[
https://issues.apache.org/jira/browse/FLINK-7468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16281492#comment-16281492
]
ASF GitHub Bot commented on FLINK-7468:
---------------------------------------
Github user zhijiangW commented on a diff in the pull request:
https://github.com/apache/flink/pull/4559#discussion_r155454935
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultSubpartitionView.java
---
@@ -22,32 +22,57 @@
import java.io.IOException;
+import static org.apache.flink.util.Preconditions.checkNotNull;
+
/**
* A view to consume a {@link ResultSubpartition} instance.
*/
-public interface ResultSubpartitionView {
+public abstract class ResultSubpartitionView {
+
+ /** The parent subpartition this view belongs to. */
+ private final ResultSubpartition parent;
+
+ public ResultSubpartitionView(ResultSubpartition parent) {
+ this.parent = checkNotNull(parent);
+ }
+
+ /**
+ * Returns the next {@link Buffer} instance of this queue iterator and
also
+ * decreases the related statistics.
+ */
+ public Buffer getNextBuffer() throws IOException, InterruptedException {
--- End diff --
i think it makes sense.
> Implement sender backlog logic for credit-based
> -----------------------------------------------
>
> Key: FLINK-7468
> URL: https://issues.apache.org/jira/browse/FLINK-7468
> Project: Flink
> Issue Type: Sub-task
> Components: Network
> Reporter: zhijiang
> Assignee: zhijiang
> Fix For: 1.5.0
>
>
> This is a part of work for credit-based network flow control.
> Receivers should know how many buffers are available on the sender side (the
> backlog). The receivers use this information to decide how to distribute
> floating buffers.
> The {{ResultSubpartition}} maintains the backlog which only indicates the
> number of buffers in this subpartition, not including the number of events.
> The backlog is increased for adding buffer to this subpartition, and
> decreased for polling buffer from it.
> The backlog is attached in {{BufferResponse}} by sender as an absolute value
> after the buffer being transferred.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)