use of com.linkedin.pinot.server.starter.ServerBuilder in project pinot by linkedin.
the class InstanceServerStarter method main.
public static void main(String[] args) throws Exception {
File confDir = new File(InstanceServerStarter.class.getClassLoader().getResource("conf").toURI());
LOGGER.info("Trying to build server config");
MetricsRegistry metricsRegistry = new MetricsRegistry();
ServerBuilder serverBuilder = new ServerBuilder(confDir.getAbsolutePath(), 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);
QueryScheduler queryScheduler = serverBuilder.buildQueryScheduler(queryExecutor);
RequestHandlerFactory simpleRequestHandlerFactory = serverBuilder.buildRequestHandlerFactory(queryScheduler);
LOGGER.info("Trying to build NettyServer");
System.out.println(getMaxQuery());
String queryJson = "";
System.out.println(getCountQuery().toString());
sendQueryToQueryExecutor(getCountQuery(), queryExecutor, queryScheduler, serverBuilder.getServerMetrics());
sendQueryToQueryExecutor(getSumQuery(), queryExecutor, queryScheduler, serverBuilder.getServerMetrics());
sendQueryToQueryExecutor(getMaxQuery(), queryExecutor, queryScheduler, serverBuilder.getServerMetrics());
sendQueryToQueryExecutor(getMinQuery(), queryExecutor, queryScheduler, serverBuilder.getServerMetrics());
LOGGER.info("Trying to build RequestHandlerFactory");
}
Aggregations