HBASE-2513 hbase-2414 added bug where we'd tight-loop if no root available
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@941101 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
40514e7f4f
commit
9acf2c8d47
|
@ -302,6 +302,7 @@ Release 0.21.0 - Unreleased
|
|||
useful (Benoit Sigoure via Stack)
|
||||
HBASE-2482 regions in transition do not get reassigned by master when RS
|
||||
crashes (Todd Lipcon via Stack)
|
||||
HBASE-2513 hbase-2414 added bug where we'd tight-loop if no root available
|
||||
|
||||
IMPROVEMENTS
|
||||
HBASE-1760 Cleanup TODOs in HTable
|
||||
|
|
|
@ -445,15 +445,15 @@ public class HMaster extends Thread implements HConstants, HMasterInterface,
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (this.regionManager.getRootRegionLocation() != null) {
|
||||
switch(this.regionServerOperationQueue.process()) {
|
||||
case FAILED:
|
||||
boolean doDelayQueue = this.regionManager.getRootRegionLocation() != null;
|
||||
switch (this.regionServerOperationQueue.process(doDelayQueue)) {
|
||||
case FAILED:
|
||||
break FINISHED;
|
||||
case REQUEUED_BUT_PROBLEM:
|
||||
if (!checkFileSystem())
|
||||
break FINISHED;
|
||||
case REQUEUED_BUT_PROBLEM:
|
||||
if (!checkFileSystem()) break FINISHED;
|
||||
default: // PROCESSED, NOOP, REQUEUED:
|
||||
break;
|
||||
}
|
||||
default: // PROCESSED, NOOP, REQUEUED:
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
|
|
|
@ -109,11 +109,16 @@ public class RegionServerOperationQueue {
|
|||
|
||||
/**
|
||||
* Try to get an operation off of the queue and process it.
|
||||
* @param skipDelayedToDos If true, do not do delayed todos first but instead
|
||||
* move straight to the current todos list. This is set when we want to be
|
||||
* sure that recently queued events are processed first such as the onlining
|
||||
* of root region (Root region needs to be online before we can do meta
|
||||
* onlining; meta onlining needs to be done before we can do... and so on).
|
||||
* @return {@link ProcessingResultCode#PROCESSED},
|
||||
* {@link ProcessingResultCode#REQUEUED},
|
||||
* {@link ProcessingResultCode#REQUEUED_BUT_PROBLEM}
|
||||
*/
|
||||
public synchronized ProcessingResultCode process() {
|
||||
public synchronized ProcessingResultCode process(final boolean skipDelayedToDos) {
|
||||
RegionServerOperation op = delayedToDoQueue.poll();
|
||||
// if there aren't any todo items in the queue, sleep for a bit.
|
||||
if (op == null) {
|
||||
|
|
|
@ -2429,7 +2429,7 @@ public class HRegionServer implements HConstants, HRegionInterface,
|
|||
final Configuration conf2) {
|
||||
try {
|
||||
Constructor<? extends HRegionServer> c =
|
||||
regionServerClass.getConstructor(HBaseConfiguration.class);
|
||||
regionServerClass.getConstructor(Configuration.class);
|
||||
return c.newInstance(conf2);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Failed construction of " +
|
||||
|
|
Loading…
Reference in New Issue