[
https://issues.apache.org/jira/browse/HADOOP-7494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085743#comment-13085743
]
Daryn Sharp commented on HADOOP-7494:
-------------------------------------
It would be best if {{preprocessOptions}} looped through the args to find the
offset of {{-c}}. This will provide a cleaner implementation of any future
switches that require an argument.
{{Long.parseLong()}} generates an exception in all the cases where special
checks were performed, so they seem unnecessary. Did you find a scenario where
the code snippet I previously posted did not work?
> 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-v0.2.patch, HADOOP-7494-v0.3.patch,
> 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