while (tableStats.advanceRow()) {
if (!tableStats.getString("TABLE_NAME").equalsIgnoreCase("timedata")) {
continue;
}
PartitionInfo pinfo = new PartitionInfo();
long partitionId = tableStats.getLong("PARTITION_ID");
pinfo.tupleCount = tableStats.getLong("TUPLE_COUNT");
pinfo.partitionKey = null;
// If redundancy (k-safety) is enabled, this will put k+1 times per partition,
// but the tuple count will be the same so it will be ok.
partitionData.put(partitionId, pinfo);
}
while (partitionKeys.advanceRow()) {
long partitionId = partitionKeys.getLong("PARTITION_ID");
PartitionInfo pinfo = partitionData.get(partitionId);
if (pinfo == null) {
// The set of partitions from the two calls don't match.
// Try again next time this is called... Maybe things
// will have settled down.
return;