You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Bhooshan Mogal (JIRA)" <ji...@apache.org> on 2014/07/15 20:38:06 UTC
[jira] [Commented] (PIG-3441) Allow Pig to use default resources
from Configuration objects
[ https://issues.apache.org/jira/browse/PIG-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14062468#comment-14062468 ]
Bhooshan Mogal commented on PIG-3441:
-------------------------------------
Hi [~daijy],
I tried changing MapReduceLauncher.launchPig as
{code}
- Configuration conf = ConfigurationUtil.toConfiguration(pc.getProperties());
+ Configuration conf = ConfigurationUtil.toConfiguration(pc.getProperties(), true);
{code}
However, the usecase still does not work. Like before, it ignores default resources. I was about to test by changing ConfigurationUtil.toConfiguration as
{code}
- return toConfiguration(properties, false);
+ return toConfiguration(properties, true);
{code}
However, looks like the Pig trunk build broke due to this commit in Tez yesterday - https://github.com/apache/incubator-tez/commit/97805278ed9b7e9f8a20521574b22515d1c553e7
A bunch of constants that Pig still refers to got removed from TezJobConfig in this commit.
Is there a ticket for this already? If not, I can create one.
Thanks,
Bhooshan
> 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.patch, PIG-3441_1.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 was sent by Atlassian JIRA
(v6.2#6252)