HBASE-10231 Potential NPE in HBaseFsck#checkMetaRegion()

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1553286 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2013-12-24 15:12:57 +00:00
parent 1fc969846c
commit f23ae335a4
1 changed files with 5 additions and 0 deletions

View File

@ -2704,6 +2704,11 @@ public class HBaseFsck extends Configured {
errors errors
.reportError(ERROR_CODE.MULTI_META_REGION, "hbase:meta is found on more than one region."); .reportError(ERROR_CODE.MULTI_META_REGION, "hbase:meta is found on more than one region.");
if (shouldFixAssignments()) { if (shouldFixAssignments()) {
if (metaHbckInfo == null) {
errors.print(
"Unable to fix problem with hbase:meta due to hbase:meta region info missing");
return false;
}
errors.print("Trying to fix a problem with hbase:meta.."); errors.print("Trying to fix a problem with hbase:meta..");
setShouldRerun(); setShouldRerun();
// try fix it (treat is a dupe assignment) // try fix it (treat is a dupe assignment)