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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to