use of io.questdb.cairo.ColumnIndexerJob in project questdb by bluestreak01.
the class HttpServer method addDefaultEndpoints.
public static void addDefaultEndpoints(HttpServer server, HttpServerConfiguration configuration, CairoEngine cairoEngine, WorkerPool workerPool, HttpRequestProcessorBuilder jsonQueryProcessorBuilder, FunctionFactoryCache functionFactoryCache) {
server.bind(new HttpRequestProcessorFactory() {
@Override
public HttpRequestProcessor newInstance() {
return jsonQueryProcessorBuilder.newInstance();
}
@Override
public String getUrl() {
return "/exec";
}
});
server.bind(new HttpRequestProcessorFactory() {
@Override
public HttpRequestProcessor newInstance() {
return new TextImportProcessor(cairoEngine);
}
@Override
public String getUrl() {
return "/imp";
}
});
server.bind(new HttpRequestProcessorFactory() {
@Override
public HttpRequestProcessor newInstance() {
return new TextQueryProcessor(configuration.getJsonQueryProcessorConfiguration(), cairoEngine, workerPool.getWorkerCount(), functionFactoryCache);
}
@Override
public String getUrl() {
return "/exp";
}
});
server.bind(new HttpRequestProcessorFactory() {
@Override
public HttpRequestProcessor newInstance() {
return new TableStatusCheckProcessor(cairoEngine, configuration.getJsonQueryProcessorConfiguration());
}
@Override
public String getUrl() {
return "/chk";
}
});
server.bind(new HttpRequestProcessorFactory() {
@Override
public HttpRequestProcessor newInstance() {
return new StaticContentProcessor(configuration);
}
@Override
public String getUrl() {
return HttpServerConfiguration.DEFAULT_PROCESSOR_URL;
}
});
// jobs that help parallel execution of queries
workerPool.assign(new ColumnIndexerJob(cairoEngine.getMessageBus()));
workerPool.assign(new GroupByJob(cairoEngine.getMessageBus()));
workerPool.assign(new LatestByAllIndexedJob(cairoEngine.getMessageBus()));
}
Aggregations