private void addInstanceTagIfNeeded(String clusterName, String instanceName) { InstanceConfig instanceConfig = _helixAdmin.getInstanceConfig(clusterName, instanceName); List<String> instanceTags = instanceConfig.getTags(); if (instanceTags == null || instanceTags.isEmpty()) { if (ZKMetadataProvider.getClusterTenantIsolationEnabled( _helixManager.getHelixPropertyStore())) { _helixAdmin.addInstanceTag( clusterName, instanceName, ControllerTenantNameBuilder.getBrokerTenantNameForTenant( ControllerTenantNameBuilder.DEFAULT_TENANT_NAME)); } else { _helixAdmin.addInstanceTag( clusterName, instanceName, CommonConstants.Helix.UNTAGGED_BROKER_INSTANCE); } } }