Search in sources :

Example 1 with MockThriftMetastoreClient

use of io.trino.plugin.hive.metastore.thrift.MockThriftMetastoreClient in project trino by trinodb.

the class TestCachingHiveMetastore method setUp.

@BeforeMethod
public void setUp() {
    mockClient = new MockThriftMetastoreClient();
    ThriftHiveMetastore thriftHiveMetastore = createThriftHiveMetastore();
    executor = listeningDecorator(newCachedThreadPool(daemonThreadsNamed(getClass().getSimpleName() + "-%s")));
    metastore = cachingHiveMetastore(new BridgingHiveMetastore(thriftHiveMetastore, IDENTITY), executor, new Duration(5, TimeUnit.MINUTES), Optional.of(new Duration(1, TimeUnit.MINUTES)), 1000);
    stats = thriftHiveMetastore.getStats();
}
Also used : MockThriftMetastoreClient(io.trino.plugin.hive.metastore.thrift.MockThriftMetastoreClient) ThriftHiveMetastore(io.trino.plugin.hive.metastore.thrift.ThriftHiveMetastore) Duration(io.airlift.units.Duration) BridgingHiveMetastore(io.trino.plugin.hive.metastore.thrift.BridgingHiveMetastore) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

Duration (io.airlift.units.Duration)1 BridgingHiveMetastore (io.trino.plugin.hive.metastore.thrift.BridgingHiveMetastore)1 MockThriftMetastoreClient (io.trino.plugin.hive.metastore.thrift.MockThriftMetastoreClient)1 ThriftHiveMetastore (io.trino.plugin.hive.metastore.thrift.ThriftHiveMetastore)1 BeforeMethod (org.testng.annotations.BeforeMethod)1