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

Paul Rogers commented on DRILL-7147:
------------------------------------

Hi [~agirish], there is no harm in users setting variables the "simple" way – 
as long as they don't want to inherit values from the environment.

However, this ticket mentions {{distrib-env.sh}} which allows a distribution to 
override the built-in settings. Both {{distrib-env.sh}} and the built-in 
settings use the {{${FOO-:value}} form to allow overrides in either the 
environment or {{drill-env.sh}}.

You mention that people set variables using the simple form in {{drill-env.sh}} 
and this causes problems. Again, the only problem this can cause is to 
overwrite the environment. It cannot cause problems with {{dristrib-env.sh}}.

Did someone set a value in {{distrib-env.sh}} without using the proper 
notation? Is this the cause of the issue?

Reversing the file order will fix that particular issue, but will break the 
ability to set the variables in the environment: a feature that DoY requires.

> Source order of "drill-env.sh" and "distrib-env.sh" should be swapped
> ---------------------------------------------------------------------
>
>                 Key: DRILL-7147
>                 URL: https://issues.apache.org/jira/browse/DRILL-7147
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Flow
>    Affects Versions: 1.15.0
>            Reporter: Hao Zhu
>            Assignee: Abhishek Girish
>            Priority: Minor
>             Fix For: 1.16.0
>
>
> In bin/drill-config.sh, the description of the source order is:
> {code:java}
> # Variables may be set in one of four places:
> #
> #   Environment (per run)
> #   drill-env.sh (per site)
> #   distrib-env.sh (per distribution)
> #   drill-config.sh (this file, Drill defaults)
> #
> # Properties "inherit" from items lower on the list, and may be "overridden" 
> by items
> # higher on the list. In the environment, just set the variable:
> {code}
> However actually bin/drill-config.sh sources drill-env.sh firstly, and then 
> distrib-env.sh.
> {code:java}
> drillEnv="$DRILL_CONF_DIR/drill-env.sh"
> if [ -r "$drillEnv" ]; then
>   . "$drillEnv"
> fi
> ...
> distribEnv="$DRILL_CONF_DIR/distrib-env.sh"
> if [ -r "$distribEnv" ]; then
>   . "$distribEnv"
> else
>   distribEnv="$DRILL_HOME/conf/distrib-env.sh"
>   if [ -r "$distribEnv" ]; then
>     . "$distribEnv"
>   fi
> fi
> {code}
> We need to swap the source order of drill-env.sh and distrib-env.sh.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to