hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r830779 - in /hadoop/hbase/trunk: conf/ src/java/org/apache/hadoop/hbase/master/ src/java/org/apache/hadoop/hbase/regionserver/ src/test/ src/test/org/apache/hadoop/hbase/regionserver/ src/test/org/apache/hadoop/hbase/regionserver/wal/
Date Wed, 28 Oct 2009 22:18:15 GMT
Author: stack
Date: Wed Oct 28 22:18:14 2009
New Revision: 830779

URL: http://svn.apache.org/viewvc?rev=830779&view=rev
Log:
HBASE-1816 Master rewrite; removed hbase.master.lease.period -- unused since zk

Modified:
    hadoop/hbase/trunk/conf/hbase-default.xml
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/RegionServerOperation.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
    hadoop/hbase/trunk/src/test/hbase-site.xml
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHRegion.java
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java

Modified: hadoop/hbase/trunk/conf/hbase-default.xml
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/conf/hbase-default.xml?rev=830779&r1=830778&r2=830779&view=diff
==============================================================================
--- hadoop/hbase/trunk/conf/hbase-default.xml (original)
+++ hadoop/hbase/trunk/conf/hbase-default.xml Wed Oct 28 22:18:14 2009
@@ -79,14 +79,6 @@
     </description>
   </property>
   <property>
-    <name>hbase.master.lease.period</name>
-    <value>120000</value>
-    <description>HMaster server lease period in milliseconds. Default is
-    120 seconds.  Region servers must report in within this period else
-    they are considered dead.  On loaded cluster, may need to up this
-    period.</description>
-  </property>
-  <property>
     <name>hbase.regionserver.port</name>
     <value>60020</value>
     <description>The port an HBase region server binds to.

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/RegionServerOperation.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/RegionServerOperation.java?rev=830779&r1=830778&r2=830779&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/RegionServerOperation.java
(original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/RegionServerOperation.java
Wed Oct 28 22:18:14 2009
@@ -33,12 +33,12 @@
   
   private long expire;
   protected final HMaster master;
-  final int leaseTimeout;
+  final int delay;
   
   protected RegionServerOperation(HMaster master) {
     this.master = master;
-    this.leaseTimeout = this.master.getConfiguration().
-      getInt("hbase.master.lease.period", 120 * 1000);
+    this.delay = this.master.getConfiguration().
+      getInt("hbase.server.thread.wakefrequency", 10 * 1000);
     // Set the future time at which we expect to be released from the
     // DelayQueue we're inserted in on lease expiration.
     this.expire = whenToExpire();
@@ -60,7 +60,7 @@
   }
 
   private long whenToExpire() {
-    return System.currentTimeMillis() + this.leaseTimeout / 2;
+    return System.currentTimeMillis() + this.delay;
   }
 
   protected boolean rootAvailable() {

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=830779&r1=830778&r2=830779&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 Wed
Oct 28 22:18:14 2009
@@ -157,7 +157,6 @@
   final int numRetries;
   protected final int threadWakeFrequency;
   private final int msgInterval;
-  private final int serverLeaseTimeout;
 
   protected final int numRegionsToReport;
   
@@ -259,8 +258,6 @@
     this.numRetries =  conf.getInt("hbase.client.retries.number", 2);
     this.threadWakeFrequency = conf.getInt(THREAD_WAKE_FREQUENCY, 10 * 1000);
     this.msgInterval = conf.getInt("hbase.regionserver.msginterval", 3 * 1000);
-    this.serverLeaseTimeout =
-      conf.getInt("hbase.master.lease.period", 120 * 1000);
 
     sleeper = new Sleeper(this.msgInterval, this.stopRequested);
 
@@ -444,11 +441,6 @@
           }
         }
         long now = System.currentTimeMillis();
-        if (lastMsg != 0 && (now - lastMsg) >= serverLeaseTimeout) {
-          // It has been way too long since we last reported to the master.
-          LOG.warn("unable to report to master for " + (now - lastMsg) +
-            " milliseconds - retrying");
-        }
         // Send messages to the master IF this.msgInterval has elapsed OR if
         // we have something to tell (and we didn't just fail sending master).
         if ((now - lastMsg) >= msgInterval ||
@@ -1324,13 +1316,6 @@
         }
         result = this.hbaseMaster.regionServerStartup(this.serverInfo);
         break;
-      } catch (Leases.LeaseStillHeldException e) {
-        LOG.info("Lease " + e.getName() + " already held on master. Check " +
-          "DNS configuration so that all region servers are" +
-          "reporting their true IPs and not 127.0.0.1. Otherwise, this" +
-          "problem should resolve itself after the lease period of " +
-          this.conf.get("hbase.master.lease.period")
-          + " seconds expires over on the master");
       } catch (IOException e) {
         LOG.warn("error telling master we are up", e);
       }

Modified: hadoop/hbase/trunk/src/test/hbase-site.xml
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/hbase-site.xml?rev=830779&r1=830778&r2=830779&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/hbase-site.xml (original)
+++ hadoop/hbase/trunk/src/test/hbase-site.xml Wed Oct 28 22:18:14 2009
@@ -68,15 +68,6 @@
     </description>
   </property>
   <property>
-    <name>hbase.master.lease.period</name>
-    <value>6000</value>
-    <description>Length of time the master will wait before timing out a region
-    server lease. Since region servers report in every second (see above), this
-    value has been reduced so that the master will notice a dead region server
-    sooner. The default is 30 seconds.
-    </description>
-  </property>
-  <property>
     <name>hbase.master.info.port</name>
     <value>-1</value>
     <description>The port for the hbase master web UI

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=830779&r1=830778&r2=830779&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 Wed
Oct 28 22:18:14 2009
@@ -1885,7 +1885,6 @@
     conf.setInt("hbase.hstore.compactionThreshold", 2);
     
     // Make lease timeout longer, lease checks less frequent
-    conf.setInt("hbase.master.lease.period", 10 * 1000);
     conf.setInt("hbase.master.lease.thread.wakefrequency", 5 * 1000);
     
     conf.setInt("hbase.regionserver.lease.period", 10 * 1000);

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java?rev=830779&r1=830778&r2=830779&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java
(original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java
Wed Oct 28 22:18:14 2009
@@ -88,9 +88,6 @@
     // We flush the cache after every 8192 bytes
     conf.setInt("hbase.hregion.memstore.flush.size", 8192);
 
-    // Make lease timeout longer, lease checks less frequent
-    conf.setInt("hbase.master.lease.period", 10 * 1000);
-
     // Increase the amount of time between client retries
     conf.setLong("hbase.client.pause", 15 * 1000);
 



Mime
View raw message