use of com.facebook.presto.hive.metastore.CachingHiveMetastore in project presto by prestodb.
the class AbstractTestHiveClient method setup.
protected final void setup(String host, int port, String databaseName, String timeZone) {
HiveClientConfig hiveClientConfig = new HiveClientConfig();
hiveClientConfig.setTimeZone(timeZone);
String proxy = System.getProperty("hive.metastore.thrift.client.socks-proxy");
if (proxy != null) {
hiveClientConfig.setMetastoreSocksProxy(HostAndPort.fromString(proxy));
}
HiveCluster hiveCluster = new TestingHiveCluster(hiveClientConfig, host, port);
ExtendedHiveMetastore metastore = new CachingHiveMetastore(new BridgingHiveMetastore(new ThriftHiveMetastore(hiveCluster)), executor, Duration.valueOf("1m"), Duration.valueOf("15s"), 10000);
setup(databaseName, hiveClientConfig, metastore);
}
Aggregations