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/19 15:54:12 UTC

[GitHub] [inlong] vernedeng opened a new pull request, #5134: [INLONG-5117][SortStandalone] Support specify component type from remote config

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

   
   - Fixes #5117
   
   ### Motivation
   
   Current config loading strategy restricts the flexibility of sort-standalone by naming the only type of components in config file. Which means one sort-standalone node can only support a series of tasks with the same type of sink.
   By specify this params into SortTask, the sort-standalone will be decoupled from node to task.
   
   ### Modifications
   
   allow sort-standalone get type of components from remote config
   
   ### Verifying this change
   
   *(Please pick either of the following options)*
   
   - [ ] This change is a trivial rework/code cleanup without any test coverage.
   
   - [ ] This change is already covered by existing tests, such as:
     *(please describe tests)*
   
   - [ ] This change added tests and can be verified as follows:
   
     *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (yes / no)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
     - If a feature is not applicable for documentation, explain why?
     - If a feature is not documented yet in this PR, please create a follow-up issue for adding the documentation
   


-- 
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] EMsnap commented on a diff in pull request #5134: [INLONG-5117][SortStandalone] Support specify component type from remote config

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


##########
inlong-sort-standalone/sort-standalone-common/src/main/java/org/apache/inlong/sort/standalone/utils/FlumeConfigGenerator.java:
##########
@@ -32,17 +33,19 @@ public class FlumeConfigGenerator {
     public static final String KEY_SORT_CHANNEL_TYPE = "sortChannel.type";
     public static final String KEY_SORT_SINK_TYPE = "sortSink.type";
     public static final String KEY_SORT_SOURCE_TYPE = "sortSource.type";
+    public static final String KEY_SDK_START_TIME = "start-time";

Review Comment:
   CamelCase please



##########
inlong-sort-standalone/sort-standalone-common/src/main/java/org/apache/inlong/sort/standalone/utils/FlumeConfigGenerator.java:
##########
@@ -51,14 +54,15 @@ public static Map<String, String> generateFlumeConfiguration(SortTaskConfig task
      *
      * @param flumeConf
      */
-    private static void appendChannels(Map<String, String> flumeConf, String name) {
+    private static void appendChannels(Map<String, String> flumeConf, String name, Map<String, String> sinkParams) {
         StringBuilder builder = new StringBuilder();
         String channelName = name + "Channel";
         flumeConf.put(name + ".channels", channelName);
         String prefix = builder.append(name).append(".channels.").append(channelName).append(".").toString();
         builder.setLength(0);
         String channelType = builder.append(prefix).append("type").toString();
-        String channelClass = CommonPropertiesHolder.getString(KEY_SORT_CHANNEL_TYPE);
+        String channelClass = sinkParams.getOrDefault(KEY_SORT_CHANNEL_TYPE,

Review Comment:
   final a variable inside a method



-- 
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 #5134: [INLONG-5117][SortStandalone] Support specify component type from remote config

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


##########
inlong-sort-standalone/sort-standalone-common/src/main/java/org/apache/inlong/sort/standalone/utils/FlumeConfigGenerator.java:
##########
@@ -32,17 +33,19 @@ public class FlumeConfigGenerator {
     public static final String KEY_SORT_CHANNEL_TYPE = "sortChannel.type";
     public static final String KEY_SORT_SINK_TYPE = "sortSink.type";
     public static final String KEY_SORT_SOURCE_TYPE = "sortSource.type";
+    public static final String KEY_SDK_START_TIME = "start-time";

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


[GitHub] [inlong] EMsnap commented on a diff in pull request #5134: [INLONG-5117][SortStandalone] Support specify component type from remote config

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


##########
inlong-sort-standalone/sort-standalone-common/src/main/java/org/apache/inlong/sort/standalone/utils/FlumeConfigGenerator.java:
##########
@@ -51,14 +54,15 @@ public static Map<String, String> generateFlumeConfiguration(SortTaskConfig task
      *
      * @param flumeConf
      */
-    private static void appendChannels(Map<String, String> flumeConf, String name) {
+    private static void appendChannels(Map<String, String> flumeConf, String name, Map<String, String> sinkParams) {
         StringBuilder builder = new StringBuilder();
         String channelName = name + "Channel";
         flumeConf.put(name + ".channels", channelName);
         String prefix = builder.append(name).append(".channels.").append(channelName).append(".").toString();
         builder.setLength(0);
         String channelType = builder.append(prefix).append("type").toString();
-        String channelClass = CommonPropertiesHolder.getString(KEY_SORT_CHANNEL_TYPE);
+        String channelClass = sinkParams.getOrDefault(KEY_SORT_CHANNEL_TYPE,

Review Comment:
   final a variable inside a method



-- 
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 #5134: [INLONG-5117][SortStandalone] Support specify component type from remote config

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


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