Mercurial > hg > Database > Christie
changeset 173:6ea1f8958d1a
fix proposal
author | akahori |
---|---|
date | Fri, 25 Jan 2019 17:14:51 +0900 |
parents | 2068aa841a4d |
children | 9b0c4774f355 |
files | src/main/java/christie/test/topology/paxos/Proposal.java src/main/java/christie/test/topology/paxos/learner/AggregateProposalCodeGear.java |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/christie/test/topology/paxos/Proposal.java Fri Jan 25 16:56:21 2019 +0900 +++ b/src/main/java/christie/test/topology/paxos/Proposal.java Fri Jan 25 17:14:51 2019 +0900 @@ -84,5 +84,10 @@ return false; } + public String toString() { + return "Proposal : number = " + number + ", value = " + value; + } + + }
--- a/src/main/java/christie/test/topology/paxos/learner/AggregateProposalCodeGear.java Fri Jan 25 16:56:21 2019 +0900 +++ b/src/main/java/christie/test/topology/paxos/learner/AggregateProposalCodeGear.java Fri Jan 25 17:14:51 2019 +0900 @@ -22,7 +22,7 @@ int count = proposalValueMap.get(value).intValue(); count++; if(count > proposal.getAcceptorNum()/2) { - System.out.println(value); + System.out.println(proposal); break; } proposalValueMap.replace(value, count);