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/04 01:58:28 UTC
svn commit: r711149 - in /hadoop/hbase/trunk: CHANGES.txt
src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Author: jimk
Date: Mon Nov 3 16:58:28 2008
New Revision: 711149
URL: http://svn.apache.org/viewvc?rev=711149&view=rev
Log:
HBASE-964 Startup stuck "waiting for root region"
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=711149&r1=711148&r2=711149&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Mon Nov 3 16:58:28 2008
@@ -60,7 +60,8 @@
HBASE-976 HADOOP 0.19.0 RC0 is broke; replace with HEAD of branch-0.19
HBASE-977 Arcane HStoreKey comparator bug
HBASE-979 REST web app is not started automatically
-
+ HBASE-964 Startup stuck "waiting for root region"
+
IMPROVEMENTS
HBASE-901 Add a limit to key length, check key and value length on client side
HBASE-890 Alter table operation and also related changes in REST interface
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=711149&r1=711148&r2=711149&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 Mon Nov 3 16:58:28 2008
@@ -123,7 +123,6 @@
protected final HBaseConfiguration conf;
private final ServerConnection connection;
- private final AtomicBoolean haveRootRegion = new AtomicBoolean(false);
private FileSystem fs;
private Path rootDir;
private final Random rand = new Random();
@@ -304,8 +303,20 @@
boolean quiesceRequested = false;
// A sleeper that sleeps for msgInterval.
Sleeper sleeper = new Sleeper(this.msgInterval, this.stopRequested);
+ boolean haveRootRegion = false;
try {
init(reportForDuty(sleeper));
+ // Try to get the root region location from the master.
+ if (!haveRootRegion) {
+ HServerAddress rootServer = hbaseMaster.getRootRegionLocation();
+ if (rootServer != null) {
+ // By setting the root region location, we bypass the wait imposed on
+ // HTable for all regions being assigned.
+ this.connection.setRootRegionLocation(
+ new HRegionLocation(HRegionInfo.ROOT_REGIONINFO, rootServer));
+ haveRootRegion = true;
+ }
+ }
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();) {
@@ -693,17 +704,6 @@
* the end of the main HRegionServer run loop.
*/
private void housekeeping() {
- // Try to get the root region location from the master.
- if (!haveRootRegion.get()) {
- HServerAddress rootServer = hbaseMaster.getRootRegionLocation();
- if (rootServer != null) {
- // By setting the root region location, we bypass the wait imposed on
- // HTable for all regions being assigned.
- this.connection.setRootRegionLocation(
- new HRegionLocation(HRegionInfo.ROOT_REGIONINFO, rootServer));
- haveRootRegion.set(true);
- }
- }
// If the todo list has > 0 messages, iterate looking for open region
// messages. Send the master a message that we're working on its
// processing so it doesn't assign the region elsewhere.