[ https://issues.apache.org/jira/browse/TEZ-1897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14522298#comment-14522298 ]
Siddharth Seth commented on TEZ-1897: ------------------------------------- Mostly minor comments. - "AsyncDispatcherConcurrent(String name, int numThreads) {" super(name) instead of super("dispatcher") - final LinkedBlockingQueue<Event> queue;; - Double ";" - serviceStop / serviceStart don't need to invoke super. These will be invoked via the stop() / start() methods automatically. - In AsyncDispatcher - the error checking code for previously registered dispatchers ("/* check to see if we have a listener registered */") can be common across all register methods. registerAndCreateDispatcher(without #threads) is missing a check on ConcurrentDispatchers - waitForDrained.wait(1000);, LOG.info("Waiting for AsyncDispatcher to drain."); - log line before the wait ? - At the same place - do the threads need to be interrupted ? Otherwise they'll always wait for the 1000ms if the queue is already empty. - There's changes in TaskImpl, Task, Vertex - which are unrelated to this. That's likely adding to perf gains. There's a separate jira for this - will see if the scope of that is no longer valid after theses changes. Major bit: There's a lot of code duplication between AsyncDispatcher and AsyncDispatcherConcurrent - GenericEventHandler, MultiAttemptListener and a bunch more.The register functions seem a little unnecessary since noone registers directly with this. Not sure if you want to fix this here or in a follow up. > Create a concurrent version of AsyncDispatcher > ---------------------------------------------- > > Key: TEZ-1897 > URL: https://issues.apache.org/jira/browse/TEZ-1897 > Project: Apache Tez > Issue Type: Task > Reporter: Bikas Saha > Assignee: Bikas Saha > Attachments: TEZ-1897.1.patch, TEZ-1897.2.patch, TEZ-1897.3.patch, > TEZ-1897.4.patch, TEZ-1897.5.patch, TEZ-1897.6.patch > > > Currently, it processes events on a single thread. For events that can be > executed in parallel, e.g. vertex manager events, allowing higher concurrency > may be beneficial. -- This message was sent by Atlassian JIRA (v6.3.4#6332)