我正在本地模式下运行一个来自java的pig(0.9.1)脚本,它从cassandra(1.0.6)获取记录。脚本是:
rows = LOAD 'cassandra://Keyspace/Data' USING CassandraStorage() AS (key, columns: bag {T: tuple(name, value)});
cols = FOREACH rows GENERATE flatten(columns);
colnames = FOREACH cols GENERATE $0;
namegroups = GROUP colnames BY (chararray) $0;
namecounts = FOREACH namegroups GENERATE COUNT($1), group;
orderednames = ORDER namecounts BY $0;
topnames = LIMIT orderednames 50;
dump topnames;
每当我尝试运行脚本时,我都会得到:
org.apache.pig.impl.logicalLayer.FrontendException: Error during parsing. can't look backwards more than one token in this stream
有趣的是,当我运行一个只读写文件系统(没有cassandra)的pig脚本时,它工作得很好。我使用的是cassandra附带的cassandrastorage文件。
有什么想法吗?谢谢。
暂无答案!
目前还没有任何答案,快来回答吧!