[
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.