You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by "gong (via GitHub)" <gi...@apache.org> on 2023/03/01 14:39:12 UTC

[GitHub] [inlong] gong opened a new pull request, #7486: [INLONG-7485][Sort] Kafka extract node decide connector option by format

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

   ### Prepare a Pull Request
   
   - [INLONG-7485][Sort] Kafka extract node decide connector option by format
   
   - Fixes #7485 
   
   ### Motivation
   
   * Kafka extract node decide connector option by format
   
   ### Modifications
   
   * Modify Kafka extract node about connector option
   
   


-- 
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] gong commented on a diff in pull request #7486: [INLONG-7485][Sort] Kafka extract node decide connector option by format

Posted by "gong (via GitHub)" <gi...@apache.org>.
gong commented on code in PR #7486:
URL: https://github.com/apache/inlong/pull/7486#discussion_r1122531965


##########
inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/node/extract/KafkaExtractNode.java:
##########
@@ -166,6 +169,21 @@ public Map<String, String> tableOptions() {
         return options;
     }
 
+    /**
+     * true is upsert kafka connector
+     * false is kafka connector
+     * @return connector option is
+     */
+    private boolean isUpsertKafkaConnector(Format format, boolean hasPrimaryKey) {
+        if (format instanceof JsonFormat && hasPrimaryKey) {

Review Comment:
   > Maybe it is better implement by 'return hasPrimaryKey && (format instansof JsonFormat || format instansof ...);'
   
   It is too long. It could add other format in th future.



-- 
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] yunqingmoswu commented on a diff in pull request #7486: [INLONG-7485][Sort] Kafka extract node decide connector option by format

Posted by "yunqingmoswu (via GitHub)" <gi...@apache.org>.
yunqingmoswu commented on code in PR #7486:
URL: https://github.com/apache/inlong/pull/7486#discussion_r1122529143


##########
inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/node/extract/KafkaExtractNode.java:
##########
@@ -166,6 +169,21 @@ public Map<String, String> tableOptions() {
         return options;
     }
 
+    /**
+     * true is upsert kafka connector
+     * false is kafka connector
+     * @return connector option is
+     */
+    private boolean isUpsertKafkaConnector(Format format, boolean hasPrimaryKey) {
+        if (format instanceof JsonFormat && hasPrimaryKey) {

Review Comment:
   Maybe it is better implement by 'return hasPrimaryKey && (format instansof JsonFormat || format instansof ...);'



-- 
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 #7486: [INLONG-7485][Sort] Kafka extract node decide connector option by format

Posted by "dockerzhang (via GitHub)" <gi...@apache.org>.
dockerzhang merged PR #7486:
URL: https://github.com/apache/inlong/pull/7486


-- 
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 #7486: [INLONG-7485][Sort] Kafka extract node decide connector option by format

Posted by "EMsnap (via GitHub)" <gi...@apache.org>.
EMsnap commented on code in PR #7486:
URL: https://github.com/apache/inlong/pull/7486#discussion_r1122524992


##########
inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/node/extract/KafkaExtractNode.java:
##########
@@ -166,6 +169,21 @@ public Map<String, String> tableOptions() {
         return options;
     }
 
+    /**
+     * true is upsert kafka connector
+     * false is kafka connector
+     * @return connector option is

Review Comment:
   wrong statement



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