You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Alan Gates (JIRA)" <ji...@apache.org> on 2009/11/11 02:01:31 UTC

[jira] Created: (PIG-1085) Pass JobConf and UDF specific configuration information to UDFs

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


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.


[jira] Commented: (PIG-1085) Pass JobConf and UDF specific configuration information to UDFs

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12776285#action_12776285 ] 

Hadoop QA commented on PIG-1085:
--------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12424546/udfconf.patch
  against trunk revision 834285.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 12 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    -1 javac.  The applied patch generated 204 javac compiler warnings (more than the trunk's current 199 warnings).

    +1 findbugs.  The patch does not introduce any new Findbugs warnings.

    -1 release audit.  The applied patch generated 323 release audit warnings (more than the trunk's current 318 warnings).

    -1 core tests.  The patch failed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/43/testReport/
Release audit warnings: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/43/artifact/trunk/patchprocess/releaseAuditDiffWarnings.txt
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/43/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/43/console

This message is automatically generated.

> 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.


[jira] Updated: (PIG-1085) Pass JobConf and UDF specific configuration information to UDFs

Posted by "Alan Gates (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alan Gates updated PIG-1085:
----------------------------

    Status: Open  (was: Patch Available)

> 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.


[jira] Commented: (PIG-1085) Pass JobConf and UDF specific configuration information to UDFs

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12776897#action_12776897 ] 

Hadoop QA commented on PIG-1085:
--------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12424686/udfconf-2.patch
  against trunk revision 835189.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 12 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    -1 javac.  The applied patch generated 204 javac compiler warnings (more than the trunk's current 199 warnings).

    +1 findbugs.  The patch does not introduce any new Findbugs warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h7.grid.sp2.yahoo.net/150/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h7.grid.sp2.yahoo.net/150/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h7.grid.sp2.yahoo.net/150/console

This message is automatically generated.

> 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-2.patch, 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.


[jira] Updated: (PIG-1085) Pass JobConf and UDF specific configuration information to UDFs

Posted by "Alan Gates (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alan Gates updated PIG-1085:
----------------------------

    Attachment: udfconf-2.patch

> 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-2.patch, 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.


[jira] Commented: (PIG-1085) Pass JobConf and UDF specific configuration information to UDFs

Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12777307#action_12777307 ] 

Daniel Dai commented on PIG-1085:
---------------------------------

+1. Patch looks good.

> 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-2.patch, 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.


[jira] Updated: (PIG-1085) Pass JobConf and UDF specific configuration information to UDFs

Posted by "Alan Gates (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alan Gates updated PIG-1085:
----------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

Patch checked in.

> 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-2.patch, 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.


[jira] Commented: (PIG-1085) Pass JobConf and UDF specific configuration information to UDFs

Posted by "Alan Gates (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780313#action_12780313 ] 

Alan Gates commented on PIG-1085:
---------------------------------

Applied the patch to the 0.6 branch as well.

> 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-2.patch, 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.


[jira] Commented: (PIG-1085) Pass JobConf and UDF specific configuration information to UDFs

Posted by "Alan Gates (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778599#action_12778599 ] 

Alan Gates commented on PIG-1085:
---------------------------------

Documentation for this patch:

The singleton UDFContext class provides two features to UDF writers.  First, on the backend, it allows UDFs to get access to the JobConf object, by calling getJobConf.  This is only available on the backend (at run time) as the JobConf has not yet been constructed on the front end (during planning time).

Second, it allows UDFs to pass configuration information between instantiations of the UDF on the front and backends.  UDFs can store information in a configuration object when they are constructed on the front end, or during other front end calls such as describeSchema.  They can then read that information on the backend when exec (for EvalFunc) or getNext (for LoadFunc) is called.  Note that information will not be passed bewteen instantiations of the function on the backend.  The communication channel only works from front end to back end.

To store information, the UDF calls getUDFProperties.  This returns a Properties object which the UDF can record the information in or read the information from.  To avoid name space conflicts UDFs are required to provide a signature when obtaining a Properties object.  This can be done in two ways.  The UDF can provide its Class object (via this.getClass()).  In this case, every instantiation of the UDF will be given the same Properties object.  The UDF can also provide its Class plus an array of Strings.  The UDF can pass its constructor arguments, or some other identifying strings.  This allows each instantiation of the UDF to have a different properties object thus avoiding name space collisions between instantiations of the UDF.


> 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-2.patch, 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.


[jira] Updated: (PIG-1085) Pass JobConf and UDF specific configuration information to UDFs

Posted by "Alan Gates (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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.


[jira] Updated: (PIG-1085) Pass JobConf and UDF specific configuration information to UDFs

Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olga Natkovich updated PIG-1085:
--------------------------------

    Fix Version/s: 0.6.0

> 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
>             Fix For: 0.6.0
>
>         Attachments: udfconf-2.patch, 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.


[jira] Updated: (PIG-1085) Pass JobConf and UDF specific configuration information to UDFs

Posted by "Alan Gates (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alan Gates updated PIG-1085:
----------------------------

    Status: Patch Available  (was: Open)

> 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.


[jira] Updated: (PIG-1085) Pass JobConf and UDF specific configuration information to UDFs

Posted by "Alan Gates (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alan Gates updated PIG-1085:
----------------------------

    Status: Patch Available  (was: Open)

Uploading new patch that addresses javac warnings and release audit issues.  If I read the output correctly all of pig's unit tests passed on the previous test.

> 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-2.patch, 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.