hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karthik Kambatla (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-1574) When RM transit from Active to Standby, the same eventDispatcher should not be registered more than once
Date Thu, 09 Jan 2014 07:31:50 GMT

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

Karthik Kambatla commented on YARN-1574:

Nice test, may be we can simplify it further.
# Does MyDispatcher need to hold onto the actual event handlers? Can we use an int to keep
track of number of handlers and just increment the count on register()? 
# Use assertEquals
+    assertTrue(expectedNumOfEventDispatcher ==
+        ((MyDispatcher) rm.getRMContext().getDispatcher())
+        .getNumOfEventDispatchers());
# Add this check once after transitionToActive also?
# Nit: Add error message for asserts
# Nit: Rename MyDispatcher to MyCountingDispatcher?
# Nit: Rename getNumOfEventDispatchers() to getEventHandlerCount()?
# Nit: Rename expectedNumOfEventDispatcher to expectedEventHandlerCount?
# Nit: Two stars in the first line of comments?
+  /*
+   * Register the handlers for alwaysOn services
+   */
+  private Dispatcher setupDispatcher() {
# Nit: Use single line for the following comment?
-    rmDispatcher = createDispatcher();
+    /*
+     * Register the handlers for all AlwaysOn services using setupDispatcher().
+     */
+    rmDispatcher = setupDispatcher();

> When RM transit from Active to Standby, the same eventDispatcher should not be registered
more than once
> --------------------------------------------------------------------------------------------------------
>                 Key: YARN-1574
>                 URL: https://issues.apache.org/jira/browse/YARN-1574
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Xuan Gong
>            Assignee: Xuan Gong
>            Priority: Blocker
>         Attachments: YARN-1574.1.patch, YARN-1574.1.patch, YARN-1574.2.patch, YARN-1574.2.patch,
> Currently, we move rmDispatcher out of ActiveService. But we still register the Event
dispatcher, such as schedulerDispatcher, RMAppEventDispatcher when we initiate the ActiveService.
> Almost every time when we transit RM from Active to Standby,  we need to initiate the
ActiveService. That means we will register the same event Dispatcher which will cause the
same event will be handled several times.

This message was sent by Atlassian JIRA

View raw message