HBASE-927 We don't recover if HRS hosting -ROOT-/.META. goes down - (fix bug in createTable which caused tests to fail)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@723000 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c209dabaf5
commit
838b238999
|
@ -92,6 +92,8 @@ Release 0.19.0 - Unreleased
|
|||
HBASE-927 We don't recover if HRS hosting -ROOT-/.META. goes down
|
||||
HBASE-1043 Removing @Override attributes where they are no longer needed.
|
||||
(Ryan Smith via Jim Kellerman)
|
||||
HBASE-927 We don't recover if HRS hosting -ROOT-/.META. goes down -
|
||||
(fix bug in createTable which caused tests to fail)
|
||||
|
||||
|
||||
IMPROVEMENTS
|
||||
|
|
|
@ -590,14 +590,27 @@ public class HMaster extends Thread implements HConstants, HMasterInterface,
|
|||
if (!isMasterRunning()) {
|
||||
throw new MasterNotRunningException();
|
||||
}
|
||||
// We can not create a table unless meta regions have already been
|
||||
// assigned and scanned.
|
||||
if (!regionManager.areAllMetaRegionsOnline()) {
|
||||
throw new NotAllMetaRegionsOnlineException();
|
||||
}
|
||||
HRegionInfo newRegion = new HRegionInfo(desc, null, null);
|
||||
createTable(newRegion);
|
||||
LOG.info("created table " + desc.getNameAsString());
|
||||
|
||||
for (int tries = 0; tries < numRetries; tries++) {
|
||||
try {
|
||||
// We can not create a table unless meta regions have already been
|
||||
// assigned and scanned.
|
||||
if (!regionManager.areAllMetaRegionsOnline()) {
|
||||
throw new NotAllMetaRegionsOnlineException();
|
||||
}
|
||||
createTable(newRegion);
|
||||
LOG.info("created table " + desc.getNameAsString());
|
||||
break;
|
||||
} catch (TableExistsException e) {
|
||||
throw e;
|
||||
} catch (IOException e) {
|
||||
if (tries == numRetries - 1) {
|
||||
throw RemoteExceptionHandler.checkIOException(e);
|
||||
}
|
||||
sleeper.sleep();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void createTable(final HRegionInfo newRegion)
|
||||
|
|
Loading…
Reference in New Issue