Alan Gates updated PIG-1085:

    Attachment: udfconf.patch

The attached patch creates a new singleton class UDFContext.  This class 
contains the JobConf (on the backend) and thus can be used by UDFs to obtain 
the JobConf.

It also allows UDFs to get their own properties object that they can use to 
store UDF specific information.  UDFs must use a signature to get the 
properties object.  They can either use their Class, in which case all 
instances of the UDF in the Pig Latin script will get the same properties 
object; or they can use their Class plus a String[].  This second option will 
allow different instances of the UDF to obtain different properties objects.

> Pass JobConf and UDF specific configuration information to UDFs
> ---------------------------------------------------------------
>                 Key: PIG-1085
>                 URL: https://issues.apache.org/jira/browse/PIG-1085
>             Project: Pig
>          Issue Type: New Feature
>          Components: impl
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>         Attachments: udfconf.patch
> Users have long asked for a way to get the JobConf structure in their UDFs.  
> It would also be nice to have a way to pass properties between the front end 
> and back end so that UDFs can store state during parse time and use it at 
> runtime.
> This patch does part of what is proposed in PIG-602, but not all of it.  It 
> does not provide a way to give user specified configuration files to UDFs.  
> So I will mark 602 as depending on this bug, but it isn't a duplicate.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

Reply via email to