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_r266154204
##########
File path:
server/src/main/java/org/apache/druid/server/coordination/ZkCoordinator.java
##########
@@ -102,72 +113,71 @@ 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()
+ loadSegmentService.submit(() -> {
+ final ChildData child = event.getData();
+ switch (event.getType()) {
+ case CHILD_ADDED:
+ final String path = child.getPath();
+ DataSegmentChangeRequest request = new
SegmentChangeRequestNoop();
+ try {
Review comment:
@samarthjain please add a comment to code that would make Gian to not ask
the question that he asked if the comment was there when Gian was reading this
code.
----------------------------------------------------------------
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]