You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by pn...@apache.org on 2019/07/04 08:25:51 UTC

[flink] 04/04: [hotfix][network] Remove unnecessary getMemorySegmentSize method from NetworkBufferPool

This is an automated email from the ASF dual-hosted git repository.

pnowojski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 666aeaf5d577e5422233e2d15295fb52d5eb38f6
Author: Zhijiang <wa...@aliyun.com>
AuthorDate: Thu Jun 6 16:01:06 2019 +0800

    [hotfix][network] Remove unnecessary getMemorySegmentSize method from NetworkBufferPool
    
    Since LocalBufferPool is not relying on NetworkBufferPool#getMemorySegmentSize any more, and the current only usage for this method
    is in tests which also seems unnecessary. So we could remove this method from NetworkBufferPool.
---
 .../org/apache/flink/runtime/io/network/buffer/NetworkBufferPool.java | 4 ----
 .../apache/flink/runtime/io/network/buffer/NetworkBufferPoolTest.java | 1 -
 2 files changed, 5 deletions(-)

diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/buffer/NetworkBufferPool.java b/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/buffer/NetworkBufferPool.java
index 0247ab7..87f0f06 100755
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/buffer/NetworkBufferPool.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/buffer/NetworkBufferPool.java
@@ -230,10 +230,6 @@ public class NetworkBufferPool implements BufferPoolFactory, MemorySegmentProvid
 		return isDestroyed;
 	}
 
-	public int getMemorySegmentSize() {
-		return memorySegmentSize;
-	}
-
 	public int getTotalNumberOfMemorySegments() {
 		return totalNumberOfMemorySegments;
 	}
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/buffer/NetworkBufferPoolTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/buffer/NetworkBufferPoolTest.java
index 89f673c..cc6c3a0 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/buffer/NetworkBufferPoolTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/buffer/NetworkBufferPoolTest.java
@@ -61,7 +61,6 @@ public class NetworkBufferPoolTest extends TestLogger {
 			final int numBuffers = 10;
 
 			NetworkBufferPool globalPool = new NetworkBufferPool(numBuffers, bufferSize, 1);
-			assertEquals(bufferSize, globalPool.getMemorySegmentSize());
 			assertEquals(numBuffers, globalPool.getTotalNumberOfMemorySegments());
 			assertEquals(numBuffers, globalPool.getNumberOfAvailableMemorySegments());
 			assertEquals(0, globalPool.getNumberOfRegisteredBufferPools());