hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Nauroth (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-4905) Add appendToFile command to "hdfs dfs"
Date Mon, 15 Jul 2013 22:28:49 GMT

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

Chris Nauroth commented on HDFS-4905:
-------------------------------------

The patch is looking really good.  I tested successfully on Mac and Windows.  The only problem
I found is that {{TestDFSShell#testAppendToFileBadArgs}} failed for me due to timeout.  Can
you take a look?

Aside from that, here are just a few more minor suggestions:

{code}
    public static final int DEFAULT_IO_LENGTH = 1024 * 1024;
{code}

This doesn't appear to be needed outside the class, so should we make it private?

{code}
        if (is != null) {
          is.close();
        }

        if (fos != null) {
          fos.close();
        }
{code}

Could you please use {{IOUtils#cleanup}} here?  Otherwise, there is a risk that {{is.close()}}
throws before we attempt to call {{fos.close()}}.

{code}
        * <<<hdfs dfs -appendToFile localfile /user/hadoop/hadoopfile>>>

        * <<<hdfs dfs -appendToFile localfile1 localfile2 /user/hadoop/hadoopdir>>>

        * <<<hdfs dfs -appendToFile localfile hdfs://nn.example.com/hadoop/hadoopfile>>>

        * <<<hdfs dfs -appendToFile - hdfs://nn.example.com/hadoop/hadoopfile>>>
          Reads the input from stdin.
{code}

In the second example, could you change "hadoopdir" to "hadoopfile" like the others?  Otherwise,
a user might mistakenly think that the multi-input form of the command operates on a destination
directory instead of file.

                
> Add appendToFile command to "hdfs dfs"
> --------------------------------------
>
>                 Key: HDFS-4905
>                 URL: https://issues.apache.org/jira/browse/HDFS-4905
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: tools
>    Affects Versions: 3.0.0
>            Reporter: Arpit Agarwal
>            Assignee: Arpit Agarwal
>            Priority: Minor
>         Attachments: HDFS-4905.002.patch, HDFS-4905.003.patch, HDFS-4905.patch
>
>
> A "hdfs dfs -appendToFile..." option would be quite useful for quick testing.

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

Mime
View raw message