You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by om...@apache.org on 2011/03/04 04:54:36 UTC
svn commit: r1077235 -
/hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/ipc/Server.java
Author: omalley
Date: Fri Mar 4 03:54:35 2011
New Revision: 1077235
URL: http://svn.apache.org/viewvc?rev=1077235&view=rev
Log:
commit 11a45ea121978f2409c1ec3581053f77122f7f97
Author: Suresh Srinivas <su...@yahoo-inc.com>
Date: Fri Feb 26 16:56:52 2010 -0800
Hadoop-1849 from https://issues.apache.org/jira/secure/attachment/12437092/handlerQueueSizeConfig-0.20.patch
+++ b/YAHOO-CHANGES.txt
+
+ HADOOP-1849. Add undocumented configuration parameter for per handler
+ call queue size in IPC Server. (shv)
+
Modified:
hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/ipc/Server.java
Modified: hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/ipc/Server.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/ipc/Server.java?rev=1077235&r1=1077234&r2=1077235&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/ipc/Server.java (original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/ipc/Server.java Fri Mar 4 03:54:35 2011
@@ -100,7 +100,9 @@ public abstract class Server {
/**
* How many calls/handler are allowed in the queue.
*/
- private static final int MAX_QUEUE_SIZE_PER_HANDLER = 100;
+ private static final int IPC_SERVER_HANDLER_QUEUE_SIZE_DEFAULT = 100;
+ private static final String IPC_SERVER_HANDLER_QUEUE_SIZE_KEY =
+ "ipc.server.handler.queue.size";
/**
* Initial and max size of response buffer
@@ -1286,7 +1288,9 @@ public abstract class Server {
this.paramClass = paramClass;
this.handlerCount = handlerCount;
this.socketSendBufferSize = 0;
- this.maxQueueSize = handlerCount * MAX_QUEUE_SIZE_PER_HANDLER;
+ this.maxQueueSize = handlerCount * conf.getInt(
+ IPC_SERVER_HANDLER_QUEUE_SIZE_KEY,
+ IPC_SERVER_HANDLER_QUEUE_SIZE_DEFAULT);
this.maxRespSize = conf.getInt(IPC_SERVER_RPC_MAX_RESPONSE_SIZE_KEY,
IPC_SERVER_RPC_MAX_RESPONSE_SIZE_DEFAULT);
this.callQueue = new LinkedBlockingQueue<Call>(maxQueueSize);