Search in sources :

Example 1 with HiveMetastoreClient

use of com.facebook.presto.hive.metastore.HiveMetastoreClient in project presto by prestodb.

the class MockHiveMetastoreClientFactory method create.

@Override
public HiveMetastoreClient create(String host, int port) throws TTransportException {
    checkState(!clients.isEmpty(), "mock not given enough clients");
    HiveMetastoreClient client = clients.remove(0);
    if (client == null) {
        throw new TTransportException(TTransportException.TIMED_OUT);
    }
    return client;
}
Also used : TTransportException(org.apache.thrift.transport.TTransportException) HiveMetastoreClient(com.facebook.presto.hive.metastore.HiveMetastoreClient)

Aggregations

HiveMetastoreClient (com.facebook.presto.hive.metastore.HiveMetastoreClient)1 TTransportException (org.apache.thrift.transport.TTransportException)1