Search in sources :

Example 1 with CachingHiveMetastore

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);
}
Also used : CachingHiveMetastore(com.facebook.presto.hive.metastore.CachingHiveMetastore) ThriftHiveMetastore(com.facebook.presto.hive.metastore.ThriftHiveMetastore) ExtendedHiveMetastore(com.facebook.presto.hive.metastore.ExtendedHiveMetastore) BridgingHiveMetastore(com.facebook.presto.hive.metastore.BridgingHiveMetastore)

Aggregations

BridgingHiveMetastore (com.facebook.presto.hive.metastore.BridgingHiveMetastore)1 CachingHiveMetastore (com.facebook.presto.hive.metastore.CachingHiveMetastore)1 ExtendedHiveMetastore (com.facebook.presto.hive.metastore.ExtendedHiveMetastore)1 ThriftHiveMetastore (com.facebook.presto.hive.metastore.ThriftHiveMetastore)1