fix 500/NPE of region.jsp (#1033)
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
This commit is contained in:
parent
c1ba3bfa12
commit
d60ce17c17
|
@ -32,8 +32,13 @@
|
||||||
HRegionServer rs = (HRegionServer) getServletContext().getAttribute(HRegionServer.REGIONSERVER);
|
HRegionServer rs = (HRegionServer) getServletContext().getAttribute(HRegionServer.REGIONSERVER);
|
||||||
|
|
||||||
Region region = rs.getRegion(regionName);
|
Region region = rs.getRegion(regionName);
|
||||||
String displayName = RegionInfoDisplay.getRegionNameAsStringForDisplay(region.getRegionInfo(),
|
String displayName;
|
||||||
rs.getConfiguration());
|
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());
|
pageContext.setAttribute("pageTitle", "HBase RegionServer: " + rs.getServerName());
|
||||||
%>
|
%>
|
||||||
<jsp:include page="header.jsp">
|
<jsp:include page="header.jsp">
|
||||||
|
|
Loading…
Reference in New Issue