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



##########
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:
       Usually, I am not a big fan to encode duplicate information in the java 
module path and class name. In this case, all the classes are already in the 
`sink` module and therefore belong to the `sink`. On the other, we also only 
call it `CommitterOperator` and not `SinkCommitterOperator`. 
   
   The information you are looking for should be part of the public-facing 
interfaces (`SinkWriter`, `Committer`) and I do not think it makes much sense 
to repeat them internally. 




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