mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tdunn...@apache.org
Subject svn commit: r1179743 - /mahout/trunk/bin/mahout
Date Thu, 06 Oct 2011 18:20:57 GMT
Author: tdunning
Date: Thu Oct  6 18:20:56 2011
New Revision: 1179743

URL: http://svn.apache.org/viewvc?rev=1179743&view=rev
Log:
Only display classpath on request.

Modified:
    mahout/trunk/bin/mahout

Modified: mahout/trunk/bin/mahout
URL: http://svn.apache.org/viewvc/mahout/trunk/bin/mahout?rev=1179743&r1=1179742&r2=1179743&view=diff
==============================================================================
--- mahout/trunk/bin/mahout (original)
+++ mahout/trunk/bin/mahout Thu Oct  6 18:20:56 2011
@@ -205,8 +205,13 @@ if [ "$HADOOP_HOME" = "" ] || [ "$MAHOUT
   elif [ "$MAHOUT_LOCAL" != "" ] ; then
     echo "MAHOUT_LOCAL is set, running locally"
   fi
-  echo "CLASSPATH: $CLASSPATH"
-  exec "$JAVA" $JAVA_HEAP_MAX $MAHOUT_OPTS -classpath "$CLASSPATH" $CLASS "$@"
+    case $1 in
+    (classpath)
+      echo $CLASSPATH
+      ;;
+    (*)
+      exec "$JAVA" $JAVA_HEAP_MAX $MAHOUT_OPTS -classpath "$CLASSPATH" $CLASS "$@"
+    esac
 else
   echo "Running on hadoop, using HADOOP_HOME=$HADOOP_HOME"
   if [ "$HADOOP_CONF_DIR" = "" ] ; then
@@ -220,13 +225,18 @@ else
     echo "ERROR: Could not find mahout-examples-*.job in $MAHOUT_HOME or $MAHOUT_HOME/examples/target,
please run 'mvn install' to create the .job file"
     exit 1
   else
-    if [ "$1" = "hadoop" ]; then
+    case "$1" in
+    (hadoop)
       export HADOOP_CLASSPATH=$MAHOUT_CONF_DIR:${HADOOP_CLASSPATH}:$CLASSPATH
       exec "$HADOOP_HOME/bin/$@"
-    else
+      ;;
+    (classpath)
+      echo $CLASSPATH
+      ;;
+    (*)
       echo "MAHOUT-JOB: $MAHOUT_JOB"
       export HADOOP_CLASSPATH=$MAHOUT_CONF_DIR:${HADOOP_CLASSPATH}
       exec "$HADOOP_HOME/bin/hadoop" --config $HADOOP_CONF_DIR jar $MAHOUT_JOB $CLASS "$@"
-    fi
+    esac
   fi
 fi



Mime
View raw message