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/07/21 16:00:53 UTC

[GitHub] [inlong] vernedeng opened a new pull request, #5172: [INLONG-5165][Manager] getSortSource collects wrong topic properties of each stream

vernedeng opened a new pull request, #5172:
URL: https://github.com/apache/inlong/pull/5172

   ### Prepare a Pull Request
   *(Change the title refer to the following example)*
   
   - Title Example: [INLONG-XYZ][Component] Title of the pull request
   
   *(The following *XYZ* should be replaced by the actual [GitHub Issue](https://github.com/apache/inlong/issues) number)*
   
   - Fixes #5165
   
   ### Motivation
   
   The TopicProperties in SortSourceConfig, which is used to config sort sdk, collects wrong topic properties.
   The correct topic properties of each stream should be maintain by ext_params in Stream_Sink , instead of Inlong_Group
   
   ### Modifications
   
   *Describe the modifications you've done.*
   
   ### Verifying this change
   
   *(Please pick either of the following options)*
   
   - [ ] This change is already covered by existing tests, such as:
   SortServiceImplTest
   
   ### Documentation
   
     - Does this pull request introduce a new feature? no
     - If yes, how is the feature documented? JavaDocs
   
   


-- 
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] [inlong] dockerzhang merged pull request #5172: [INLONG-5165][Manager] Getting Sort source collects wrong topic properties of each stream

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


-- 
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] [inlong] vernedeng commented on a diff in pull request #5172: [INLONG-5165][Manager] Getting Sort source collects wrong topic properties of each stream

Posted by GitBox <gi...@apache.org>.
vernedeng commented on code in PR #5172:
URL: https://github.com/apache/inlong/pull/5172#discussion_r927246125


##########
inlong-sort/pom.xml:
##########
@@ -40,7 +40,7 @@
         <module>sort-connectors</module>
         <module>sort-core</module>
         <module>sort-dist</module>
-        <module>sort-end-to-end-tests</module>
+        <!--<module>sort-end-to-end-tests</module>-->

Review Comment:
   sorry, foget to uncomment it.



-- 
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] [inlong] healchow commented on a diff in pull request #5172: [INLONG-5165][Manager] Getting Sort source collects wrong topic properties of each stream

Posted by GitBox <gi...@apache.org>.
healchow commented on code in PR #5172:
URL: https://github.com/apache/inlong/pull/5172#discussion_r927227517


##########
inlong-sort/pom.xml:
##########
@@ -40,7 +40,7 @@
         <module>sort-connectors</module>
         <module>sort-core</module>
         <module>sort-dist</module>
-        <module>sort-end-to-end-tests</module>
+        <!--<module>sort-end-to-end-tests</module>-->

Review Comment:
   Please do not change this module, the unit tests error for this module will be fixed later.



##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/sortstandalone/SortSourceStreamInfo.java:
##########
@@ -17,12 +17,38 @@
 
 package org.apache.inlong.manager.common.pojo.sortstandalone;
 
+import com.google.gson.Gson;
 import lombok.Data;
+import org.apache.pulsar.shade.org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 @Data
 public class SortSourceStreamInfo {
     private static final long serialVersionUID = 1L;
+    private static final Logger LOGGER = LoggerFactory.getLogger(SortSourceStreamInfo.class);
     String sortClusterName;
     String sortTaskName;
     String groupId;
+    String extParams;
+    Map<String, String> extParamsMap;
+
+    public Map<String, String> getExtParamsMap() {
+        if (extParamsMap != null) {
+            return extParamsMap;
+        }
+        if (StringUtils.isNotBlank(extParams)) {
+            try {
+                Gson gson = new Gson();
+                extParamsMap = gson.fromJson(extParams, Map.class);
+            } catch (Throwable t) {
+                LOGGER.error(t.getMessage(), t);

Review Comment:
   Suggest setting more info in the error log, the exception stack trace has already included the message info.



-- 
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] [inlong] vernedeng commented on a diff in pull request #5172: [INLONG-5165][Manager] Getting Sort source collects wrong topic properties of each stream

Posted by GitBox <gi...@apache.org>.
vernedeng commented on code in PR #5172:
URL: https://github.com/apache/inlong/pull/5172#discussion_r927247997


##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/sortstandalone/SortSourceStreamInfo.java:
##########
@@ -17,12 +17,38 @@
 
 package org.apache.inlong.manager.common.pojo.sortstandalone;
 
+import com.google.gson.Gson;
 import lombok.Data;
+import org.apache.pulsar.shade.org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 @Data
 public class SortSourceStreamInfo {
     private static final long serialVersionUID = 1L;
+    private static final Logger LOGGER = LoggerFactory.getLogger(SortSourceStreamInfo.class);
     String sortClusterName;
     String sortTaskName;
     String groupId;
+    String extParams;
+    Map<String, String> extParamsMap;
+
+    public Map<String, String> getExtParamsMap() {
+        if (extParamsMap != null) {
+            return extParamsMap;
+        }
+        if (StringUtils.isNotBlank(extParams)) {
+            try {
+                Gson gson = new Gson();
+                extParamsMap = gson.fromJson(extParams, Map.class);
+            } catch (Throwable t) {
+                LOGGER.error(t.getMessage(), t);

Review Comment:
   fixed, thx



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