|
@@ -60,6 +60,7 @@ import javax.security.auth.Subject;
|
|
|
import org.apache.commons.logging.Log;
|
|
|
import org.apache.commons.logging.LogFactory;
|
|
|
import org.apache.hadoop.conf.Configuration;
|
|
|
+import org.apache.hadoop.fs.CommonConfigurationKeys;
|
|
|
import org.apache.hadoop.security.SecurityUtil;
|
|
|
import org.apache.hadoop.io.Writable;
|
|
|
import org.apache.hadoop.io.WritableUtils;
|
|
@@ -84,12 +85,7 @@ public abstract class Server {
|
|
|
// 1 : Introduce ping and server does not throw away RPCs
|
|
|
// 3 : Introduce the protocol into the RPC connection header
|
|
|
public static final byte CURRENT_VERSION = 3;
|
|
|
-
|
|
|
- /**
|
|
|
- * How many calls/handler are allowed in the queue.
|
|
|
- */
|
|
|
- private static final int MAX_QUEUE_SIZE_PER_HANDLER = 100;
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* Initial and max size of response buffer
|
|
|
*/
|
|
@@ -1034,7 +1030,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(
|
|
|
+ CommonConfigurationKeys.IPC_SERVER_HANDLER_QUEUE_SIZE_KEY,
|
|
|
+ CommonConfigurationKeys.IPC_SERVER_HANDLER_QUEUE_SIZE_DEFAULT);
|
|
|
this.callQueue = new LinkedBlockingQueue<Call>(maxQueueSize);
|
|
|
this.maxIdleTime = 2*conf.getInt("ipc.client.connection.maxidletime", 1000);
|
|
|
this.maxConnectionsToNuke = conf.getInt("ipc.client.kill.max", 10);
|