THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
A new method to write or process watermarks from upstream operators.
package org.apache.flink.streaming.api.functions.sink;
import org.apache.flink.api.common.eventtime.Watermark;
@Public
public interface SinkFunction<IN> extends Function, Serializable {
/**
* Write the given watermark to the sink. This function is called for every watermark.
*
* @param watermark The watermark.
* @throws Exception This method may throw exceptions. Throwing an exception will cause the
* operation to fail and may trigger recovery.
*/
default void writeWatermark(Watermark watermark) throws Exception {}
default void invoke(IN value, Context context) throws Exception {}
}
...
A new method to write watermarks from upstream operators.
package org.apache.flink.api.connector.sink;
import org.apache.flink.api.common.eventtime.Watermark;
public interface SinkWriter<InputT, CommT, WriterStateT> extends AutoCloseable {
/**
* Add a watermark to the writer.
*
* @param watermark The watermark.
* @throws IOException if fail to add a watermark.
*/
default void writeWatermark(Watermark watermark) throws IOException {}
void write(InputT element, Context context) throws IOException;
}
...