Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig, mail # user - Unable to convert non-flat tuple to string


Copy link to this message
-
RE: Unable to convert non-flat tuple to string
Amir Youssefi 2008-04-10, 19:24
You are grouping by two columns hence you need to flatten the group:

cs = foreach gs generate flatten(group), COUNT ( logs.$1);

-Amir

-----Original Message-----
From: mickey hsieh [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 10, 2008 10:32 AM
To: [EMAIL PROTECTED]
Subject: Unable to convert non-flat tuple to string

Any ideal

here is my script

logs = load '/test/action_log_2008-03-30.log' using PigStorage(',') ; gs
= group logs by ( $1, $2) ; cs = foreach gs generate group, COUNT (
logs.$1); store cs into '/test/case1' ;
java.lang.RuntimeException: java.io.IOException: Unable to convert
non-flat tuple to string.
at
org.apache.pig.backend.hadoop.executionengine.mapreduceExec.PigMapReduce
$ReduceDataOutputCollector.add(PigMapReduce.java:358)
at
org.apache.pig.impl.eval.collector.UnflattenCollector.add(UnflattenColle
ctor.java:52)
at
org.apache.pig.impl.eval.GenerateSpec$CrossProductItem.add(GenerateSpec.
java:232)
at
org.apache.pig.impl.eval.collector.UnflattenCollector.add(UnflattenColle
ctor.java:52)
at
org.apache.pig.impl.eval.collector.DataCollector.addToSuccessor(DataColl
ector.java:98)
at org.apache.pig.impl.eval.SimpleEvalSpec$1.add(SimpleEvalSpec.java:38)
at
org.apache.pig.impl.eval.GenerateSpec$CrossProductItem.exec(GenerateSpec
.java:263)
at org.apache.pig.impl.eval.GenerateSpec$1.add(GenerateSpec.java:88)
at
org.apache.pig.backend.hadoop.executionengine.mapreduceExec.PigMapReduce
.reduce(PigMapReduce.java:159)
at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:333)
at
org.apache.hadoop.mapred.TaskTracker$Child.main(TaskTracker.java:2084)

--
Thanks,
MIckey Hsieh