healchow commented on code in PR #4938:
URL: https://github.com/apache/inlong/pull/4938#discussion_r917205572


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/repository/DataProxyConfigRepository.java:
##########
@@ -163,53 +175,108 @@ private Map<String, List<InLongIdObject>> 
reloadInlongId() {
             if (groupId == null) {
                 continue;
             }
-            // choose topic
-            String groupTopic = groupIdObj.getTopic();
-            String streamTopic = streamIdObj.getTopic();
-            String finalTopic = null;
-            if (StringUtils.isEmpty(groupTopic)) {
-                // both empty then ignore
-                if (StringUtils.isEmpty(streamTopic)) {
-                    continue;
-                } else {
-                    finalTopic = streamTopic;
-                }
+            Map<String, String> groupParams = 
this.getExtParams(groupIdObj.getExtParams());
+            Map<String, String> streamParams = 
this.getExtParams(streamIdObj.getExtParams());
+            this.parseFirstTopic(groupIdObj, streamIdObj, groupParams, 
streamParams, inlongIdMap);
+            this.parseSecondTopic(groupIdObj, streamIdObj, groupParams, 
streamParams, inlongIdMap);
+        }
+        return inlongIdMap;
+    }
+
+    /**
+     * getExtParams
+     */
+    @SuppressWarnings("unchecked")
+    private Map<String, String> getExtParams(String extParams) {
+        // parse extparams
+        if (!StringUtils.isEmpty(extParams)) {
+            try {
+                Map<String, String> groupParams = gson.fromJson(extParams, 
HashMap.class);
+                return groupParams;
+            } catch (Exception e) {
+                LOGGER.error(e.getMessage(), e);

Review Comment:
   Suggest adding more info in the log, such as:
   ```java
   LOGGER.error("parse ext params from entity error:", e);
   ```



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