diff --git a/extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/ControllerImpl.java b/extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/ControllerImpl.java index db7a0f38b00..bf16412b0ee 100644 --- a/extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/ControllerImpl.java +++ b/extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/ControllerImpl.java @@ -356,7 +356,9 @@ public class ControllerImpl implements Controller } ); - workerTaskLauncher.waitForWorkerShutdown(); + if (workerTaskLauncher != null) { + workerTaskLauncher.waitForWorkerShutdown(); + } } public TaskStatus runTask(final Closer closer)