vernedeng commented on code in PR #9262:
URL: https://github.com/apache/inlong/pull/9262#discussion_r1390559182
##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/SortSourceServiceImpl.java:
##########
@@ -315,10 +316,10 @@ private Map<String, CacheZone> parseCacheZones(
Map<String, List<SortSourceStreamSinkInfo>> tag2SinkInfos =
sinkInfoList.stream()
.filter(sink ->
Objects.nonNull(groupInfos.get(sink.getGroupId())))
.filter(sink -> {
- if (StringUtils.isBlank(sortClusterTag)) {
+ if (CollectionUtils.isEmpty(sortClusterTags)) {
return true;
}
- return
sortClusterTag.equals(groupInfos.get(sink.getGroupId()).getClusterTag());
+ return
sortClusterTags.contains(groupInfos.get(sink.getGroupId()).getClusterTag());
Review Comment:
Use set instead of list
##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/sort/standalone/SortSourceClusterInfo.java:
##########
@@ -69,6 +74,13 @@ public Map<String, String> getExtParamsMap() {
return extParamsMap;
}
+ public List<String> getClusterTagList() {
+ if (clusterTags == null) {
+ return new ArrayList<>();
+ }
+ return Arrays.asList(clusterTags.split(InlongConstants.COMMA));
+ }
+
Review Comment:
make a clusterTagsSet, and init it when the first time you use it.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]