Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Remove clientId references

  • Loading branch information...
commit f881f1c18c87cc522b6d652eddbc65984a90d10b 1 parent ea2342d
Daniel Gómez Ferro authored
3  src/main/java/com/yahoo/pasc/paxos/client/ClientState.java
@@ -39,8 +39,7 @@
39 39 private int from;
40 40 ReplyStore replyStore;
41 41
42   - public ClientState(int clientId, int servers, int quorum, int inlineThreshold, int asyncMessages) {
43   - this.clientId = clientId;
  42 + public ClientState(int servers, int quorum, int inlineThreshold, int asyncMessages) {
44 43 this.servers = servers;
45 44 this.quorum = quorum;
46 45 this.inlineThreshold = inlineThreshold;
5 src/main/java/com/yahoo/pasc/paxos/client/PaxosClient.java
@@ -111,8 +111,7 @@ public static void main(String[] args) throws Exception {
111 111 Random rnd = new Random();
112 112
113 113 for (int i = 0; i < buffer; ++ i) {
114   - int clientId = clientIds++;
115   - ClientState clientState = new ClientState(clientId, servers, quorum, inlineThreshold, asynSize);
  114 + ClientState clientState = new ClientState(servers, quorum, inlineThreshold, asynSize);
116 115 final PascRuntime<ClientState> runtime = new PascRuntime<ClientState>(protection);
117 116 runtime.setState(clientState);
118 117 runtime.addHandler(ServerHello.class, shello);
@@ -124,7 +123,7 @@ public static void main(String[] args) throws Exception {
124 123 runtime.addHandler(Hello.class, hello);
125 124
126 125 final PaxosClientHandler handler = new PaxosClientHandler(runtime, new SimpleClient(requestSize),
127   - serverHosts, clientId, clients, timeout, zkConnection, executor);
  126 + serverHosts, clients, timeout, zkConnection, executor);
128 127
129 128 if (line.hasOption('w')) handler.setWarmup(Integer.parseInt(line.getOptionValue('w')));
130 129 if (line.hasOption('m')) handler.setMeasuringTime(Integer.parseInt(line.getOptionValue('m')));
3  src/main/java/com/yahoo/pasc/paxos/client/PaxosClientHandler.java
@@ -95,9 +95,8 @@
95 95 * @throws IOException
96 96 */
97 97 public PaxosClientHandler(final PascRuntime<ClientState> runtime, ClientInterface clientInterface, String[] servers,
98   - int clientId, int clients, int timeout, String zkConnection, final ExecutionHandler executor)
  98 + int clients, int timeout, String zkConnection, final ExecutionHandler executor)
99 99 throws IOException {
100   - this.clientId = clientId;
101 100 this.clients = clients;
102 101 this.timeout = timeout;
103 102 this.zk = new ZooKeeper(zkConnection, 5000, this);

0 comments on commit f881f1c

Please sign in to comment.
Something went wrong with that request. Please try again.