Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-1084

Hard-coding a well-known location for configuration directory gives less flexibility for packaging Zookeeper configurations

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • 3.3.2
    • None
    • scripts
    • None

    Description

      Currently, Zookeeper relies on zkEnv.sh logic to discover the location of the configuration directory if none is specified:

      # 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
      

      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.

      Attachments

        1. ZOOKEEPER-1084.patch.txt
          0.4 kB
          Roman Shaposhnik

        Activity

          People

            rvs Roman Shaposhnik
            rvs Roman Shaposhnik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: