You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-dev@hadoop.apache.org by Karthik Kambatla <ka...@cloudera.com> on 2013/06/06 21:35:59 UTC

DrainDispatcher/tests race?

Hi devs,

The DrainDispatcher is used in several tests. Looking at the code,
DrainDispatcher#await() waits for the event queue to be empty, which is
widely used (MockRM). However, the queue being empty doesn't necessarily
imply the completion of the handlers invoked.

Is there a way to wait for the event handlers themselves to finish? If not,
do you think there is merit to adding that functionality? Sleeping for some
interval after the handler is invoked seems like a bad idea as it bumps up
test times and doesn't guarantee correctness either.

Context: I ran into this while debugging the test failure of
TestAMRMPRCNodeUpdates (YARN-77).

Please let me know if I am missing something here.

Thanks
Karthik