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

Bhooshan Mogal commented on PIG-3441:
-------------------------------------

Thanks. Yes, I tried https://issues.apache.org/jira/browse/PIG-3135 before. I 
had a email thread with Prashant regarding this issue. PIG-3135 is for allowing 
pig to use standard configuration files (core-site, hdfs-site) from a different 
location. This issue is regarding custom configuration files that one may wish 
to use. One of the usecases could be the one I mentioned in the description, 
where a hadoop driver for a storage system (MyFileSystem.java) loads its own 
configuration files statically. Parameters from configuration files loaded 
statically in such scenarios are not available in pig scripts/grunt shell.

Here is a link to the email thread for more context - 
http://mail-archives.apache.org/mod_mbox/pig-user/201304.mbox/%3cca+di8edden65eqmprp6tt9a9bj8bhcwhn5ifh7ham4wea3b...@mail.gmail.com%3E
 
                
> Allow Pig to use default resources from Configuration objects
> -------------------------------------------------------------
>
>                 Key: PIG-3441
>                 URL: https://issues.apache.org/jira/browse/PIG-3441
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.11.1
>            Reporter: Bhooshan Mogal
>         Attachments: PIG-3441_1.patch, PIG-3441.patch
>
>
> Pig currently ignores parameters from configuration files added statically to 
> Configuration objects as Configuration.addDefaultResource(filename.xml).
> Consider the following scenario -
> In a hadoop FileSystem driver for a non-HDFS filesystem you load properties 
> specific to that FileSystem in a static initializer block in the class that 
> extends org.apache.hadoop.fs.Filesystem for your FileSystem like below - 
> {code}
> class MyFileSystem extends FileSystem {
>         static {
>               Configuration.addDefaultResource("myfs-default.xml");
>               Configuration.addDefaultResource("myfs-site.xml");
>       }
> }
> {code}
> Interfaces like the Hadoop CLI, Hive, Hadoop M/R can find configuration 
> parameters defined in these configuration files as long as they are on the 
> classpath.
> However, Pig cannot find parameters from these files, because it ignores 
> configuration files added statically.
> Pig should allow users to specify if they would like pig to read parameters 
> from resources loaded statically.

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

Reply via email to