Re: Pig UDF question

2012-05-16 Thread Thejas Nair
On 5/15/12 4:18 PM, Mohit Anchlia wrote: I am trying to write an UDF that indexes data in elasticsearch after converting it to JSON. I had 2 questions: 1. If I create a static member in UDF class is that one instance per mapper task? Yes, every mapper task uses single jvm , so you would see one

Re: Pig UDF question

2012-05-15 Thread Mohit Anchlia
Thanks for the reference, Yes I am aware of it but I can't use it as is. For my future references also it would be good for me to know: 1. If I create a static member in UDF class is that one instance per mapper task? 2. Is there a method that gets called at the end of mapper method that I can

Re: Pig UDF question

2012-05-15 Thread Russell Jurney
Are you aware of Wonderdog, which already does this? Unfortunately, finding reusable pig components can be very hard, as they exist across many proprietary projects. https://github.com/infochimps/wonderdog A post explaining how to use it, end to end, is here: http://www.quora.com/Autocomplete/Wha

Pig UDF question

2012-05-15 Thread Mohit Anchlia
I am trying to write an UDF that indexes data in elasticsearch after converting it to JSON. I had 2 questions: 1. If I create a static member in UDF class is that one instance per mapper task? 2. Is there a method that gets called at the end of mapper method that I can use for cleanup? I was wond