0
votes

Trying to execute WordCount example from cassandra and getting an error:

Exception in thread "main" java.lang.NoSuchMethodError: org.apache.thrift.meta_data.FieldValueMetaData.(BZ)V at org.apache.cassandra.thrift.SlicePredicate.(SlicePredicate.java:132) at WordCount.run(WordCount.java:199) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65) at WordCount.main(WordCount.java:74) 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)

thank you in advance!

1
you need to provide more information about your environment and how you tried to run the example. - sdolgy
Well, I have tried everything. I run it like: hadoop jar WordCount.jar, in classpath I have both cassandra and libthrift libraries. tried to switch places in classpath, tried to use newer 0.7 and older 0.5 libthrift, the same thing with apache-cassandra... lib. - Anton
It seems that Hadoop has some older libthrift somewhere in it's libs, but how to figure it out? : ( - Anton
bin/word_count is provided to set up the classpath and environment so you don't need to do it by hand... - jbellis

1 Answers

1
votes

edited hadoop.sh, inserted fixed classpath list and tried to take out different libraries from classpath, found that hue-plugins-1.2.0.jar interferes with Thrift.

this solved the problem: sudo rm /usr/lib/hadoop-0.20/lib/hue-plugins-1.2.0.jar