You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/07/28 04:26:30 UTC

[GitHub] [inlong] fuweng11 opened a new pull request, #5247: [INLONG-5246][Manager] Return all cluster nodes under the same cluster tag and type to the agent

fuweng11 opened a new pull request, #5247:
URL: https://github.com/apache/inlong/pull/5247

   
   ### Prepare a Pull Request
   
   - Fixes #5246 
   
   ### Motivation
   
   Ensure that the agent can get the dataproxy node.
   
   ### Modifications
   
    Return all cluster nodes under the same cluster tag and type to the agent instead of return first.
   
   ### Verifying this change
   
   
   - [X] This change is a trivial rework/code cleanup without any test coverage.
   
   - [ ] This change is already covered by existing tests, such as:
     *(please describe tests)*
   
   - [ ] This change added tests and can be verified as follows:
   
     *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (no)
   
   


-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] dockerzhang merged pull request #5247: [INLONG-5246][Manager] Return all cluster nodes under the same tag and type

Posted by GitBox <gi...@apache.org>.
dockerzhang merged PR #5247:
URL: https://github.com/apache/inlong/pull/5247


-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] healchow commented on a diff in pull request #5247: [INLONG-5246][Manager] Return all cluster nodes under the same cluster tag and type to the agent

Posted by GitBox <gi...@apache.org>.
healchow commented on code in PR #5247:
URL: https://github.com/apache/inlong/pull/5247#discussion_r931817231


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/cluster/InlongClusterServiceImpl.java:
##########
@@ -635,19 +635,20 @@ public DataProxyNodeResponse getDataProxyNodes(String inlongGroupId) {
         // if more than one data proxy cluster, currently takes first
         // TODO consider the data proxy load and re-balance
         InlongClusterEntity clusterEntity = clusterList.get(0);
-        Integer clusterId = clusterEntity.getId();
-        List<InlongClusterNodeEntity> nodeList = clusterNodeMapper.selectByParentId(clusterId);
         List<DataProxyNodeInfo> nodeInfos = new ArrayList<>();
-        for (InlongClusterNodeEntity nodeEntity : nodeList) {
-            DataProxyNodeInfo nodeInfo = new DataProxyNodeInfo();
-            nodeInfo.setId(nodeEntity.getId());
-            nodeInfo.setIp(nodeEntity.getIp());
-            nodeInfo.setPort(nodeEntity.getPort());
-            nodeInfos.add(nodeInfo);
+        for (InlongClusterEntity entity : clusterList) {
+            List<InlongClusterNodeEntity> nodeList = clusterNodeMapper.selectByParentId(entity.getId());
+            for (InlongClusterNodeEntity nodeEntity : nodeList) {
+                DataProxyNodeInfo nodeInfo = new DataProxyNodeInfo();
+                nodeInfo.setId(nodeEntity.getId());
+                nodeInfo.setIp(nodeEntity.getIp());
+                nodeInfo.setPort(nodeEntity.getPort());
+                nodeInfos.add(nodeInfo);
+            }
         }
 
         DataProxyNodeResponse response = new DataProxyNodeResponse();
-        response.setClusterId(clusterId);
+        response.setClusterId(clusterEntity.getId());

Review Comment:
   Just change to `response.setClusterId(clusterList.get(0).getId());`.



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org