samarthjain commented on a change in pull request #7088: Improve parallelism of 
zookeeper based segment change processing
URL: https://github.com/apache/incubator-druid/pull/7088#discussion_r279479975
 
 

 ##########
 File path: 
server/src/main/java/org/apache/druid/server/coordinator/CuratorLoadQueuePeon.java
 ##########
 @@ -59,40 +68,50 @@
   private static final int DROP = 0;
   private static final int LOAD = 1;
 
-  private static void executeCallbacks(List<LoadPeonCallback> callbacks)
-  {
-    for (LoadPeonCallback callback : callbacks) {
-      if (callback != null) {
-        callback.execute();
-      }
-    }
-  }
-
   private final CuratorFramework curator;
   private final String basePath;
   private final ObjectMapper jsonMapper;
   private final ScheduledExecutorService processingExecutor;
+  /**
+   * Threadpool with daemon threads running scheduled tasks that monitor 
whether
+   * the zk nodes created for segment processing are removed
+   */
+  private final ScheduledExecutorService monitorNodeRemovedExecutor;
+
+  /**
+   * Threadpool with daemon threads that execute callback actions associated
+   * with loading or dropping segments.
+   */
   private final ExecutorService callBackExecutor;
   private final DruidCoordinatorConfig config;
 
   private final AtomicLong queuedSize = new AtomicLong(0);
   private final AtomicInteger failedAssignCount = new AtomicInteger(0);
 
+  /**
+   * Needs to be thread safe since it can be concurrently accessed via
+   * loadSegment(), actionCompleted(), getSegmentsToLoad() and stop()
+   */
   private final ConcurrentSkipListMap<DataSegment, SegmentHolder> 
segmentsToLoad = new ConcurrentSkipListMap<>(
       DruidCoordinator.SEGMENT_COMPARATOR_RECENT_FIRST
   );
+
+  /**
+   * Needs to be thread safe since it can be concurrently accessed via
+   * dropSegment(), actionCompleted(), getSegmentsToDrop() and stop()
 
 Review comment:
   Done

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to