woofyzhao commented on code in PR #6299:
URL: https://github.com/apache/inlong/pull/6299#discussion_r1005547957


##########
inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/impl/InlongClientImpl.java:
##########
@@ -152,20 +153,22 @@ public Map<String, InlongGroupStatusInfo> 
listGroupStatus(List<String> groupIds)
 
     @Override
     public Map<String, InlongGroupStatusInfo> listGroupStatus(List<String> 
groupIds, String credentials) {
-        Map<String, InlongGroupStatusInfo> statusInfoMap = 
listGroupStatus(groupIds);
+        Map<String, InlongGroupStatusInfo> groupStatusMap = 
listGroupStatus(groupIds);
 
         // sort status info
-        ListSortStatusRequest sortStatusRequest = new ListSortStatusRequest();
-        sortStatusRequest.setInlongGroupIds(groupIds);
-        sortStatusRequest.setCredentials(credentials);
-        Map<String, SortStatus> sortStatusMap = 
groupClient.listSortStatus(sortStatusRequest).getStatusMap();
-
-        if (MapUtils.isNotEmpty(sortStatusMap)) {
-            statusInfoMap.forEach((groupId, statusInfo) -> {
-                statusInfo.setSortStatus(sortStatusMap.getOrDefault(groupId, 
SortStatus.UNKNOWN));
-            });
+        SortStatusRequest statusRequest = new SortStatusRequest();
+        statusRequest.setInlongGroupIds(groupIds);
+        statusRequest.setCredentials(credentials);
+        List<SortStatusInfo> sortStatusInfos = 
groupClient.listSortStatus(statusRequest);
+
+        if (CollectionUtils.isEmpty(sortStatusInfos)) {

Review Comment:
   I think you mean "isNotEmpty" here.



-- 
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]

Reply via email to