Search in sources :

Example 1 with ThriftTpchService

use of com.facebook.presto.connector.thrift.server.ThriftTpchService in project presto by prestodb.

the class ThriftQueryRunner method startThriftServers.

private static List<DriftServer> startThriftServers(int thriftServers, boolean enableIndexJoin) {
    List<DriftServer> servers = new ArrayList<>(thriftServers);
    for (int i = 0; i < thriftServers; i++) {
        ThriftTpchService service = enableIndexJoin ? new ThriftIndexedTpchService() : new ThriftTpchService();
        DriftServer server = new DriftServer(new DriftNettyServerTransportFactory(new DriftNettyServerConfig()), CODEC_MANAGER, new NullMethodInvocationStatsFactory(), ImmutableSet.of(new DriftService(service)), ImmutableSet.of());
        server.start();
        servers.add(server);
    }
    return servers;
}
Also used : ThriftTpchService(com.facebook.presto.connector.thrift.server.ThriftTpchService) DriftNettyServerConfig(com.facebook.drift.transport.netty.server.DriftNettyServerConfig) DriftService(com.facebook.drift.server.DriftService) ThriftIndexedTpchService(com.facebook.presto.connector.thrift.server.ThriftIndexedTpchService) ArrayList(java.util.ArrayList) NullMethodInvocationStatsFactory(com.facebook.drift.server.stats.NullMethodInvocationStatsFactory) DriftServer(com.facebook.drift.server.DriftServer) DriftNettyServerTransportFactory(com.facebook.drift.transport.netty.server.DriftNettyServerTransportFactory)

Aggregations

DriftServer (com.facebook.drift.server.DriftServer)1 DriftService (com.facebook.drift.server.DriftService)1 NullMethodInvocationStatsFactory (com.facebook.drift.server.stats.NullMethodInvocationStatsFactory)1 DriftNettyServerConfig (com.facebook.drift.transport.netty.server.DriftNettyServerConfig)1 DriftNettyServerTransportFactory (com.facebook.drift.transport.netty.server.DriftNettyServerTransportFactory)1 ThriftIndexedTpchService (com.facebook.presto.connector.thrift.server.ThriftIndexedTpchService)1 ThriftTpchService (com.facebook.presto.connector.thrift.server.ThriftTpchService)1 ArrayList (java.util.ArrayList)1