HDFS-5928. Show namespace and namenode ID on NN dfshealth page. Contributed by Siqi Li.
This commit is contained in:
parent
a16d022ca4
commit
00b4e44a2e
@ -309,6 +309,9 @@ Release 2.7.0 - UNRELEASED
|
|||||||
HDFS-7283. Bump DataNode OOM log from WARN to ERROR.
|
HDFS-7283. Bump DataNode OOM log from WARN to ERROR.
|
||||||
(Stephen Chu via wheat9)
|
(Stephen Chu via wheat9)
|
||||||
|
|
||||||
|
HDFS-5928. Show namespace and namenode ID on NN dfshealth page.
|
||||||
|
(Siqi Li via wheat9)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
@ -116,15 +116,20 @@
|
|||||||
{/nn}
|
{/nn}
|
||||||
|
|
||||||
<div class="page-header"><h1>Overview {#nnstat}<small>'{HostAndPort}' ({State})</small>{/nnstat}</h1></div>
|
<div class="page-header"><h1>Overview {#nnstat}<small>'{HostAndPort}' ({State})</small>{/nnstat}</h1></div>
|
||||||
{#nn}
|
|
||||||
<table class="table table-bordered table-striped">
|
<table class="table table-bordered table-striped">
|
||||||
|
{#HAInfo}
|
||||||
|
<tr><th>Namespace:</th><td>{Namespace}</td></tr>
|
||||||
|
<tr><th>Namenode ID:</th><td>{NamenodeID}</td></tr>
|
||||||
|
{/HAInfo}
|
||||||
|
{#nn}
|
||||||
<tr><th>Started:</th><td>{NNStarted}</td></tr>
|
<tr><th>Started:</th><td>{NNStarted}</td></tr>
|
||||||
<tr><th>Version:</th><td>{Version}</td></tr>
|
<tr><th>Version:</th><td>{Version}</td></tr>
|
||||||
<tr><th>Compiled:</th><td>{CompileInfo}</td></tr>
|
<tr><th>Compiled:</th><td>{CompileInfo}</td></tr>
|
||||||
<tr><th>Cluster ID:</th><td>{ClusterId}</td></tr>
|
<tr><th>Cluster ID:</th><td>{ClusterId}</td></tr>
|
||||||
<tr><th>Block Pool ID:</th><td>{BlockPoolId}</td></tr>
|
<tr><th>Block Pool ID:</th><td>{BlockPoolId}</td></tr>
|
||||||
</table>
|
|
||||||
{/nn}
|
{/nn}
|
||||||
|
</table>
|
||||||
|
|
||||||
<div class="page-header"><h1>Summary</h1></div>
|
<div class="page-header"><h1>Summary</h1></div>
|
||||||
<p>
|
<p>
|
||||||
|
@ -54,6 +54,23 @@
|
|||||||
|
|
||||||
var data = {};
|
var data = {};
|
||||||
|
|
||||||
|
$.ajax({'url': '/conf', 'dataType': 'xml', 'async': false}).done(
|
||||||
|
function(d) {
|
||||||
|
var $xml = $(d);
|
||||||
|
var namespace, nnId;
|
||||||
|
$xml.find('property').each(function(idx,v) {
|
||||||
|
if ($(v).find('name').text() === 'dfs.nameservice.id') {
|
||||||
|
namespace = $(v).find('value').text();
|
||||||
|
}
|
||||||
|
if ($(v).find('name').text() === 'dfs.ha.namenode.id') {
|
||||||
|
nnId = $(v).find('value').text();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (namespace && nnId) {
|
||||||
|
data['HAInfo'] = {"Namespace": namespace, "NamenodeID": nnId};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Workarounds for the fact that JMXJsonServlet returns non-standard JSON strings
|
// Workarounds for the fact that JMXJsonServlet returns non-standard JSON strings
|
||||||
function workaround(nn) {
|
function workaround(nn) {
|
||||||
nn.JournalTransactionInfo = JSON.parse(nn.JournalTransactionInfo);
|
nn.JournalTransactionInfo = JSON.parse(nn.JournalTransactionInfo);
|
||||||
|
Loading…
Reference in New Issue
Block a user