You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Ashutosh Chauhan (JIRA)" <ji...@apache.org> on 2011/01/19 19:48:45 UTC

[jira] Created: (PIG-1811) Provide a way to access properties defined in properties file in front end

Provide a way to access properties defined in properties file in front end
--------------------------------------------------------------------------

                 Key: PIG-1811
                 URL: https://issues.apache.org/jira/browse/PIG-1811
             Project: Pig
          Issue Type: Improvement
          Components: impl
    Affects Versions: 0.8.0
            Reporter: Ashutosh Chauhan
            Priority: Minor
             Fix For: 0.9.0


If I have properties defined in a properties-file and pass it to pig using pig -P pig.properties, these properties aren't accessible in front end (e.g. in MyLoader.setPartitionKeys() ) when I try to access it through  UDFContext.getUDFContext().getClientSystemProps().getProperty("myprop")


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


[jira] [Assigned] (PIG-1811) Provide a way to access properties defined in properties file in front end

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

Olga Natkovich reassigned PIG-1811:
-----------------------------------

    Assignee: Richard Ding

> Provide a way to access properties defined in properties file in front end
> --------------------------------------------------------------------------
>
>                 Key: PIG-1811
>                 URL: https://issues.apache.org/jira/browse/PIG-1811
>             Project: Pig
>          Issue Type: Improvement
>          Components: impl
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>            Assignee: Richard Ding
>            Priority: Minor
>             Fix For: 0.9.0
>
>
> If I have properties defined in a properties-file and pass it to pig using pig -P pig.properties, these properties aren't accessible in front end (e.g. in MyLoader.setPartitionKeys() ) when I try to access it through  UDFContext.getUDFContext().getClientSystemProps().getProperty("myprop")

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (PIG-1811) Provide a way to access properties defined in properties file in front end

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

Ashutosh Chauhan updated PIG-1811:
----------------------------------

    Affects Version/s:     (was: 0.8.0)
                       0.7.0
        Fix Version/s:     (was: 0.9.0)

Shown above is inappropriate usage of UDFContext by loader. All the interface methods of LoadFunc/StoreFunc passes a job object. If loader wants to access the properties passed to Pig by user, it should look into job object, not UDFContext. This works correctly as expected in Pig 0.8. However, in Pig 0.7 properties are not available either via UDFContext or Job object. Said properties were in pig.properties file which Pig reads by default from its classpath.

> Provide a way to access properties defined in properties file in front end
> --------------------------------------------------------------------------
>
>                 Key: PIG-1811
>                 URL: https://issues.apache.org/jira/browse/PIG-1811
>             Project: Pig
>          Issue Type: Improvement
>          Components: impl
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>            Priority: Minor
>
> If I have properties defined in a properties-file and pass it to pig using pig -P pig.properties, these properties aren't accessible in front end (e.g. in MyLoader.setPartitionKeys() ) when I try to access it through  UDFContext.getUDFContext().getClientSystemProps().getProperty("myprop")

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


[jira] [Resolved] (PIG-1811) Provide a way to access properties defined in properties file in front end

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

Richard Ding resolved PIG-1811.
-------------------------------

    Resolution: Won't Fix

> Provide a way to access properties defined in properties file in front end
> --------------------------------------------------------------------------
>
>                 Key: PIG-1811
>                 URL: https://issues.apache.org/jira/browse/PIG-1811
>             Project: Pig
>          Issue Type: Improvement
>          Components: impl
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>            Assignee: Richard Ding
>            Priority: Minor
>             Fix For: 0.9.0
>
>
> If I have properties defined in a properties-file and pass it to pig using pig -P pig.properties, these properties aren't accessible in front end (e.g. in MyLoader.setPartitionKeys() ) when I try to access it through  UDFContext.getUDFContext().getClientSystemProps().getProperty("myprop")

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (PIG-1811) Provide a way to access properties defined in properties file in front end

Posted by "Ashutosh Chauhan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12983833#action_12983833 ] 

Ashutosh Chauhan commented on PIG-1811:
---------------------------------------

Reason is at the time Pig calls setPartitionKeys() on Loader, UDFContext only contains System.getProperties() and Pig hasn't populated it with the ones loaded from properties file. 

> Provide a way to access properties defined in properties file in front end
> --------------------------------------------------------------------------
>
>                 Key: PIG-1811
>                 URL: https://issues.apache.org/jira/browse/PIG-1811
>             Project: Pig
>          Issue Type: Improvement
>          Components: impl
>    Affects Versions: 0.8.0
>            Reporter: Ashutosh Chauhan
>            Priority: Minor
>             Fix For: 0.9.0
>
>
> If I have properties defined in a properties-file and pass it to pig using pig -P pig.properties, these properties aren't accessible in front end (e.g. in MyLoader.setPartitionKeys() ) when I try to access it through  UDFContext.getUDFContext().getClientSystemProps().getProperty("myprop")

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


[jira] [Commented] (PIG-1811) Provide a way to access properties defined in properties file in front end

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

Richard Ding commented on PIG-1811:
-----------------------------------

As Ashutosh commented that UDF has access to Job configuration (via UDFContext) in back-end and, in front-end, Job configuration is accessible in all methods of LoadFunc/StoreFunc (and InputFormat/OutputFormat). 

I'm going to close this jira. We will open new jiras if new use cases come up in the future. 
 

> Provide a way to access properties defined in properties file in front end
> --------------------------------------------------------------------------
>
>                 Key: PIG-1811
>                 URL: https://issues.apache.org/jira/browse/PIG-1811
>             Project: Pig
>          Issue Type: Improvement
>          Components: impl
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>            Assignee: Richard Ding
>            Priority: Minor
>             Fix For: 0.9.0
>
>
> If I have properties defined in a properties-file and pass it to pig using pig -P pig.properties, these properties aren't accessible in front end (e.g. in MyLoader.setPartitionKeys() ) when I try to access it through  UDFContext.getUDFContext().getClientSystemProps().getProperty("myprop")

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (PIG-1811) Provide a way to access properties defined in properties file in front end

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

Olga Natkovich updated PIG-1811:
--------------------------------

    Fix Version/s: 0.9.0

> Provide a way to access properties defined in properties file in front end
> --------------------------------------------------------------------------
>
>                 Key: PIG-1811
>                 URL: https://issues.apache.org/jira/browse/PIG-1811
>             Project: Pig
>          Issue Type: Improvement
>          Components: impl
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>            Priority: Minor
>             Fix For: 0.9.0
>
>
> If I have properties defined in a properties-file and pass it to pig using pig -P pig.properties, these properties aren't accessible in front end (e.g. in MyLoader.setPartitionKeys() ) when I try to access it through  UDFContext.getUDFContext().getClientSystemProps().getProperty("myprop")

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira