Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 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
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
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB