Search in sources :

Example 1 with ThriftIndexedTpchService

use of io.trino.plugin.thrift.server.ThriftIndexedTpchService in project trino by trinodb.

the class ThriftQueryRunner method startThriftServers.

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(io.trino.plugin.thrift.server.ThriftTpchService) DriftNettyServerConfig(io.airlift.drift.transport.netty.server.DriftNettyServerConfig) DriftService(io.airlift.drift.server.DriftService) ThriftIndexedTpchService(io.trino.plugin.thrift.server.ThriftIndexedTpchService) ArrayList(java.util.ArrayList) NullMethodInvocationStatsFactory(io.airlift.drift.server.stats.NullMethodInvocationStatsFactory) DriftServer(io.airlift.drift.server.DriftServer) DriftNettyServerTransportFactory(io.airlift.drift.transport.netty.server.DriftNettyServerTransportFactory)

Aggregations

DriftServer (io.airlift.drift.server.DriftServer)1 DriftService (io.airlift.drift.server.DriftService)1 NullMethodInvocationStatsFactory (io.airlift.drift.server.stats.NullMethodInvocationStatsFactory)1 DriftNettyServerConfig (io.airlift.drift.transport.netty.server.DriftNettyServerConfig)1 DriftNettyServerTransportFactory (io.airlift.drift.transport.netty.server.DriftNettyServerTransportFactory)1 ThriftIndexedTpchService (io.trino.plugin.thrift.server.ThriftIndexedTpchService)1 ThriftTpchService (io.trino.plugin.thrift.server.ThriftTpchService)1 ArrayList (java.util.ArrayList)1