ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-905

enhance zkServer.sh for easier zookeeper automation-izing

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.0
    • Component/s: scripts
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      zkServer.sh is good at starting zookeeper and figuring out the right options to pass along.

      unfortunately if you want to wrap zookeeper startup/shutdown in any significant way, you have to reimplement a bunch of the logic there.

      the attached patch addresses a couple simple issues:
      1. add a 'start-foreground' option to zkServer.sh - this allows things that expect to manage a foregrounded process (daemontools, launchd, etc) to use zkServer.sh instead of rolling their own to launch zookeeper

      2. add a 'print-cmd' option to zkServer.sh - rather than launching zookeeper from the script, just give me the command you'd normally use to exec zookeeper. I found this useful when writing automation to start/stop zookeeper as part of smoke testing zookeeper-based applications

      3. Deal more gracefully with supplying alternate configuration files to zookeeper - currently the script assumes all config files reside in $ZOOCFGDIR - also useful for smoke testing

      4. communicate extra info ("JMX enabled") about zookeeper on STDERR rather than STDOUT (necessary for #2)

      5. fixes an issue on macos where readlink doesn't have the '-f' option.

      1. zkServer.sh.diff
        2 kB
        Nicholas Harteau

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Nicholas Harteau
            Reporter:
            Nicholas Harteau
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development