Skip to content

Commit 708f3fc

Browse files
committed
HADOOP-5976. Add a new command, classpath, to the hadoop script. Contributed by Owen O'Malley and Gary Murry
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@791937 13f79535-47bb-0310-9956-ffa450edef68
1 parent aa47115 commit 708f3fc

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ Trunk (unreleased changes)
154154

155155
HADOOP-3315. Add a new, binary file foramt, TFile. (Hong Tang via cdouglas)
156156

157+
HADOOP-5976. Add a new command, classpath, to the hadoop script. (Owen
158+
O'Malley and Gary Murry via szetszwo)
159+
157160
IMPROVEMENTS
158161

159162
HADOOP-4565. Added CombineFileInputFormat to use data locality information

bin/hadoop

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ function print_usage(){
3030
echo " jar <jar> run a jar file"
3131
echo " distcp <srcurl> <desturl> copy file or directories recursively"
3232
echo " archive -archiveName NAME <src>* <dest> create a hadoop archive"
33+
echo " classpath prints the class path needed to get the"
34+
echo " Hadoop jar and the required libraries"
3335
echo " daemonlog get/set the log level for each daemon"
3436
echo " or"
3537
echo " CLASSNAME run the class named CLASSNAME"
@@ -72,6 +74,14 @@ case $COMMAND in
7274
fi
7375
;;
7476

77+
classpath)
78+
if $cygwin; then
79+
CLASSPATH=`cygpath -p -w "$CLASSPATH"`
80+
fi
81+
echo $CLASSPATH
82+
exit
83+
;;
84+
7585
#core commands
7686
*)
7787
# the core commands

src/docs/src/documentation/content/xdocs/commands_manual.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,15 @@
410410
Runs the class named CLASSNAME.
411411
</p>
412412
</section>
413+
<section>
414+
<title> classpath </title>
415+
<p>
416+
Prints the class path needed to get the Hadoop jar and the required libraries.
417+
</p>
418+
<p>
419+
<code>Usage: hadoop classpath</code>
420+
</p>
421+
</section>
413422
</section>
414423
<section>
415424
<title> Administration Commands </title>

0 commit comments

Comments
 (0)