diff --git a/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java index c4d52d5e42a..99d0f0fbb49 100644 --- a/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java +++ b/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java @@ -918,7 +918,7 @@ public class HRegionServer implements HRegionInterface, HBaseRPCErrorHandler, public HServerLoad.RegionLoad createRegionLoad(final String encodedRegionName) { HRegion r = null; r = this.onlineRegions.get(encodedRegionName); - return createRegionLoad(r); + return r != null ? createRegionLoad(r) : null; } /* @@ -2362,7 +2362,7 @@ public class HRegionServer implements HRegionInterface, HBaseRPCErrorHandler, @Override @QosPriority(priority=HIGH_QOS) public List getOnlineRegions() { - List list = new ArrayList(); + List list = new ArrayList(onlineRegions.size()); for (Map.Entry e: this.onlineRegions.entrySet()) { list.add(e.getValue().getRegionInfo()); } diff --git a/src/main/resources/hbase-webapps/regionserver/regionserver.jsp b/src/main/resources/hbase-webapps/regionserver/regionserver.jsp index 68d4e422bc0..7995e91d1a4 100644 --- a/src/main/resources/hbase-webapps/regionserver/regionserver.jsp +++ b/src/main/resources/hbase-webapps/regionserver/regionserver.jsp @@ -56,7 +56,7 @@ %> <%= r.getRegionNameAsString() %> <%= Bytes.toStringBinary(r.getStartKey()) %><%= Bytes.toStringBinary(r.getEndKey()) %> - <%= load.toString() %> + <%= load == null? "null": load.toString() %> <% } %>