Chhaya Vishwakarma
Chhaya Vishwakarma

Reputation: 1437

How to make mahout interact with hadoop HDFS

I am using HDP mahout version 0.8. I have set MAHOUT_LOCAL="". When I run mahout, I see the message HADOOP LOCAL NOT SET RUNNING ON HADOOP but my program is not writing output to HDFS directory.

Can anyone tell me how to make my mahout program take input from HDFS and write output to HDFS?

Upvotes: 0

Views: 154

Answers (2)

salmuz
salmuz

Reputation: 44

Did you set the $MAHOUT_HOME/bin and $HADOOP_HOME/bin on the PATH ?

For example on Linux: export PATH=$PATH:$MAHOUT_HOME/bin/:$HADOOP_HOME/bin/ export HADOOP_CONF_DIR=$HADOOP_HOME/conf/

Then, almost all the Mahout's commands use the options -i (input) and -o (output).

For example:

mahout seqdirectory -i <input_path> -o <output_path> -chunk 64

Upvotes: 1

Kuntal-G
Kuntal-G

Reputation: 2991

Assuming you have your mahout jar build which takes input and write to hdfs. Do the following:

From hadoop bin directory:

./hadoop jar /home/kuntal/Kuntal/BIG_DATA/mahout-recommender.jar mia.recommender.RecommenderIntro  --tempDir /home/kuntal/Kuntal/BIG_DATA --recommenderClassName org.apache.mahout.cf.taste.impl.recommender.GenericItemBasedRecommender

#Input Output Args specify if required
-Dmapred.input.dir=./ratingsLess.txt -Dmapred.output.dir=/input/output

Please check this: http://chimpler.wordpress.com/2013/02/20/playing-with-the-mahout-recommendation-engine-on-a-hadoop-cluster/

Upvotes: 0

Related Questions