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

Hadoop QA commented on HADOOP-1910:
-----------------------------------

+1 overall.  Here are the results of testing the latest attachment 
http://issues.apache.org/jira/secure/attachment/12366045/HADOOP-1910.patch
against trunk revision r578987.

    @author +1.  The patch does not contain any @author tags.

    javadoc +1.  The javadoc tool did not generate any warning messages.

    javac +1.  The applied patch does not generate any new compiler warnings.

    findbugs +1.  The patch does not introduce any new Findbugs warnings.

    core tests +1.  The patch passed core unit tests.

    contrib tests +1.  The patch passed contrib unit tests.

Test results: 
http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/818/testReport/
Findbugs warnings: 
http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/818/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: 
http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/818/artifact/trunk/build/test/checkstyle-errors.html
Console output: 
http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/818/console

This message is automatically generated.

> Extra checks in DFS.create() are not necessary.
> -----------------------------------------------
>
>                 Key: HADOOP-1910
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1910
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.14.1
>            Reporter: Raghu Angadi
>            Assignee: Raghu Angadi
>            Priority: Minor
>             Fix For: 0.15.0
>
>         Attachments: HADOOP-1910.patch
>
>
> {{DistributedFileSystem.create(path)}} like this :
> {code}
>   public FSDataOutputStream create(Path f, boolean overwrite,
>     int bufferSize, short replication, long blockSize,
>     Progressable progress) throws IOException {
>     if (exists(f) && !overwrite) {
>       throw new IOException("File already exists:"+f);
>     }
>     Path parent = f.getParent();
>     if (parent != null && !exists(parent) && !mkdirs(parent)) {
>       throw new IOException("Mkdirs failed to create " + parent);
>     }
>     return new FSDataOutputStream( dfs.create(getPathName(f), overwrite, 
>                                               replication, blockSize, 
>                                               progress, bufferSize, ticket));
>   }
> {code}
> This has overhead of 2-3 RPCs to namenode for every create(). The first 
> {{exists()}} is not required because {{overwrite}} flag is passed to 
> Namenode. The second {{exists()}} and {{mkdirs()}} is not required since 
> {{create()}} already does this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to