That's a bash script that invokes a Java class - MahoutDriver which reads the 
props file mentioned earlier.
The props files is a mapping of the commandName to the actual Java program.

For Eg:- seq2sparse would be mapped to SparseVectorsFromSequenceFiles in the 
props.




On Wednesday, January 29, 2014 6:16 PM, Andrew Musselman 
<andrew.mussel...@gmail.com> wrote:
 
Those aliases are defined in src/conf/driver.classes.default.props.

That language is shell-scripting, e.g. bash.



On Wed, Jan 29, 2014 at 2:15 PM, qiaoresearcher <qiaoresearc...@gmail.com>wrote:

> when run the command like:
>
> mahout seq2sparse -i inputfile -o outputfile
>
> where is the command seq2sparse defined? how does the system know to
> actually run the SparseFileFromSequenceFile class?
>
>  what is the language used in the command Mahout such as the language given
> below:
>
> ========================================
>
> THIS="$0"
> while [ -h "$THIS" ]; do
>   ls=`ls -ld "$THIS"`
>   link=`expr "$ls" : '.*-> \(.*\)$'`
>   if expr "$link" : '.*/.*' > /dev/null; then
>     THIS="$link"
>   else
>     THIS=`dirname "$THIS"`/"$link"
>   fi
> done
>
> IS_CORE=0
> if [ "$1" == "-core" ] ; then
>   IS_CORE=1
>   shift
> fi
>
> if [ "$MAHOUT_CORE" != "" ]; then
>   IS_CORE=1
> fi
>
> # some directories
> THIS_DIR=`dirname "$THIS"`
> MAHOUT_HOME=`cd "$THIS_DIR/.." ; pwd`
>
> # some Java parameters
> if [ "$MAHOUT_JAVA_HOME" != "" ]; then
>   #echo "run java in $MAHOUT_JAVA_HOME"
>   JAVA_HOME=$MAHOUT_JAVA_HOME
> fi
>

Reply via email to