pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "V.V.Chaitanya Krishna (JIRA)" <j...@apache.org>
Subject [jira] Updated: (PIG-1381) Need a way for Pig to take an alternative property file
Date Mon, 24 May 2010 09:44:25 GMT

     [ https://issues.apache.org/jira/browse/PIG-1381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

V.V.Chaitanya Krishna updated PIG-1381:

    Attachment: PIG-1381_cli_1.patch

Uploading patch that implements option 1 of command-line option of providing a properties'
file by user.

The patch has the following changes:

* Renaming PropertiesUtil.loadPropertiesFromFile to PropertiesUtil.loadDefaultProperties
* Refactoring the code implementing the loading of properties from pig-default.properties
and pig.properties (to avoid code duplication).
* Extracting the code that loads properties from the deprecated .pigrc file. This makes it
easier to use the method again to load properties from the user-specified properties' file.
* load the properties from deprecated .pigrc file _before_ the other default files (i.e.,
pig-default.properties and pig.properties). This will make the code simpler as we dont need
to check for the existence of property before loading it from .pigrc file, because it will
later get overriden by the value in pid-default.properties or pig.properties.

> Need a way for Pig to take an alternative property file
> -------------------------------------------------------
>                 Key: PIG-1381
>                 URL: https://issues.apache.org/jira/browse/PIG-1381
>             Project: Pig
>          Issue Type: Improvement
>          Components: impl
>    Affects Versions: 0.7.0
>            Reporter: Daniel Dai
>            Assignee: V.V.Chaitanya Krishna
>             Fix For: 0.8.0
>         Attachments: PIG-1381-1.patch, PIG-1381-2.patch, PIG-1381-3.patch, PIG-1381-4.patch,
PIG-1381-5.patch, PIG-1381_cli_1.patch
> Currently, Pig read the first ever pig.properties in CLASSPATH. Pig has a default pig.properties
and if user have a different pig.properties, there will be a conflict since we can only read
one. There are couple of ways to solve it:
> 1. Give a command line option for user to pass an additional property file
> 2. Change the name for default pig.properties to pig-default.properties, and user can
give a pig.properties to override
> 3. Further, can we consider to use pig-default.xml/pig-site.xml, which seems to be more
natural for hadoop community. If so, we shall provide backward compatibility to also read
pig.properties, pig-cluster-hadoop-site.xml. 

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

View raw message