Search in sources :

Example 1 with InMemoryHiveMetastore

use of com.facebook.presto.hive.metastore.thrift.InMemoryHiveMetastore in project presto by prestodb.

the class TestHiveClientInMemoryMetastoreWithFilterPushdown method createMetastore.

@Override
protected ExtendedHiveMetastore createMetastore(File tempDir) {
    File baseDir = new File(tempDir, "metastore");
    InMemoryHiveMetastore hiveMetastore = new InMemoryHiveMetastore(baseDir);
    return new BridgingHiveMetastore(hiveMetastore, new HivePartitionMutator());
}
Also used : InMemoryHiveMetastore(com.facebook.presto.hive.metastore.thrift.InMemoryHiveMetastore) File(java.io.File) HivePartitionMutator(com.facebook.presto.hive.metastore.HivePartitionMutator) BridgingHiveMetastore(com.facebook.presto.hive.metastore.thrift.BridgingHiveMetastore)

Example 2 with InMemoryHiveMetastore

use of com.facebook.presto.hive.metastore.thrift.InMemoryHiveMetastore in project presto by prestodb.

the class TestHiveMetadataFileFormatEncryptionSettings method setup.

@BeforeClass
public void setup() {
    baseDirectory = new File(Files.createTempDir(), "metastore");
    metastore = new BridgingHiveMetastore(new InMemoryHiveMetastore(baseDirectory), new HivePartitionMutator());
    executor = newCachedThreadPool(daemonThreadsNamed("hive-encryption-test-%s"));
    transactionManager = new HiveTransactionManager();
    metadataFactory = new HiveMetadataFactory(metastore, HDFS_ENVIRONMENT, new HivePartitionManager(FUNCTION_AND_TYPE_MANAGER, HIVE_CLIENT_CONFIG), DateTimeZone.forTimeZone(TimeZone.getTimeZone(ZoneId.of(HIVE_CLIENT_CONFIG.getTimeZone()))), true, false, false, false, true, true, HIVE_CLIENT_CONFIG.getMaxPartitionBatchSize(), HIVE_CLIENT_CONFIG.getMaxPartitionsPerScan(), false, FUNCTION_AND_TYPE_MANAGER, new HiveLocationService(HDFS_ENVIRONMENT), FUNCTION_RESOLUTION, ROW_EXPRESSION_SERVICE, FILTER_STATS_CALCULATOR_SERVICE, new TableParameterCodec(), PARTITION_UPDATE_CODEC, PARTITION_UPDATE_SMILE_CODEC, listeningDecorator(executor), new HiveTypeTranslator(), new HiveStagingFileCommitter(HDFS_ENVIRONMENT, listeningDecorator(executor)), new HiveZeroRowFileCreator(HDFS_ENVIRONMENT, new OutputStreamDataSinkFactory(), listeningDecorator(executor)), TEST_SERVER_VERSION, new HivePartitionObjectBuilder(), new HiveEncryptionInformationProvider(ImmutableList.of(new TestDwrfEncryptionInformationSource())), new HivePartitionStats(), new HiveFileRenamer(), HiveColumnConverterProvider.DEFAULT_COLUMN_CONVERTER_PROVIDER);
    metastore.createDatabase(METASTORE_CONTEXT, Database.builder().setDatabaseName(TEST_DB_NAME).setOwnerName("public").setOwnerType(PrincipalType.ROLE).build());
}
Also used : OutputStreamDataSinkFactory(com.facebook.presto.hive.datasink.OutputStreamDataSinkFactory) HivePartitionMutator(com.facebook.presto.hive.metastore.HivePartitionMutator) InMemoryHiveMetastore(com.facebook.presto.hive.metastore.thrift.InMemoryHiveMetastore) File(java.io.File) BridgingHiveMetastore(com.facebook.presto.hive.metastore.thrift.BridgingHiveMetastore) BeforeClass(org.testng.annotations.BeforeClass)

Example 3 with InMemoryHiveMetastore

use of com.facebook.presto.hive.metastore.thrift.InMemoryHiveMetastore in project presto by prestodb.

the class TestHiveClientInMemoryMetastore method createMetastore.

@Override
protected ExtendedHiveMetastore createMetastore(File tempDir) {
    File baseDir = new File(tempDir, "metastore");
    InMemoryHiveMetastore hiveMetastore = new InMemoryHiveMetastore(baseDir);
    return new BridgingHiveMetastore(hiveMetastore, new HivePartitionMutator());
}
Also used : InMemoryHiveMetastore(com.facebook.presto.hive.metastore.thrift.InMemoryHiveMetastore) File(java.io.File) HivePartitionMutator(com.facebook.presto.hive.metastore.HivePartitionMutator) BridgingHiveMetastore(com.facebook.presto.hive.metastore.thrift.BridgingHiveMetastore)

Aggregations

HivePartitionMutator (com.facebook.presto.hive.metastore.HivePartitionMutator)3 BridgingHiveMetastore (com.facebook.presto.hive.metastore.thrift.BridgingHiveMetastore)3 InMemoryHiveMetastore (com.facebook.presto.hive.metastore.thrift.InMemoryHiveMetastore)3 File (java.io.File)3 OutputStreamDataSinkFactory (com.facebook.presto.hive.datasink.OutputStreamDataSinkFactory)1 BeforeClass (org.testng.annotations.BeforeClass)1