Return-Path: X-Original-To: apmail-hadoop-common-commits-archive@www.apache.org Delivered-To: apmail-hadoop-common-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8D1FD11E75 for ; Sun, 3 Aug 2014 05:17:28 +0000 (UTC) Received: (qmail 97311 invoked by uid 500); 3 Aug 2014 05:17:27 -0000 Delivered-To: apmail-hadoop-common-commits-archive@hadoop.apache.org Received: (qmail 97220 invoked by uid 500); 3 Aug 2014 05:17:27 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 97208 invoked by uid 99); 3 Aug 2014 05:17:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Aug 2014 05:17:27 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Aug 2014 05:17:28 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id DFE13238944C; Sun, 3 Aug 2014 05:17:02 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1615388 - in /hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common: ./ src/main/bin/ src/main/java/org/apache/hadoop/util/ src/site/apt/ src/test/java/org/apache/hadoop/util/ Date: Sun, 03 Aug 2014 05:17:02 -0000 To: common-commits@hadoop.apache.org From: cnauroth@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140803051702.DFE13238944C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cnauroth Date: Sun Aug 3 05:17:02 2014 New Revision: 1615388 URL: http://svn.apache.org/r1615388 Log: HADOOP-10903. Merging change r1615386 from trunk to branch-2. Added: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Classpath.java - copied unchanged from r1615386, hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Classpath.java hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestClasspath.java - copied unchanged from r1615386, hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestClasspath.java Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/bin/hadoop hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/bin/hadoop.cmd hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/site/apt/CommandsManual.apt.vm Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1615388&r1=1615387&r2=1615388&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt (original) +++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt Sun Aug 3 05:17:02 2014 @@ -57,6 +57,9 @@ Release 2.6.0 - UNRELEASED HADOOP-10900. CredentialShell args should use single-dash style. (wang) + HADOOP-10903. Enhance hadoop classpath command to expand wildcards or write + classpath into jar manifest. (cnauroth) + OPTIMIZATIONS BUG FIXES Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/bin/hadoop URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/bin/hadoop?rev=1615388&r1=1615387&r2=1615388&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/bin/hadoop (original) +++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/bin/hadoop Sun Aug 3 05:17:02 2014 @@ -90,11 +90,6 @@ case $COMMAND in fi ;; - classpath) - echo $CLASSPATH - exit - ;; - #core commands *) # the core commands @@ -116,6 +111,14 @@ case $COMMAND in CLASSPATH=${CLASSPATH}:${TOOL_PATH} elif [ "$COMMAND" = "credential" ] ; then CLASS=org.apache.hadoop.security.alias.CredentialShell + elif [ "$COMMAND" = "classpath" ] ; then + if [ "$#" -eq 1 ]; then + # No need to bother starting up a JVM for this simple case. + echo $CLASSPATH + exit + else + CLASS=org.apache.hadoop.util.Classpath + fi elif [[ "$COMMAND" = -* ]] ; then # class and package names cannot begin with a - echo "Error: No command named \`$COMMAND' was found. Perhaps you meant \`hadoop ${COMMAND#-}'" Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/bin/hadoop.cmd URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/bin/hadoop.cmd?rev=1615388&r1=1615387&r2=1615388&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/bin/hadoop.cmd (original) +++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/bin/hadoop.cmd Sun Aug 3 05:17:02 2014 @@ -115,11 +115,14 @@ call :updatepath %HADOOP_BIN_PATH% ) if %hadoop-command% == classpath ( - @echo %CLASSPATH% - goto :eof + if not defined hadoop-command-arguments ( + @rem No need to bother starting up a JVM for this simple case. + @echo %CLASSPATH% + exit /b + ) ) - set corecommands=fs version jar checknative distcp daemonlog archive + set corecommands=fs version jar checknative distcp daemonlog archive classpath for %%i in ( %corecommands% ) do ( if %hadoop-command% == %%i set corecommand=true ) @@ -175,6 +178,10 @@ call :updatepath %HADOOP_BIN_PATH% set CLASSPATH=%CLASSPATH%;%TOOL_PATH% goto :eof +:classpath + set CLASS=org.apache.hadoop.util.Classpath + goto :eof + :updatepath set path_to_add=%* set current_path_comparable=%path% Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/site/apt/CommandsManual.apt.vm URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/site/apt/CommandsManual.apt.vm?rev=1615388&r1=1615387&r2=1615388&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/site/apt/CommandsManual.apt.vm (original) +++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/site/apt/CommandsManual.apt.vm Sun Aug 3 05:17:02 2014 @@ -294,9 +294,24 @@ User Commands * <<>> Prints the class path needed to get the Hadoop jar and the required - libraries. + libraries. If called without arguments, then prints the classpath set up by + the command scripts, which is likely to contain wildcards in the classpath + entries. Additional options print the classpath after wildcard expansion or + write the classpath into the manifest of a jar file. The latter is useful in + environments where wildcards cannot be used and the expanded classpath exceeds + the maximum supported command line length. - Usage: <<>> + Usage: <<|-h|--help]>>> + +*-----------------+-----------------------------------------------------------+ +|| COMMAND_OPTION || Description +*-----------------+-----------------------------------------------------------+ +| --glob | expand wildcards +*-----------------+-----------------------------------------------------------+ +| --jar | write classpath as manifest in jar named +*-----------------+-----------------------------------------------------------+ +| -h, --help | print help +*-----------------+-----------------------------------------------------------+ Administration Commands