ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-146

Allow clients to retrieve the list of hosts/servers from a URL

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.6.0
    • Component/s: java client
    • Labels:
      None
    • Release Note:
      not a blocker for 3.2, moving to 3.3

      Description

      As I suggested in ZOOKEEPER-107, it would be nice to allow clients to specify their hosts strings via a URL so that this can change dynamically. For instance, obtain the current list of hosts from a webpage or a file on disk.

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Patch Available Patch Available
          4m 37s 1 Jakob Homan 26/Sep/08 00:15
          Patch Available Patch Available Open Open
          21h 38m 1 Patrick Hunt 26/Sep/08 21:54
          Michi Mutsuzaki made changes -
          Fix Version/s 3.6.0 [ 12326518 ]
          Fix Version/s 3.5.0 [ 12316644 ]
          Mahadev konar made changes -
          Fix Version/s 3.5.0 [ 12316644 ]
          Fix Version/s 3.4.0 [ 12314469 ]
          Thomas Koch made changes -
          Link This issue relates to ZOOKEEPER-836 [ ZOOKEEPER-836 ]
          Thomas Koch made changes -
          Link This issue blocks ZOOKEEPER-836 [ ZOOKEEPER-836 ]
          Thomas Koch made changes -
          Link This issue blocks ZOOKEEPER-836 [ ZOOKEEPER-836 ]
          Patrick Hunt made changes -
          Fix Version/s 3.4.0 [ 12314469 ]
          Fix Version/s 3.3.0 [ 12313976 ]
          Patrick Hunt made changes -
          Release Note not a blocker for 3.2, moving to 3.3
          Fix Version/s 3.3.0 [ 12313976 ]
          Fix Version/s 3.2.0 [ 12313491 ]
          Jakob Homan made changes -
          Assignee Jakob Homan [ jghoman ]
          Hide
          Jakob Homan added a comment -

          Un-assigning myself as it looks like some work is being done and I don't want to appear to be blocking it or such. Will keep watching to see if there is some way I can help out.

          Show
          Jakob Homan added a comment - Un-assigning myself as it looks like some work is being done and I don't want to appear to be blocking it or such. Will keep watching to see if there is some way I can help out.
          Benjamin Reed made changes -
          Link This issue is related to ZOOKEEPER-390 [ ZOOKEEPER-390 ]
          Patrick Hunt made changes -
          Fix Version/s 3.2.0 [ 12313491 ]
          Fix Version/s 3.1.0 [ 12313381 ]
          Hide
          Mahadev konar added a comment -

          this issue relates to ZOOKEEPER-237

          Show
          Mahadev konar added a comment - this issue relates to ZOOKEEPER-237
          Mahadev konar made changes -
          Link This issue relates to ZOOKEEPER-237 [ ZOOKEEPER-237 ]
          Hide
          Jakob Homan added a comment -

          OK, I wait to see if anything happens with the C version and if so, updated with Patrick's comments at that point.

          Show
          Jakob Homan added a comment - OK, I wait to see if anything happens with the C version and if so, updated with Patrick's comments at that point.
          Mahadev konar made changes -
          Affects Version/s 3.1.0 [ 12313381 ]
          Affects Version/s 3.0.0 [ 12313216 ]
          Fix Version/s 3.1.0 [ 12313381 ]
          Fix Version/s 3.0.0 [ 12313216 ]
          Mahadev konar made changes -
          Affects Version/s 3.1.0 [ 12313381 ]
          Affects Version/s 3.0.0 [ 12313216 ]
          Patrick Hunt made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Hide
          Patrick Hunt added a comment -

          Agree with Mahadev, as this is an addition to the API which is b/w compatible it would be great to wait post 3.0.

          Also the javadoc for new constructors and the getHosts method should be added(ZOOKEEPER-21, just committed, adds better docs for the existing zk constructors). Review the src/docs, probably should add information to the documentation as well regarding the format of the http response, protocols supported, etc...

          Show
          Patrick Hunt added a comment - Agree with Mahadev, as this is an addition to the API which is b/w compatible it would be great to wait post 3.0. Also the javadoc for new constructors and the getHosts method should be added( ZOOKEEPER-21 , just committed, adds better docs for the existing zk constructors). Review the src/docs, probably should add information to the documentation as well regarding the format of the http response, protocols supported, etc...
          Hide
          Mahadev konar added a comment -

          this seems like a nice change.... but we dont have a similar implementation for c.... i would like to keep the c and java clients in sync as much as possible..... i would suggest moving this to post 3.0 and also provide a c counterpart to it...

          Show
          Mahadev konar added a comment - this seems like a nice change.... but we dont have a similar implementation for c.... i would like to keep the c and java clients in sync as much as possible..... i would suggest moving this to post 3.0 and also provide a c counterpart to it...
          Jakob Homan made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Jakob Homan made changes -
          Field Original Value New Value
          Attachment ZOOKEEPER-146.patch [ 12390969 ]
          Hide
          Jakob Homan added a comment -

          This patch:

          • Creates a new HostsProvider interface with one method (getHosts()) and two implementations of this method, StringHostsProvider and URLHostsProvider that return the list of hosts from either of those sources. The StringHostsProvider provides the same functionality that there currently is, and URL will go grab the string from http/file/etc.
          • Creates two new constructors for ZooKeeper to use URLs rather than strings.
          • Provides unit tests for the two new concrete classes.

          The patch doesn't change much of the inner workings of the ZooKeeper or ClientCnxn class, just grabs the string from the provider. It would be possible to improve disconnect behavior by checking to see if there are new hosts available before connecting.

          Show
          Jakob Homan added a comment - This patch: Creates a new HostsProvider interface with one method (getHosts()) and two implementations of this method, StringHostsProvider and URLHostsProvider that return the list of hosts from either of those sources. The StringHostsProvider provides the same functionality that there currently is, and URL will go grab the string from http/file/etc. Creates two new constructors for ZooKeeper to use URLs rather than strings. Provides unit tests for the two new concrete classes. The patch doesn't change much of the inner workings of the ZooKeeper or ClientCnxn class, just grabs the string from the provider. It would be possible to improve disconnect behavior by checking to see if there are new hosts available before connecting.
          Jakob Homan created issue -

            People

            • Assignee:
              Unassigned
              Reporter:
              Jakob Homan
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Development