hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Divya Gehlot <divya.htco...@gmail.com>
Subject how to write custom log loader and store in JSON format
Date Sat, 04 Jul 2015 05:20:12 GMT
Hi,
I am new to pig and I have a log file in below format
(Message,NIL,2015-07-01,22:58:53.66,E,xxxxxxxxxx.xxx.xxxxx.xxx,12,0xd6,BIZ,Componentname,0,0.0,key_1=value&KEY_2=1111&KEY_3=VALUE&KEY_4=AU&KEY_5=COMPANY&KEY_6=VALUE&KEY_7=12222222&KEY_8=VALUE&KEY_9=VALUE&KEY_10=VALUE&KEY_10=VALUE)


for which I need to write pig script and store in below JSON format
{Message1:Message,date:2015-07-01,Time:22:58:53.66,E:E,machine
:xxxxxxxxxx.xxx.xxxxx.xxx,data:{key_1:value,key_2:value,key_3:value,key_3:value,key_3:value,key_5:value.....}
}

Can somebody help me in writing custom loader .

would really appreciate your help.

thanks,

Mime
View raw message