我在hadoop2.2.0中编写了一个作业,它读取一个输入文件,并在cassandra2.0中批量加载数据
但是我得到了错误(这是因为编译和执行中使用的hadoop的分布不同)
[root@hadoopslave ~]# hadoop jar ultra-bulkloader-hadoop.jar
14/07/10 01:08:01 INFO client.RMProxy: Connecting to ResourceManager at /10.211.212.157:8040
Exception in thread "main" java.lang.IncompatibleClassChangeError: Found interface org.apache.hadoop.mapreduce.JobContext, but class was expected
at org.apache.cassandra.hadoop.BulkOutputFormat.checkOutputSpecs(BulkOutputFormat.java:35)
at org.apache.hadoop.mapreduce.JobSubmitter.checkSpecs(JobSubmitter.java:456)
at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:342)
at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1268)
at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1265)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
at org.apache.hadoop.mapreduce.Job.submit(Job.java:1265)
at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1286)
at com.home.task.hadoop.bulkloader.BulkLoaderDriver.run(BulkLoaderDriver.java:38)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
at com.home.task.hadoop.bulkloader.BulkLoaderDriver.main(BulkLoaderDriver.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
Cassandra2.0支持什么版本的hadoop
2条答案
按热度按时间xoefb8l81#
我修复了类似的问题,在运行cassandra2.0.7时,将api从cassandra1.1.1更新为cassandra2.0.7
4smxwvx52#
修复程序在cassandra 2.0.6上提供
https://issues.apache.org/jira/browse/cassandra-5201