Package org.apache.druid.query
Class ChainedExecutionQueryRunner<T>
- java.lang.Object
-
- org.apache.druid.query.ChainedExecutionQueryRunner<T>
-
- All Implemented Interfaces:
QueryRunner<T>
public class ChainedExecutionQueryRunner<T> extends Object implements QueryRunner<T>
A QueryRunner that combines a list of other QueryRunners and executes them in parallel on an executor. When using this, it is important to make sure that the list of QueryRunners provided is fully flattened. If, for example, you were to pass a list of a Chained QueryRunner (A) and a non-chained QueryRunner (B). Imagine A has 2 QueryRunner chained together (Aa and Ab), the fact that the Queryables are run in parallel on an executor would mean that the Queryables are actually processed in the orderA -> B -> Aa -> Ab
That is, the two sub queryables for A would run *after* B is run, effectively meaning that the results for B must be fully cached in memory before the results for Aa and Ab are computed.
-
-
Constructor Summary
Constructors Constructor Description ChainedExecutionQueryRunner(QueryProcessingPool queryProcessingPool, QueryWatcher queryWatcher, Iterable<QueryRunner<T>> queryables)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Sequence<T>
run(QueryPlus<T> queryPlus, ResponseContext responseContext)
Runs the given query and returns results in a time-ordered sequence.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.druid.query.QueryRunner
run
-
-
-
-
Constructor Detail
-
ChainedExecutionQueryRunner
public ChainedExecutionQueryRunner(QueryProcessingPool queryProcessingPool, QueryWatcher queryWatcher, Iterable<QueryRunner<T>> queryables)
-
-
Method Detail
-
run
public Sequence<T> run(QueryPlus<T> queryPlus, ResponseContext responseContext)
Description copied from interface:QueryRunner
Runs the given query and returns results in a time-ordered sequence.- Specified by:
run
in interfaceQueryRunner<T>
-
-