Map<Integer, Long> rowIdsPerPartition = new HashMap<Integer, Long>();
context.put("rowIdsPerPartition", rowIdsPerPartition);
// First get Tablespace metadata - nPartitions
SploutClient client = new SploutClient(((String) context.get("qnodes")).split(","));
Tablespace tablespace = client.tablespace(TABLESPACE);
int nPartitions = tablespace.getPartitionMap().getPartitionEntries().size();
// Then gather number of registers for each partition
for(int partition = 0; partition < nPartitions; partition++) {
String query = "SELECT MAX(rowid) FROM pagecounts;";