MAPReducer Driver运行报错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-问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文
阿里云
为了无法计算的价值
打开APP
阿里云APP内打开

MAPReducer Driver运行报错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

2019-01-23 14:33:19 7418 1

我是照着海量电力设备监测数据存储分析里面的海量电力设备监测数据存储分析实验步骤来的,代码这些都是和教程里面是一样的,在用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
取消 提交回答
全部回答(1)
  • hjkhjk
    2019-07-17 23:26:37
    已采纳

    格式转换出错,看一下格式出错的位置换成getDouble就行了

    0 0
相关问答

0

回答

大佬们,mongodb-cdc,Resume of change stream was not po

2022-08-20 17:13:33 170浏览量 回答数 0

1

回答

What does a MySQL database contain?

2021-10-16 16:42:58 239浏览量 回答数 1

2

回答

How to select random rows from a table by SQL?

2021-10-16 14:45:07 412浏览量 回答数 2

0

回答

Failed to add the host to the list of known hosts

2020-09-09 18:08:15 783浏览量 回答数 0

1

回答

OSS在.net core 2.1上传报错The stream was already consumedIt cannot be read again.

2018-10-26 19:14:11 4254浏览量 回答数 1

1

回答

Error establishing a database connection

2018-09-04 10:07:33 333浏览量 回答数 1

1

回答

Error establishing a database connection

2018-08-18 15:42:24 666浏览量 回答数 1

3

回答

Error establishing a database connection

2018-04-25 14:06:20 2212浏览量 回答数 3

3

回答

Error establishing a database connection

2016-12-31 09:46:27 4794浏览量 回答数 3

1

回答

Error establishing a database connection

2016-08-26 03:12:58 6421浏览量 回答数 1
+关注
0
文章
2
问答
问答排行榜
最热
最新
相关电子书
更多
低代码开发师(初级)实战教程
立即下载
阿里巴巴DevOps 最佳实践手册
立即下载
冬季实战营第三期:MySQL数据库进阶实战
立即下载