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();
|
RegionLoad.Builder regionLoadBldr = RegionLoad.newBuilder();
|
||||||
RegionSpecifier.Builder regionSpecifier = RegionSpecifier.newBuilder();
|
RegionSpecifier.Builder regionSpecifier = RegionSpecifier.newBuilder();
|
||||||
for (Region region : regions) {
|
for (Region region : regions) {
|
||||||
Set<String> regionCoprocessors = region.getCoprocessorHost().getCoprocessors();
|
if (region.getCoprocessorHost() != null) {
|
||||||
Iterator<String> iterator = regionCoprocessors.iterator();
|
Set<String> regionCoprocessors = region.getCoprocessorHost().getCoprocessors();
|
||||||
while (iterator.hasNext()) {
|
Iterator<String> iterator = regionCoprocessors.iterator();
|
||||||
serverLoad.addCoprocessors(coprocessorBuilder.setName(iterator.next()).build());
|
while (iterator.hasNext()) {
|
||||||
|
serverLoad.addCoprocessors(coprocessorBuilder.setName(iterator.next()).build());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
serverLoad.addRegionLoads(createRegionLoad(region, regionLoadBldr, regionSpecifier));
|
serverLoad.addRegionLoads(createRegionLoad(region, regionLoadBldr, regionSpecifier));
|
||||||
for (String coprocessor : getWAL(region.getRegionInfo()).getCoprocessorHost()
|
for (String coprocessor : getWAL(region.getRegionInfo()).getCoprocessorHost()
|
||||||
|
|
Loading…
Reference in New Issue