Search in sources :

Example 1 with PartitionScanExecutor

use of com.hazelcast.map.impl.query.PartitionScanExecutor in project hazelcast by hazelcast.

the class MapServiceContextImpl method createMapQueryRunner.

protected QueryRunner createMapQueryRunner(NodeEngine nodeEngine, QueryOptimizer queryOptimizer, ResultProcessorRegistry resultProcessorRegistry, PartitionScanRunner partitionScanRunner) {
    boolean parallelEvaluation = nodeEngine.getProperties().getBoolean(QUERY_PREDICATE_PARALLEL_EVALUATION);
    PartitionScanExecutor partitionScanExecutor;
    if (parallelEvaluation) {
        int opTimeoutInMillis = nodeEngine.getProperties().getInteger(OPERATION_CALL_TIMEOUT_MILLIS);
        ManagedExecutorService queryExecutorService = nodeEngine.getExecutionService().getExecutor(QUERY_EXECUTOR);
        partitionScanExecutor = new ParallelPartitionScanExecutor(partitionScanRunner, queryExecutorService, opTimeoutInMillis);
    } else {
        partitionScanExecutor = new CallerRunsPartitionScanExecutor(partitionScanRunner);
    }
    return new QueryRunner(this, queryOptimizer, partitionScanExecutor, resultProcessorRegistry);
}
Also used : ManagedExecutorService(com.hazelcast.util.executor.ManagedExecutorService) CallerRunsPartitionScanExecutor(com.hazelcast.map.impl.query.CallerRunsPartitionScanExecutor) ParallelPartitionScanExecutor(com.hazelcast.map.impl.query.ParallelPartitionScanExecutor) PartitionScanExecutor(com.hazelcast.map.impl.query.PartitionScanExecutor) ParallelPartitionScanExecutor(com.hazelcast.map.impl.query.ParallelPartitionScanExecutor) CallerRunsPartitionScanExecutor(com.hazelcast.map.impl.query.CallerRunsPartitionScanExecutor) QueryRunner(com.hazelcast.map.impl.query.QueryRunner)

Aggregations

CallerRunsPartitionScanExecutor (com.hazelcast.map.impl.query.CallerRunsPartitionScanExecutor)1 ParallelPartitionScanExecutor (com.hazelcast.map.impl.query.ParallelPartitionScanExecutor)1 PartitionScanExecutor (com.hazelcast.map.impl.query.PartitionScanExecutor)1 QueryRunner (com.hazelcast.map.impl.query.QueryRunner)1 ManagedExecutorService (com.hazelcast.util.executor.ManagedExecutorService)1