HDFS-12206. Rename the split EC / replicated block metrics.

This commit is contained in:
Andrew Wang 2017-07-28 11:24:44 -07:00
parent 77791e4c36
commit 480c8db40c
9 changed files with 90 additions and 90 deletions

View File

@ -232,47 +232,47 @@ public long getNumTimedOutPendingReconstructions() {
} }
/** Used by metrics. */ /** Used by metrics. */
public long getLowRedundancyBlocksStat() { public long getLowRedundancyBlocks() {
return neededReconstruction.getLowRedundancyBlocksStat(); return neededReconstruction.getLowRedundancyBlocksStat();
} }
/** Used by metrics. */ /** Used by metrics. */
public long getCorruptBlocksStat() { public long getCorruptBlocks() {
return corruptReplicas.getCorruptBlocksStat(); return corruptReplicas.getCorruptBlocksStat();
} }
/** Used by metrics. */ /** Used by metrics. */
public long getMissingBlocksStat() { public long getMissingBlocks() {
return neededReconstruction.getCorruptBlocksStat(); return neededReconstruction.getCorruptBlocksStat();
} }
/** Used by metrics. */ /** Used by metrics. */
public long getMissingReplicationOneBlocksStat() { public long getMissingReplicationOneBlocks() {
return neededReconstruction.getCorruptReplicationOneBlocksStat(); return neededReconstruction.getCorruptReplicationOneBlocksStat();
} }
/** Used by metrics. */ /** Used by metrics. */
public long getPendingDeletionBlocksStat() { public long getPendingDeletionReplicatedBlocks() {
return invalidateBlocks.getBlocksStat(); return invalidateBlocks.getBlocksStat();
} }
/** Used by metrics. */ /** Used by metrics. */
public long getLowRedundancyECBlockGroupsStat() { public long getLowRedundancyECBlockGroups() {
return neededReconstruction.getLowRedundancyECBlockGroupsStat(); return neededReconstruction.getLowRedundancyECBlockGroupsStat();
} }
/** Used by metrics. */ /** Used by metrics. */
public long getCorruptECBlockGroupsStat() { public long getCorruptECBlockGroups() {
return corruptReplicas.getCorruptECBlockGroupsStat(); return corruptReplicas.getCorruptECBlockGroupsStat();
} }
/** Used by metrics. */ /** Used by metrics. */
public long getMissingECBlockGroupsStat() { public long getMissingECBlockGroups() {
return neededReconstruction.getCorruptECBlockGroupsStat(); return neededReconstruction.getCorruptECBlockGroupsStat();
} }
/** Used by metrics. */ /** Used by metrics. */
public long getPendingDeletionECBlockGroupsStat() { public long getPendingDeletionECBlockGroups() {
return invalidateBlocks.getECBlockGroupsStat(); return invalidateBlocks.getECBlockGroupsStat();
} }
@ -2292,11 +2292,11 @@ public long getBytesInFuture() {
return bmSafeMode.getBytesInFuture(); return bmSafeMode.getBytesInFuture();
} }
public long getBytesInFutureReplicatedBlocksStat() { public long getBytesInFutureReplicatedBlocks() {
return bmSafeMode.getBytesInFutureBlocks(); return bmSafeMode.getBytesInFutureBlocks();
} }
public long getBytesInFutureStripedBlocksStat() { public long getBytesInFutureECBlockGroups() {
return bmSafeMode.getBytesInFutureECBlockGroups(); return bmSafeMode.getBytesInFutureECBlockGroups();
} }

View File

@ -92,6 +92,7 @@
import org.apache.hadoop.hdfs.protocol.BlocksStats; import org.apache.hadoop.hdfs.protocol.BlocksStats;
import org.apache.hadoop.hdfs.protocol.ECBlockGroupsStats; import org.apache.hadoop.hdfs.protocol.ECBlockGroupsStats;
import org.apache.hadoop.hdfs.protocol.OpenFileEntry; import org.apache.hadoop.hdfs.protocol.OpenFileEntry;
import org.apache.hadoop.hdfs.server.namenode.metrics.ReplicatedBlocksMBean;
import org.apache.hadoop.hdfs.server.protocol.SlowDiskReports; import org.apache.hadoop.hdfs.server.protocol.SlowDiskReports;
import static org.apache.hadoop.util.Time.now; import static org.apache.hadoop.util.Time.now;
import static org.apache.hadoop.util.Time.monotonicNow; import static org.apache.hadoop.util.Time.monotonicNow;
@ -243,10 +244,9 @@
import org.apache.hadoop.hdfs.server.namenode.ha.EditLogTailer; import org.apache.hadoop.hdfs.server.namenode.ha.EditLogTailer;
import org.apache.hadoop.hdfs.server.namenode.ha.HAContext; import org.apache.hadoop.hdfs.server.namenode.ha.HAContext;
import org.apache.hadoop.hdfs.server.namenode.ha.StandbyCheckpointer; import org.apache.hadoop.hdfs.server.namenode.ha.StandbyCheckpointer;
import org.apache.hadoop.hdfs.server.namenode.metrics.ECBlockGroupsStatsMBean; import org.apache.hadoop.hdfs.server.namenode.metrics.ECBlockGroupsMBean;
import org.apache.hadoop.hdfs.server.namenode.metrics.FSNamesystemMBean; import org.apache.hadoop.hdfs.server.namenode.metrics.FSNamesystemMBean;
import org.apache.hadoop.hdfs.server.namenode.metrics.NameNodeMetrics; import org.apache.hadoop.hdfs.server.namenode.metrics.NameNodeMetrics;
import org.apache.hadoop.hdfs.server.namenode.metrics.ReplicatedBlocksStatsMBean;
import org.apache.hadoop.hdfs.server.namenode.snapshot.DirectorySnapshottableFeature; import org.apache.hadoop.hdfs.server.namenode.snapshot.DirectorySnapshottableFeature;
import org.apache.hadoop.hdfs.server.namenode.snapshot.Snapshot; import org.apache.hadoop.hdfs.server.namenode.snapshot.Snapshot;
import org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager; import org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotManager;
@ -340,7 +340,7 @@
@InterfaceAudience.Private @InterfaceAudience.Private
@Metrics(context="dfs") @Metrics(context="dfs")
public class FSNamesystem implements Namesystem, FSNamesystemMBean, public class FSNamesystem implements Namesystem, FSNamesystemMBean,
NameNodeMXBean, ReplicatedBlocksStatsMBean, ECBlockGroupsStatsMBean { NameNodeMXBean, ReplicatedBlocksMBean, ECBlockGroupsMBean {
public static final Log LOG = LogFactory.getLog(FSNamesystem.class); public static final Log LOG = LogFactory.getLog(FSNamesystem.class);
private final MetricsRegistry registry = new MetricsRegistry("FSNamesystem"); private final MetricsRegistry registry = new MetricsRegistry("FSNamesystem");
@Metric final MutableRatesWithAggregation detailedLockHoldTimeMetrics = @Metric final MutableRatesWithAggregation detailedLockHoldTimeMetrics =
@ -4076,10 +4076,10 @@ long[] getStats() {
* @see ClientProtocol#getBlocksStats() * @see ClientProtocol#getBlocksStats()
*/ */
BlocksStats getBlocksStats() { BlocksStats getBlocksStats() {
return new BlocksStats(getLowRedundancyBlocksStat(), return new BlocksStats(getLowRedundancyReplicatedBlocks(),
getCorruptBlocksStat(), getMissingBlocksStat(), getCorruptReplicatedBlocks(), getMissingReplicatedBlocks(),
getMissingReplicationOneBlocksStat(), getBlocksBytesInFutureStat(), getMissingReplicationOneBlocks(), getBytesInFutureReplicatedBlocks(),
getPendingDeletionBlocksStat()); getPendingDeletionReplicatedBlocks());
} }
/** /**
@ -4089,9 +4089,9 @@ BlocksStats getBlocksStats() {
* @see ClientProtocol#getECBlockGroupsStats() * @see ClientProtocol#getECBlockGroupsStats()
*/ */
ECBlockGroupsStats getECBlockGroupsStats() { ECBlockGroupsStats getECBlockGroupsStats() {
return new ECBlockGroupsStats(getLowRedundancyECBlockGroupsStat(), return new ECBlockGroupsStats(getLowRedundancyECBlockGroups(),
getCorruptECBlockGroupsStat(), getMissingECBlockGroupsStat(), getCorruptECBlockGroups(), getMissingECBlockGroups(),
getECBlocksBytesInFutureStat(), getPendingDeletionECBlockGroupsStat()); getBytesInFutureECBlockGroups(), getPendingDeletionECBlockGroups());
} }
@Override // FSNamesystemMBean @Override // FSNamesystemMBean
@ -4638,76 +4638,76 @@ public long getPendingDeletionBlocks() {
@Override // ReplicatedBlocksMBean @Override // ReplicatedBlocksMBean
@Metric({"LowRedundancyReplicatedBlocks", @Metric({"LowRedundancyReplicatedBlocks",
"Number of low redundancy replicated blocks"}) "Number of low redundancy replicated blocks"})
public long getLowRedundancyBlocksStat() { public long getLowRedundancyReplicatedBlocks() {
return blockManager.getLowRedundancyBlocksStat(); return blockManager.getLowRedundancyBlocks();
} }
@Override // ReplicatedBlocksMBean @Override // ReplicatedBlocksMBean
@Metric({"CorruptReplicatedBlocks", "Number of corrupted replicated blocks"}) @Metric({"CorruptReplicatedBlocks", "Number of corrupted replicated blocks"})
public long getCorruptBlocksStat() { public long getCorruptReplicatedBlocks() {
return blockManager.getCorruptBlocksStat(); return blockManager.getCorruptBlocks();
} }
@Override // ReplicatedBlocksMBean @Override // ReplicatedBlocksMBean
@Metric({"MissingReplicatedBlocks", "Number of missing replicated blocks"}) @Metric({"MissingReplicatedBlocks", "Number of missing replicated blocks"})
public long getMissingBlocksStat() { public long getMissingReplicatedBlocks() {
return blockManager.getMissingBlocksStat(); return blockManager.getMissingBlocks();
} }
@Override // ReplicatedBlocksMBean @Override // ReplicatedBlocksMBean
@Metric({"MissingReplicatedOneBlocks", "Number of missing replicated blocks" + @Metric({"MissingReplicationOneBlocks", "Number of missing replicated " +
" with replication factor 1"}) "blocks with replication factor 1"})
public long getMissingReplicationOneBlocksStat() { public long getMissingReplicationOneBlocks() {
return blockManager.getMissingReplicationOneBlocksStat(); return blockManager.getMissingReplicationOneBlocks();
} }
@Override // ReplicatedBlocksMBean @Override // ReplicatedBlocksMBean
@Metric({"BytesReplicatedFutureBlocks", "Total bytes in replicated blocks " + @Metric({"BytesInFutureReplicatedBlocks", "Total bytes in replicated " +
"with future generation stamp"}) "blocks with future generation stamp"})
public long getBlocksBytesInFutureStat() { public long getBytesInFutureReplicatedBlocks() {
return blockManager.getBytesInFutureReplicatedBlocksStat(); return blockManager.getBytesInFutureReplicatedBlocks();
} }
@Override // ReplicatedBlocksMBean @Override // ReplicatedBlocksMBean
@Metric({"PendingDeletionReplicatedBlocks", "Number of replicated blocks " + @Metric({"PendingDeletionReplicatedBlocks", "Number of replicated blocks " +
"that are pending deletion"}) "that are pending deletion"})
public long getPendingDeletionBlocksStat() { public long getPendingDeletionReplicatedBlocks() {
return blockManager.getPendingDeletionBlocksStat(); return blockManager.getPendingDeletionReplicatedBlocks();
} }
@Override // ECBlockGroupsStatsMBean @Override // ECBlockGroupsMBean
@Metric({"LowRedundancyECBlockGroups", "Number of erasure coded block " + @Metric({"LowRedundancyECBlockGroups", "Number of erasure coded block " +
"groups with low redundancy"}) "groups with low redundancy"})
public long getLowRedundancyECBlockGroupsStat() { public long getLowRedundancyECBlockGroups() {
return blockManager.getLowRedundancyECBlockGroupsStat(); return blockManager.getLowRedundancyECBlockGroups();
} }
@Override // ECBlockGroupsStatsMBean @Override // ECBlockGroupsMBean
@Metric({"CorruptECBlockGroups", "Number of erasure coded block groups that" + @Metric({"CorruptECBlockGroups", "Number of erasure coded block groups that" +
" are corrupt"}) " are corrupt"})
public long getCorruptECBlockGroupsStat() { public long getCorruptECBlockGroups() {
return blockManager.getCorruptECBlockGroupsStat(); return blockManager.getCorruptECBlockGroups();
} }
@Override // ECBlockGroupsStatsMBean @Override // ECBlockGroupsMBean
@Metric({"MissingECBlockGroups", "Number of erasure coded block groups that" + @Metric({"MissingECBlockGroups", "Number of erasure coded block groups that" +
" are missing"}) " are missing"})
public long getMissingECBlockGroupsStat() { public long getMissingECBlockGroups() {
return blockManager.getMissingECBlockGroupsStat(); return blockManager.getMissingECBlockGroups();
} }
@Override // ECBlockGroupsStatsMBean @Override // ECBlockGroupsMBean
@Metric({"BytesFutureECBlockGroups", "Total bytes in erasure coded block " + @Metric({"BytesInFutureECBlockGroups", "Total bytes in erasure coded block " +
"groups with future generation stamp"}) "groups with future generation stamp"})
public long getECBlocksBytesInFutureStat() { public long getBytesInFutureECBlockGroups() {
return blockManager.getBytesInFutureStripedBlocksStat(); return blockManager.getBytesInFutureECBlockGroups();
} }
@Override // ECBlockGroupsStatsMBean @Override // ECBlockGroupsMBean
@Metric({"PendingDeletionECBlockGroups", "Number of erasure coded block " + @Metric({"PendingDeletionECBlockGroups", "Number of erasure coded block " +
"groups that are pending deletion"}) "groups that are pending deletion"})
public long getPendingDeletionECBlockGroupsStat() { public long getPendingDeletionECBlockGroups() {
return blockManager.getPendingDeletionECBlockGroupsStat(); return blockManager.getPendingDeletionECBlockGroups();
} }
@Override @Override
@ -4774,9 +4774,9 @@ public String getFSState() {
* Register following MBeans with their respective names. * Register following MBeans with their respective names.
* FSNamesystemMBean: * FSNamesystemMBean:
* "hadoop:service=NameNode,name=FSNamesystemState" * "hadoop:service=NameNode,name=FSNamesystemState"
* ReplicatedBlocksStatsMBean: * ReplicatedBlocksMBean:
* "hadoop:service=NameNode,name=ReplicatedBlocksState" * "hadoop:service=NameNode,name=ReplicatedBlocksState"
* ECBlockGroupsStatsMBean: * ECBlockGroupsMBean:
* "hadoop:service=NameNode,name=ECBlockGroupsState" * "hadoop:service=NameNode,name=ECBlockGroupsState"
*/ */
private void registerMBean() { private void registerMBean() {
@ -4785,9 +4785,9 @@ private void registerMBean() {
StandardMBean namesystemBean = new StandardMBean( StandardMBean namesystemBean = new StandardMBean(
this, FSNamesystemMBean.class); this, FSNamesystemMBean.class);
StandardMBean replicaBean = new StandardMBean( StandardMBean replicaBean = new StandardMBean(
this, ReplicatedBlocksStatsMBean.class); this, ReplicatedBlocksMBean.class);
StandardMBean ecBean = new StandardMBean( StandardMBean ecBean = new StandardMBean(
this, ECBlockGroupsStatsMBean.class); this, ECBlockGroupsMBean.class);
namesystemMBeanName = MBeans.register( namesystemMBeanName = MBeans.register(
"NameNode", "FSNamesystemState", namesystemBean); "NameNode", "FSNamesystemState", namesystemBean);
replicatedBlocksMBeanName = MBeans.register( replicatedBlocksMBeanName = MBeans.register(

View File

@ -31,29 +31,29 @@
* *
*/ */
@InterfaceAudience.Private @InterfaceAudience.Private
public interface ECBlockGroupsStatsMBean { public interface ECBlockGroupsMBean {
/** /**
* Return count of erasure coded block groups with low redundancy. * Return count of erasure coded block groups with low redundancy.
*/ */
long getLowRedundancyECBlockGroupsStat(); long getLowRedundancyECBlockGroups();
/** /**
* Return count of erasure coded block groups that are corrupt. * Return count of erasure coded block groups that are corrupt.
*/ */
long getCorruptECBlockGroupsStat(); long getCorruptECBlockGroups();
/** /**
* Return count of erasure coded block groups that are missing. * Return count of erasure coded block groups that are missing.
*/ */
long getMissingECBlockGroupsStat(); long getMissingECBlockGroups();
/** /**
* Return total bytes of erasure coded future block groups. * Return total bytes of erasure coded future block groups.
*/ */
long getECBlocksBytesInFutureStat(); long getBytesInFutureECBlockGroups();
/** /**
* Return count of erasure coded block groups that are pending deletion. * Return count of erasure coded block groups that are pending deletion.
*/ */
long getPendingDeletionECBlockGroupsStat(); long getPendingDeletionECBlockGroups();
} }

View File

@ -30,34 +30,34 @@
* @see org.apache.hadoop.hdfs.server.namenode.metrics.NameNodeMetrics * @see org.apache.hadoop.hdfs.server.namenode.metrics.NameNodeMetrics
*/ */
@InterfaceAudience.Private @InterfaceAudience.Private
public interface ReplicatedBlocksStatsMBean { public interface ReplicatedBlocksMBean {
/** /**
* Return low redundancy blocks count. * Return low redundancy blocks count.
*/ */
long getLowRedundancyBlocksStat(); long getLowRedundancyReplicatedBlocks();
/** /**
* Return corrupt blocks count. * Return corrupt blocks count.
*/ */
long getCorruptBlocksStat(); long getCorruptReplicatedBlocks();
/** /**
* Return missing blocks count. * Return missing blocks count.
*/ */
long getMissingBlocksStat(); long getMissingReplicatedBlocks();
/** /**
* Return count of missing blocks with replication factor one. * Return count of missing blocks with replication factor one.
*/ */
long getMissingReplicationOneBlocksStat(); long getMissingReplicationOneBlocks();
/** /**
* Return total bytes of future blocks. * Return total bytes of future blocks.
*/ */
long getBlocksBytesInFutureStat(); long getBytesInFutureReplicatedBlocks();
/** /**
* Return count of blocks that are pending deletion. * Return count of blocks that are pending deletion.
*/ */
long getPendingDeletionBlocksStat(); long getPendingDeletionReplicatedBlocks();
} }

View File

@ -424,9 +424,9 @@ public void testCheckStripedReplicaCorrupt() throws Exception {
cluster.getDataNodes().get(3).getDatanodeId(), reports[0]); cluster.getDataNodes().get(3).getDatanodeId(), reports[0]);
BlockManagerTestUtil.updateState(ns.getBlockManager()); BlockManagerTestUtil.updateState(ns.getBlockManager());
// the total number of corrupted block info is still 1 // the total number of corrupted block info is still 1
Assert.assertEquals(1, ns.getCorruptECBlockGroupsStat()); Assert.assertEquals(1, ns.getCorruptECBlockGroups());
Assert.assertEquals(1, ns.getCorruptReplicaBlocks()); Assert.assertEquals(1, ns.getCorruptReplicaBlocks());
Assert.assertEquals(0, ns.getCorruptBlocksStat()); Assert.assertEquals(0, ns.getCorruptReplicatedBlocks());
// 2 internal blocks corrupted // 2 internal blocks corrupted
Assert.assertEquals(2, bm.getCorruptReplicas(stored).size()); Assert.assertEquals(2, bm.getCorruptReplicas(stored).size());

View File

@ -809,10 +809,10 @@ public Boolean get() {
long totalMissingBlocks = cluster.getNamesystem().getMissingBlocksCount(); long totalMissingBlocks = cluster.getNamesystem().getMissingBlocksCount();
Long replicaMissingBlocks = Long replicaMissingBlocks =
(Long) mbs.getAttribute(replStateMBeanName, (Long) mbs.getAttribute(replStateMBeanName,
"MissingBlocksStat"); "MissingReplicatedBlocks");
Long ecMissingBlocks = Long ecMissingBlocks =
(Long) mbs.getAttribute(ecBlkGrpStateMBeanName, (Long) mbs.getAttribute(ecBlkGrpStateMBeanName,
"MissingECBlockGroupsStat"); "MissingECBlockGroups");
assertEquals("Unexpected total missing blocks!", assertEquals("Unexpected total missing blocks!",
expectedMissingBlockCount, totalMissingBlocks); expectedMissingBlockCount, totalMissingBlocks);
assertEquals("Unexpected total missing blocks!", assertEquals("Unexpected total missing blocks!",
@ -826,10 +826,10 @@ public Boolean get() {
cluster.getNamesystem().getCorruptReplicaBlocks(); cluster.getNamesystem().getCorruptReplicaBlocks();
Long replicaCorruptBlocks = Long replicaCorruptBlocks =
(Long) mbs.getAttribute(replStateMBeanName, (Long) mbs.getAttribute(replStateMBeanName,
"CorruptBlocksStat"); "CorruptReplicatedBlocks");
Long ecCorruptBlocks = Long ecCorruptBlocks =
(Long) mbs.getAttribute(ecBlkGrpStateMBeanName, (Long) mbs.getAttribute(ecBlkGrpStateMBeanName,
"CorruptECBlockGroupsStat"); "CorruptECBlockGroups");
assertEquals("Unexpected total corrupt blocks!", assertEquals("Unexpected total corrupt blocks!",
expectedCorruptBlockCount, totalCorruptBlocks); expectedCorruptBlockCount, totalCorruptBlocks);
assertEquals("Unexpected total corrupt blocks!", assertEquals("Unexpected total corrupt blocks!",

View File

@ -419,7 +419,7 @@ public void testReconstructionWork() throws Exception {
// Verify low redundancy count matching EC block groups count // Verify low redundancy count matching EC block groups count
BlockManagerTestUtil.updateState(bm); BlockManagerTestUtil.updateState(bm);
assertEquals(blockGroups, bm.getLowRedundancyECBlockGroupsStat()); assertEquals(blockGroups, bm.getLowRedundancyECBlockGroups());
DFSTestUtil.verifyClientStats(conf, dfsCluster); DFSTestUtil.verifyClientStats(conf, dfsCluster);
@ -429,7 +429,7 @@ public void testReconstructionWork() throws Exception {
// Verify pending reconstruction count // Verify pending reconstruction count
assertEquals(blockGroups, getNumberOfBlocksToBeErasureCoded(dfsCluster)); assertEquals(blockGroups, getNumberOfBlocksToBeErasureCoded(dfsCluster));
assertEquals(0, bm.getLowRedundancyECBlockGroupsStat()); assertEquals(0, bm.getLowRedundancyECBlockGroups());
DFSTestUtil.verifyClientStats(conf, dfsCluster); DFSTestUtil.verifyClientStats(conf, dfsCluster);
} finally { } finally {
dfsCluster.shutdown(); dfsCluster.shutdown();

View File

@ -317,27 +317,27 @@ private void verifyAggregatedMetricsTally() throws Exception {
namesystem.getUnderReplicatedBlocks()); namesystem.getUnderReplicatedBlocks());
assertEquals("Low redundancy metrics not matching!", assertEquals("Low redundancy metrics not matching!",
namesystem.getLowRedundancyBlocks(), namesystem.getLowRedundancyBlocks(),
namesystem.getLowRedundancyBlocksStat() + namesystem.getLowRedundancyReplicatedBlocks() +
namesystem.getLowRedundancyECBlockGroupsStat()); namesystem.getLowRedundancyECBlockGroups());
assertEquals("Corrupt blocks metrics not matching!", assertEquals("Corrupt blocks metrics not matching!",
namesystem.getCorruptReplicaBlocks(), namesystem.getCorruptReplicaBlocks(),
namesystem.getCorruptBlocksStat() + namesystem.getCorruptReplicatedBlocks() +
namesystem.getCorruptECBlockGroupsStat()); namesystem.getCorruptECBlockGroups());
assertEquals("Missing blocks metrics not matching!", assertEquals("Missing blocks metrics not matching!",
namesystem.getMissingBlocksCount(), namesystem.getMissingBlocksCount(),
namesystem.getMissingBlocksStat() + namesystem.getMissingReplicatedBlocks() +
namesystem.getMissingECBlockGroupsStat()); namesystem.getMissingECBlockGroups());
assertEquals("Missing blocks with replication factor one not matching!", assertEquals("Missing blocks with replication factor one not matching!",
namesystem.getMissingReplOneBlocksCount(), namesystem.getMissingReplOneBlocksCount(),
namesystem.getMissingReplicationOneBlocksStat()); namesystem.getMissingReplicationOneBlocks());
assertEquals("Bytes in future blocks metrics not matching!", assertEquals("Bytes in future blocks metrics not matching!",
namesystem.getBytesInFuture(), namesystem.getBytesInFuture(),
namesystem.getBlocksBytesInFutureStat() + namesystem.getBytesInFutureReplicatedBlocks() +
namesystem.getECBlocksBytesInFutureStat()); namesystem.getBytesInFutureECBlockGroups());
assertEquals("Pending deletion blocks metrics not matching!", assertEquals("Pending deletion blocks metrics not matching!",
namesystem.getPendingDeletionBlocks(), namesystem.getPendingDeletionBlocks(),
namesystem.getPendingDeletionBlocksStat() + namesystem.getPendingDeletionReplicatedBlocks() +
namesystem.getPendingDeletionECBlockGroupsStat()); namesystem.getPendingDeletionECBlockGroups());
} }
/** Corrupt a block and ensure metrics reflects it */ /** Corrupt a block and ensure metrics reflects it */