hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r907858 - in /hadoop/hbase/trunk: ./ src/contrib/mdc_replication/src/java/org/apache/hadoop/hbase/replication/ src/java/org/apache/hadoop/hbase/ src/java/org/apache/hadoop/hbase/client/ src/java/org/apache/hadoop/hbase/regionserver/ src/tes...
Date Tue, 09 Feb 2010 00:43:54 GMT
Author: stack
Date: Tue Feb  9 00:43:54 2010
New Revision: 907858

URL: http://svn.apache.org/viewvc?rev=907858&view=rev
Log:
HBASE-2193 Better readability of - hbase.regionserver.lease.period

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/contrib/mdc_replication/src/java/org/apache/hadoop/hbase/replication/ReplicationConnectionManager.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HConstants.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTable.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHRegion.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=907858&r1=907857&r2=907858&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Tue Feb  9 00:43:54 2010
@@ -196,6 +196,8 @@
    HBASE-2164  Ivy nit - clean up configs (Kay Kay via Stack)
    HBASE-2184  Calling HTable.getTableDescriptor().* on a full cluster takes
                a long time (Cristian Ivascu via Stack)
+   HBASE-2193  Better readability of - hbase.regionserver.lease.period
+               (Kay Kay via Stack)
 
   IMPROVEMENTS
    HBASE-1760  Cleanup TODOs in HTable

Modified: hadoop/hbase/trunk/src/contrib/mdc_replication/src/java/org/apache/hadoop/hbase/replication/ReplicationConnectionManager.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/contrib/mdc_replication/src/java/org/apache/hadoop/hbase/replication/ReplicationConnectionManager.java?rev=907858&r1=907857&r2=907858&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/contrib/mdc_replication/src/java/org/apache/hadoop/hbase/replication/ReplicationConnectionManager.java
(original)
+++ hadoop/hbase/trunk/src/contrib/mdc_replication/src/java/org/apache/hadoop/hbase/replication/ReplicationConnectionManager.java
Tue Feb  9 00:43:54 2010
@@ -56,7 +56,7 @@
         conf.get(REGION_SERVER_CLASS, DEFAULT_REGION_SERVER_CLASS);
     this.numRetries = conf.getInt("hbase.client.retries.number", 10);
     this.maxRPCAttempts = conf.getInt("hbase.client.rpc.maxattempts", 1);
-    this.rpcTimeout = conf.getLong("hbase.regionserver.lease.period", 60000);
+    this.rpcTimeout = conf.getLong(HBASE_REGIONSERVER_LEASE_PERIOD_KEY, DEFAULT_HBASE_REGIONSERVER_LEASE_PERIOD);
     try {
       this.serverInterfaceClass =
         (Class<? extends ReplicationRegionInterface>)

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HConstants.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HConstants.java?rev=907858&r1=907857&r2=907858&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HConstants.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HConstants.java Tue Feb  9 00:43:54
2010
@@ -304,5 +304,18 @@
    * The default value is unlimited.
    */
   public static long DEFAULT_HBASE_CLIENT_SCANNER_MAX_RESULT_SIZE = Long.MAX_VALUE;
+  
+  
+  /**
+   * HRegion server lease period in milliseconds. Clients must report in within this period
+   * else they are considered dead. Unit measured in ms (milliseconds).
+   */
+  public static String HBASE_REGIONSERVER_LEASE_PERIOD_KEY   = "hbase.regionserver.lease.period";
+  
+  
+  /**
+   * Default value of {@link #HBASE_REGIONSERVER_LEASE_PERIOD_KEY}. 
+   */
+  public static long DEFAULT_HBASE_REGIONSERVER_LEASE_PERIOD = 60000;
 
 }

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java?rev=907858&r1=907857&r2=907858&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java Tue
Feb  9 00:43:54 2010
@@ -295,7 +295,7 @@
       this.pause = conf.getLong("hbase.client.pause", 1 * 1000);
       this.numRetries = conf.getInt("hbase.client.retries.number", 10);
       this.maxRPCAttempts = conf.getInt("hbase.client.rpc.maxattempts", 1);
-      this.rpcTimeout = conf.getLong("hbase.regionserver.lease.period", 60000);
+      this.rpcTimeout = conf.getLong(HBASE_REGIONSERVER_LEASE_PERIOD_KEY, DEFAULT_HBASE_REGIONSERVER_LEASE_PERIOD);
       
       this.master = null;
       this.masterChecked = false;

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTable.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTable.java?rev=907858&r1=907857&r2=907858&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTable.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTable.java Tue Feb  9 00:43:54
2010
@@ -118,7 +118,7 @@
     }
     this.connection = HConnectionManager.getConnection(conf);
     this.scannerTimeout =
-      conf.getInt("hbase.regionserver.lease.period", 60 * 1000);
+      (int) conf.getLong(HConstants.HBASE_REGIONSERVER_LEASE_PERIOD_KEY, HConstants.DEFAULT_HBASE_REGIONSERVER_LEASE_PERIOD);
     this.configuration = conf;
     this.connection.locateRegion(tableName, HConstants.EMPTY_START_ROW);
     this.writeBufferSize = conf.getLong("hbase.client.write.buffer", 2097152);

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=907858&r1=907857&r2=907858&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java Tue
Feb  9 00:43:54 2010
@@ -268,7 +268,7 @@
     this.numRegionsToReport =                                        
       conf.getInt("hbase.regionserver.numregionstoreport", 10);      
 
-    this.rpcTimeout = conf.getLong("hbase.regionserver.lease.period", 60000);
+    this.rpcTimeout = conf.getLong(HBASE_REGIONSERVER_LEASE_PERIOD_KEY, DEFAULT_HBASE_REGIONSERVER_LEASE_PERIOD);
 
     reinitialize();
   }
@@ -332,7 +332,7 @@
       this.threadWakeFrequency * multiplier,  this.stopRequested);
 
     this.leases = new Leases(
-        conf.getInt("hbase.regionserver.lease.period", 60 * 1000),
+        (int) conf.getLong(HBASE_REGIONSERVER_LEASE_PERIOD_KEY, DEFAULT_HBASE_REGIONSERVER_LEASE_PERIOD),
         this.threadWakeFrequency);
   }
 

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHRegion.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHRegion.java?rev=907858&r1=907857&r2=907858&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHRegion.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHRegion.java Tue
Feb  9 00:43:54 2010
@@ -1887,7 +1887,7 @@
     // Make lease timeout longer, lease checks less frequent
     conf.setInt("hbase.master.lease.thread.wakefrequency", 5 * 1000);
     
-    conf.setInt("hbase.regionserver.lease.period", 10 * 1000);
+    conf.setInt(HConstants.HBASE_REGIONSERVER_LEASE_PERIOD_KEY, 10 * 1000);
     
     // Increase the amount of time between client retries
     conf.setLong("hbase.client.pause", 15 * 1000);



Mime
View raw message