Skip to content

Commit

Permalink
[core] Fix an issue where the threadid and threadCount were not passed
Browse files Browse the repository at this point in the history
to the workload client threads. Had to use setters to get around the
checkstyle complaint of having too many parameters.
  • Loading branch information
manolama committed Aug 3, 2017
1 parent 6c20ca6 commit 2c716ac
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion core/src/main/java/com/yahoo/ycsb/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,14 @@ public ClientThread(DB db, boolean dotransactions, Workload workload, Properties
this.completeLatch = completeLatch;
}

public void setThreadId(final int threadId) {
threadid = threadId;
}

public void setThreadCount(final int threadCount) {
threadcount = threadCount;
}

public int getOpsDone() {
return opsdone;
}
Expand Down Expand Up @@ -877,7 +885,8 @@ private static List<ClientThread> initDb(String dbname, Properties props, int th

ClientThread t = new ClientThread(db, dotransactions, workload, props, threadopcount, targetperthreadperms,
completeLatch);

t.setThreadId(threadid);
t.setThreadCount(threadcount);
clients.add(t);
}

Expand Down

0 comments on commit 2c716ac

Please sign in to comment.