HBASE-1816 Master rewrite; removed hbase.master.lease.period -- unused since zk
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@830779 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d6adcd04f5
commit
d91ee91b89
|
@ -78,14 +78,6 @@
|
|||
the root and meta tables.
|
||||
</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>
|
||||
|
|
|
@ -33,12 +33,12 @@ abstract class RegionServerOperation implements Delayed, HConstants {
|
|||
|
||||
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 @@ abstract class RegionServerOperation implements Delayed, HConstants {
|
|||
}
|
||||
|
||||
private long whenToExpire() {
|
||||
return System.currentTimeMillis() + this.leaseTimeout / 2;
|
||||
return System.currentTimeMillis() + this.delay;
|
||||
}
|
||||
|
||||
protected boolean rootAvailable() {
|
||||
|
|
|
@ -157,7 +157,6 @@ public class HRegionServer implements HConstants, HRegionInterface,
|
|||
final int numRetries;
|
||||
protected final int threadWakeFrequency;
|
||||
private final int msgInterval;
|
||||
private final int serverLeaseTimeout;
|
||||
|
||||
protected final int numRegionsToReport;
|
||||
|
||||
|
@ -259,8 +258,6 @@ public class HRegionServer implements HConstants, HRegionInterface,
|
|||
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 @@ public class HRegionServer implements HConstants, HRegionInterface,
|
|||
}
|
||||
}
|
||||
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 @@ public class HRegionServer implements HConstants, HRegionInterface,
|
|||
}
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -67,15 +67,6 @@
|
|||
Default is 10.
|
||||
</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>
|
||||
|
|
|
@ -1885,7 +1885,6 @@ public class TestHRegion extends HBaseTestCase {
|
|||
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);
|
||||
|
|
|
@ -88,9 +88,6 @@ public class TestLogRolling extends HBaseClusterTestCase {
|
|||
// 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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue