leventov 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_r266153838
 
 

 ##########
 File path: 
server/src/main/java/org/apache/druid/server/coordination/ZkCoordinator.java
 ##########
 @@ -102,63 +108,60 @@ public void start() throws IOException
             new PathChildrenCacheListener()
             {
               @Override
-              public void childEvent(CuratorFramework client, 
PathChildrenCacheEvent event) throws Exception
+              public void childEvent(CuratorFramework client, 
PathChildrenCacheEvent event)
               {
                 final ChildData child = event.getData();
                 switch (event.getType()) {
                   case CHILD_ADDED:
-                    final String path = child.getPath();
-                    final DataSegmentChangeRequest request = 
jsonMapper.readValue(
-                        child.getData(), DataSegmentChangeRequest.class
-                    );
-
-                    log.info("New request[%s] with zNode[%s].", 
request.asString(), path);
-
-                    try {
-                      request.go(
-                          dataSegmentChangeHandler,
-                          new DataSegmentChangeCallback()
-                          {
-                            boolean hasRun = false;
-
-                            @Override
-                            public void execute()
+                    log.info("Child zNode added at [%s]", 
event.getData().getPath());
+                    segmentLoadUnloadService.submit(() -> {
+                      final String path = child.getPath();
+                      DataSegmentChangeRequest request = new 
SegmentChangeRequestNoop();
+                      try {
+                        final DataSegmentChangeRequest finalRequest = 
jsonMapper.readValue(
+                            child.getData(), DataSegmentChangeRequest.class
 
 Review comment:
   Not according to Druid code style

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

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

Reply via email to