JingGe commented on a change in pull request #18428:
URL: https://github.com/apache/flink/pull/18428#discussion_r794360373



##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/sink/WriterOperator.java
##########
@@ -56,105 +59,64 @@
  * 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:
- *
- * <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>
+ * <p>The operator may be part of a sink pipeline and is the first operator.
  *
  * @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
  */
-class SinkOperator<InputT, CommT, WriterStateT> extends 
AbstractStreamOperator<byte[]>
-        implements OneInputStreamOperator<InputT, byte[]>, BoundedOneInput {
+class WriterOperator<InputT, CommT> extends 
AbstractStreamOperator<CommittableMessage<CommT>>

Review comment:
       From the code readability perspective, first of all, the package info is 
"hidden" in the import corner; second, it is not consistent, `Committer` -> 
`CommitterOperator`, but `SinkWriter` -> `WriterOperator`. Comparing to 
"Committer", the word "Writer" is more common and abstracted, could be used in 
many different scenarios. But, your point is also fair enough.




-- 
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]


Reply via email to