diff --git a/core/src/main/java/com/yahoo/ycsb/Client.java b/core/src/main/java/com/yahoo/ycsb/Client.java index 2a56ba5b00..1bdf44e4b8 100644 --- a/core/src/main/java/com/yahoo/ycsb/Client.java +++ b/core/src/main/java/com/yahoo/ycsb/Client.java @@ -418,7 +418,10 @@ private static List initDb(String dbname, Properties props, int th opcount = Integer.parseInt(props.getProperty(RECORD_COUNT_PROPERTY, DEFAULT_RECORD_COUNT)); } } - + if (threadcount > opcount){ + threadcount = opcount; + System.out.println("Warning: the threadcount is bigger than recordcount, the threadcount will be recordcount!"); + } for (int threadid = 0; threadid < threadcount; threadid++) { DB db; try {