HDFS-7483. Display information per tier on the Namenode UI. Contributed by Benoy Antony and Haohui Mai.
This commit is contained in:
parent
a628f67590
commit
df1e8ce44a
@ -729,6 +729,9 @@ Release 2.8.0 - UNRELEASED
|
|||||||
|
|
||||||
HDFS-8794. Improve CorruptReplicasMap#corruptReplicasMap. (yliu)
|
HDFS-8794. Improve CorruptReplicasMap#corruptReplicasMap. (yliu)
|
||||||
|
|
||||||
|
HDFS-7483. Display information per tier on the Namenode UI.
|
||||||
|
(Benoy Antony and wheat9 via wheat9)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than
|
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than
|
||||||
|
@ -199,6 +199,31 @@
|
|||||||
{#failed}{#helper_dir_status type="Failed"/}{/failed}
|
{#failed}{#helper_dir_status type="Failed"/}{/failed}
|
||||||
{/nn.NameDirStatuses}
|
{/nn.NameDirStatuses}
|
||||||
</table>
|
</table>
|
||||||
|
<div class="page-header"><h1>DFS Storage Types</h1></div>
|
||||||
|
<small>
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Storage Type</th>
|
||||||
|
<th>Configured Capacity</th>
|
||||||
|
<th>Capacity Used</th>
|
||||||
|
<th>Capacity Remaining</th>
|
||||||
|
<th>Block Pool Used</th>
|
||||||
|
<th>Nodes In Service</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
{#blockstats.StorageTypeStats}
|
||||||
|
<tr>
|
||||||
|
<td>{key}</td>
|
||||||
|
<td>{value.capacityTotal|fmt_bytes}</td>
|
||||||
|
<td>{value.capacityUsed|fmt_bytes} ({value.capacityUsedPercentage|fmt_percentage})</td>
|
||||||
|
<td>{value.capacityRemaining|fmt_bytes} ({value.capacityRemainingPercentage|fmt_percentage})</td>
|
||||||
|
<td>{value.blockPoolUsed|fmt_bytes}</td>
|
||||||
|
<td>{value.nodesInService}</td>
|
||||||
|
</tr>
|
||||||
|
{/blockstats.StorageTypeStats}
|
||||||
|
</table>
|
||||||
|
</small>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/x-dust-template" id="tmpl-snapshot">
|
<script type="text/x-dust-template" id="tmpl-snapshot">
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
{"name": "nn", "url": "/jmx?qry=Hadoop:service=NameNode,name=NameNodeInfo"},
|
{"name": "nn", "url": "/jmx?qry=Hadoop:service=NameNode,name=NameNodeInfo"},
|
||||||
{"name": "nnstat", "url": "/jmx?qry=Hadoop:service=NameNode,name=NameNodeStatus"},
|
{"name": "nnstat", "url": "/jmx?qry=Hadoop:service=NameNode,name=NameNodeStatus"},
|
||||||
{"name": "fs", "url": "/jmx?qry=Hadoop:service=NameNode,name=FSNamesystemState"},
|
{"name": "fs", "url": "/jmx?qry=Hadoop:service=NameNode,name=FSNamesystemState"},
|
||||||
|
{"name": "blockstats", "url": "/jmx?qry=Hadoop:service=NameNode,name=BlockStats"},
|
||||||
{"name": "mem", "url": "/jmx?qry=java.lang:type=Memory"}
|
{"name": "mem", "url": "/jmx?qry=java.lang:type=Memory"}
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -88,6 +89,13 @@
|
|||||||
for (var k in d) {
|
for (var k in d) {
|
||||||
data[k] = k === 'nn' ? workaround(d[k].beans[0]) : d[k].beans[0];
|
data[k] = k === 'nn' ? workaround(d[k].beans[0]) : d[k].beans[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var blockstats = data['blockstats'];
|
||||||
|
for (var k in blockstats.StorageTypeStats) {
|
||||||
|
var b = blockstats.StorageTypeStats[k].value;
|
||||||
|
b.capacityUsedPercentage = b.capacityUsed * 100.0 / b.capacityTotal;
|
||||||
|
b.capacityRemainingPercentage = b.capacityRemaining * 100.0 / b.capacityTotal;
|
||||||
|
}
|
||||||
render();
|
render();
|
||||||
}),
|
}),
|
||||||
function (url, jqxhr, text, err) {
|
function (url, jqxhr, text, err) {
|
||||||
|
@ -106,7 +106,6 @@ protected static String readOutput(URL url) throws IOException {
|
|||||||
public void testStorageTypeStatsJMX() throws Exception {
|
public void testStorageTypeStatsJMX() throws Exception {
|
||||||
URL baseUrl = new URL (cluster.getHttpUri(0));
|
URL baseUrl = new URL (cluster.getHttpUri(0));
|
||||||
String result = readOutput(new URL(baseUrl, "/jmx"));
|
String result = readOutput(new URL(baseUrl, "/jmx"));
|
||||||
System.out.println(result);
|
|
||||||
|
|
||||||
Map<String, Object> stat = (Map<String, Object>) JSON.parse(result);
|
Map<String, Object> stat = (Map<String, Object>) JSON.parse(result);
|
||||||
Object[] beans =(Object[]) stat.get("beans");
|
Object[] beans =(Object[]) stat.get("beans");
|
||||||
|
Loading…
Reference in New Issue
Block a user