2

I'm trying to run PUMA benchmark set(Purdue Mapreduce Benchmarks Suite: for hadoop). I ran one application(wordcount) appropriately but couldn't run the other one(invertedindex). Error occures at runtime and it says

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/hadoop/examples/InvertedIndex : Unsupported major.minor version 51.0

I googled and found that it's because of the java version. I checked the java version and recompile the code and then run it. But still the same error occured at runtime for invertedindex application and wordcount application works well.

$ java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
$ javac -version
javac 1.7.0_51

How can I resolve this problem? Can this error be caused by source code?

Joffrey
  • 301
  • 5
  • 16
  • possible duplicate of [Unsupported major.minor version 51.0](http://stackoverflow.com/questions/10382929/unsupported-major-minor-version-51-0) – radai Mar 25 '14 at 04:39

1 Answers1

4

the java version you obtain with java -version is not reflective of your hadoop's java version.

to check your hadoop's java version, use command hadoop classpath and check the directory of jdk it points to. or you could go to hadoop/config/hadoop-env.sh to find it.

your problem will most likely be solved by pointing hadoops's java home to jdk 1.7. you can edit this again in hadoop-env.sh.

HaoYuan
  • 324
  • 2
  • 6