kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rha...@apache.org
Subject [kafka] branch trunk updated: KAFKA-10111: Make SinkTaskContext.errantRecordReporter() a default method (#8814)
Date Fri, 05 Jun 2020 20:21:38 GMT
This is an automated email from the ASF dual-hosted git repository.

rhauch pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git

The following commit(s) were added to refs/heads/trunk by this push:
     new da32720  KAFKA-10111: Make SinkTaskContext.errantRecordReporter() a default method
da32720 is described below

commit da32720c19dfdfb0d1151267b5459bded7ba3bc5
Author: Randall Hauch <rhauch@gmail.com>
AuthorDate: Fri Jun 5 15:20:24 2020 -0500

    KAFKA-10111: Make SinkTaskContext.errantRecordReporter() a default method (#8814)
    Connector projects may have their own mock or testing implementations of the `SinkTaskContext`,
and this newly-added method should be a default method to prevent breaking those projects.
Changing this to a default method that returns null also makes sense w/r/t the method semantics,
since the method is already defined to return null if the reporter has not been configured.
    Author: Randall Hauch <rhauch@gmail.com>
    Reviewer: Konstantine Karantasis <konstantine@confluent.io>
 .../src/main/java/org/apache/kafka/connect/sink/SinkTaskContext.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/connect/api/src/main/java/org/apache/kafka/connect/sink/SinkTaskContext.java
index a431dbe..33c82cb 100644
--- a/connect/api/src/main/java/org/apache/kafka/connect/sink/SinkTaskContext.java
+++ b/connect/api/src/main/java/org/apache/kafka/connect/sink/SinkTaskContext.java
@@ -119,6 +119,8 @@ public interface SinkTaskContext {
      * @return the reporter; null if no error reporter has been configured for the connector
      * @since 2.6
-    ErrantRecordReporter errantRecordReporter();
+    default ErrantRecordReporter errantRecordReporter() {
+        return null;
+    }

View raw message