hadoop class path

4 views
Skip to first unread message

honey asin

unread,
Jan 10, 2018, 5:01:47 AM1/10/18
to Hadoop Learners from Hadoop-skills.com
Hi,
I am trying to run some unit tests for mapper and reducer using JUnit and mockito.
Do I have to specify the location of the Hadoop core and commons jar files in classpath everytime I run a test?.
I thought running the "Hadoop" command was supposed to automatically include all the required libraries at runtime. Is there any way to avoid typing the Hadoop dependencies every time?.

hadoop -cp /home/xxx/Downloads/mockito-all-1.9.5.jar:/home/xxx/Downloads/junit-4.10.jar:/home/xxx/Downloads/hadoop-1.1.1/hadoop-core-1.1.1.jar:./classes:.:/home/xxx/Downloads/hadoop-1.1.1/lib/commons-logging-1.1.1.jar org.junit.runner.JUnitCore MaxTemperatureMapperTest


Thank You
Honey Asin 
Reply all
Reply to author
Forward
0 new messages