[ https://issues.apache.org/jira/browse/GOBBLIN-1016?focusedWorklogId=371800&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-371800 ]
ASF GitHub Bot logged work on GOBBLIN-1016: ------------------------------------------- Author: ASF GitHub Bot Created on: 14/Jan/20 19:06 Start Date: 14/Jan/20 19:06 Worklog Time Spent: 10m Work Description: htran1 commented on pull request #2863: GOBBLIN-1016: Allow Gobblin Application Master to join Helix cluster … URL: https://github.com/apache/incubator-gobblin/pull/2863#discussion_r366518825 ########## File path: gobblin-yarn/src/test/java/org/apache/gobblin/yarn/GobblinYarnAppLauncherTest.java ########## @@ -265,17 +297,61 @@ public void testSendShutdownRequest() throws Exception { Assert.assertEquals(this.curatorFramework.checkExists() .forPath(String.format("/%s/CONTROLLER/MESSAGES", GobblinYarnAppLauncherTest.class.getSimpleName())) .getVersion(), 0); - YarnSecurityManagerTest.GetControllerMessageNumFunc getCtrlMessageNum = - new YarnSecurityManagerTest.GetControllerMessageNumFunc(GobblinYarnAppLauncherTest.class.getSimpleName(), + YarnSecurityManagerTest.GetHelixMessageNumFunc getCtrlMessageNum = + new YarnSecurityManagerTest.GetHelixMessageNumFunc(GobblinYarnAppLauncherTest.class.getSimpleName(), InstanceType.CONTROLLER, "", this.curatorFramework); AssertWithBackoff assertWithBackoff = AssertWithBackoff.create().logger(LoggerFactory.getLogger("testSendShutdownRequest")).timeoutMs(20000); assertWithBackoff.assertEquals(getCtrlMessageNum, 1, "1 controller message queued"); // Give Helix sometime to handle the message assertWithBackoff.assertEquals(getCtrlMessageNum, 0, "all controller messages processed"); + + this.helixManagerManagedHelix.connect(); + this.helixManagerManagedHelix.getMessagingService().registerMessageHandlerFactory(GobblinHelixConstants.SHUTDOWN_MESSAGE_TYPE, + new TestShutdownMessageHandlerFactory(this)); + + this.gobblinYarnAppLauncherManagedHelix.connectHelixManager(); + this.gobblinYarnAppLauncherManagedHelix.sendShutdownRequest(); + + Assert.assertEquals(this.curatorFramework.checkExists() + .forPath(String.format("/%s/INSTANCES/%s/MESSAGES", this.configManagedHelix.getString(GobblinClusterConfigurationKeys.HELIX_CLUSTER_NAME_KEY), TEST_HELIX_INSTANCE_NAME_MANAGED)) + .getVersion(), 0); + YarnSecurityManagerTest.GetHelixMessageNumFunc getInstanceMessageNum = + new YarnSecurityManagerTest.GetHelixMessageNumFunc(this.configManagedHelix.getString( + GobblinClusterConfigurationKeys.HELIX_CLUSTER_NAME_KEY), + InstanceType.PARTICIPANT, TEST_HELIX_INSTANCE_NAME_MANAGED, this.curatorFramework); + assertWithBackoff = + AssertWithBackoff.create().logger(LoggerFactory.getLogger("testSendShutdownRequest")).timeoutMs(20000); + assertWithBackoff.assertEquals(getInstanceMessageNum, 1, "1 controller message queued"); + + // Give Helix sometime to handle the message + assertWithBackoff.assertEquals(getInstanceMessageNum, 0, "all controller messages processed"); } + /*static class GetInstanceMessageFunc implements Function<Void, Integer> { Review comment: Remove this block? ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 371800) Time Spent: 50m (was: 40m) > Allow Gobblin Application Master to join Helix cluster in PARTICIPANT mode > when Helix cluster is managed > -------------------------------------------------------------------------------------------------------- > > Key: GOBBLIN-1016 > URL: https://issues.apache.org/jira/browse/GOBBLIN-1016 > Project: Apache Gobblin > Issue Type: Improvement > Components: gobblin-cluster > Affects Versions: 0.15.0 > Reporter: Sudarshan Vasudevan > Assignee: Hung Tran > Priority: Major > Fix For: 0.15.0 > > Time Spent: 50m > Remaining Estimate: 0h > > In the managed cluster mode, the Gobblin Yarn Application Master joins Helix > cluster in the ADMINISTRATOR role. However, Helix does not support messaging > for instances which are not CONTROLLER or PARTICIPANT. To properly handle > shutdown and token file update messages, the AppMaster should connect to the > Helix cluster as a PARTICIPANT, these message types need to be destined to > PARTICIPANT instead of CONTROLLER as is the case today. -- This message was sent by Atlassian Jira (v8.3.4#803005)