Search in sources :

Example 1 with CachingHiveMetastore

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);
}
Also used : TestingMetastoreLocator(io.prestosql.plugin.hive.metastore.thrift.TestingMetastoreLocator) CachingHiveMetastore(io.prestosql.plugin.hive.metastore.CachingHiveMetastore) ThriftHiveMetastore(io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastore) CachingHiveMetastore(io.prestosql.plugin.hive.metastore.CachingHiveMetastore) SemiTransactionalHiveMetastore(io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore) HiveMetastore(io.prestosql.plugin.hive.metastore.HiveMetastore) BridgingHiveMetastore(io.prestosql.plugin.hive.metastore.thrift.BridgingHiveMetastore) ThriftHiveMetastore(io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastore) MetastoreLocator(io.prestosql.plugin.hive.metastore.thrift.MetastoreLocator) TestingMetastoreLocator(io.prestosql.plugin.hive.metastore.thrift.TestingMetastoreLocator) ThriftHiveMetastoreConfig(io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastoreConfig) BridgingHiveMetastore(io.prestosql.plugin.hive.metastore.thrift.BridgingHiveMetastore)

Example 2 with CachingHiveMetastore

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);
}
Also used : MockThriftMetastoreClient(io.prestosql.plugin.hive.metastore.thrift.MockThriftMetastoreClient) CachingHiveMetastore(io.prestosql.plugin.hive.metastore.CachingHiveMetastore) ThriftHiveMetastore(io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastore) MetastoreLocator(io.prestosql.plugin.hive.metastore.thrift.MetastoreLocator) ThriftHiveMetastoreConfig(io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastoreConfig) BridgingHiveMetastore(io.prestosql.plugin.hive.metastore.thrift.BridgingHiveMetastore)

Example 3 with CachingHiveMetastore

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);
}
Also used : MockThriftMetastoreClient(io.prestosql.plugin.hive.metastore.thrift.MockThriftMetastoreClient) CachingHiveMetastore(io.prestosql.plugin.hive.metastore.CachingHiveMetastore) ThriftHiveMetastore(io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastore) MetastoreLocator(io.prestosql.plugin.hive.metastore.thrift.MetastoreLocator) ThriftHiveMetastoreConfig(io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastoreConfig) BridgingHiveMetastore(io.prestosql.plugin.hive.metastore.thrift.BridgingHiveMetastore)

Example 4 with CachingHiveMetastore

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);
}
Also used : TestingMetastoreLocator(io.prestosql.plugin.hive.metastore.thrift.TestingMetastoreLocator) CachingHiveMetastore(io.prestosql.plugin.hive.metastore.CachingHiveMetastore) ThriftHiveMetastore(io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastore) CachingHiveMetastore(io.prestosql.plugin.hive.metastore.CachingHiveMetastore) SemiTransactionalHiveMetastore(io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore) HiveMetastore(io.prestosql.plugin.hive.metastore.HiveMetastore) BridgingHiveMetastore(io.prestosql.plugin.hive.metastore.thrift.BridgingHiveMetastore) ThriftHiveMetastore(io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastore) MetastoreLocator(io.prestosql.plugin.hive.metastore.thrift.MetastoreLocator) TestingMetastoreLocator(io.prestosql.plugin.hive.metastore.thrift.TestingMetastoreLocator) ThriftHiveMetastoreConfig(io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastoreConfig) BridgingHiveMetastore(io.prestosql.plugin.hive.metastore.thrift.BridgingHiveMetastore)

Aggregations

CachingHiveMetastore (io.prestosql.plugin.hive.metastore.CachingHiveMetastore)4 BridgingHiveMetastore (io.prestosql.plugin.hive.metastore.thrift.BridgingHiveMetastore)4 MetastoreLocator (io.prestosql.plugin.hive.metastore.thrift.MetastoreLocator)4 ThriftHiveMetastore (io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastore)4 ThriftHiveMetastoreConfig (io.prestosql.plugin.hive.metastore.thrift.ThriftHiveMetastoreConfig)4 HiveMetastore (io.prestosql.plugin.hive.metastore.HiveMetastore)2 SemiTransactionalHiveMetastore (io.prestosql.plugin.hive.metastore.SemiTransactionalHiveMetastore)2 MockThriftMetastoreClient (io.prestosql.plugin.hive.metastore.thrift.MockThriftMetastoreClient)2 TestingMetastoreLocator (io.prestosql.plugin.hive.metastore.thrift.TestingMetastoreLocator)2