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

Switch to Plain View
Pig, mail # user - Unable to load data using PigStorage that was previously stored using PigStorage


Copy link to this message
-
Unable to load data using PigStorage that was previously stored using PigStorage
Jerry Lam 2013-04-17, 01:28
Hi pig users,

I tried to load data using PigStorage that was previously stored using
PigStorage but it failed.

Each line looks like this in the data file that is generated by PigStorage:
[a#hello,b#{([c#11,d#22]),([c#33,d#44])}]

I did the following:
A = load 'data.txt' as document:[];
B = foreach A generate document#'b' as b;
C = foreach B generate flatten(b);
dump C;

I expect to see the following output:
([c#11,d#22])
([c#33,d#44])

Instead, I got:
java.lang.ClassCastException: org.apache.pig.data.DataByteArray cannot be
cast to org.apache.pig.data.DataBag

Anyone encounters this problem before? How can I read the data back?

Thanks,

Jerry
+
Ruslan Al-Fakikh 2013-04-17, 15:57
+
Jerry Lam 2013-04-17, 17:11
+
Ruslan Al-Fakikh 2013-04-17, 17:22
+
Ruslan Al-Fakikh 2013-04-17, 17:24
+
Jerry Lam 2013-04-17, 17:38
+
Ruslan Al-Fakikh 2013-04-17, 19:26
+
Jerry Lam 2013-04-17, 19:48
+
Ruslan Al-Fakikh 2013-04-18, 02:52
+
Jerry Lam 2013-04-18, 14:37
+
Jerry Lam 2013-04-18, 14:43
+
Prashant Kommireddi 2013-04-18, 16:34
+
Jerry Lam 2013-04-18, 21:14
+
Prashant Kommireddi 2013-04-18, 21:41
+
Jerry Lam 2013-04-18, 22:57
+
Ruslan Al-Fakikh 2013-04-19, 20:56
+
Jerry Lam 2013-04-20, 00:39
+
Prashant Kommireddi 2013-04-18, 06:56