From cf09fbf4ce54443c78a40f529b124423ed1c5443 Mon Sep 17 00:00:00 2001 From: Gian Merlino Date: Sun, 26 May 2019 15:14:50 -0700 Subject: [PATCH] Fix LookupSerdeModule double-binding in Coordinator-as-Overlord mode. (#7765) Fixes #7762. --- .../src/main/java/org/apache/druid/cli/CliCoordinator.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/src/main/java/org/apache/druid/cli/CliCoordinator.java b/services/src/main/java/org/apache/druid/cli/CliCoordinator.java index c1ab5b94a7d..98bb958d9c5 100644 --- a/services/src/main/java/org/apache/druid/cli/CliCoordinator.java +++ b/services/src/main/java/org/apache/druid/cli/CliCoordinator.java @@ -272,10 +272,12 @@ public class CliCoordinator extends ServerRunnable } ); - modules.add(new LookupSerdeModule()); - if (beOverlord) { modules.addAll(new CliOverlord().getModules(false)); + } else { + // Only add LookupSerdeModule if !beOverlord, since CliOverlord includes it, and having two copies causes + // the injector to get confused due to having multiple bindings for the same classes. + modules.add(new LookupSerdeModule()); } return modules;