HBASE-3838 RegionCoprocesorHost.preWALRestore throws npe in case there is no RegionObserver registered

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1098705 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2011-05-02 18:14:05 +00:00
parent 6c32f36250
commit 2a4f052bcc
2 changed files with 11 additions and 7 deletions

View File

@ -93,6 +93,8 @@ Release 0.91.0 - Unreleased
cluster and was returning master hostname for rs to use
HBASE-3829 TestMasterFailover failures in jenkins
HBASE-3843 splitLogWorker starts too early (Prakash Khemani)
HBASE-3838 RegionCoprocesorHost.preWALRestore throws npe in case there is
no RegionObserver registered (Himanshu Vashishtha)
IMPROVEMENTS
HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack)

View File

@ -920,11 +920,12 @@ public class RegionCoprocessorHost
ctx = ObserverContext.createAndPrepare(env, ctx);
((RegionObserver)env.getInstance()).preWALRestore(ctx, info, logKey,
logEdit);
bypass |= ctx.shouldBypass();
if (ctx.shouldComplete()) {
break;
}
}
bypass |= ctx.shouldBypass();
if (ctx.shouldComplete()) {
break;
}
}
return bypass;
}
@ -943,10 +944,11 @@ public class RegionCoprocessorHost
ctx = ObserverContext.createAndPrepare(env, ctx);
((RegionObserver)env.getInstance()).postWALRestore(ctx, info,
logKey, logEdit);
if (ctx.shouldComplete()) {
break;
}
}
if (ctx.shouldComplete()) {
break;
}
}
}
}