Skip to content

Commit

Permalink
[INLONG-11335][Manager] Move maxPacketLength to the DataProxyNodeResp…
Browse files Browse the repository at this point in the history
…onse (#11336)
  • Loading branch information
fuweng11 authored Oct 11, 2024
1 parent a4e2e2e commit 766419c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,4 @@ public class DataProxyNodeInfo {
*/
private Integer nodeLoad;

/**
* Node max packet length
*/
private Integer maxPacketLength;

}
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ public class DataProxyNodeResponse {
*/
private Integer load = 20;

/**
* Node max packet length
*/
private Integer maxPacketLength;

/**
* List of the cluster node
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -960,6 +960,7 @@ public DataProxyNodeResponse getDataProxyNodes(String groupId, String protocolTy
if (dataProxyCluster != null && StringUtils.isNotBlank(dataProxyCluster.getExtParams())) {
DataProxyClusterDTO dataProxyClusterDTO = DataProxyClusterDTO.getFromJson(dataProxyCluster.getExtParams());
maxPacketLength = dataProxyClusterDTO.getMaxPacketLength();
response.setMaxPacketLength(maxPacketLength);
}

// TODO consider the data proxy load and re-balance
Expand All @@ -978,7 +979,6 @@ public DataProxyNodeResponse getDataProxyNodes(String groupId, String protocolTy
nodeInfo.setPort(nodeEntity.getPort());
nodeInfo.setProtocolType(nodeEntity.getProtocolType());
nodeInfo.setNodeLoad(nodeEntity.getNodeLoad());
nodeInfo.setMaxPacketLength(maxPacketLength);
nodeList.add(nodeInfo);
}
response.setNodeList(nodeList);
Expand All @@ -1004,6 +1004,7 @@ public DataProxyNodeResponse getDataProxyNodesByCluster(String clusterName, Stri
if (StringUtils.isNotBlank(clusterEntity.getExtParams())) {
DataProxyClusterDTO dataProxyClusterDTO = DataProxyClusterDTO.getFromJson(clusterEntity.getExtParams());
maxPacketLength = dataProxyClusterDTO.getMaxPacketLength();
response.setMaxPacketLength(maxPacketLength);
}
List<InlongClusterNodeEntity> nodeEntities =
clusterNodeMapper.selectByParentId(clusterEntity.getId(), protocolType);
Expand Down Expand Up @@ -1041,7 +1042,6 @@ public DataProxyNodeResponse getDataProxyNodesByCluster(String clusterName, Stri
nodeInfo.setPort(nodeEntity.getPort());
nodeInfo.setProtocolType(nodeEntity.getProtocolType());
nodeInfo.setNodeLoad(nodeEntity.getNodeLoad());
nodeInfo.setMaxPacketLength(maxPacketLength);
nodeList.add(nodeInfo);
}
response.setNodeList(nodeList);
Expand Down

0 comments on commit 766419c

Please sign in to comment.