use of com.facebook.presto.raptor.metadata.TableMetadata in project presto by prestodb.
the class OrganizationJob method runJob.
private void runJob(long transactionId, OptionalInt bucketNumber, long tableId, Set<UUID> shardUuids) throws IOException {
TableMetadata metadata = getTableMetadata(tableId);
List<ShardInfo> newShards = performCompaction(transactionId, bucketNumber, shardUuids, metadata);
log.info("Compacted shards %s into %s", shardUuids, newShards.stream().map(ShardInfo::getShardUuid).collect(toList()));
shardManager.replaceShardUuids(transactionId, tableId, metadata.getColumns(), shardUuids, newShards, OptionalLong.empty());
}
use of com.facebook.presto.raptor.metadata.TableMetadata in project presto by prestodb.
the class OrganizationJob method runJob.
private void runJob(long transactionId, boolean tableSupportsDeltaDelete, OptionalInt bucketNumber, long tableId, Map<UUID, Optional<UUID>> shardUuidsMap) throws IOException {
TableMetadata metadata = getTableMetadata(tableId);
List<ShardInfo> newShards = performCompaction(transactionId, tableSupportsDeltaDelete, bucketNumber, shardUuidsMap, metadata);
log.info("Compacted shards %s into %s for table: %s", shardUuidsMap, newShards.stream().map(ShardInfo::getShardUuid).collect(toList()), tableId);
// TODO: Will merge these new function with old function once new feature is stable
if (tableSupportsDeltaDelete) {
shardManager.replaceShardUuids(transactionId, tableId, metadata.getColumns(), shardUuidsMap, newShards, OptionalLong.empty(), true);
} else {
shardManager.replaceShardUuids(transactionId, tableId, metadata.getColumns(), shardUuidsMap.keySet(), newShards, OptionalLong.empty());
}
}
Aggregations