VoltTable[] results = new VoltTable[] { constructResultsTable() };
results[0].addRow(m_hostId, hostname, m_siteId, tableName, 0, "NO DATA TO DISTRIBUTE", "");
final Table new_catalog_table = getCatalogTable(tableName);
Boolean needsConversion = null;
BBContainer c = null;
int c_size = 1024 * 1024;
ByteBuffer c_aggregate = ByteBuffer.allocateDirect(c_size);
try {
VoltTable table = null;
c = null;
while (hasMoreChunks()) {
c = getNextChunk();
if (c == null) {
continue; // Should be equivalent to break
}
c_aggregate.put(c.b);
}
LOG.trace("c_aggregate position :" + c_aggregate.position());
LOG.trace("c_aggregate capacity :" + c_aggregate.capacity());
if (needsConversion == null) {
VoltTable old_table = PrivateVoltTableFactory.createVoltTableFromBuffer(c_aggregate.duplicate(), true);
needsConversion = SavedTableConverter.needsConversion(old_table, new_catalog_table);
}
final VoltTable old_table = PrivateVoltTableFactory.createVoltTableFromBuffer(c_aggregate, true);
if (needsConversion) {
table = SavedTableConverter.convertTable(old_table, new_catalog_table);
} else {
table = old_table;
}
LOG.trace("createPartitionedTables :" + tableName);
VoltTable[] partitioned_tables = createPartitionedTables(tableName, table);
if (c != null) {
c.discard();
}
// LoadMultipartitionTable -- send data to all ..
int[] dependencyIds = new int[sites_to_partitions.size()];