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

Chris Nauroth commented on HDFS-7591:
-------------------------------------

[~arpitagarwal], thank you for catching that.  Yes, you're right.  This 
condition works fine in the branch-2 code, but I missed the fact that the trunk 
code does an additional {{shift}} call before reaching this point.

[~varun_saxena], thank you for the patch.  In the trunk version of the batch 
code, we have a much better setup for code reuse.  I suggest adding a function 
called {{hadoop_do_classpath_subcommand}} to hadoop-functions.sh.  That 
function would contain the same code that your current patch adds to the hdfs 
script, along with the fix suggested by Arpit.  After that function is in 
place, all of the individual entry points can use one line of code to call it 
like this:

{code}
    hadoop_do_classpath_subcommand "$@"
{code}

Feel free to make the change to the hadoop script too within the scope of this 
jira.


> hdfs classpath command should support same options as hadoop classpath.
> -----------------------------------------------------------------------
>
>                 Key: HDFS-7591
>                 URL: https://issues.apache.org/jira/browse/HDFS-7591
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: scripts
>            Reporter: Chris Nauroth
>            Assignee: Varun Saxena
>            Priority: Minor
>         Attachments: HDFS-7591.001.patch
>
>
> HADOOP-10903 enhanced the {{hadoop classpath}} command to support optional 
> expansion of the wildcards and bundling the classpath into a jar file 
> containing a manifest with the Class-Path attribute.  The other classpath 
> commands should do the same for consistency.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to