|
@@ -60,8 +60,6 @@ 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 static org.apache.hadoop.fs.CommonConfigurationKeys.*;
|
|
|
import org.apache.hadoop.io.Writable;
|
|
|
import org.apache.hadoop.io.WritableUtils;
|
|
|
import org.apache.hadoop.ipc.metrics.RpcMetrics;
|
|
@@ -98,12 +96,7 @@ public abstract class Server {
|
|
|
// 3 : Introduce the protocol into the RPC connection header
|
|
|
// 4 : Introduced SASL security layer
|
|
|
public static final byte CURRENT_VERSION = 4;
|
|
|
-
|
|
|
- /**
|
|
|
- * 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
|
|
|
*/
|
|
@@ -1288,9 +1281,12 @@ public abstract class Server {
|
|
|
this.paramClass = paramClass;
|
|
|
this.handlerCount = handlerCount;
|
|
|
this.socketSendBufferSize = 0;
|
|
|
- this.maxQueueSize = handlerCount * MAX_QUEUE_SIZE_PER_HANDLER;
|
|
|
- this.maxRespSize = conf.getInt(IPC_SERVER_RPC_MAX_RESPONSE_SIZE_KEY,
|
|
|
- IPC_SERVER_RPC_MAX_RESPONSE_SIZE_DEFAULT);
|
|
|
+ this.maxQueueSize = handlerCount * conf.getInt(
|
|
|
+ CommonConfigurationKeys.IPC_SERVER_HANDLER_QUEUE_SIZE_KEY,
|
|
|
+ CommonConfigurationKeys.IPC_SERVER_HANDLER_QUEUE_SIZE_DEFAULT);
|
|
|
+ this.maxRespSize = conf.getInt(
|
|
|
+ CommonConfigurationKeys.IPC_SERVER_RPC_MAX_RESPONSE_SIZE_KEY,
|
|
|
+ CommonConfigurationKeys.IPC_SERVER_RPC_MAX_RESPONSE_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);
|