flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aljoscha <...@git.apache.org>
Subject [GitHub] flink pull request #4616: [FLINK-7552] [FLINK-7553] Enhance SinkInterface / ...
Date Tue, 05 Sep 2017 16:25:52 GMT
Github user aljoscha commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4616#discussion_r137039841
  
    --- Diff: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/sink/SinkFunction.java
---
    @@ -35,6 +35,39 @@
     	 *
     	 * @param value The input record.
     	 * @throws Exception
    +	 * @deprecated Use {@link #invoke(SinkContext, Object)}.
     	 */
    -	void invoke(IN value) throws Exception;
    +	@Deprecated
    +	default void invoke(IN value) throws Exception {
    +	}
    +
    +	/**
    +	 * Writes the given value to the sink. This function is called for every record.
    +	 *
    +	 * @param context Additional context about the input record.
    +	 * @param value The input record.
    +	 * @throws Exception
    +	 */
    +	default void invoke(SinkContext context, IN value) throws Exception {
    --- End diff --
    
    Makes sense, I will change this. 👍 


---

Mime
View raw message