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/10/17 02:08:56 UTC

[GitHub] [inlong] thesumery commented on a diff in pull request #6165: [INLONG-6160][Sort] Support dynamic partition for KafkaLoadNode

thesumery commented on code in PR #6165:
URL: https://github.com/apache/inlong/pull/6165#discussion_r996557503


##########
inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/node/load/KafkaLoadNode.java:
##########
@@ -112,14 +119,23 @@ public KafkaLoadNode(@JsonProperty("id") String id,
             @JsonProperty("properties") Map<String, String> properties,
             @JsonProperty("primaryKey") String primaryKey,
             @Nullable @JsonProperty("sinkMultipleFormat") Format sinkMultipleFormat,
-            @Nullable @JsonProperty("topicPattern") String topicPattern) {
+            @Nullable @JsonProperty("topicPattern") String topicPattern,
+            @Nullable @JsonProperty("sinkPartitioner") String sinkPartitioner,
+            @Nullable @JsonProperty("partitionPattern") String partitionPattern) {
         super(id, name, fields, fieldRelations, filters, filterStrategy, sinkParallelism, properties);
         this.topic = Preconditions.checkNotNull(topic, "topic is null");
         this.bootstrapServers = Preconditions.checkNotNull(bootstrapServers, "bootstrapServers is null");
         this.format = Preconditions.checkNotNull(format, "format is null");
         this.primaryKey = primaryKey;
         this.sinkMultipleFormat = sinkMultipleFormat;
         this.topicPattern = topicPattern;
+        this.sinkPartitioner = sinkPartitioner;
+        if ("raw-hash".equals(sinkPartitioner)) {

Review Comment:
   extract a constant



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