Trying to run Hadoop Map Reduce example in Cloudera



0

Whenever I follow step 12 to submit the job to the cluster I get an error saying in the Running Map Reduce file on the google drive I get an error that says

 

Exception in thread "main" java.lang.UnsupportedClassVersionError: com/eng/mr/WordCountDriver : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    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)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:201)
 


3 Answer(s)


0

I'm trying to run this in the VM Ware machine.


0

Hi Blaine,

You are getting following error: Unsupported major.minor version 51.0.

The reason is you have compiled the mapreduce jar in different version while creating and running in different version.

For example: You have created the jar with java-8 and trying to run in java-7 environment.

Hope this helps.


0

Ok I understand the problem but how do I fix this?  From my understanding I need to create the jar and run the jar using the same java version. I'm not aware of how to do this. Do I need to use the Java Version the the Cloudera VM uses?

 

Your Answer

Click on this code-snippet-icon icon to add code snippet.

Upload Files (Maximum image file size - 1.5 MB, other file size - 10 MB, total size - not more than 50 MB)

Email
Password