jonyangx commented on code in PR #2818:
URL: 
https://github.com/apache/incubator-eventmesh/pull/2818#discussion_r1061515186


##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/tcp/client/rebalance/EventmeshRebalanceImpl.java:
##########
@@ -62,7 +62,7 @@ public void doRebalance() throws Exception {
         final String cluster = 
eventMeshTCPServer.getEventMeshTCPConfiguration().getEventMeshCluster();
         //get eventmesh of local idc
         Map<String, String> localEventMeshMap = 
queryLocalEventMeshMap(cluster);
-        if (localEventMeshMap == null || localEventMeshMap.size() == 0) {
+        if (localEventMeshMap == null ||  MapUtils.isEmpty(localEventMeshMap)) 
{

Review Comment:
   You could delete localEventMeshMap == null .



##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/tcp/client/rebalance/EventmeshRebalanceImpl.java:
##########
@@ -112,7 +112,7 @@ private void doRebalanceByGroup(String cluster, String 
group, String purpose, Ma
         //query distribute data of loacl idc
         Map<String, Integer> clientDistributionMap = 
queryLocalEventMeshDistributeData(cluster, group, purpose,
                 eventMeshMap);
-        if (clientDistributionMap == null || clientDistributionMap.size() == 
0) {
+        if (clientDistributionMap == null || 
MapUtils.isEmpty(clientDistributionMap)) {

Review Comment:
   You could delete localEventMeshMap == null .



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to