0
我想将零存储在Hbase的一列中。所以,我在猪脚本中做了以下操作。零的创建问题的总和
data = load 'access_log_Jul95' using PigStorage(' ') as (ip:chararray, dash1:chararray, dash2:chararray, date:chararray, date1:chararray, getRequset:chararray, location:chararray, http:chararray, code:int, size:int);
splitDate = foreach data generate 0 AS size:int , ip as ip, FLATTEN(STRSPLIT(date, ':')) as h;
groupedIp = group splitDate by h.$1;
,然后我正在做这样的
a = foreach groupedIp generate SUM(splitDate.size);
其抛出错误控制台上像
Could not infer the matching function for org.apache.pig.builtin.SUM as multiple or none of them fit. Please use an explicit cast
有什么办法,我总能在这种情况下,用了写零使用SUM或者SUM在这里使用全零的方式将会很有帮助。
谢谢。
给您藏汉样本数据......这将是hepful如果数据可用 – Aman