Package org.apache.druid.query
Interface QueryProcessingPool
-
- All Superinterfaces:
Executor
,ExecutorService
,com.google.common.util.concurrent.ListeningExecutorService
- All Known Implementing Classes:
DirectQueryProcessingPool
,ForwardingQueryProcessingPool
,MetricsEmittingQueryProcessingPool
public interface QueryProcessingPool extends com.google.common.util.concurrent.ListeningExecutorService
This class implements the logic of how units of query execution run concurrently. It is used inQueryRunnerFactory.mergeRunners(QueryProcessingPool, Iterable)
. In a most straightforward implementation, each unit will be submitted to anPrioritizedExecutorService
. Extensions, however, can implement their own logic for picking which unit to pick first for execution.This interface extends
ListeningExecutorService
as well. It has a separate method to submit query execution tasks so that implementations can differentiate those tasks from any regular async tasks. One example isGroupingEngine.mergeRunners(QueryProcessingPool, Iterable)
where different kind of tasks are submitted to same processing pool.Query execution task also includes a reference to
QueryRunner
so that any state required to decide the priority of a unit can be carried forward with the correspondingQueryRunner
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T,V>
com.google.common.util.concurrent.ListenableFuture<T>submitRunnerTask(PrioritizedQueryRunnerCallable<T,V> task)
Submits the query execution unit task for asynchronous execution.-
Methods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow
-
-
-
-
Method Detail
-
submitRunnerTask
<T,V> com.google.common.util.concurrent.ListenableFuture<T> submitRunnerTask(PrioritizedQueryRunnerCallable<T,V> task)
Submits the query execution unit task for asynchronous execution.- Type Parameters:
T
- - Task result typeV
- - Query runner sequence type- Parameters:
task
- - Task to be submitted.- Returns:
- - Future object for tracking the task completion.
-
-