I’m new to java and trying to run a MR that uses HIPI: http://hipi.cs.virginia.edu/
I’ve used the command as described in:
http://hadoop.apache.org/common/docs/r0.20.2/mapred_tutorial.html
I’m using hadoop 0.20.2
my command looks like:
hadoop jar grayscalefromfile_exc.jar grayscalefromfile_exc.StubDriver -libjars hipi-0.0.1.jar imgs imgsOut1
where the path looks like:
--
--grayscalefromfile_exc.jar
--hipi-0.0.1.jar
The error i get:
Exception in thread “main” java.lang.NoClassDefFoundError: hipi/imagebundle/mapreduce/ImageBundleInputFormat
at grayscalefromfile_exc.StubDriver.run(StubDriver.java:89)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
at grayscalefromfile_exc.StubDriver.main(StubDriver.java:103)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.RunJar.main(RunJar.java:186)
Caused by: java.lang.ClassNotFoundException: hipi.imagebundle.mapreduce.ImageBundleInputFormat
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
… 9 more
Needless to say , the hipi-0.0.1.jar, has the path inside: hipi/imagebundle/mapreduce/ImageBundleInputFormat.java
Tnx
libjars uploads the given jars to the cluster and then makes them available on the classpath for each mapper / reducer instance
If you want to add additional jars to the driver client classpath, you’ll need to use the HADOOP_CLASSPATH env variable:
And my output when i run this (the error relates to the fact i haven’t got a hipi image bundle file):