Search in sources :

Example 1 with DriftNettyServerConfig

use of io.airlift.drift.transport.netty.server.DriftNettyServerConfig 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)

Example 2 with DriftNettyServerConfig

use of io.airlift.drift.transport.netty.server.DriftNettyServerConfig in project hetu-core by openlookeng.

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