HDFS-5986. Capture the number of blocks pending deletion on namenode webUI. Contributed by Chris Nauroth.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1575384 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
55af4b0a79
commit
b1f87bbabd
|
@ -532,6 +532,9 @@ Release 2.4.0 - UNRELEASED
|
||||||
HDFS-6061. Allow dfs.datanode.shared.file.descriptor.path to contain
|
HDFS-6061. Allow dfs.datanode.shared.file.descriptor.path to contain
|
||||||
multiple entries and fall back when needed (cmccabe)
|
multiple entries and fall back when needed (cmccabe)
|
||||||
|
|
||||||
|
HDFS-5986. Capture the number of blocks pending deletion on namenode webUI.
|
||||||
|
(cnauroth)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HDFS-5790. LeaseManager.findPath is very slow when many leases need recovery
|
HDFS-5790. LeaseManager.findPath is very slow when many leases need recovery
|
||||||
|
|
|
@ -5533,6 +5533,7 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
||||||
return blockManager.getScheduledReplicationBlocksCount();
|
return blockManager.getScheduledReplicationBlocksCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
@Metric
|
@Metric
|
||||||
public long getPendingDeletionBlocks() {
|
public long getPendingDeletionBlocks() {
|
||||||
return blockManager.getPendingDeletionBlocksCount();
|
return blockManager.getPendingDeletionBlocksCount();
|
||||||
|
|
|
@ -145,4 +145,10 @@ public interface FSNamesystemMBean {
|
||||||
* Return the maximum number of inodes in the file system
|
* Return the maximum number of inodes in the file system
|
||||||
*/
|
*/
|
||||||
public long getMaxObjects();
|
public long getMaxObjects();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Number of blocks pending deletion
|
||||||
|
* @return number of blocks pending deletion
|
||||||
|
*/
|
||||||
|
long getPendingDeletionBlocks();
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,6 +160,7 @@
|
||||||
<tr><th><a href="#tab-datanode">Dead Nodes</a></th><td>{NumDeadDataNodes} (Decommissioned: {NumDecomDeadDataNodes})</td></tr>
|
<tr><th><a href="#tab-datanode">Dead Nodes</a></th><td>{NumDeadDataNodes} (Decommissioned: {NumDecomDeadDataNodes})</td></tr>
|
||||||
<tr><th><a href="#tab-datanode">Decommissioning Nodes</a></th><td>{NumDecommissioningDataNodes}</td></tr>
|
<tr><th><a href="#tab-datanode">Decommissioning Nodes</a></th><td>{NumDecommissioningDataNodes}</td></tr>
|
||||||
<tr><th title="Excludes missing blocks.">Number of Under-Replicated Blocks</th><td>{UnderReplicatedBlocks}</td></tr>
|
<tr><th title="Excludes missing blocks.">Number of Under-Replicated Blocks</th><td>{UnderReplicatedBlocks}</td></tr>
|
||||||
|
<tr><th>Number of Blocks Pending Deletion</th><td>{PendingDeletionBlocks}</td></tr>
|
||||||
{/fs}
|
{/fs}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.hadoop.hdfs.server.namenode;
|
package org.apache.hadoop.hdfs.server.namenode;
|
||||||
|
|
||||||
import static org.junit.Assert.assertTrue;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
import java.lang.management.ManagementFactory;
|
import java.lang.management.ManagementFactory;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -63,6 +63,10 @@ public class TestFSNamesystemMBean {
|
||||||
assertTrue(stat.containsKey("Snapshots")
|
assertTrue(stat.containsKey("Snapshots")
|
||||||
&& (Long) stat.get("Snapshots") == fsn.getNumSnapshots());
|
&& (Long) stat.get("Snapshots") == fsn.getNumSnapshots());
|
||||||
|
|
||||||
|
Object pendingDeletionBlocks = mbs.getAttribute(mxbeanName,
|
||||||
|
"PendingDeletionBlocks");
|
||||||
|
assertNotNull(pendingDeletionBlocks);
|
||||||
|
assertTrue(pendingDeletionBlocks instanceof Long);
|
||||||
} finally {
|
} finally {
|
||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
|
|
Loading…
Reference in New Issue