mirror of https://github.com/apache/druid.git
MSQ: Load broadcast tables on workers. (#14437)
They were not previously loaded because supportsQueries was false. This patch sets supportsQueries to true, and clarifies in Task javadocs that supportsQueries can be true for tasks that aren't directly queryable over HTTP.
This commit is contained in:
parent
5d76d0ea74
commit
85656a467c
|
@ -154,6 +154,14 @@ public class MSQWorkerTask extends AbstractTask
|
||||||
return getContextValue(Tasks.PRIORITY_KEY, Tasks.DEFAULT_BATCH_INDEX_TASK_PRIORITY);
|
return getContextValue(Tasks.PRIORITY_KEY, Tasks.DEFAULT_BATCH_INDEX_TASK_PRIORITY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean supportsQueries()
|
||||||
|
{
|
||||||
|
// Even though we don't have a QueryResource, we do embed a query stack, and so we need preloaded resources
|
||||||
|
// such as broadcast tables.
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o)
|
public boolean equals(Object o)
|
||||||
{
|
{
|
||||||
|
|
|
@ -182,7 +182,12 @@ public interface Task
|
||||||
<T> QueryRunner<T> getQueryRunner(Query<T> query);
|
<T> QueryRunner<T> getQueryRunner(Query<T> query);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return true if this Task type is queryable, such as streaming ingestion tasks
|
* True if this task type embeds a query stack, and therefore should preload resources (like broadcast tables)
|
||||||
|
* that may be needed by queries.
|
||||||
|
*
|
||||||
|
* If true, {@link #getQueryRunner(Query)} does not necessarily return nonnull query runners. For example,
|
||||||
|
* MSQWorkerTask returns true from this method (because it embeds a query stack for running multi-stage queries)
|
||||||
|
* even though it is not directly queryable via HTTP.
|
||||||
*/
|
*/
|
||||||
boolean supportsQueries();
|
boolean supportsQueries();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue