Dimitry, just wondering based on your blog.
If Russel invoked the method this way, will it not work?
DEFINE UUID InvokeForString('java.util.UUID.*randomUUID.*toString');
with_uuid = FOREACH my_stuff generate UUID(), *;
What he did earlier was that he called a instance method toString of UUID
cla
Are there examples of JRuby UDFs? I couldn't figure it out.
Russell Jurney
twitter.com/rjurney
russell.jur...@gmail.com
datasyndrome.com
On May 27, 2012, at 4:01 PM, Dmitriy Ryaboy wrote:
> Right.. Russel, the reason DynamicInvokers weren't working is that
> InvokeForString expects a function t
Right.. Russel, the reason DynamicInvokers weren't working is that
InvokeForString expects a function that returns a String. randomUUID
returns a UUID, not a String.
You could of course call this trivially using jruby udfs (less work
than the java version).
D
On Sun, May 27, 2012 at 2:39 PM, Drag
You have to call UUID.randomUUID() to get an UUID, but you cannot use DEFINE
to do that since DEFINE does not support methods that return arbitrary classes.
Wrapping it into an UDF, works just fine,
package piggybank;
import java.io.IOException;
import java.util.UUID;
import org.apache.pig.Eval
It helps, but I am not able to invoke java.util.UUID.toString, maybe
because it doesn't take an argument. This is from the docs:
DEFINE UrlDecode InvokeForString('java.net.URLDecoder.decode', 'String
String');
encoded_strings = LOAD 'encoded_strings.txt' as (encoded:chararray);
decoded_strings =
I hope this helps. DynamicInvoker feature in Pig. Added in 0.8.0
http://squarecog.wordpress.com/2010/08/20/upcoming-features-in-pig-0-8-dynamic-invokers/
Thanks
On 5/24/12, Russell Jurney wrote:
> Thanks, I mean how do you invoke it directly in grunt> from Pig?
>
> I keep messing it up for the
Is this @highponte a spam? It is there for all
mails(hadoop,hbase,pig). Can hadoop mailing lists spammed?
On 5/27/12, highpointe wrote:
> Here is my SS: 259 71 2451
>
> On May 26, 2012, at 9:13 PM, Jonathan Coveney wrote:
>
>> -user
>> +dev
>>
>> Haha, I made this very same comment somewhere, a