You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ec...@apache.org on 2014/08/01 00:08:21 UTC
[45/50] [abbrv] git commit: [master] Increase idle time on a
connection to one day
[master] Increase idle time on a connection to one day
Test Plan: not tested
Reviewers: manukranthk, daviddeng, gauravm, fan
Reviewed By: fan
Subscribers: hbase-eng@
Differential Revision: https://phabricator.fb.com/D1425597
git-svn-id: svn+ssh://tubbs/svnhive/hadoop/branches/titan/VENDOR.hbase/hbase-trunk@43429 e7acf4d4-3532-417f-9e73-7a9ae25a1f51
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/fede35dd
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/fede35dd
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/fede35dd
Branch: refs/heads/0.89-fb
Commit: fede35dd59efe3926f884170d1996adcd6248be6
Parents: 8e1133c
Author: adela <ad...@e7acf4d4-3532-417f-9e73-7a9ae25a1f51>
Authored: Thu Jul 10 21:54:21 2014 +0000
Committer: Elliott Clark <el...@fb.com>
Committed: Thu Jul 31 14:44:24 2014 -0700
----------------------------------------------------------------------
src/main/java/org/apache/hadoop/hbase/HConstants.java | 6 ++++++
.../org/apache/hadoop/hbase/thrift/HBaseNiftyThriftServer.java | 6 ++++--
2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/fede35dd/src/main/java/org/apache/hadoop/hbase/HConstants.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/hbase/HConstants.java b/src/main/java/org/apache/hadoop/hbase/HConstants.java
index 3970bc2..8be87a4 100644
--- a/src/main/java/org/apache/hadoop/hbase/HConstants.java
+++ b/src/main/java/org/apache/hadoop/hbase/HConstants.java
@@ -212,6 +212,12 @@ public final class HConstants {
/** Default value of REGIONSERVER_USE_HADOOP_RPC boolean flag **/
public static final boolean DEFAULT_REGIONSERVER_USE_HADOOP_RPC = false;
+ /** String representing the name of the config for maximal idle time of a connection **/
+ public static final String SWIFT_CONNECTION_IDLE_MAX_MINUTES = "swift.connection.idle.max";
+
+ /** Default value of SWIFT_CONNECTION_IDLE_MAX_MINUTES*/
+ public static final int SWIFT_CONNECTION_IDLE_MAX_MINUTES_DEFAULT = 10;
+
/** Boolean flag to represent whether to use THRIFT or not **/
public static final String REGIONSERVER_USE_THRIFT = "hbase.regionserver.rpc.thrift.enabled";
http://git-wip-us.apache.org/repos/asf/hbase/blob/fede35dd/src/main/java/org/apache/hadoop/hbase/thrift/HBaseNiftyThriftServer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/hbase/thrift/HBaseNiftyThriftServer.java b/src/main/java/org/apache/hadoop/hbase/thrift/HBaseNiftyThriftServer.java
index 4a6123a..4ba0486 100644
--- a/src/main/java/org/apache/hadoop/hbase/thrift/HBaseNiftyThriftServer.java
+++ b/src/main/java/org/apache/hadoop/hbase/thrift/HBaseNiftyThriftServer.java
@@ -111,8 +111,10 @@ public class HBaseNiftyThriftServer {
conf.getInt(HConstants.SWIFT_WORKER_THREADS,
HConstants.SWIFT_WORKER_THREADS_DEFAULT))
.setIdleConnectionTimeout(
- new Duration(conf.getInt(HConstants.HBASE_RPC_TIMEOUT_KEY,
- HConstants.DEFAULT_HBASE_RPC_TIMEOUT), TimeUnit.MILLISECONDS));
+ new Duration(conf.getInt(
+ HConstants.SWIFT_CONNECTION_IDLE_MAX_MINUTES,
+ HConstants.SWIFT_CONNECTION_IDLE_MAX_MINUTES_DEFAULT),
+ TimeUnit.MINUTES));
if (useHeaderProtocol) {
server = new ThriftServer(processor, serverConfig.setProtocolName(