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.
Copyright Notice:Content Author:「Dheeraj R」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/19481227/pig-udf-to-write-to-a-file-to-hdfs