You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Ramya Sunil (Created) (JIRA)" <ji...@apache.org> on 2011/10/27 20:24:32 UTC

[jira] [Created] (HADOOP-7779) bin/hadoop classpath CLI does not display the complete classpath

bin/hadoop classpath CLI does not display the complete classpath
----------------------------------------------------------------

                 Key: HADOOP-7779
                 URL: https://issues.apache.org/jira/browse/HADOOP-7779
             Project: Hadoop Common
          Issue Type: Bug
    Affects Versions: 0.23.0
            Reporter: Ramya Sunil
             Fix For: 0.23.0


bin/hadoop classpath does not display the complete classpath. The classpath looks like:

{noformat}
$HADOOP_CONF_DIR:$HADOOP_COMMON_HOME/libexec/../share/hadoop/common/lib/*:$HADOOP_COMMON_HOME/libexec/../share/hadoop/common/*:/$HADOOP_HDFS_HOME/share/hadoop/hdfs:$HADOOP_HDFS_HOME/share/hadoop/hdfs/lib/*:$HADOOP_HDFS_HOME/share/hadoop/hdfs/*
{noformat}

The jar names have to be expanded instead of "*" to display the complete classpath.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-7779) bin/hadoop classpath CLI does not display the complete classpath

Posted by "Ravi Prakash (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-7779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13137593#comment-13137593 ] 

Ravi Prakash commented on HADOOP-7779:
--------------------------------------

Why won't wildcards do? I think it is a lot cleaner than having a long classpath. I would prefer to not have this change.
                
> bin/hadoop classpath CLI does not display the complete classpath
> ----------------------------------------------------------------
>
>                 Key: HADOOP-7779
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7779
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 0.23.0
>            Reporter: Ramya Sunil
>             Fix For: 0.23.0
>
>
> bin/hadoop classpath does not display the complete classpath. The classpath looks like:
> {noformat}
> $HADOOP_CONF_DIR:$HADOOP_COMMON_HOME/libexec/../share/hadoop/common/lib/*:$HADOOP_COMMON_HOME/libexec/../share/hadoop/common/*:/$HADOOP_HDFS_HOME/share/hadoop/hdfs:$HADOOP_HDFS_HOME/share/hadoop/hdfs/lib/*:$HADOOP_HDFS_HOME/share/hadoop/hdfs/*
> {noformat}
> The jar names have to be expanded instead of "*" to display the complete classpath.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HADOOP-7779) bin/hadoop classpath CLI does not display the complete classpath

Posted by "Harsh J (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-7779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13461059#comment-13461059 ] 

Harsh J commented on HADOOP-7779:
---------------------------------

I tend to agree with Ravi. I don't find it useful to see a very huge list of jars thrown on my screen when I demand a {{classpath}}. I just want a classpath I can use via {{-cp/-classpath}}.

bq. For cases where users want to include a jar in classpath by checking if one already exists or not, one has to manually traverse each and every directory just to locate the jar.

But there's maven for that purpose today. We should really be moving people down the proper project-based paths?

bq. IMO, the idea of exposing "hadoop classpath" was to let users learn about all the jars included in the classpath. Masking that by just printing wildcards would not serve the purpose.

That may have been so, but all I've seen as the use of this command from both dev and op side (specifically of those who've been running 2.x based version distributions) has been to rather check for the presence of certain projects or for use with a quick {{java/javac}} command. For these purposes, knowing the jar is not very important.

bq. Also, this was the behavior in hadoop-0.20.x. I would not want to change this behavior unless we agree to introduce a regression.

Functionally we're still printing a usable classpath (in whatever form - wildcards or no wildcards) for use with other programs, that much we haven't broken I think?

Also to note is that now we have tons of jars on the classpath, its not sane to print or read through them all anymore.

Let me know how you still feel about this change - I feel that we may instead devote more time to documenting how to use the apache hadoop maven-based projects, than anything else such as teaching people to use jars (which is so old style today!).
                
> bin/hadoop classpath CLI does not display the complete classpath
> ----------------------------------------------------------------
>
>                 Key: HADOOP-7779
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7779
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 0.23.0
>            Reporter: Ramya Sunil
>
> bin/hadoop classpath does not display the complete classpath. The classpath looks like:
> {noformat}
> $HADOOP_CONF_DIR:$HADOOP_COMMON_HOME/libexec/../share/hadoop/common/lib/*:$HADOOP_COMMON_HOME/libexec/../share/hadoop/common/*:/$HADOOP_HDFS_HOME/share/hadoop/hdfs:$HADOOP_HDFS_HOME/share/hadoop/hdfs/lib/*:$HADOOP_HDFS_HOME/share/hadoop/hdfs/*
> {noformat}
> The jar names have to be expanded instead of "*" to display the complete classpath.

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

[jira] [Updated] (HADOOP-7779) bin/hadoop classpath CLI does not display the complete classpath

Posted by "Harsh J (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-7779?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Harsh J updated HADOOP-7779:
----------------------------

    Fix Version/s:     (was: 0.24.0)
    
> bin/hadoop classpath CLI does not display the complete classpath
> ----------------------------------------------------------------
>
>                 Key: HADOOP-7779
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7779
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 0.23.0
>            Reporter: Ramya Sunil
>
> bin/hadoop classpath does not display the complete classpath. The classpath looks like:
> {noformat}
> $HADOOP_CONF_DIR:$HADOOP_COMMON_HOME/libexec/../share/hadoop/common/lib/*:$HADOOP_COMMON_HOME/libexec/../share/hadoop/common/*:/$HADOOP_HDFS_HOME/share/hadoop/hdfs:$HADOOP_HDFS_HOME/share/hadoop/hdfs/lib/*:$HADOOP_HDFS_HOME/share/hadoop/hdfs/*
> {noformat}
> The jar names have to be expanded instead of "*" to display the complete classpath.

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

[jira] [Commented] (HADOOP-7779) bin/hadoop classpath CLI does not display the complete classpath

Posted by "Ramya Sunil (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-7779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13137627#comment-13137627 ] 

Ramya Sunil commented on HADOOP-7779:
-------------------------------------

Agreed that its a lot cleaner but not really useful for the following reasons:

* For cases where users want to include a jar in classpath by checking if one already exists or not, one has to manually traverse each and every directory just to locate the jar.  
* We have also had cases when jobs fail due to ClassNotFoundException. A quick check for this would be to see whether the corresponding jar is included/not in the "hadoop classpath" In the current case, the wildcards wont be of much help unless the user is ready to recursively check every directory. IMO, the idea of exposing "hadoop classpath" was to let users learn about all the jars included in the classpath. Masking that by just printing wildcards would not serve the purpose.
* Also, this was the behavior in hadoop-0.20.x. I would not want to change this behavior unless we agree to introduce a regression.
                
> bin/hadoop classpath CLI does not display the complete classpath
> ----------------------------------------------------------------
>
>                 Key: HADOOP-7779
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7779
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 0.23.0
>            Reporter: Ramya Sunil
>             Fix For: 0.23.0
>
>
> bin/hadoop classpath does not display the complete classpath. The classpath looks like:
> {noformat}
> $HADOOP_CONF_DIR:$HADOOP_COMMON_HOME/libexec/../share/hadoop/common/lib/*:$HADOOP_COMMON_HOME/libexec/../share/hadoop/common/*:/$HADOOP_HDFS_HOME/share/hadoop/hdfs:$HADOOP_HDFS_HOME/share/hadoop/hdfs/lib/*:$HADOOP_HDFS_HOME/share/hadoop/hdfs/*
> {noformat}
> The jar names have to be expanded instead of "*" to display the complete classpath.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira