[ 
https://issues.apache.org/jira/browse/HDFS-13314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16419273#comment-16419273
 ] 

Rushabh S Shah commented on HDFS-13314:
---------------------------------------

bq. We test this code path since we have many unit tests that exercise 
saveNamespace. e.g. multiple test cases in TestFSImage would fail if NN exits 
when numErrors == 0.
Agreed.
bq. No easy way to do so without refactoring existing classes or inserting some 
test hooks. I don't think it is worth the effort.
In most of the patches that I have submitted, writing test cases took majority 
of time compared to writing production code but that doesn't give free pass to 
commit.

bq. More details: The suggested unit test sounds like that we should test 
whether the if-statement in Java is working properly.
[~szetszwo], The test case would protect this feature if someone in future 
removes/modifies this _if statement_.
Almost all of the code contains if, while or for statements. That doesn't mean 
it needs no test cases.

But looks like its little late now for this comment.


> NameNode should optionally exit if it detects FsImage corruption
> ----------------------------------------------------------------
>
>                 Key: HDFS-13314
>                 URL: https://issues.apache.org/jira/browse/HDFS-13314
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: namenode
>            Reporter: Arpit Agarwal
>            Assignee: Arpit Agarwal
>            Priority: Major
>             Fix For: 3.1.0, 2.10.0, 2.9.1, 3.0.2
>
>         Attachments: HDFS-13314.01.patch, HDFS-13314.02.patch, 
> HDFS-13314.03.patch, HDFS-13314.04.patch, HDFS-13314.05.patch
>
>
> The NameNode should optionally exit after writing an FsImage if it detects 
> the following kinds of corruptions:
> # INodeReference pointing to non-existent INode
> # Duplicate entries in snapshot deleted diff list.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to