HBASE-13923 Addendum fixes NPE in HRegionServer#buildServerLoad()
This commit is contained in:
parent
b5b5853043
commit
db5dd1ebef
|
@ -1182,10 +1182,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