在 Hadoop 上执行 Cassandra WordCount 时出现错误:java.lang.NoSuchMethodError: org.apache.thrift.meta_data.FieldValueMetaData.(BZ)V
尝试从 cassandra 执行 WordCount 示例并收到错误:
线程“main”中的异常 java.lang.NoSuchMethodError: org.apache.thrift.meta_data.FieldValueMetaData.(BZ)V 在 org.apache.cassandra.thrift.SlicePredicate.(SlicePredicate.java:132) 在 WordCount.run(WordCount.java:199) 在 org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65) 在 WordCount.main(WordCount.java:74) 在 sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法) 在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 在 java.lang.reflect.Method.invoke(Method.java:597) 在 org.apache.hadoop.util.RunJar.main(RunJar.java:186)
提前谢谢您!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
编辑hadoop.sh,插入固定的类路径列表并尝试从类路径中取出不同的库,发现hue-plugins-1.2.0.jar会干扰Thrift。
这解决了问题:
sudo rm /usr/lib/hadoop-0.20/lib/hue-plugins-1.2.0.jar
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