hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-13923 Addendum fixes NPE in HRegionServer#buildServerLoad()
Date Thu, 25 Jun 2015 23:35:33 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.0 59357ced2 -> 4c3ff1c22


HBASE-13923 Addendum fixes NPE in HRegionServer#buildServerLoad()


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/4c3ff1c2
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/4c3ff1c2
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/4c3ff1c2

Branch: refs/heads/branch-1.0
Commit: 4c3ff1c224a728d90019e2e78a6f9b47ae720c2e
Parents: 59357ce
Author: tedyu <yuzhihong@gmail.com>
Authored: Thu Jun 25 16:35:33 2015 -0700
Committer: tedyu <yuzhihong@gmail.com>
Committed: Thu Jun 25 16:35:33 2015 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hbase/regionserver/HRegionServer.java   | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/4c3ff1c2/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
index f5cebc8..c654253 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
@@ -1110,10 +1110,12 @@ public class HRegionServer extends HasThread implements
     RegionLoad.Builder regionLoadBldr = RegionLoad.newBuilder();
     RegionSpecifier.Builder regionSpecifier = RegionSpecifier.newBuilder();
     for (HRegion 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 :


Mime
View raw message