hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daryn Sharp (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-7494) Add -c option for FSshell -tail
Date Tue, 02 Aug 2011 16:49:27 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-7494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13076305#comment-13076305

Daryn Sharp commented on HADOOP-7494:

This is a nice change, but it's really illustrating the need to move to using the apache commons
command line parsing...!

Ignoring that for the moment:
# Why is {{CommandFormat}} allowing 1 to 2 args now instead of just 1?
# Fetching the next arg after -c isn't bounds checked.
# The consumed argument should be removed immediately, instead of by setting {{isBlankExist}}
and deferring to the end of the method.
# I don't understand all the manipulation of the offset?  Why pattern match instead of just
letting the subsequent {{parseLong()}} decide if it's not a number?  Why is it subtracting
1 when the offset is positive?  I think all you need to do is add a "-" if the first char
isn't "+" prior to calling {{parseLong()}}.
# Please match the real shell error message when {{parseLong()}} doesn't like the number.
# Please add unit tests to hdfs and link the jira.
# Just stylistically I like to see {{processOptions}} and {{processPath}} at the top of the
file so I can quickly grok the command, and helper methods afterwards. Not a big deal.

> Add -c option for FSshell -tail
> -------------------------------
>                 Key: HADOOP-7494
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7494
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>    Affects Versions: 0.23.0
>            Reporter: XieXianshan
>            Assignee: XieXianshan
>            Priority: Trivial
>             Fix For: 0.23.0
>         Attachments: HADOOP-7494.patch
> Add the "-c" option for FSshell -tail to allow users to specify the output bytes(currently,it's
-1024 by default).
> For instance:
> $ hdfs dfs -tail -c -10 /user/hadoop/xiexs
> or
> $ hdfs dfs -tail -c+10 /user/hadoop/xiexs

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message