[
https://issues.apache.org/jira/browse/HDFS-14714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16911594#comment-16911594
]
Ayush Saxena commented on HDFS-14714:
-------------------------------------
Thanx [~zhangchen] for the patch.
{code:java}
+ assertNotEquals("There should be some corrupt blocks", 0,
+ routerStat.getCorruptBlocks());
+ assertEquals(
+ "The router stats result should equal to the sum of subcluter's stats",
+ routerStat.getCorruptBlocks(),
+ stats.get(0).getCorruptBlocks() + stats.get(1).getCorruptBlocks());
{code}
Seems assertNotEquals isn't required. when we are checking with the exact
value, checking not equal to 0 doesn't make sense and for assertEquals here the
expected value should come before.
For assertions we have hard-coded values like 2 and all, these are dependent on
number of NS, if in future the number of namespaces changes for some purpose, I
guess this test would require modifications, may be we can try avoiding
hard-coding values and take number from number of namespaces and similarly.
> RBF: implement getReplicatedBlockStats interface
> ------------------------------------------------
>
> Key: HDFS-14714
> URL: https://issues.apache.org/jira/browse/HDFS-14714
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: Chen Zhang
> Assignee: Chen Zhang
> Priority: Major
> Attachments: HDFS-14714.001.patch, HDFS-14714.002.patch,
> HDFS-14714.003.patch, HDFS-14714.004.patch
>
>
> It's not implemented now, we sometime need this interface for cluster monitor
> {code:java}
> // current implementation
> public ReplicatedBlockStats getReplicatedBlockStats() throws IOException {
> rpcServer.checkOperation(NameNode.OperationCategory.READ, false);
> return null;
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.2#803003)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]