HBASE-13923 Addendum fixes NPE in HRegionServer#buildServerLoad()
This commit is contained in:
parent
92b6622d97
commit
f248f86396
|
@ -1177,10 +1177,12 @@ public class HRegionServer extends HasThread implements
|
|||
RegionLoad.Builder regionLoadBldr = RegionLoad.newBuilder();
|
||||
RegionSpecifier.Builder regionSpecifier = RegionSpecifier.newBuilder();
|
||||
for (Region region : regions) {
|
||||
Set<String> regionCoprocessors = region.getCoprocessorHost().getCoprocessors();
|
||||
Iterator<String> iterator = regionCoprocessors.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
serverLoad.addCoprocessors(coprocessorBuilder.setName(iterator.next()).build());
|
||||
if (region.getCoprocessorHost() != null) {
|
||||
Set<String> regionCoprocessors = region.getCoprocessorHost().getCoprocessors();
|
||||
Iterator<String> iterator = regionCoprocessors.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
serverLoad.addCoprocessors(coprocessorBuilder.setName(iterator.next()).build());
|
||||
}
|
||||
}
|
||||
serverLoad.addRegionLoads(createRegionLoad(region, regionLoadBldr, regionSpecifier));
|
||||
for (String coprocessor : getWAL(region.getRegionInfo()).getCoprocessorHost()
|
||||
|
|
Loading…
Reference in New Issue