[ 
https://issues.apache.org/jira/browse/GOBBLIN-1841?focusedWorklogId=867604&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-867604
 ]

ASF GitHub Bot logged work on GOBBLIN-1841:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 27/Jun/23 00:14
            Start Date: 27/Jun/23 00:14
    Worklog Time Spent: 10m 
      Work Description: homatthew commented on code in PR #3708:
URL: https://github.com/apache/gobblin/pull/3708#discussion_r1242970851


##########
gobblin-yarn/src/main/java/org/apache/gobblin/yarn/GobblinApplicationMaster.java:
##########
@@ -135,6 +141,26 @@ protected MultiTypeMessageHandlerFactory 
getUserDefinedMessageHandlerFactory() {
     return new ControllerUserDefinedMessageHandlerFactory();
   }
 
+  @Override
+  public synchronized void setupHelix() {
+    super.setupHelix();
+    this.disableTaskRunnersFromPreviousExecutions(this.multiManager);
+  }
+
+  public static void 
disableTaskRunnersFromPreviousExecutions(GobblinHelixMultiManager multiManager) 
{
+    HelixManager helixManager = multiManager.getJobClusterHelixManager();
+    HelixDataAccessor helixDataAccessor = helixManager.getHelixDataAccessor();
+    String clusterName = helixManager.getClusterName();
+    HelixAdmin helixAdmin = helixManager.getClusterManagmentTool();
+    Set<String> taskRunners = HelixUtils.getParticipants(helixDataAccessor,
+        GobblinYarnTaskRunner.HELIX_YARN_INSTANCE_NAME_PREFIX);
+    LOGGER.warn("Found {} task runners in the cluster.", taskRunners.size());
+    for (String taskRunner: taskRunners) {

Review Comment:
   whitespace before the `:`. But this will probably be caught by the linter





Issue Time Tracking
-------------------

    Worklog Id:     (was: 867604)
    Time Spent: 1h 20m  (was: 1h 10m)

> Move disabling of current live instances to the GobblinClusterManager startup
> -----------------------------------------------------------------------------
>
>                 Key: GOBBLIN-1841
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1841
>             Project: Apache Gobblin
>          Issue Type: Improvement
>            Reporter: Matthew Ho
>            Priority: Major
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to