use of com.facebook.presto.hive.metastore.HivePageSinkMetadataProvider in project presto by prestodb.
the class HivePageSinkProvider method createPageSink.
private ConnectorPageSink createPageSink(HiveWritableTableHandle handle, boolean isCreateTable, ConnectorSession session) {
OptionalInt bucketCount = handle.getBucketProperty().isPresent() ? OptionalInt.of(handle.getBucketProperty().get().getBucketCount()) : OptionalInt.empty();
HiveWriterFactory writerFactory = new HiveWriterFactory(fileWriterFactories, handle.getSchemaName(), handle.getTableName(), isCreateTable, handle.getInputColumns(), handle.getTableStorageFormat(), handle.getPartitionStorageFormat(), bucketCount, handle.getLocationHandle(), locationService, handle.getFilePrefix(), new HivePageSinkMetadataProvider(handle.getPageSinkMetadata(), metastore), typeManager, hdfsEnvironment, immutablePartitions, session);
return new HivePageSink(writerFactory, handle.getInputColumns(), handle.getBucketProperty(), pageIndexerFactory, typeManager, hdfsEnvironment, maxOpenPartitions, writeVerificationExecutor, partitionUpdateCodec, session);
}
Aggregations