Search in sources :

Example 1 with HivePageSinkMetadataProvider

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);
}
Also used : HivePageSinkMetadataProvider(com.facebook.presto.hive.metastore.HivePageSinkMetadataProvider) OptionalInt(java.util.OptionalInt)

Aggregations

HivePageSinkMetadataProvider (com.facebook.presto.hive.metastore.HivePageSinkMetadataProvider)1 OptionalInt (java.util.OptionalInt)1