zentol commented on a change in pull request #8494: [FLINK-12570] Switch Task
from ResultPartition to ResultPartitionWriter interface
URL: https://github.com/apache/flink/pull/8494#discussion_r286909547
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/writer/ResultPartitionWriter.java
##########
@@ -65,4 +67,23 @@
* Manually trigger consumption from enqueued {@link BufferConsumer
BufferConsumers} in one specified subpartition.
*/
void flush(int subpartitionIndex);
+
+ /**
+ * Fails partition producing.
+ *
+ * <p>The method propagates non-{@code null} failure cause to consumer
based on best effort.
+ * It may also release some resources.
+ * Closing of partition is still needed afterwards.
+ *
+ * @param throwable failure cause
+ */
+ void fail(@Nullable Throwable throwable);
+
+ /**
+ * Indicates successful end of partition producing.
+ *
+ * <p>It can be used to notify the consumers that the producing is done.
Review comment:
"can be used" implies that all implementation allow this, and the user
decides whether to do it or not.
If the notification is an implementation detail I'd remove it from the
javadocs here.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services