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

ZooKeeper Client Configuration

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • 3.6.0
    • 3.5.2
    • java client
    • All

    Description

      I ran into an issue when connecting to two ZooKeeper clusters from the same JVM application. One of the clusters required SASL authentication while the other one did not. Unfortunately the client uses System properties to configure authentication and the client was attempting to authenticate on the non-auth cluster, preventing a connection.

      To solve it, I implemented a base config class with helper methods for parsing config settings as well as a client specific subclass that parsed the system system values but allowed for overriding via programatic values or via a file. There are also new Zookeeper constructors to use this config object. I implemented it so that it's completely backwards compatible so it shouldn't break existing installs (and it hasn't yet with my testing).

      If folks like this, we could use the same config base for server configs and migrate away from system properties to per object configs. It would also be helpful to centralize more of the "zookeeper.*" strings.

      Let me know what ya'll think and thanks!

      Attachments

        1. zookeeper-2103.patch
          123 kB
          Chris Larsen

        Issue Links

          Activity

            People

              manolamancha Chris Larsen
              manolamancha Chris Larsen
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: