You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2010/07/14 06:33:24 UTC
svn commit: r963945 - in /hbase/branches/0.20: CHANGES.txt
src/java/org/apache/hadoop/hbase/master/HMaster.java
Author: stack
Date: Wed Jul 14 04:33:24 2010
New Revision: 963945
URL: http://svn.apache.org/viewvc?rev=963945&view=rev
Log:
HBASE-2796 Backport of 2707 to 0.20 branch -- reverted... broke 0.20 build
Modified:
hbase/branches/0.20/CHANGES.txt
hbase/branches/0.20/src/java/org/apache/hadoop/hbase/master/HMaster.java
Modified: hbase/branches/0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.20/CHANGES.txt?rev=963945&r1=963944&r2=963945&view=diff
==============================================================================
--- hbase/branches/0.20/CHANGES.txt (original)
+++ hbase/branches/0.20/CHANGES.txt Wed Jul 14 04:33:24 2010
@@ -5,7 +5,6 @@ Release 0.20.6 - Unreleased
HBASE-2772 Scan doesn't recover from region server failure
HBASE-2786 TestHLog.testSplit hangs
HBASE-2797 Another NPE in ReadWriteConsistencyControl
- HBASE-2796 Backport of 2707 to 0.20 branch
HBASE-2802 Stop daughter regions both being assigned same server
Release 0.20.5 - Jun 24, 2010
Modified: hbase/branches/0.20/src/java/org/apache/hadoop/hbase/master/HMaster.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/master/HMaster.java?rev=963945&r1=963944&r2=963945&view=diff
==============================================================================
--- hbase/branches/0.20/src/java/org/apache/hadoop/hbase/master/HMaster.java (original)
+++ hbase/branches/0.20/src/java/org/apache/hadoop/hbase/master/HMaster.java Wed Jul 14 04:33:24 2010
@@ -467,11 +467,13 @@ public class HMaster extends Thread impl
private boolean processToDoQueue() {
RegionServerOperation op = null;
- // If nothing on the todoQueue, go to the delay queue.
- if (toDoQueue.isEmpty()) {
+ // block until the root region is online
+ if (regionManager.getRootRegionLocation() != null) {
+ // We can't process server shutdowns unless the root region is online
op = delayedToDoQueue.poll();
}
- // if there aren't any todo items in the queue, we'll sleep for a bit.
+
+ // if there aren't any todo items in the queue, sleep for a bit.
if (op == null ) {
try {
op = toDoQueue.poll(threadWakeFrequency, TimeUnit.MILLISECONDS);
@@ -479,9 +481,13 @@ public class HMaster extends Thread impl
// continue
}
}
- if (closed.get()) return true;
- // If nothing to do, return.
- if (op == null) return false;
+
+ // at this point, if there's still no todo operation, or we're supposed to
+ // be closed, return.
+ if (op == null || closed.get()) {
+ return true;
+ }
+
try {
if (LOG.isDebugEnabled()) {
LOG.debug("Processing todo: " + op.toString());