由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
DataSciences版 - hadoop pig的问题
相关主题
求助 信息提取 (转载)Pig UDF written in Python
请教一个R问题:怎么rbind一系列data,如data1,data2,....data1000用10-fold cross-validation 之后怎么挑Model?
请问大家有没有直接用java全程写mapreduce的程序的?入门者问一个pig问题
Pig word count帮朋友招人: 要很强business solution的senior level data scientist
求教sqlzoo euro 2012 第十三题一个面试题(predictive model) (转载)
请教一个面试题(已跪)Memory Error in pandas.concat with Python
R describe dataset求教linear regression的一道面试题
各位说的编程,到底是啥SAS question using PROC SQL 高手请进, 包子答谢
相关话题的讨论汇总
话题: error话题: data4话题: cost话题: sum话题: data3
进入DataSciences版参与讨论
1 (共1页)
t*********u
发帖数: 26311
1
data3 = FOREACH data2 GENERATE group, SUM(data1.cpc) as cost:int;
data4 = ORDER data3 BY cost ASC;
如果
DESCRIBE data4;
不会报错
但是换成 DUMP data4;
就报错
2014-06-11 17:22:26,525 ERROR org.apache.pig.tools.pigstats.SimplePigStats:
ERROR: java.lang.RuntimeException: java.lang.ClassCastException: java.lang.L
ong cannot be cast to java.lang.Integer
2014-06-11 17:22:26,525 ERROR org.apache.pig.tools.pigstats.PigStatsUtil: 1
map reduce job(s) failed!
2014-06-11 17:22:26,573 ERROR org.apache.pig.tools.grunt.Grunt: ERROR 1066:
Unable to open iterator for alias data4. Backend error : java.lang.RuntimeEx
ception: java.lang.ClassCastException: java.lang.Long cannot be cast to java
.lang.Integer
data4: {group: chararray,cost: int}
里面没有出现需要long的地方啊
k****o
发帖数: 76
2
Before doing DUMP data4, mapreduce is not actually running.. "Describe"
works without mapreduce runs..
check the table for pig SUM :
http://pig.apache.org/docs/r0.7.0/piglatin_ref2.html#SUM:
SUM returns long when input is int, but you assign it to cost: int..
This is where the runtime error comes from, I believe. change to "cost: long
", or simply "cost" without type specification..

.L

【在 t*********u 的大作中提到】
: data3 = FOREACH data2 GENERATE group, SUM(data1.cpc) as cost:int;
: data4 = ORDER data3 BY cost ASC;
: 如果
: DESCRIBE data4;
: 不会报错
: 但是换成 DUMP data4;
: 就报错
: 2014-06-11 17:22:26,525 ERROR org.apache.pig.tools.pigstats.SimplePigStats:
: ERROR: java.lang.RuntimeException: java.lang.ClassCastException: java.lang.L
: ong cannot be cast to java.lang.Integer

t*********u
发帖数: 26311
3
got it
thanks

long

【在 k****o 的大作中提到】
: Before doing DUMP data4, mapreduce is not actually running.. "Describe"
: works without mapreduce runs..
: check the table for pig SUM :
: http://pig.apache.org/docs/r0.7.0/piglatin_ref2.html#SUM:
: SUM returns long when input is int, but you assign it to cost: int..
: This is where the runtime error comes from, I believe. change to "cost: long
: ", or simply "cost" without type specification..
:
: .L

t*********u
发帖数: 26311
4
你的意思是 pig
相当于先编译成java
然后在执行?

long

【在 k****o 的大作中提到】
: Before doing DUMP data4, mapreduce is not actually running.. "Describe"
: works without mapreduce runs..
: check the table for pig SUM :
: http://pig.apache.org/docs/r0.7.0/piglatin_ref2.html#SUM:
: SUM returns long when input is int, but you assign it to cost: int..
: This is where the runtime error comes from, I believe. change to "cost: long
: ", or simply "cost" without type specification..
:
: .L

1 (共1页)
进入DataSciences版参与讨论
相关主题
SAS question using PROC SQL 高手请进, 包子答谢求教sqlzoo euro 2012 第十三题
一道面试题求解请教一个面试题(已跪)
周末包子谢帖及请教高手R describe dataset
[Solved] Ubuntu 8.10安装在外置USB硬盘的问题各位说的编程,到底是啥
求助 信息提取 (转载)Pig UDF written in Python
请教一个R问题:怎么rbind一系列data,如data1,data2,....data1000用10-fold cross-validation 之后怎么挑Model?
请问大家有没有直接用java全程写mapreduce的程序的?入门者问一个pig问题
Pig word count帮朋友招人: 要很强business solution的senior level data scientist
相关话题的讨论汇总
话题: error话题: data4话题: cost话题: sum话题: data3