pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitriy V. Ryaboy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PIG-2965) RANDOM should allow seed initialization for ease of testing
Date Fri, 06 Sep 2013 16:12:52 GMT

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

Dmitriy V. Ryaboy commented on PIG-2965:

A UDF essentially has a constructor and an exec method. "foreach lines udf(foo)" calls the
exec method and passes to it the foo parameter. "define udfinstance udf(foo)" passes foo to
the constructor, and makes an instance of the foo udf initialized in that way bound to "udfinstance"
(so you can have many differently initialized udfs in the same script).  You can read more
info on all this in the docs about "define" keyword and the UDF author's guide.
> RANDOM should allow seed initialization for ease of testing
> -----------------------------------------------------------
>                 Key: PIG-2965
>                 URL: https://issues.apache.org/jira/browse/PIG-2965
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Aneesh Sharma
>            Assignee: Jonathan Coveney
>              Labels: newbie
>         Attachments: PIG-2965-0.patch

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message