Return-Path: Delivered-To: apmail-lucene-hadoop-dev-archive@locus.apache.org Received: (qmail 50423 invoked from network); 24 Apr 2007 17:47:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Apr 2007 17:47:37 -0000 Received: (qmail 62479 invoked by uid 500); 24 Apr 2007 17:47:43 -0000 Delivered-To: apmail-lucene-hadoop-dev-archive@lucene.apache.org Received: (qmail 62199 invoked by uid 500); 24 Apr 2007 17:47:43 -0000 Mailing-List: contact hadoop-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hadoop-dev@lucene.apache.org Delivered-To: mailing list hadoop-dev@lucene.apache.org Received: (qmail 62185 invoked by uid 99); 24 Apr 2007 17:47:42 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2007 10:47:42 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2007 10:47:35 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 883B5714062 for ; Tue, 24 Apr 2007 10:47:15 -0700 (PDT) Message-ID: <1141691.1177436835555.JavaMail.jira@brutus> Date: Tue, 24 Apr 2007 10:47:15 -0700 (PDT) From: "Raghu Angadi (JIRA)" To: hadoop-dev@lucene.apache.org Subject: [jira] Commented: (HADOOP-1148) re-indent all code In-Reply-To: <228135.1174594892135.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-1148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491373 ] Raghu Angadi commented on HADOOP-1148: -------------------------------------- I am merging a largish patch made on 2-3 weeks old trunk. I think these changes are resulting in some rejections even with '{{patch -l}}'. For e.g. I could not find any other reason for following rejection for [FSDataset.java|http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSDataset.java?view=log]. {noformat} Index: src/java/org/apache/hadoop/dfs/FSDataset.java =================================================================== --- src/java/org/apache/hadoop/dfs/FSDataset.java (revision 527216) +++ src/java/org/apache/hadoop/dfs/FSDataset.java (working copy) FSDataset.java.rej: *************** *** 471,488 **** /** * Get a stream of data from the indicated block. */ - public synchronized InputStream getBlockData(Block b) throws IOException { if (! isValidBlock(b)) { throw new IOException("Block " + b + " is not valid."); } // File should be opened with the lock. - return new FileInputStream(getFile(b)); } /** * Start writing to a block file */ - public OutputStream writeToBlock(Block b) throws IOException { // // Make sure the block isn't a valid one - we're still creating it! // --- 487,513 ---- /** * Get a stream of data from the indicated block. */ + public synchronized File getBlockFile(Block b) throws IOException { if (! isValidBlock(b)) { throw new IOException("Block " + b + " is not valid."); } // File should be opened with the lock. + return getFile(b); } + static class BlockWriteStreams { + OutputStream dataOut; + OutputStream checksumOut; + + BlockWriteStreams( File f ) throws IOException { + dataOut = new FileOutputStream( f ); + checksumOut = new FileOutputStream( getMetaFile( f ) ); + } + } /** * Start writing to a block file */ + public BlockWriteStreams writeToBlock(Block b) throws IOException { // // Make sure the block isn't a valid one - we're still creating it! // {noformat} > re-indent all code > ------------------ > > Key: HADOOP-1148 > URL: https://issues.apache.org/jira/browse/HADOOP-1148 > Project: Hadoop > Issue Type: Improvement > Reporter: Doug Cutting > Assigned To: Doug Cutting > Priority: Minor > Fix For: 0.13.0 > > Attachments: checkstyle-errors.html, indents2.patch, whitespace.patch > > > We should re-indent all code to consistently use 2-spaces per level. This will not invalidate outstanding patches: one can use the '-l' option to ignore whitespace differences in patches. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.