t*u
2 楼
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的地方啊
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
3 楼
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
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
4 楼
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
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
5 楼
你的意思是 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
相当于先编译成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
相关阅读
求教linear regression的一道面试题请教一下Data Scientist绿卡申请问题harvard data science certificate 一万多刀, 值得嗎?请教一个用R做cox regression的问题Facebook 长期招 Data Scientists 和 Data Engineers!给推荐个online data science的master program急需healthcare方面的数据分析人员讲讲:这个行业的outcomes主要有哪几方面?谢谢!!是不是我看错了,Kaggle上可做的题一共11题? (转载)【视频分享】Python成为Data Engineers/Scientists首选语言对capital one data analyst职位感兴趣的看一眼请推荐好的hadoop/spark 的 课程评估feature的预测能力香港能不能成为矽谷? 转载MIT 6.036处理几本书Georgia Tech Analytics program计算数学硕士能去找data science的工作吗?转DS需要上哪些数学课?银行的所谓 data scientist 真他妈水 (转载)招data analyst和data scientist(北京)