pawel-big-lebowski commented on code in PR #130:
URL: 
https://github.com/apache/flink-connector-kafka/pull/130#discussion_r1818830900


##########
flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/sink/KafkaSink.java:
##########
@@ -132,4 +142,30 @@ public SimpleVersionedSerializer<KafkaWriterState> 
getWriterStateSerializer() {
     protected Properties getKafkaProducerConfig() {
         return kafkaProducerConfig;
     }
+
+    @Override
+    public LineageVertex getLineageVertex() {
+        // enrich dataset facet with properties
+        if (recordSerializer instanceof KafkaDatasetFacetProvider) {
+            Optional<KafkaDatasetFacet> kafkaDatasetFacet =
+                    ((KafkaDatasetFacetProvider) 
recordSerializer).getKafkaDatasetFacet();
+
+            if (!kafkaDatasetFacet.isPresent()) {
+                LOG.warn("Provided did not return kafka dataset facet");
+                return null;

Review Comment:
   Nope, interface doesn't specify `@nullable`. We can return `LineageVertex` 
with empty dataset list instead.



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to