ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-330

zookeeper standalone server does not startup with just a port and datadir.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.1.1, 3.2.0
    • Fix Version/s: 3.1.1, 3.2.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      ZOOKEEPER-326 made a change to zookeeperservermain.java that broke the starting of zookeeperserver with just the port and datadir.

      1. ZOOKEEPER-330.patch
        5 kB
        Mahadev konar
      2. ZOOKEEPER-330.patch
        5 kB
        Chris Darroch

        Activity

        Hide
        Hudson added a comment -

        Integrated in ZooKeeper-trunk #243 (See http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/243/)
        . zookeeper standalone server does not startup with just a port and datadir. (chris darroch and mahadev)

        Show
        Hudson added a comment - Integrated in ZooKeeper-trunk #243 (See http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/243/ ) . zookeeper standalone server does not startup with just a port and datadir. (chris darroch and mahadev)
        Hide
        Mahadev konar added a comment -

        I just committed this. Thanks chris.

        Show
        Mahadev konar added a comment - I just committed this. Thanks chris.
        Hide
        Mahadev konar added a comment -

        +1 for the aptch .... good changes chris...

        Show
        Mahadev konar added a comment - +1 for the aptch .... good changes chris...
        Hide
        Chris Darroch added a comment -

        Sorry I didn't catch the problem with src/c/tests/zkServer.sh invoking ZooKeeperMain directly.

        The only issue I had with your proposed patch here is that the original problem I encountered in ZOOKEEPER-326 returns – if you start a standalone server using QuorumPeerMain, it ignores tickTime settings there again. This contradicts the information here:

        http://hadoop.apache.org/zookeeper/docs/r3.1.0/zookeeperStarted.html#sc_InstallingSingleMode

        and it also just would be nice, I think, for the standard zkServer.sh (which uses QuorumPeerMain) and standard config file to work fully for standalone installations out of the box.

        My revisions in the attached patch allow ZooKeeperMain to take a single config file as an alternate set of arguments, in which case it works like QuorumPeerMain. This seems to resolve both my original issue, support the addition of a command-line tickTime argument as per your patch, and allow the src/c/tests/zkServer.sh script to work as-is.

        Show
        Chris Darroch added a comment - Sorry I didn't catch the problem with src/c/tests/zkServer.sh invoking ZooKeeperMain directly. The only issue I had with your proposed patch here is that the original problem I encountered in ZOOKEEPER-326 returns – if you start a standalone server using QuorumPeerMain, it ignores tickTime settings there again. This contradicts the information here: http://hadoop.apache.org/zookeeper/docs/r3.1.0/zookeeperStarted.html#sc_InstallingSingleMode and it also just would be nice, I think, for the standard zkServer.sh (which uses QuorumPeerMain) and standard config file to work fully for standalone installations out of the box. My revisions in the attached patch allow ZooKeeperMain to take a single config file as an alternate set of arguments, in which case it works like QuorumPeerMain. This seems to resolve both my original issue, support the addition of a command-line tickTime argument as per your patch, and allow the src/c/tests/zkServer.sh script to work as-is.
        Hide
        Mahadev konar added a comment -

        also the c tests fail to run right now since the api for ZookeeperServerMain changed. Now it passes again with the patch.

        Show
        Mahadev konar added a comment - also the c tests fail to run right now since the api for ZookeeperServerMain changed. Now it passes again with the patch.
        Hide
        Mahadev konar added a comment -

        this patch fixes the issue.
        ZOOKEEPER-326 made the ZookeeperServerMain args to take just a config file rather than its initial semantics of taking a clientport and datadir.

        The ZookeeperServerMain class now takes the same arguments that it did earlier with an additional optional argument of ticktime.

        so the command will look like
        ZooKeeperServerMain port datadir [ticktime]
        ticktime being optional.

        If users want to use a config file for a standalone server they can use

        QuorumPeerMain configfile

        Show
        Mahadev konar added a comment - this patch fixes the issue. ZOOKEEPER-326 made the ZookeeperServerMain args to take just a config file rather than its initial semantics of taking a clientport and datadir. The ZookeeperServerMain class now takes the same arguments that it did earlier with an additional optional argument of ticktime. so the command will look like ZooKeeperServerMain port datadir [ticktime] ticktime being optional. If users want to use a config file for a standalone server they can use QuorumPeerMain configfile

          People

          • Assignee:
            Mahadev konar
            Reporter:
            Mahadev konar
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development