Reputation: 711
I would like to read a complete file through a Pig UDF and then prepare an output file using PrintWriter library in Java and store it on HDFS.
Is this possible,
Steps followed
1) I am able to read the input file in the UDF. Prepare a HashMap from that file.[ACHIEVED]
2) write the data to an output file by filtering the input file. The filtration is done using the HashMap[YET TO BE ACHIEVED]
Can anyone help in my step2.
Aim is to create a file in the Pig UDF and write to that file.
Thanks,
Regards, Dheeraj Rampally.
Upvotes: 1
Views: 497
Reputation: 711
No Problem...I have found an alternative for this.. Instead of writing into a file I am now returning a Databag from Pig UDF
Upvotes: 1