[ 
https://issues.apache.org/jira/browse/YARN-5911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15678114#comment-15678114
 ] 

sandflee commented on YARN-5911:
--------------------------------

thanks [~varun_saxena], one minor comment:
if events not drained, we should at least wait 1s since drainDispatcher not 
invoke waitForDrained.notify, could we use a shorter time?
{code}
        while (!isDrained() && eventHandlingThread != null
            && eventHandlingThread.isAlive()
            && System.currentTimeMillis() < endTime) {
          waitForDrained.wait(1000);
          LOG.info("Waiting for AsyncDispatcher to drain. Thread state is :" +
              eventHandlingThread.getState());
        }
      }
{code}

> DrainDispatcher does not drain all events on stop even if 
> setDrainEventsOnStop is true
> --------------------------------------------------------------------------------------
>
>                 Key: YARN-5911
>                 URL: https://issues.apache.org/jira/browse/YARN-5911
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Varun Saxena
>            Assignee: Varun Saxena
>         Attachments: YARN-5911.01.patch
>
>
> DrainDispatcher#serviceStop sets the stopped flag first before draining the 
> event queue.
> This means that the thread terminates as soon as it encounters stopped flag 
> as true and does not continue to process leftover events in queue, something 
> which it should do if setDrainEventsOnStop is set.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to