Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 30895E44B for ; Wed, 2 Jan 2013 17:48:13 +0000 (UTC) Received: (qmail 37466 invoked by uid 500); 2 Jan 2013 17:48:12 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 37432 invoked by uid 500); 2 Jan 2013 17:48:12 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 37422 invoked by uid 99); 2 Jan 2013 17:48:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2013 17:48:12 +0000 Date: Wed, 2 Jan 2013 17:48:12 +0000 (UTC) From: "Suresh Srinivas (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-9119) Add test to FileSystemContractBaseTest to verify integrity of overwritten files MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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