我是照着海量电力设备监测数据存储分析里面的海量电力设备监测数据存储分析实验步骤来的,代码这些都是和教程里面是一样的,在用eclipse运行TJDriver时候报错。
Exception in thread "main" java.lang.RuntimeException: com.aliyun.odps.OdpsException: java.lang.ClassCastException: com.aliyun.odps.io.DoubleWritable cannot be cast to com.aliyun.odps.io.LongWritable
at com.aliyun.odps.mapred.LocalJobRunner.submit(LocalJobRunner.java:163)
at com.aliyun.odps.mapred.JobClient.submitJob(JobClient.java:178)
at com.aliyun.odps.mapred.JobClient.runJob(JobClient.java:80)
at TJDriver.main(TJDriver.java:36)
Caused by: com.aliyun.odps.OdpsException: java.lang.ClassCastException: com.aliyun.odps.io.DoubleWritable cannot be cast to com.aliyun.odps.io.LongWritable
at com.aliyun.odps.mapred.LocalJobRunner.runJob(LocalJobRunner.java:206)
at com.aliyun.odps.mapred.LocalJobRunner.submit(LocalJobRunner.java:160)
... 3 more
Caused by: java.lang.ClassCastException: com.aliyun.odps.io.DoubleWritable cannot be cast to com.aliyun.odps.io.LongWritable
at com.aliyun.odps.mapred.bridge.WritableRecord.getBigint(WritableRecord.java:213)
at com.aliyun.odps.mapred.bridge.WritableRecord.getBigint(WritableRecord.java:223)
at TJReducer.reduce(TJReducer.java:57)
at com.aliyun.odps.mapred.local.ReduceDriver.run(ReduceDriver.java:232)
at com.aliyun.odps.mapred.LocalJobRunner.handleNonPipeMode(LocalJobRunner.java:371)
at com.aliyun.odps.mapred.LocalJobRunner.runJob(LocalJobRunner.java:203)
... 4 more
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。