HBASE-13001 NullPointer in master logs for table.jsp (Vikas Vishwakarma)
This commit is contained in:
parent
b5590ac722
commit
bb3ca8ed12
|
@ -44,15 +44,9 @@
|
|||
Configuration conf = master.getConfiguration();
|
||||
MetaTableLocator metaTableLocator = new MetaTableLocator();
|
||||
String fqtn = request.getParameter("name");
|
||||
HTable table = new HTable(conf, fqtn);
|
||||
HTable table = null;
|
||||
String tableHeader;
|
||||
boolean withReplica = false;
|
||||
if (table.getTableDescriptor().getRegionReplication() > 1) {
|
||||
tableHeader = "<h2>Table Regions</h2><table class=\"table table-striped\"><tr><th>Name</th><th>Region Server</th><th>Start Key</th><th>End Key</th><th>Locality</th><th>Requests</th><th>ReplicaID</th></tr>";
|
||||
withReplica = true;
|
||||
} else {
|
||||
tableHeader = "<h2>Table Regions</h2><table class=\"table table-striped\"><tr><th>Name</th><th>Region Server</th><th>Start Key</th><th>End Key</th><th>Locality</th><th>Requests</th></tr>";
|
||||
}
|
||||
ServerName rl = metaTableLocator.getMetaRegionLocation(master.getZooKeeper());
|
||||
boolean showFragmentation = conf.getBoolean("hbase.master.ui.fragmentation.enabled", false);
|
||||
boolean readOnly = conf.getBoolean("hbase.master.ui.readonly", false);
|
||||
|
@ -85,7 +79,7 @@
|
|||
<link href="/static/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="/static/css/bootstrap-theme.min.css" rel="stylesheet">
|
||||
<link href="/static/css/hbase.css" rel="stylesheet">
|
||||
<% if ( !readOnly && action != null ) { %>
|
||||
<% if ( ( !readOnly && action != null ) || fqtn == null ) { %>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
setTimeout("history.back()",5000);
|
||||
|
@ -124,6 +118,14 @@
|
|||
</div>
|
||||
</div>
|
||||
<%
|
||||
if ( fqtn != null ) {
|
||||
table = new HTable(conf, fqtn);
|
||||
if (table.getTableDescriptor().getRegionReplication() > 1) {
|
||||
tableHeader = "<h2>Table Regions</h2><table class=\"table table-striped\"><tr><th>Name</th><th>Region Server</th><th>Start Key</th><th>End Key</th><th>Locality</th><th>Requests</th><th>ReplicaID</th></tr>";
|
||||
withReplica = true;
|
||||
} else {
|
||||
tableHeader = "<h2>Table Regions</h2><table class=\"table table-striped\"><tr><th>Name</th><th>Region Server</th><th>Start Key</th><th>End Key</th><th>Locality</th><th>Requests</th></tr>";
|
||||
}
|
||||
if ( !readOnly && action != null ) {
|
||||
%>
|
||||
<div class="container">
|
||||
|
@ -157,9 +159,6 @@ if ( !readOnly && action != null ) {
|
|||
%>
|
||||
<p>Go <a href="javascript:history.back()">Back</a>, or wait for the redirect.
|
||||
</div>
|
||||
<script src="/static/js/jquery.min.js" type="text/javascript"></script>
|
||||
<script src="/static/js/bootstrap.min.js" type="text/javascript"></script>
|
||||
</body>
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
|
@ -356,12 +355,22 @@ Actions:
|
|||
</table>
|
||||
</center>
|
||||
</p>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
<% }
|
||||
} else { // handle the case for fqtn is null with error message + redirect
|
||||
%>
|
||||
<div class="container">
|
||||
<div class="row inner_header">
|
||||
<div class="page-header">
|
||||
<h1>Table not ready</h1>
|
||||
</div>
|
||||
</div>
|
||||
<p><hr><p>
|
||||
<p>Go <a href="javascript:history.back()">Back</a>, or wait for the redirect.
|
||||
</div>
|
||||
<% } %>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<script src="/static/js/jquery.min.js" type="text/javascript"></script>
|
||||
<script src="/static/js/bootstrap.min.js" type="text/javascript"></script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue