Search in sources :

Example 1 with NettyServer

use of com.linkedin.pinot.transport.netty.NettyServer in project pinot by linkedin.

the class ServerBuilder method buildNettyServer.

public NettyServer buildNettyServer(NettyServerConfig nettyServerConfig, RequestHandlerFactory requestHandlerFactory) {
    LOGGER.info("Trying to build NettyTCPServer with port : " + nettyServerConfig.getPort());
    NettyServer nettyServer = new NettyTCPServer(nettyServerConfig.getPort(), requestHandlerFactory, null);
    return nettyServer;
}
Also used : NettyTCPServer(com.linkedin.pinot.transport.netty.NettyTCPServer) NettyServer(com.linkedin.pinot.transport.netty.NettyServer)

Example 2 with NettyServer

use of com.linkedin.pinot.transport.netty.NettyServer in project pinot by linkedin.

the class FileBasedServer method main.

public static void main(String[] args) throws Exception {
    //Process Command Line to get config and port
    processCommandLineArgs(args);
    LOGGER.info("Trying to build server config");
    MetricsRegistry metricsRegistry = new MetricsRegistry();
    ServerBuilder serverBuilder = new ServerBuilder(new File(_serverConfigPath), metricsRegistry);
    LOGGER.info("Trying to build InstanceDataManager");
    final DataManager instanceDataManager = serverBuilder.buildInstanceDataManager();
    LOGGER.info("Trying to start InstanceDataManager");
    instanceDataManager.start();
    //    bootstrapSegments(instanceDataManager);
    LOGGER.info("Trying to build QueryExecutor");
    final QueryExecutor queryExecutor = serverBuilder.buildQueryExecutor(instanceDataManager);
    final QueryScheduler queryScheduler = serverBuilder.buildQueryScheduler(queryExecutor);
    LOGGER.info("Trying to build RequestHandlerFactory");
    RequestHandlerFactory simpleRequestHandlerFactory = serverBuilder.buildRequestHandlerFactory(queryScheduler);
    LOGGER.info("Trying to build NettyServer");
    NettyServer nettyServer = new NettyTCPServer(_serverPort, simpleRequestHandlerFactory, null);
    Thread serverThread = new Thread(nettyServer);
    ShutdownHook shutdownHook = new ShutdownHook(nettyServer);
    serverThread.start();
    Runtime.getRuntime().addShutdownHook(shutdownHook);
}
Also used : MetricsRegistry(com.yammer.metrics.core.MetricsRegistry) QueryScheduler(com.linkedin.pinot.core.query.scheduler.QueryScheduler) QueryExecutor(com.linkedin.pinot.common.query.QueryExecutor) RequestHandlerFactory(com.linkedin.pinot.transport.netty.NettyServer.RequestHandlerFactory) DataManager(com.linkedin.pinot.common.data.DataManager) NettyTCPServer(com.linkedin.pinot.transport.netty.NettyTCPServer) File(java.io.File) NettyServer(com.linkedin.pinot.transport.netty.NettyServer)

Aggregations

NettyServer (com.linkedin.pinot.transport.netty.NettyServer)2 NettyTCPServer (com.linkedin.pinot.transport.netty.NettyTCPServer)2 DataManager (com.linkedin.pinot.common.data.DataManager)1 QueryExecutor (com.linkedin.pinot.common.query.QueryExecutor)1 QueryScheduler (com.linkedin.pinot.core.query.scheduler.QueryScheduler)1 RequestHandlerFactory (com.linkedin.pinot.transport.netty.NettyServer.RequestHandlerFactory)1 MetricsRegistry (com.yammer.metrics.core.MetricsRegistry)1 File (java.io.File)1