You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by la...@apache.org on 2013/08/13 06:13:05 UTC

svn commit: r1513341 - in /hbase/branches/0.94/src/main: java/org/apache/hadoop/hbase/HConstants.java java/org/apache/hadoop/hbase/regionserver/HRegionServer.java resources/hbase-default.xml

Author: larsh
Date: Tue Aug 13 04:13:04 2013
New Revision: 1513341

URL: http://svn.apache.org/r1513341
Log:
HBASE-9139 Independent timeout configuration for rpc channel between cluster nodes (Julian Zhou)

Modified:
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/HConstants.java
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
    hbase/branches/0.94/src/main/resources/hbase-default.xml

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/HConstants.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/HConstants.java?rev=1513341&r1=1513340&r2=1513341&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/HConstants.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/HConstants.java Tue Aug 13 04:13:04 2013
@@ -569,6 +569,16 @@ public final class HConstants {
    */
   public static int DEFAULT_HBASE_RPC_TIMEOUT = 60000;
 
+  /**
+   * timeout for short operation RPC
+   */
+  public static String HBASE_RPC_SHORTOPERATION_TIMEOUT_KEY = "hbase.rpc.shortoperation.timeout";
+
+  /**
+   * Default value of {@link #HBASE_RPC_SHORTOPERATION_TIMEOUT_KEY}
+   */
+  public static int DEFAULT_HBASE_RPC_SHORTOPERATION_TIMEOUT = 10000;
+
   /*
    * cluster replication constants.
    */

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=1513341&r1=1513340&r2=1513341&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java Tue Aug 13 04:13:04 2013
@@ -429,8 +429,8 @@ public class HRegionServer implements HR
       "hbase.regionserver.numregionstoreport", 10);
 
     this.rpcTimeout = conf.getInt(
-      HConstants.HBASE_RPC_TIMEOUT_KEY,
-      HConstants.DEFAULT_HBASE_RPC_TIMEOUT);
+      HConstants.HBASE_RPC_SHORTOPERATION_TIMEOUT_KEY,
+      HConstants.DEFAULT_HBASE_RPC_SHORTOPERATION_TIMEOUT);
 
     this.abortRequested = false;
     this.stopped = false;

Modified: hbase/branches/0.94/src/main/resources/hbase-default.xml
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/resources/hbase-default.xml?rev=1513341&r1=1513340&r2=1513341&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/resources/hbase-default.xml (original)
+++ hbase/branches/0.94/src/main/resources/hbase-default.xml Tue Aug 13 04:13:04 2013
@@ -542,6 +542,21 @@
     used for client / server RPC call marshalling.
     </description>
   </property>
+  <property>
+    <name>hbase.rpc.timeout</name>
+    <value>60000</value>
+    <description>This is for the RPC layer to define how long HBase client applications
+        take for a remote call to time out. It uses pings to check connections
+        but will eventually throw a TimeoutException.</description>
+  </property>
+  <property>
+    <name>hbase.rpc.shortoperation.timeout</name>
+    <value>10000</value>
+    <description>This is another version of "hbase.rpc.timeout". For those RPC operation
+        within cluster, we rely on this configuration to set a short timeout limitation
+        for short operation. For example, short rpc timeout for region server's trying
+        to report to active master can benefit quicker master failover process.</description>
+  </property>
 
   <!-- The following properties configure authentication information for
        HBase processes when using Kerberos security.  There are no default