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/05/24 10:31:55 UTC

[GitHub] [incubator-inlong] xuesongxs opened a new pull request, #4355: Fix ProxyConfigEntry cluster id NPE

xuesongxs opened a new pull request, #4355:
URL: https://github.com/apache/incubator-inlong/pull/4355

   Fixes #4354 


-- 
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] [incubator-inlong] xuesongxs commented on a diff in pull request #4355: [INLONG-4354][SDK] Fix NPE of the ProxyConfigEntry cluster id

Posted by GitBox <gi...@apache.org>.
xuesongxs commented on code in PR #4355:
URL: https://github.com/apache/incubator-inlong/pull/4355#discussion_r881289798


##########
inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/config/ProxyConfigManager.java:
##########
@@ -588,8 +588,12 @@ private ProxyConfigEntry getLocalProxyListFromFile(String filePath) throws Excep
         Map<String, Integer> streamIdMap = getStreamIdMap(localProxyAddrJson);
         proxyEntry.setGroupIdNumAndStreamIdNumMap(groupIdNum, streamIdMap);
         proxyEntry.setLoad(load);
-        if (localProxyAddrJson.has("cluster_id")) {
-            proxyEntry.setClusterId(localProxyAddrJson.get("cluster_id").getAsString());
+        if (localProxyAddrJson.has("data")) {

Review Comment:
   > The configuration of the cluster_id needs to be added to the local configuration file to deal with this problem. Are you trying to deal with the configuration pulled back from the manager? If this case, you need to modify the requestProxyList function.
   
   Yes, I changed the wrong place before. Now I only change the requestproxyList function, but there is another problem, in The .local file is called cluster_id, in .proxyip and .managerip files it is called clusterId. Is it necessary to unify here? If so, it should also be modified in the description of the official website.
   ![image](https://user-images.githubusercontent.com/54351417/170200316-dfb2907f-9bc6-4808-92eb-48b8eccb2344.png)
   
   



-- 
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] [incubator-inlong] baomingyu commented on a diff in pull request #4355: [INLONG-4354][SDK] Fix NPE of the ProxyConfigEntry cluster id

Posted by GitBox <gi...@apache.org>.
baomingyu commented on code in PR #4355:
URL: https://github.com/apache/incubator-inlong/pull/4355#discussion_r881185040


##########
inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/config/ProxyConfigManager.java:
##########
@@ -588,8 +588,12 @@ private ProxyConfigEntry getLocalProxyListFromFile(String filePath) throws Excep
         Map<String, Integer> streamIdMap = getStreamIdMap(localProxyAddrJson);
         proxyEntry.setGroupIdNumAndStreamIdNumMap(groupIdNum, streamIdMap);
         proxyEntry.setLoad(load);
-        if (localProxyAddrJson.has("cluster_id")) {
-            proxyEntry.setClusterId(localProxyAddrJson.get("cluster_id").getAsString());
+        if (localProxyAddrJson.has("data")) {

Review Comment:
   The configuration of the cluster_id needs to be added to the local configuration file to deal with this problem. Are you trying to deal with the configuration pulled back from the manager? If this case, you need to modify the requestProxyList function.



-- 
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] [incubator-inlong] dockerzhang commented on pull request #4355: [INLONG-4354][DataProxy] Fix ProxyConfigEntry cluster id NPE

Posted by GitBox <gi...@apache.org>.
dockerzhang commented on PR #4355:
URL: https://github.com/apache/incubator-inlong/pull/4355#issuecomment-1135775168

   @luchunliang @baomingyu PTAL


-- 
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] [incubator-inlong] baomingyu commented on a diff in pull request #4355: [INLONG-4354][SDK] Fix NPE of the ProxyConfigEntry cluster id

Posted by GitBox <gi...@apache.org>.
baomingyu commented on code in PR #4355:
URL: https://github.com/apache/incubator-inlong/pull/4355#discussion_r882269666


##########
inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/config/ProxyConfigManager.java:
##########
@@ -588,8 +588,12 @@ private ProxyConfigEntry getLocalProxyListFromFile(String filePath) throws Excep
         Map<String, Integer> streamIdMap = getStreamIdMap(localProxyAddrJson);
         proxyEntry.setGroupIdNumAndStreamIdNumMap(groupIdNum, streamIdMap);
         proxyEntry.setLoad(load);
-        if (localProxyAddrJson.has("cluster_id")) {
-            proxyEntry.setClusterId(localProxyAddrJson.get("cluster_id").getAsString());
+        if (localProxyAddrJson.has("data")) {

Review Comment:
   Good job. LGTM. It is suggested to be done in another pr.



-- 
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] [incubator-inlong] dockerzhang merged pull request #4355: [INLONG-4354][SDK] Fix NPE of the ProxyConfigEntry cluster id

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


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