hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iwasak...@apache.org
Subject hadoop git commit: HADOOP-13244. o.a.h.ipc.Server#Server should honor handlerCount when queueSizePerHandler is specified in consturctor. Contributed by Kai Sasaki.
Date Tue, 14 Jun 2016 10:54:57 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.8 3bf5379ad -> 3c9d31c55


HADOOP-13244. o.a.h.ipc.Server#Server should honor handlerCount when queueSizePerHandler is
specified in consturctor. Contributed by Kai Sasaki.

(cherry picked from commit 20b13d109a1f66d8911936d26bdde38d81a1c4c6)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/3c9d31c5
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/3c9d31c5
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/3c9d31c5

Branch: refs/heads/branch-2.8
Commit: 3c9d31c55a4329f4255598dcb6f7143df03149a0
Parents: 3bf5379
Author: Masatake Iwasaki <iwasakims@apache.org>
Authored: Tue Jun 14 19:20:46 2016 +0900
Committer: Masatake Iwasaki <iwasakims@apache.org>
Committed: Tue Jun 14 19:52:48 2016 +0900

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/ipc/Server.java              | 2 +-
 .../src/test/java/org/apache/hadoop/ipc/TestRPC.java             | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/3c9d31c5/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java
index bf2b5c5..5d3e23e 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java
@@ -2469,7 +2469,7 @@ public abstract class Server {
     this.maxDataLength = conf.getInt(CommonConfigurationKeys.IPC_MAXIMUM_DATA_LENGTH,
         CommonConfigurationKeys.IPC_MAXIMUM_DATA_LENGTH_DEFAULT);
     if (queueSizePerHandler != -1) {
-      this.maxQueueSize = queueSizePerHandler;
+      this.maxQueueSize = handlerCount * queueSizePerHandler;
     } else {
       this.maxQueueSize = handlerCount * conf.getInt(
           CommonConfigurationKeys.IPC_SERVER_HANDLER_QUEUE_SIZE_KEY,

http://git-wip-us.apache.org/repos/asf/hadoop/blob/3c9d31c5/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPC.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPC.java
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPC.java
index 9212163..93c78ec 100644
--- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPC.java
+++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPC.java
@@ -348,6 +348,10 @@ public class TestRPC extends TestRpcBase {
 
     assertEquals(3, server.getNumReaders());
     assertEquals(200, server.getMaxQueueSize());
+
+    server = newServerBuilder(conf).setQueueSizePerHandler(10)
+        .setNumHandlers(2).setVerbose(false).build();
+    assertEquals(2 * 10, server.getMaxQueueSize());
   }
 
   @Test


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message