You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Patrick Hunt (JIRA)" <ji...@apache.org> on 2011/06/01 21:19:48 UTC

[jira] [Commented] (ZOOKEEPER-1084) Hard-coding a well-known location for configuration directory gives less flexibility for packaging Zookeeper configurations

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

Patrick Hunt commented on ZOOKEEPER-1084:
-----------------------------------------

This seems fine to me. Looking at blame it's been this way forever. Probably hardcoded with the original yahoo specific location - Mahadev does this change seem ok to you? I don't think we should include packaging specific locations, rather support dev environment by default and allow those packaging the code to override.

Looking at hadoop's hadoop-config.sh they have a DEFAULT_CONF_DIR that potentially references "etc/hadoop" but afaict not "/etc/hadoop".

> Hard-coding a well-known location for configuration directory gives less flexibility for packaging Zookeeper configurations
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1084
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1084
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: scripts
>    Affects Versions: 3.3.2
>            Reporter: Roman Shaposhnik
>            Priority: Minor
>         Attachments: ZOOKEEPER-1084.patch.txt
>
>
> Currently, Zookeeper relies on zkEnv.sh logic to discover the location of the configuration directory if none is specified:
> {noformat}
> # We use ZOOCFGDIR if defined,
> # otherwise we use /etc/zookeeper
> # or the conf directory that is
> # a sibling of this script's directory
> if [ "x$ZOOCFGDIR" = "x" ]
> then
>     if [ -d "/etc/zookeeper" ]
>     then
>         ZOOCFGDIR="/etc/zookeeper"
>     else
>         ZOOCFGDIR="$ZOOBINDIR/../conf"
>     fi
> fi
> {noformat}
> The problem with such an approach is that having /etc/zookeeper (for whatever reason) trips this logic up in believing that
> it is THE place. It would be much nicer to follow the suit of other Apache Hadoop projects and restrict the logic to
> $ZOOCFGDIR and $ZOOBINDIR/../conf
> Please note, that if that happens one can always have an existing behavior of picking up /etc/zookeeper by creating
> a symlink at $ZOOBINDIR/../conf pointing to it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira