Skip to content

Commit

Permalink
[INLONG-9867][Manager] Fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
fuweng11 committed Apr 17, 2024
1 parent 4397be7 commit 0758d17
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
public class SortStandaloneConfigOperator implements SortConfigOperator {

private static final Logger LOGGER = LoggerFactory.getLogger(SortStandaloneConfigOperator.class);
private static final String KEY_OLD_TENANT = "tenant";
private static final String KEY_NEW_TENANT = "pulsarTenant";
private static final String KEY_TENANT = "tenant";
private static final String KEY_TENANT_V2 = "pulsarTenant";
private static final String STANDALONE_CLUSTER_PREFIX = "SORT_";

@Autowired
Expand Down Expand Up @@ -238,10 +238,10 @@ private Topic saveTopic(SortSourceGroupInfo sortGroupInfo, InlongStreamEntity st
String namespace = sortGroupInfo.getMqResource();
String topic = streamEntity.getMqResource();
Map<String, String> groupExt = sortGroupInfo.getExtParamsMap();
String groupTenant = Optional.ofNullable(groupExt.get(KEY_NEW_TENANT)).orElse(groupExt.get(KEY_OLD_TENANT));
String groupTenant = Optional.ofNullable(groupExt.get(KEY_TENANT_V2)).orElse(groupExt.get(KEY_TENANT));
String tenant = StringUtils.isNotBlank(groupTenant)
? groupTenant
: Optional.ofNullable(param.get(KEY_NEW_TENANT)).orElse(param.get(KEY_OLD_TENANT));
: Optional.ofNullable(param.get(KEY_TENANT_V2)).orElse(param.get(KEY_TENANT));
String fullTopic = tenant + InlongConstants.SLASH + namespace + InlongConstants.SLASH + topic;

return Topic.builder()
Expand Down

0 comments on commit 0758d17

Please sign in to comment.