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());
}
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());
}
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());
}
Aggregations