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

Prashant Kommireddi commented on PIG-3261:
------------------------------------------

Hi [~qwertymaniac], thanks for updating the patch. Documentation looks good, I 
tested by building the same. 

Minor nitpick, I would prefer nested-if in this case as "$PIG_CLASSPATH" is 
tested twice. But that's probably just me :)
{code}
if [ "$PIG_CLASSPATH" != "" ] && [ "$PIG_USER_CLASSPATH_FIRST" == "" ]; then
    CLASSPATH=${CLASSPATH}:${PIG_CLASSPATH}
elif [ "$PIG_CLASSPATH" != "" ] && [ "$PIG_USER_CLASSPATH_FIRST" != "" ]; then
    CLASSPATH=${PIG_CLASSPATH}:${CLASSPATH}
fi
{code}

Otherwise, +1 (non-binding)
                
> User set PIG_CLASSPATH entries must be prepended to the CLASSPATH, not 
> appended
> -------------------------------------------------------------------------------
>
>                 Key: PIG-3261
>                 URL: https://issues.apache.org/jira/browse/PIG-3261
>             Project: Pig
>          Issue Type: Bug
>          Components: grunt
>    Affects Versions: 0.10.0
>            Reporter: Harsh J
>            Assignee: Harsh J
>         Attachments: PIG-3261.patch, PIG-3261.patch, PIG-3261.patch, 
> PIG-3261.patch
>
>
> Currently we are doing this wrong:
> {code}
> if [ "$PIG_CLASSPATH" != "" ]; then
>     CLASSPATH=${CLASSPATH}:${PIG_CLASSPATH}
> {code}
> This means that anything added to CLASSPATH until that point will never be 
> able to get overridden by a user set environment, which is wrong behavior. 
> Hadoop libs for example are added to CLASSPATH, before this extension is 
> called in bin/pig.

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