kfaraz commented on code in PR #16266:
URL: https://github.com/apache/druid/pull/16266#discussion_r1571682209


##########
services/src/main/java/org/apache/druid/cli/CliPeon.java:
##########
@@ -185,6 +187,13 @@ public class CliPeon extends GuiceRunnable
   @Option(name = "--loadBroadcastSegments", title = "loadBroadcastSegments", 
description = "Enable loading of broadcast segments")
   public String loadBroadcastSegments = "false";
 
+
+  /**
+   * If set to true then lookups won't be loaded

Review Comment:
   This javadoc needs to be updated.



##########
server/src/main/java/org/apache/druid/query/lookup/LookupSerdeModule.java:
##########
@@ -58,6 +59,7 @@ public List<? extends Module> getJacksonModules()
   public void configure(Binder binder)
   {
     JsonConfigProvider.bind(binder, LookupModule.PROPERTY_BASE, 
LookupConfig.class);
+    binder.bind(LookupNodeService.class).toInstance(new 
LookupNodeService(LookupListeningAnnouncerConfig.DEFAULT_TIER));

Review Comment:
   Please add a comment here on why this needs to be done.



##########
services/src/main/java/org/apache/druid/cli/CliPeon.java:
##########
@@ -363,7 +372,7 @@ public String getTaskIDFromTask(final Task task)
         new IndexingServiceTuningConfigModule(),
         new InputSourceModule(),
         new ChatHandlerServerModule(properties),
-        new LookupModule()
+        LookupLoadingMode.NONE == loadLookups ? new LookupSerdeModule() : new 
LookupModule()

Review Comment:
   A log line which indicates the chosen lookup loading mode and the expected 
effects would also be helpful.



##########
server/src/main/java/org/apache/druid/query/lookup/LookupLoadingMode.java:
##########
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.druid.query.lookup;
+
+public enum LookupLoadingMode

Review Comment:
   Please add a javadoc for this.



##########
services/src/main/java/org/apache/druid/cli/CliPeon.java:
##########
@@ -363,7 +372,7 @@ public String getTaskIDFromTask(final Task task)
         new IndexingServiceTuningConfigModule(),
         new InputSourceModule(),
         new ChatHandlerServerModule(properties),
-        new LookupModule()
+        LookupLoadingMode.NONE == loadLookups ? new LookupSerdeModule() : new 
LookupModule()

Review Comment:
   Maybe put this logic in a private method `getLookupModule()` and add a 
javadoc there explaining what we are doing.



##########
indexing-service/src/test/java/org/apache/druid/indexing/overlord/ForkingTaskRunnerTest.java:
##########
@@ -537,6 +539,115 @@ ProcessHolder runTaskProcess(List<String> command, File 
logFile, TaskLocation ta
     Assert.assertTrue(forkingTaskRunner.restore().isEmpty());
   }
 
+  @Test
+  public void testTaskRun_doesnt_pass_loadLookups_Argument() throws Exception

Review Comment:
   The other tests in this class don't use the underscore style of naming 
tests. Please adhere to the existing style in this class if possible.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to