Author: omalley
Date: Fri Mar  4 03:29:37 2011
New Revision: 1077004

URL: http://svn.apache.org/viewvc?rev=1077004&view=rev
Log:
commit 908cb0ce1e984f2603d51bef634b3cae3466794d
Author: Yahoo\! <[email protected]>
Date:   Thu Sep 24 16:08:33 2009 -0700

    HADOOP-5976. Add a new command, classpath, to the hadoop script. 
Contributed by Owen O'Malley and Gary Murry
    
    from: http://issues.apache.org/jira/secure/attachment/12420325/script.patch
    
    +++ b/YAHOO-CHANGES.txt
    +56. HADOOP-5976. Add a new command, classpath, to the hadoop
    +    script. Contributed by Owen O'Malley and Gary Murry
    +

Modified:
    hadoop/common/branches/branch-0.20-security-patches/bin/hadoop
    
hadoop/common/branches/branch-0.20-security-patches/src/docs/src/documentation/content/xdocs/commands_manual.xml

Modified: hadoop/common/branches/branch-0.20-security-patches/bin/hadoop
URL: 
http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/bin/hadoop?rev=1077004&r1=1077003&r2=1077004&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/bin/hadoop (original)
+++ hadoop/common/branches/branch-0.20-security-patches/bin/hadoop Fri Mar  4 
03:29:37 2011
@@ -73,6 +73,8 @@ if [ $# = 0 ]; then
   echo "  jar <jar>            run a jar file"
   echo "  distcp <srcurl> <desturl> copy file or directories recursively"
   echo "  archive -archiveName NAME <src>* <dest> create a hadoop archive"
+  echo "  classpath            prints the class path needed to get the"
+  echo "                       Hadoop jar and the required libraries"
   echo "  daemonlog            get/set the log level for each daemon"
   echo " or"
   echo "  CLASSNAME            run the class named CLASSNAME"
@@ -182,7 +184,13 @@ fi
 unset IFS
 
 # figure out which class to run
-if [ "$COMMAND" = "namenode" ] ; then
+if [ "$COMMAND" = "classpath" ] ; then
+  if $cygwin; then
+    CLASSPATH=`cygpath -p -w "$CLASSPATH"`
+  fi
+  echo $CLASSPATH
+  exit
+elif [ "$COMMAND" = "namenode" ] ; then
   CLASS='org.apache.hadoop.hdfs.server.namenode.NameNode'
   HADOOP_OPTS="$HADOOP_OPTS $HADOOP_NAMENODE_OPTS"
 elif [ "$COMMAND" = "secondarynamenode" ] ; then

Modified: 
hadoop/common/branches/branch-0.20-security-patches/src/docs/src/documentation/content/xdocs/commands_manual.xml
URL: 
http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/docs/src/documentation/content/xdocs/commands_manual.xml?rev=1077004&r1=1077003&r2=1077004&view=diff
==============================================================================
--- 
hadoop/common/branches/branch-0.20-security-patches/src/docs/src/documentation/content/xdocs/commands_manual.xml
 (original)
+++ 
hadoop/common/branches/branch-0.20-security-patches/src/docs/src/documentation/content/xdocs/commands_manual.xml
 Fri Mar  4 03:29:37 2011
@@ -409,6 +409,15 @@
                                         Runs the class named CLASSNAME.
                                </p>
                        </section>
+                       <section>
+                               <title> classpath </title>
+                               <p>
+                                       Prints the class path needed to get the 
Hadoop jar and the required libraries.
+                               </p>
+                               <p>
+                                       <code>Usage: hadoop classpath</code>
+                               </p>
+                       </section>
     </section>
                <section>
                        <title> Administration Commands </title>


Reply via email to