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

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

                Author: ASF GitHub Bot
            Created on: 21/Nov/22 17:39
            Start Date: 21/Nov/22 17:39
    Worklog Time Spent: 10m 
      Work Description: umustafi commented on code in PR #3602:
URL: https://github.com/apache/gobblin/pull/3602#discussion_r1028351561


##########
gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinTaskRunner.java:
##########
@@ -544,23 +544,25 @@ void connectHelixManagerWithRetry() {
   private void addInstanceTags() {
     HelixManager receiverManager = getReceiverManager();
     if (receiverManager.isConnected()) {
-      // The helix instance associated with this container should be 
consistent on helix tag
-      List<String> existedTags = receiverManager.getClusterManagmentTool()
-          .getInstanceConfig(this.clusterName, 
this.helixInstanceName).getTags();
-      Set<String> desiredTags = new HashSet<>(
-          ConfigUtils.getStringList(this.clusterConfig, 
GobblinClusterConfigurationKeys.HELIX_INSTANCE_TAGS_KEY));
-      if (!desiredTags.isEmpty()) {
-        // Remove tag assignments for the current Helix instance from a 
previous run
-        for (String tag : existedTags) {
-          if (!desiredTags.contains(tag))
-            
receiverManager.getClusterManagmentTool().removeInstanceTag(this.clusterName, 
this.helixInstanceName, tag);
-          logger.info("Removed unrelated helix tag {} for instance {}", tag, 
this.helixInstanceName);
+      try {
+        Set<String> desiredTags = new 
HashSet<>(ConfigUtils.getStringList(this.clusterConfig, 
GobblinClusterConfigurationKeys.HELIX_INSTANCE_TAGS_KEY));
+        if (!desiredTags.isEmpty()) {
+          // The helix instance associated with this container should be 
consistent on helix tag
+          List<String> existedTags =
+              
receiverManager.getClusterManagmentTool().getInstanceConfig(this.clusterName, 
this.helixInstanceName).getTags();

Review Comment:
   It seems like Helix does not automatically register the participant as an 
instance config if it joins as a participant. We may need to call 
`setInstanceConfig` and double check our assumptions.





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

    Worklog Id:     (was: 827693)
    Time Spent: 2h 40m  (was: 2.5h)

> Ensure GobblinTaskRunner works when used without Yarn
> -----------------------------------------------------
>
>                 Key: GOBBLIN-1743
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1743
>             Project: Apache Gobblin
>          Issue Type: Bug
>          Components: gobblin-core
>            Reporter: Urmi Mustafi
>            Assignee: Abhishek Tiwari
>            Priority: Major
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> this PR [https://github.com/apache/gobblin/pull/3519/files]  has a call to 
> Helix cluster contained outside of a conditional that was previously never 
> encountered for Fliptop use case. I moved the call back inside the 
> conditional to ensure we don't attempt to retrieve an instanceConfig that is 
> not registered with Helix as we don't have Yarn mode enabled. 



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

Reply via email to