hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject git commit: HBASE-11492 Hadoop configuration overrides some ipc parameters including tcpNoDelay (Nicolas Liochon)
Date Mon, 14 Jul 2014 21:18:23 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 ef4f8d012 -> 9cb234104


HBASE-11492 Hadoop configuration overrides some ipc parameters including tcpNoDelay (Nicolas
Liochon)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/9cb23410
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/9cb23410
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/9cb23410

Branch: refs/heads/0.98
Commit: 9cb234104d63b1a96232e821ad0cbbb516aeae84
Parents: ef4f8d0
Author: Andrew Purtell <apurtell@apache.org>
Authored: Sun Jul 13 22:43:44 2014 -0700
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Mon Jul 14 14:16:52 2014 -0700

----------------------------------------------------------------------
 .../hadoop/hbase/ipc/FifoRpcScheduler.java      |  5 ++--
 .../org/apache/hadoop/hbase/ipc/RpcServer.java  | 30 +++++++++++++-------
 .../hadoop/hbase/ipc/SimpleRpcScheduler.java    | 18 ++++++++----
 .../hadoop/hbase/regionserver/HRegion.java      |  4 +--
 .../hadoop/hbase/TestFullLogReconstruction.java |  1 +
 .../hadoop/hbase/regionserver/wal/TestHLog.java | 11 ++++---
 6 files changed, 42 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/9cb23410/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/FifoRpcScheduler.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/FifoRpcScheduler.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/FifoRpcScheduler.java
index 7618436..0664b76 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/FifoRpcScheduler.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/FifoRpcScheduler.java
@@ -39,8 +39,9 @@ public class FifoRpcScheduler implements RpcScheduler {
 
   public FifoRpcScheduler(Configuration conf, int handlerCount) {
     this.handlerCount = handlerCount;
-    this.maxQueueLength = conf.getInt("ipc.server.max.callqueue.length",
-        handlerCount * RpcServer.DEFAULT_MAX_CALLQUEUE_LENGTH_PER_HANDLER);
+    this.maxQueueLength = conf.getInt("hbase.ipc.server.max.callqueue.length",
+      conf.getInt("ipc.server.max.callqueue.length",
+        handlerCount * RpcServer.DEFAULT_MAX_CALLQUEUE_LENGTH_PER_HANDLER));
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/hbase/blob/9cb23410/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
index ad930cc..bad389e 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
@@ -517,7 +517,8 @@ public class RpcServer implements RpcServerInterface {
                                          //-tion (for idle connections) ran
     private long cleanupInterval = 10000; //the minimum interval between
                                           //two cleanup runs
-    private int backlogLength = conf.getInt("ipc.server.listen.queue.size", 128);
+    private int backlogLength = conf.getInt("hbase.ipc.server.listen.queue.size",
+      conf.getInt("ipc.server.listen.queue.size", 128));
 
     private ExecutorService readPool;
 
@@ -1854,14 +1855,19 @@ public class RpcServer implements RpcServerInterface {
     this.isa = isa;
     this.conf = conf;
     this.socketSendBufferSize = 0;
-    this.maxQueueSize =
-      this.conf.getInt("ipc.server.max.callqueue.size", DEFAULT_MAX_CALLQUEUE_SIZE);
-    this.readThreads = conf.getInt("ipc.server.read.threadpool.size", 10);
-    this.maxIdleTime = 2*conf.getInt("ipc.client.connection.maxidletime", 1000);
-    this.maxConnectionsToNuke = conf.getInt("ipc.client.kill.max", 10);
-    this.thresholdIdleConnections = conf.getInt("ipc.client.idlethreshold", 4000);
-    this.purgeTimeout = conf.getLong("ipc.client.call.purge.timeout",
-      2 * HConstants.DEFAULT_HBASE_RPC_TIMEOUT);
+    this.maxQueueSize = conf.getInt("hbase.ipc.server.max.callqueue.size",
+      conf.getInt("ipc.server.max.callqueue.size", DEFAULT_MAX_CALLQUEUE_SIZE));
+    this.readThreads = conf.getInt("hbase.ipc.server.read.threadpool.size",
+      conf.getInt("ipc.server.read.threadpool.size", 10));
+    this.maxIdleTime = 2 * conf.getInt("hbase.ipc.client.connection.maxidletime",
+      conf.getInt("ipc.client.connection.maxidletime", 1000));
+    this.maxConnectionsToNuke = conf.getInt("hbase.ipc.client.kill.max",
+      conf.getInt("ipc.client.kill.max", 10));
+    this.thresholdIdleConnections = conf.getInt("hbase.ipc.client.idlethreshold",
+      conf.getInt("ipc.client.idlethreshold", 4000));
+    this.purgeTimeout = conf.getLong("hbase.ipc.client.call.purge.timeout",
+      conf.getLong("ipc.client.call.purge.timeout",
+        2 * HConstants.DEFAULT_HBASE_RPC_TIMEOUT));
     this.warnResponseTime = conf.getInt(WARN_RESPONSE_TIME, DEFAULT_WARN_RESPONSE_TIME);
     this.warnResponseSize = conf.getInt(WARN_RESPONSE_SIZE, DEFAULT_WARN_RESPONSE_SIZE);
 
@@ -1870,8 +1876,10 @@ public class RpcServer implements RpcServerInterface {
     this.port = listener.getAddress().getPort();
 
     this.metrics = new MetricsHBaseServer(name, new MetricsHBaseServerWrapperImpl(this));
-    this.tcpNoDelay = conf.getBoolean("ipc.server.tcpnodelay", true);
-    this.tcpKeepAlive = conf.getBoolean("ipc.server.tcpkeepalive", true);
+    this.tcpNoDelay = conf.getBoolean("hbase.ipc.server.tcpnodelay",
+      conf.getBoolean("ipc.server.tcpnodelay", true));
+    this.tcpKeepAlive = conf.getBoolean("hbase.ipc.server.tcpkeepalive",
+      conf.getBoolean("ipc.server.tcpkeepalive", true));
 
     this.warnDelayedCalls = conf.getInt(WARN_DELAYED_CALLS, DEFAULT_WARN_DELAYED_CALLS);
     this.delayedCalls = new AtomicInteger(0);

http://git-wip-us.apache.org/repos/asf/hbase/blob/9cb23410/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcScheduler.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcScheduler.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcScheduler.java
index b172b32..d5c6437 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcScheduler.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcScheduler.java
@@ -34,9 +34,12 @@ import org.apache.hadoop.hbase.HConstants;
 public class SimpleRpcScheduler implements RpcScheduler {
   public static final Log LOG = LogFactory.getLog(SimpleRpcScheduler.class);
 
-  public static final String CALL_QUEUE_READ_SHARE_CONF_KEY = "ipc.server.callqueue.read.share";
+  public static final String CALL_QUEUE_READ_SHARE_CONF_KEY =
+    "hbase.ipc.server.callqueue.read.share";
   public static final String CALL_QUEUE_HANDLER_FACTOR_CONF_KEY =
-      "ipc.server.callqueue.handler.factor";
+    "hbase.ipc.server.callqueue.handler.factor";
+  public static final String CALL_QUEUE_MAX_LENGTH_CONF_KEY =
+    "hbase.ipc.server.max.callqueue.length";
 
   private int port;
   private final PriorityFunction priority;
@@ -62,14 +65,17 @@ public class SimpleRpcScheduler implements RpcScheduler {
       int replicationHandlerCount,
       PriorityFunction priority,
       int highPriorityLevel) {
-    int maxQueueLength = conf.getInt("ipc.server.max.callqueue.length",
-        handlerCount * RpcServer.DEFAULT_MAX_CALLQUEUE_LENGTH_PER_HANDLER);
+    int maxQueueLength = conf.getInt(CALL_QUEUE_MAX_LENGTH_CONF_KEY,
+      conf.getInt("ipc.server.max.callqueue.length",
+        handlerCount * RpcServer.DEFAULT_MAX_CALLQUEUE_LENGTH_PER_HANDLER));
     this.priority = priority;
     this.highPriorityLevel = highPriorityLevel;
 
-    float callqReadShare = conf.getFloat(CALL_QUEUE_READ_SHARE_CONF_KEY, 0);
+    float callqReadShare = conf.getFloat(CALL_QUEUE_READ_SHARE_CONF_KEY,
+      conf.getFloat("ipc.server.callqueue.read.share", 0));
 
-    float callQueuesHandlersFactor = conf.getFloat(CALL_QUEUE_HANDLER_FACTOR_CONF_KEY, 0);
+    float callQueuesHandlersFactor = conf.getFloat(CALL_QUEUE_HANDLER_FACTOR_CONF_KEY,
+      conf.getFloat("ipc.server.callqueue.handler.factor", 0));
     int numCallQueues = Math.max(1, (int)Math.round(handlerCount * callQueuesHandlersFactor));
 
     LOG.info("Using default user call queue, count=" + numCallQueues);

http://git-wip-us.apache.org/repos/asf/hbase/blob/9cb23410/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
index 5530920..3c680b6 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
@@ -593,8 +593,8 @@ public class HRegion implements HeapSize { // , Writable{
         + busyWaitDuration + ") or hbase.busy.wait.multiplier.max ("
         + maxBusyWaitMultiplier + "). Their product should be positive");
     }
-    this.maxBusyWaitDuration = conf.getLong("ipc.client.call.purge.timeout",
-      2 * HConstants.DEFAULT_HBASE_RPC_TIMEOUT);
+    this.maxBusyWaitDuration = conf.getLong("hbase.ipc.client.call.purge.timeout",
+      conf.getLong("ipc.client.call.purge.timeout", 2 * HConstants.DEFAULT_HBASE_RPC_TIMEOUT));
 
     /*
      * timestamp.slop provides a server-side constraint on the timestamp. This

http://git-wip-us.apache.org/repos/asf/hbase/blob/9cb23410/hbase-server/src/test/java/org/apache/hadoop/hbase/TestFullLogReconstruction.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestFullLogReconstruction.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestFullLogReconstruction.java
index 95253eb..d5d12bf 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestFullLogReconstruction.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestFullLogReconstruction.java
@@ -53,6 +53,7 @@ public class TestFullLogReconstruction {
     c.setInt("dfs.socket.timeout", 5000);
     // faster failover with cluster.shutdown();fs.close() idiom
     c.setInt("ipc.client.connect.max.retries", 1);
+    c.setInt("hbase.ipc.client.connect.max.retries", 1);
     c.setInt("dfs.client.block.recovery.retries", 1);
     c.setInt(HConstants.ZK_SESSION_TIMEOUT, 1000);
     TEST_UTIL.startMiniCluster(3);

http://git-wip-us.apache.org/repos/asf/hbase/blob/9cb23410/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLog.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLog.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLog.java
index 94cfe69..18c130b 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLog.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLog.java
@@ -109,12 +109,11 @@ public class TestHLog  {
     TEST_UTIL.getConfiguration().setInt("dfs.heartbeat.interval", 1);
     TEST_UTIL.getConfiguration().setInt("dfs.socket.timeout", 5000);
     // faster failover with cluster.shutdown();fs.close() idiom
-    TEST_UTIL.getConfiguration()
-        .setInt("ipc.client.connect.max.retries", 1);
-    TEST_UTIL.getConfiguration().setInt(
-        "dfs.client.block.recovery.retries", 1);
-    TEST_UTIL.getConfiguration().setInt(
-      "ipc.client.connection.maxidletime", 500);
+    TEST_UTIL.getConfiguration().setInt("ipc.client.connect.max.retries", 1);
+    TEST_UTIL.getConfiguration().setInt("hbase.ipc.client.connect.max.retries", 1);
+    TEST_UTIL.getConfiguration().setInt("dfs.client.block.recovery.retries", 1);
+    TEST_UTIL.getConfiguration().setInt("ipc.client.connection.maxidletime", 500);
+    TEST_UTIL.getConfiguration().setInt("hbase.ipc.client.connection.maxidletime", 500);
     TEST_UTIL.getConfiguration().set(CoprocessorHost.WAL_COPROCESSOR_CONF_KEY,
         SampleRegionWALObserver.class.getName());
     TEST_UTIL.startMiniDFSCluster(3);


Mime
View raw message