AHeise commented on a change in pull request #16701:
URL: https://github.com/apache/flink/pull/16701#discussion_r683684529
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/sink/SinkOperator.java
##########
@@ -32,25 +34,42 @@
import org.apache.flink.streaming.runtime.streamrecord.StreamRecord;
import org.apache.flink.streaming.runtime.tasks.ProcessingTimeService;
import org.apache.flink.util.UserCodeClassLoader;
+import org.apache.flink.util.function.BiFunctionWithException;
+import javax.annotation.Nullable;
+
+import java.io.IOException;
+import java.util.Collection;
import java.util.List;
import static org.apache.flink.util.Preconditions.checkNotNull;
/**
- * Abstract base class for operators that work with a {@link SinkWriter}.
+ * An operator that processes records to be written into a {@link
+ * org.apache.flink.api.connector.sink.Sink}. It also has a way to process
committables with the
+ * same parallelism or send them downstream to a {@link CommitterOperator}
with a different
+ * parallelism.
+ *
+ * <p>The operator may be part of a sink pipeline and is the first operator.
There are currently two
+ * ways this operator is used:
*
- * <p>Sub-classes are responsible for creating the specific {@link SinkWriter}
by implementing
- * {@link #createWriter()}.
+ * <ul>
+ * <li>In streaming mode, there is this operator with parallelism p
containing {@link
+ * org.apache.flink.api.connector.sink.SinkWriter} and {@link
+ * org.apache.flink.api.connector.sink.Committer} and a {@link
CommitterOperator} containing
+ * the {@link org.apache.flink.api.connector.sink.GlobalCommitter} with
parallelism 1.
+ * <li>In batch mode, there is this operator with parallelism p containing
{@link
+ * org.apache.flink.api.connector.sink.SinkWriter} and a {@link
CommitterOperator} containing
+ * the {@link org.apache.flink.api.connector.sink.Committer} and {@link
+ * org.apache.flink.api.connector.sink.GlobalCommitter} with parallelism
1.
+ * </ul>
*
- * @param <InputT> The input type of the {@link SinkWriter}.
- * @param <CommT> The committable type of the {@link SinkWriter}.
+ * @param <InputT> the type of the committable
+ * @param <CommT> the type of the committable (to send to downstream operators)
+ * @param <WriterStateT> the type of the writer state for stateful sinks
*/
-@Internal
-abstract class AbstractSinkWriterOperator<InputT, CommT> extends
AbstractStreamOperator<CommT>
- implements OneInputStreamOperator<InputT, CommT>, BoundedOneInput {
-
- private static final long serialVersionUID = 1L;
+public class SinkOperator<InputT, CommT, WriterStateT> extends
AbstractStreamOperator<byte[]>
Review comment:
I made it non-public 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]