flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From NicoK <...@git.apache.org>
Subject [GitHub] flink pull request #4559: [FLINK-7468][network] Implement sender backlog log...
Date Fri, 01 Dec 2017 13:38:15 GMT
Github user NicoK commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4559#discussion_r154343587
  
    --- 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 --
    
    `@Nullable` and (I'm not sure whether @pnowojski agrees) maybe make this method `final`
(any subclass should  only override `getNextBufferInternal`)?


---

Mime
View raw message