我正在尝试处理以下数据:
B = FOREACH A GENERATE FLATTEN( vitalStatus);
DUMB B;
(value,LIVING)
(value,LIVING)
(value,LIVING)
(value,DECEASED)
(value,LIVING)
(value,DECEASED)
(value,DECEASED)
(value,LIVING)
但是当我尝试过滤它时(FILTER A BY vitalStatus MATCHES'DECEASED') 我做错了什么?
我收到以下错误:
2013-08-23 08:47:16,290 [Thread-4] WARN org.apache.hadoop.mapred.LocalJobRunner - job_local_0001
java.lang.ClassCastException: org.apache.pig.data.BinSedesTuple cannot be cast to java.lang.String
at org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.PORegexp.getNext(PORegexp.java:84)
at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POFilter.getNext(POFilter.java:148)
at org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.processInput(PhysicalOperator.java:290)
at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:233)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapReduce$Reduce.runPipeline(PigGenericMapReduce.java:460)
...
答案 0 :(得分:1)
通过应用CASSANDRA-5941
中的修复解决正如Alex Lui在我的机票中提到的那样:
git clone http://git-wip-us.apache.org/repos/asf/cassandra.git
cd cassandra
git checkout cassandra-1.2
patch -p1 < 5867-bug-fix-filter-push-down-1.2-branch.txt
ant