chantccc commented on a change in pull request #2251:
URL: https://github.com/apache/incubator-inlong/pull/2251#discussion_r789324829



##########
File path: 
inlong-sort/sort-core/src/main/java/org/apache/inlong/sort/flink/kafka/KafkaSerializationSchemaBuilder.java
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.inlong.sort.flink.kafka;
+
+import org.apache.flink.api.common.serialization.SerializationSchema;
+import org.apache.flink.types.Row;
+import org.apache.inlong.sort.protocol.serialization.SerializationInfo;
+
+import java.nio.charset.StandardCharsets;
+
+public class KafkaSerializationSchemaBuilder {

Review comment:
       KafkaSerializationSchemaBuilder -> SerializationSchemaBuilder
   the builder will be used in more sinks in the future 

##########
File path: 
inlong-sort/sort-single-tenant/src/main/java/org/apache/inlong/sort/singletenant/flink/Entrance.java
##########
@@ -93,7 +100,9 @@ private static DataFlowInfo getDataflowInfoFromFile(String 
fileName) throws IOEx
     private static void buildSinkStream(
             DataStream<Row> sourceStream,
             Configuration config,
-            SinkInfo sinkInfo) {
+            SinkInfo sinkInfo,
+            Map<String, Object> properties,
+            CheckpointingMode checkpointingMode) {

Review comment:
       put checkpointingMode in config, and give it a default value 
'EXACTLY_ONCE'

##########
File path: 
inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/sink/KafkaSinkInfo.java
##########
@@ -0,0 +1,80 @@
+package org.apache.inlong.sort.protocol.sink;
+
+import 
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty;
+import org.apache.inlong.sort.protocol.FieldInfo;
+import org.apache.inlong.sort.protocol.serialization.SerializationInfo;
+
+import java.util.Objects;
+
+public class KafkaSinkInfo extends SinkInfo {
+
+    private static final long serialVersionUID = 161617117094475954L;
+
+    @JsonProperty("version")
+    private final String kafkaVersion;
+
+    @JsonProperty("address")
+    private final String address;
+
+    @JsonProperty("topic")
+    private final String topic;
+
+    @JsonProperty("serialization_info")
+    private final SerializationInfo serializationInfo;
+
+    public KafkaSinkInfo(

Review comment:
       it's better to add annotation @JsonCreator

##########
File path: inlong-sort/sort-core/pom.xml
##########
@@ -227,6 +227,11 @@
             <version>3.1</version>
         </dependency>
 
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>flink-connector-kafka_2.11</artifactId>

Review comment:
       Currently, sort-core do not need to depend on this




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