use of io.trino.plugin.hive.metastore.MetastoreConfig in project trino by trinodb.
the class TestConnectorPushdownRulesWithHive method createLocalQueryRunner.
@Override
protected Optional<LocalQueryRunner> createLocalQueryRunner() {
baseDir = Files.createTempDir();
HdfsConfig config = new HdfsConfig();
HdfsConfiguration configuration = new HiveHdfsConfiguration(new HdfsConfigurationInitializer(config), ImmutableSet.of());
HdfsEnvironment environment = new HdfsEnvironment(configuration, config, new NoHdfsAuthentication());
metastore = new FileHiveMetastore(new NodeVersion("test_version"), environment, new MetastoreConfig(), new FileHiveMetastoreConfig().setCatalogDirectory(baseDir.toURI().toString()).setMetastoreUser("test"));
Database database = Database.builder().setDatabaseName(SCHEMA_NAME).setOwnerName(Optional.of("public")).setOwnerType(Optional.of(PrincipalType.ROLE)).build();
metastore.createDatabase(database);
LocalQueryRunner queryRunner = LocalQueryRunner.create(HIVE_SESSION);
queryRunner.createCatalog(HIVE_CATALOG_NAME, new TestingHiveConnectorFactory(metastore), ImmutableMap.of());
return Optional.of(queryRunner);
}
use of io.trino.plugin.hive.metastore.MetastoreConfig in project trino by trinodb.
the class TestHiveGlueMetastore method createMetastore.
@Override
protected HiveMetastore createMetastore(File tempDir, HiveIdentity identity) {
GlueHiveMetastoreConfig glueConfig = new GlueHiveMetastoreConfig();
glueConfig.setDefaultWarehouseDir(tempDir.toURI().toString());
glueConfig.setAssumeCanonicalPartitionKeys(true);
Executor executor = new BoundedExecutor(this.executor, 10);
return new GlueHiveMetastore(HDFS_ENVIRONMENT, glueConfig, executor, new DefaultGlueColumnStatisticsProviderFactory(glueConfig, executor, executor), Optional.empty(), new DefaultGlueMetastoreTableFilterProvider(new MetastoreConfig().setHideDeltaLakeTables(true)).get());
}
Aggregations