public void start() throws InterruptedException, IOException {
Map<String, Object> context = new HashMap<String, Object>();
context.put("qnodes", qNodes);
Map<Integer, Long> rowIdsPerPartition = new HashMap<Integer, Long>();
context.put("rowIdsPerPartition", rowIdsPerPartition);
SploutClient client = new SploutClient(((String) context.get("qnodes")).split(","));
Tablespace tablespace = client.tablespace(TABLESPACE);
int nPartitions = tablespace.getPartitionMap().getPartitionEntries().size();
for (int partition = 0; partition < nPartitions; partition++) {
String query = "SELECT MAX(rowid) FROM pagecounts;";
Map<String, Object> obj = (Map<String, Object>) client
.query(TABLESPACE, null, query, partition + "").getResult().get(0);
rowIdsPerPartition.put(partition, Long.parseLong(obj.get("MAX(rowid)").toString()));
}
SploutBenchmark benchmark = new SploutBenchmark();
for (int i = 0; i < nIterations; i++) {
benchmark.stressTest(nThreads, nQueries, PageCountsStressThreadImpl.class, context);
benchmark.printStats(System.out);
}
}