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

Switch to Plain View
Pig, mail # user - Custom Store Func for storing data as JsonArray


Copy link to this message
-
Custom Store Func for storing data as JsonArray
Harish Krishnan 2013-03-05, 23:51
Hi,

My application requires data to be written to hdfs as JsonArray. I tried
using the JsonStorage but it writes each tuple as a line of JsonObject.
E.x:
{a,b,c}
{a2,b2,c2}
{a3,b3,c3}

I tried to write a custom store func but it writes as a line of JsonArray.
E.x:
[{a,b,c}]
[{a2,b2,c2}]
[{a3,b3,c3}]

However what I want is

[
{a,b,c}
{a2,b2,c2}
{a3,b3,c3}
]

Any suggestion?

Thanks & Regards,
Harish.T.K