From c3bfc4ef85b4c64b50e6c9ffb472bda97f0f0513 Mon Sep 17 00:00:00 2001 From: nkeywal Date: Mon, 30 Sep 2013 13:05:39 +0000 Subject: [PATCH] HBASE-9670 Client pause should be 100ms everywhere git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1527537 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java | 3 ++- .../src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java | 3 ++- .../src/main/java/org/apache/hadoop/hbase/HConstants.java | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java index 11e0c04a65b..15f2488cd69 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java @@ -190,7 +190,8 @@ public class HBaseAdmin implements Abortable, Closeable { this.conf = connection.getConfiguration(); this.connection = connection; - this.pause = this.conf.getLong("hbase.client.pause", 1000); + this.pause = this.conf.getLong(HConstants.HBASE_CLIENT_PAUSE, + HConstants.DEFAULT_HBASE_CLIENT_PAUSE); this.numRetries = this.conf.getInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, HConstants.DEFAULT_HBASE_CLIENT_RETRIES_NUMBER); this.retryLongerMultiplier = this.conf.getInt( diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java index 83a916e4669..5d607a67f19 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java @@ -1233,7 +1233,8 @@ public class RpcClient { RpcClient(Configuration conf, String clusterId, SocketFactory factory, SocketAddress localAddr) { this.maxIdleTime = conf.getInt("hbase.ipc.client.connection.maxidletime", 10000); //10s this.maxRetries = conf.getInt("hbase.ipc.client.connect.max.retries", 0); - this.failureSleep = conf.getInt("hbase.client.pause", 1000); + this.failureSleep = conf.getLong(HConstants.HBASE_CLIENT_PAUSE, + HConstants.DEFAULT_HBASE_CLIENT_PAUSE); this.tcpNoDelay = conf.getBoolean("hbase.ipc.client.tcpnodelay", true); this.tcpKeepAlive = conf.getBoolean("hbase.ipc.client.tcpkeepalive", true); this.pingInterval = getPingInterval(conf); diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java index 48caea307be..f0ad529dd0a 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java @@ -570,7 +570,7 @@ public final class HConstants { /** * Default value of {@link #HBASE_CLIENT_PAUSE}. */ - public static long DEFAULT_HBASE_CLIENT_PAUSE = 1000; + public static long DEFAULT_HBASE_CLIENT_PAUSE = 100; /** * Parameter name for server pause value, used mostly as value to wait before