hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [2/5] hbase git commit: HBASE-13923 Addendum fixes NPE in HRegionServer#buildServerLoad()
Date Wed, 01 Jul 2015 22:02:00 GMT
HBASE-13923 Addendum fixes NPE in HRegionServer#buildServerLoad()

Conflicts:
	hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java


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

Branch: refs/heads/0.98
Commit: c34db5e837454438e80fdcc4c56ff45e44197906
Parents: 5f8219f
Author: tedyu <yuzhihong@gmail.com>
Authored: Thu Jun 25 16:30:52 2015 -0700
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Wed Jul 1 12:22:22 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/c34db5e8/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 5a14f40..2b7bdf8 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
@@ -1165,10 +1165,12 @@ public class HRegionServer implements ClientProtos.ClientService.BlockingInterfa
     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 : getWAL(region.getRegionInfo()).getCoprocessorHost()


Mime
View raw message