HBASE-23677 fix 500/NPE of region.jsp (#1033)
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
This commit is contained in:
parent
ceaeece2c5
commit
a44f3b50e4
|
@ -32,8 +32,13 @@
|
|||
HRegionServer rs = (HRegionServer) getServletContext().getAttribute(HRegionServer.REGIONSERVER);
|
||||
|
||||
Region region = rs.getRegion(regionName);
|
||||
String displayName = RegionInfoDisplay.getRegionNameAsStringForDisplay(region.getRegionInfo(),
|
||||
rs.getConfiguration());
|
||||
String displayName;
|
||||
if (region != null) {
|
||||
displayName = RegionInfoDisplay.getRegionNameAsStringForDisplay(region.getRegionInfo(),
|
||||
rs.getConfiguration());
|
||||
} else {
|
||||
displayName = "region {" + regionName + "} is not currently online on this region server";
|
||||
}
|
||||
pageContext.setAttribute("pageTitle", "HBase RegionServer: " + rs.getServerName());
|
||||
%>
|
||||
<jsp:include page="header.jsp">
|
||||
|
|
Loading…
Reference in New Issue