Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Rapid - Apache Mahout Clustering designs

You're reading from  Rapid - Apache Mahout Clustering designs

Product type Book
Published in Oct 2015
Publisher
ISBN-13 9781783284436
Pages 130 pages
Edition 1st Edition
Languages

Launching the Mahout job on the cluster


Mahout has a script under the bin folder of the installation. Notice line 120 onwards of the following script:

# CLASSPATH initially contains $MAHOUT_CONF_DIR, or defaults to $MAHOUT_HOME/src/conf
CLASSPATH=${CLASSPATH}:$MAHOUT_CONF_DIR

if [ "$MAHOUT_LOCAL" != "" ]; then
echo "MAHOUT_LOCAL is set, so we don't add HADOOP_CONF_DIR to classpath."
elif [ -n "$HADOOP_CONF_DIR"  ] ; then
echo "MAHOUT_LOCAL is not set; adding HADOOP_CONF_DIR to classpath."
  CLASSPATH=${CLASSPATH}:$HADOOP_CONF_DIR
fi

We can set HADOOP_HOME and HADOOP_CONF_DIR to launch the Mahout job (algorithm) on the Hadoop cluster.

Just before the algorithm command, set the two previously mentioned parameters using the export command:

export  HADOOP_HOME=<ur hadoop location>
export HADOOP_CONF_DIR=$HADOOP_HOME/conf

The Mahout launcher script helps to launch the job locally or on a cluster.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}