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_r276324565
##########
File path:
server/src/main/java/org/apache/druid/server/coordination/ZkCoordinator.java
##########
@@ -102,63 +110,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()
+ segmentLoadUnloadService.submit(() -> {
Review comment:
@samarthjain since you are on this class, could you please refactor this big
switch into a smaller, observable switch, as I did here:
https://github.com/apache/incubator-druid/pull/6702/files#diff-a5003741be9e3c5599b84fb0c3c572fdL237?
----------------------------------------------------------------
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]