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/02/27 03:34:35 UTC

[GitHub] [incubator-inlong] healchow commented on a change in pull request #2767: [INLONG-2751][Manager] Fix the response code while query failing

healchow commented on a change in pull request #2767:
URL: https://github.com/apache/incubator-inlong/pull/2767#discussion_r815383061



##########
File path: inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/config/ConfigManager.java
##########
@@ -287,14 +288,15 @@ private boolean checkWithManager(String host, String proxyClusterName) {
                 Map<String, String> groupIdToMValue = new HashMap<String, String>();
                 Map<String, String> mqConfig = new HashMap<>();// include url2token and other params
 
-                if (configJson.getErrCode() == 0) {
+                if (configJson.isSuccess()) { //success get config
+                    LOG.info("getConfig_v2 result: {}", returnStr);
                     /*
                      * get mqUrls <->token maps;
                      * if mq is pulsar, store format: third-party-cluster.index1=cluster1url1,cluster1url2=token
                      * if mq is tubemq, token is "", store format: third-party-cluster.index1=cluster1url1,cluster1url2=
                      */
                     int index = 1;
-                    List<ThirdPartyClusterInfo> clusterSet = configJson.getPulsarSet();
+                    List<ThirdPartyClusterInfo> clusterSet = configJson.getData().getMqSet();

Review comment:
       `configJson.getData()` may be null, so direct call `getMqSet()` may cause a null pointer exception.




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