pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Dai (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PIG-2317) Ruby/Jruby UDFs
Date Tue, 27 Mar 2012 07:47:51 GMT

    [ https://issues.apache.org/jira/browse/PIG-2317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13239288#comment-13239288

Daniel Dai commented on PIG-2317:

e2e tests run for me. However, one other test which runs before fail:

register 'udf2.rb' using jruby as myfuncs;
a = load 'student.txt' using PigStorage() as (name, age:int, gpa:double);
b = foreach a generate myfuncs.squaresquare(age);
dump b;

require 'pigudf'
require 'morerubyudfs'

class TestUDFs < PigUdf
    def squaresquare(num)
        return Myudfs.square(num)**2 if num

require 'pigudf'
class Myudfs < PigUdf
    def Myudfs.square(num)
        return num**2 if num

    def Myudfs.cube(num)
        return num**3 if num

libsToShip() get morerubyudfs.rb as relative path before, but now I get absolute path. I will
trace more tomorrow.
> Ruby/Jruby UDFs
> ---------------
>                 Key: PIG-2317
>                 URL: https://issues.apache.org/jira/browse/PIG-2317
>             Project: Pig
>          Issue Type: New Feature
>            Reporter: Jacob Perkins
>            Assignee: Jonathan Coveney
>            Priority: Minor
>              Labels: 0.10_blocker
>             Fix For: 0.10, 0.11
>         Attachments: PIG-2317-10.patch, PIG-2317-10_plus.patch, PIG-2317-11.patch, PIG-2317-12.patch,
PIG-2317-13.patch, PIG-2317-13.patch, PIG-2317-13.patch, PIG-2317-8.patch, PIG-2317-8_plus.patch,
PIG-2317-9.patch, PigUdf.rb, PigUdf.rb, jruby_scripting.patch, jruby_scripting_2_real.patch,
jruby_scripting_3.patch, jruby_scripting_4.patch, jruby_scripting_5.patch, jruby_scripting_6.patch,
jruby_scripting_7.patch, pigjruby.rb, pigjruby.rb, pigjruby.rb, pigudf.rb
> It should be possible to write UDFs in Ruby. These UDFs will be registered in the same
way as python and javascript UDFs.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message