hanghangliu commented on code in PR #3487: URL: https://github.com/apache/gobblin/pull/3487#discussion_r861088860
########## gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnAutoScalingManager.java: ########## @@ -128,6 +138,11 @@ public YarnAutoScalingManager(GobblinApplicationMaster appMaster) { this.autoScalingExecutor = Executors.newSingleThreadScheduledExecutor( ExecutorsUtils.newThreadFactory(Optional.of(log), Optional.of("AutoScalingExecutor"))); + + this.helixInstanceTags = ConfigUtils.getString(config, Review Comment: Done. Changed the member variable name to defaultHelixInstanceTags and added comment. ########## gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinTaskRunner.java: ########## @@ -540,16 +542,25 @@ void connectHelixManagerWithRetry() { * the job with EXAMPLE_INSTANCE_TAG will remain in the ZK until an instance with EXAMPLE_INSTANCE_TAG was found. */ private void addInstanceTags() { - List<String> tags = ConfigUtils.getStringList(this.clusterConfig, GobblinClusterConfigurationKeys.HELIX_INSTANCE_TAGS_KEY); HelixManager receiverManager = getReceiverManager(); if (receiverManager.isConnected()) { - if (!tags.isEmpty()) { - logger.info("Adding tags binding " + tags); - tags.forEach(tag -> receiverManager.getClusterManagmentTool() - .addInstanceTag(this.clusterName, this.helixInstanceName, tag)); - logger.info("Actual tags binding " + receiverManager.getClusterManagmentTool() - .getInstanceConfig(this.clusterName, this.helixInstanceName).getTags()); + // 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()) { + // If a helix instance already have tag assigned during last run, it won't be auto removed. Need to remove unwanted tags Review Comment: done -- 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. To unsubscribe, e-mail: dev-unsubscr...@gobblin.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org