use of io.prestosql.plugin.hive.metastore.CachingHiveMetastore in project boostkit-bigdata by kunpengcompute.
the class AbstractTestHive method setup.
protected final void setup(String host, int port, String databaseName, String timeZone) {
HiveConfig hiveConfig = getHiveConfig().setParquetTimeZone(timeZone).setRcfileTimeZone(timeZone);
String proxy = System.getProperty("hive.metastore.thrift.client.socks-proxy");
if (proxy != null) {
hiveConfig.setMetastoreSocksProxy(HostAndPort.fromString(proxy));
}
MetastoreLocator metastoreLocator = new TestingMetastoreLocator(hiveConfig, host, port);
HiveMetastore metastore = new CachingHiveMetastore(new BridgingHiveMetastore(new ThriftHiveMetastore(metastoreLocator, new ThriftHiveMetastoreConfig())), executor, executorRefresh, Duration.valueOf("1m"), Duration.valueOf("15s"), Duration.valueOf("1m"), Duration.valueOf("15s"), 10000, false);
setup(databaseName, hiveConfig, metastore);
}
use of io.prestosql.plugin.hive.metastore.CachingHiveMetastore in project boostkit-bigdata by kunpengcompute.
the class TestHiveWriterFactory method setUp.
private void setUp() {
mockClient = new MockThriftMetastoreClient();
executor = newCachedThreadPool(daemonThreadsNamed("hive-%s"));
executorRefresh = newCachedThreadPool(daemonThreadsNamed("hive-refresh-%s"));
MetastoreLocator metastoreLocator = new MockMetastoreLocator(mockClient);
metastore = new CachingHiveMetastore(new BridgingHiveMetastore(new ThriftHiveMetastore(metastoreLocator, new ThriftHiveMetastoreConfig())), executor, executorRefresh, Duration.valueOf("1m"), Duration.valueOf("15s"), Duration.valueOf("1m"), Duration.valueOf("15s"), 10000, false);
}
use of io.prestosql.plugin.hive.metastore.CachingHiveMetastore in project hetu-core by openlookeng.
the class TestHiveWriterFactory method setUp.
private void setUp() {
mockClient = new MockThriftMetastoreClient();
executor = newCachedThreadPool(daemonThreadsNamed("hive-%s"));
executorRefresh = newCachedThreadPool(daemonThreadsNamed("hive-refresh-%s"));
MetastoreLocator metastoreLocator = new MockMetastoreLocator(mockClient);
metastore = new CachingHiveMetastore(new BridgingHiveMetastore(new ThriftHiveMetastore(metastoreLocator, new ThriftHiveMetastoreConfig())), executor, executorRefresh, Duration.valueOf("1m"), Duration.valueOf("15s"), Duration.valueOf("1m"), Duration.valueOf("15s"), 10000, false);
}
use of io.prestosql.plugin.hive.metastore.CachingHiveMetastore in project hetu-core by openlookeng.
the class AbstractTestHive method setup.
protected final void setup(String host, int port, String databaseName, String timeZone) {
HiveConfig hiveConfig = getHiveConfig().setParquetTimeZone(timeZone).setRcfileTimeZone(timeZone);
String proxy = System.getProperty("hive.metastore.thrift.client.socks-proxy");
if (proxy != null) {
hiveConfig.setMetastoreSocksProxy(HostAndPort.fromString(proxy));
}
MetastoreLocator metastoreLocator = new TestingMetastoreLocator(hiveConfig, host, port);
HiveMetastore metastore = new CachingHiveMetastore(new BridgingHiveMetastore(new ThriftHiveMetastore(metastoreLocator, new ThriftHiveMetastoreConfig())), executor, executorRefresh, Duration.valueOf("1m"), Duration.valueOf("15s"), Duration.valueOf("1m"), Duration.valueOf("15s"), 10000, false);
setup(databaseName, hiveConfig, metastore);
}
Aggregations