java - Running a Hadoop Map-Reduce Job -


i new hadoop , trying run word count job on single node cluster installed on desktop. following tutorial below:

http://javabeginnerstutorial.com/hadoop/your-first-hadoop-map-reduce-job/

currently stuck on step 3, , receive error when attempt run:

~/development/hadoop_projects/word_count$ mvn clean install

the error is:

error: java_home not defined correctly. cannot execute usr/lib/jvm/java-7-openjdk-amd64/bin/java

i think installed maven correctly, have no idea. running on ubuntu 14.04, ideas on java home path, or there issue going on here?

#

the above error fixed fixing java_home path, following error once run mvn clean install:

hduser@venus:~/development/hadoop_projects/word_count$ mvn clean install [info] scanning projects... [info] ------------------------------------------------------------------------ [info] build failure [info] ------------------------------------------------------------------------ [info] total time: 0.088s [info] finished at: tue jul 14 23:07:21 pdt 2015 [info] final memory: 5m/240m [info] ------------------------------------------------------------------------ [error] goal specified requires project execute there no pom in directory (/home/hduser/development/hadoop_projects/word_count). please verify invoked maven correct directory. -> [help 1] [error]  [error] see full stack trace of errors, re-run maven -e switch. [error] re-run maven using -x switch enable full debug logging. [error]  [error] more information errors , possible solutions, please read following articles: [error] [help 1] http://cwiki.apache.org/confluence/display/maven/missingprojectexception 

i created pom.xml file in word_count folder, reason not being recognized when run mvn. when ls word_count there no pom.xml in directory, can see in files gui window.

there terrific ask ubuntu article explains in detail how can set java_home environment variable. applying here solution found there, adapted particular setup.

open /etc/environment in editor , add following line file:

java_home="usr/lib/jvm/java-7-openjdk-amd64/" 

note did not append bin/java path, wrong. command prompt type following load new environment variable:

source /etc/environment 

finally, verify java_home set correctly typing in command prompt:

echo $java_home 

Comments