You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ji...@apache.org on 2008/11/21 01:14:09 UTC
svn commit: r719433 - in /hadoop/hbase/trunk: CHANGES.txt
src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Author: jimk
Date: Thu Nov 20 16:14:09 2008
New Revision: 719433
URL: http://svn.apache.org/viewvc?rev=719433&view=rev
Log:
HBASE-927 We don't recover if HRS hosting -ROOT-/.META. goes down
Rather than just check once if we know the root region location, check every time in case it changes.
Modified:
hadoop/hbase/trunk/CHANGES.txt
hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=719433&r1=719432&r2=719433&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Thu Nov 20 16:14:09 2008
@@ -132,6 +132,7 @@
the deleted cell
HBASE-675 Report correct server hosting a table split for assignment to
for MR Jobs
+ HBASE-927 We don't recover if HRS hosting -ROOT-/.META. goes down
NEW FEATURES
HBASE-875 Use MurmurHash instead of JenkinsHash [in bloomfilters]
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=719433&r1=719432&r2=719433&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 Thu Nov 20 16:14:09 2008
@@ -296,8 +296,7 @@
long lastMsg = 0;
// Now ask master what it wants us to do and tell it what we have done
for (int tries = 0; !stopRequested.get() && isHealthy();) {
- // Try to get the root region location from the master.
- if (!haveRootRegion.get()) {
+ // Try to get the root region location from the master.
HServerAddress rootServer = hbaseMaster.getRootRegionLocation();
if (rootServer != null) {
// By setting the root region location, we bypass the wait imposed on
@@ -306,8 +305,7 @@
new HRegionLocation(HRegionInfo.ROOT_REGIONINFO, rootServer));
haveRootRegion.set(true);
}
- }
- long now = System.currentTimeMillis();
+ 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) +
@@ -565,7 +563,6 @@
* only called when the HRegionServer receives a kill signal.
*/
private static class ShutdownThread extends Thread {
- private final Log LOG = LogFactory.getLog(this.getClass());
private final HRegionServer instance;
/**
@@ -591,7 +588,6 @@
* compaction.
*/
private static class MajorCompactionChecker extends Chore {
- private final Log LOG = LogFactory.getLog(this.getClass());
private final HRegionServer instance;
MajorCompactionChecker(final HRegionServer h,
@@ -617,7 +613,7 @@
}
}
}
- };
+ }
/**
* Report the status of the server. A server is online once all the startup
RE: svn commit: r719433 - in /hadoop/hbase/trunk: CHANGES.txt
src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Posted by "Jim Kellerman (POWERSET)" <Ji...@microsoft.com>.
Yeah, it's broken.
---
Jim Kellerman, Powerset (Live Search, Microsoft Corporation)
> -----Original Message-----
> From: stack [mailto:stack@duboce.net]
> Sent: Thursday, November 20, 2008 4:49 PM
> To: hbase-dev@hadoop.apache.org
> Subject: Re: svn commit: r719433 - in /hadoop/hbase/trunk: CHANGES.txt
> src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
>
> jimk@apache.org wrote:
> > ...
> > // Now ask master what it wants us to do and tell it what we have
> done
> > for (int tries = 0; !stopRequested.get() && isHealthy();) {
> > - // Try to get the root region location from the master.
> > - if (!haveRootRegion.get()) {
> > + // Try to get the root region location from the master.
> > HServerAddress rootServer =
> hbaseMaster.getRootRegionLocation();
>
> Every time we want to send the regionserver heartbeat, we first ask for
> the location of the root region? No caching of the root region and we
> now do two trips to the master on every heartbeat? Am I reading this
> right?
> St.Ack
Re: svn commit: r719433 - in /hadoop/hbase/trunk: CHANGES.txt src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Posted by stack <st...@duboce.net>.
jimk@apache.org wrote:
> ...
> // Now ask master what it wants us to do and tell it what we have done
> for (int tries = 0; !stopRequested.get() && isHealthy();) {
> - // Try to get the root region location from the master.
> - if (!haveRootRegion.get()) {
> + // Try to get the root region location from the master.
> HServerAddress rootServer = hbaseMaster.getRootRegionLocation();
Every time we want to send the regionserver heartbeat, we first ask for
the location of the root region? No caching of the root region and we
now do two trips to the master on every heartbeat? Am I reading this right?
St.Ack