You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Suresh Srinivas (JIRA)" <ji...@apache.org> on 2013/01/02 18:48:12 UTC

[jira] [Commented] (HADOOP-9119) Add test to FileSystemContractBaseTest to verify integrity of overwritten files

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

Suresh Srinivas commented on HADOOP-9119:
-----------------------------------------

Comments:
# Please add additional comments to toChar() method explaining breifly what is being done.
# #writeAndRead() - I may not have understood the code correctly. Some comments:
#* what is the reason why you need to accumulate the error strings in result and why not just print LOG.warn() as error is encountered?
# Variable name first_error_line - it is not related to really line right? You could just maintain the index where you encountered error right? 
#* Also not sure why have {{len * 40}} as the size of result ro why for loop is between {{first_error_line - 10}} to {{first_error_line + 10}}. A brief description of why this is done would help understand the code better. 
#* You could have array index of out of exception in the for loop. You should swap Math.min() and Math.max()
# Some nits - Some lines have are more than 80 chars

                
> Add test to FileSystemContractBaseTest to verify integrity of overwritten files
> -------------------------------------------------------------------------------
>
>                 Key: HADOOP-9119
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9119
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Steve Loughran
>            Assignee: Steve Loughran
>            Priority: Minor
>         Attachments: HADOOP-9119.patch
>
>
> The test {{FileSystemContractBaseTest.testOverwrite()}} is meant to verify that overwrites work -but it only overwrites a zero byte file with some data and only checks for length. This can hide problems where there overwrite was somehow corrupted.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira