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

Dasha Boudnik commented on BIGTOP-1560:
---------------------------------------

[~cos], sorry, missed it! Ok, so I:

- put in assume instead of assert
- took out the constant USERNAME altogether and changed USER_DIR to 
"/user/hdfs", since in the same comment you've linked to you mentioned that the 
test will only work under user hdfs. USERNAME isn't used anywhere except when 
defining USER_DIR, so I think that makes sense?
- added the user hdfs requirement into the comment above the class
- Does it maybe also make sense to add an assume for the user? Or is it better 
to allow the test to fail with the appropriate stdout message if its run under 
the wrong user?

[~jayunit100], didn't occur to me that there may be cases where the configs are 
changed (oops), thanks again! I added the requirement to the top comment. But 
(again, I may be very wrong here) won't the test still work if block rep = 2? 
Or will that mean that the system won't know which of the two blocks to use -- 
the one that was corrupted or the one that was left untouched? If you're 
triggering specifically the corrupted one for recovery, wouldn't HDFS be able 
to restore it from the second replica alone?

Patch attached with mentioned changes, let me know if we should add anything 
else or change what I've done. Thanks to the both of you!

> Add a test case for performing block corruption recovery
> --------------------------------------------------------
>
>                 Key: BIGTOP-1560
>                 URL: https://issues.apache.org/jira/browse/BIGTOP-1560
>             Project: Bigtop
>          Issue Type: Test
>          Components: tests
>    Affects Versions: 0.8.0
>            Reporter: Dasha Boudnik
>            Assignee: Dasha Boudnik
>             Fix For: 0.9.0
>
>         Attachments: BIGTOP-1560.patch, BIGTOP-1560.patch, BIGTOP-1560.patch
>
>
> Found this issue in internal testing. Roughly:
> create file in HDFS
> find block for the file
> corrupt a block
> trigger recovery by trying to read the file
> check recovery was successful



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to