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 #4509: [FLINK-7406][network] Implement Netty receiver inc...
Date Tue, 21 Nov 2017 14:49:49 GMT
Github user NicoK commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4509#discussion_r152239190
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java
---
    @@ -462,4 +554,42 @@ public String getMessage() {
     				expectedSequenceNumber, actualSequenceNumber);
     		}
     	}
    +
    +	private class AvailableBufferQueue {
    +
    +		/** The current available floating buffers from the fixed buffer pool. */
    +		private final ArrayDeque<Buffer> floatingBuffers;
    +
    +		/** The current available exclusive buffers from the global buffer pool. */
    +		private final ArrayDeque<Buffer> exclusiveBuffers;
    +
    +		AvailableBufferQueue() {
    +			this.exclusiveBuffers = new ArrayDeque<>();
    +			this.floatingBuffers = new ArrayDeque<>();
    +		}
    +
    +		void addExclusiveBuffer(Buffer buffer) {
    +			exclusiveBuffers.add(buffer);
    +		}
    +
    +		Buffer takeExclusiveBuffer() {
    --- End diff --
    
    should be `@Nullable`


---

Mime
View raw message