Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.0
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      A skeleton script that shows how to setup znode watches and how to react to events using the Python client libraries.

      Description

      When adding some zookeeper-based functionality to a python script I had to figure everything out without guidance, which while doable, would have been a lot easier with an example. I extracted a skeleton program structure out with hopes its useful to others (maybe add as an example in the source or wiki?).

      This script does an aget() and sets a watch, and hopefully illustrates what's going on, and where to plug in your application code that gets run when the znode changes.

      There are probably some bugs, which if we fix now and provide a well-reviewed example hopefully others will not run into the same mistakes.

      1. ZOOKEEPER-765.patch
        7 kB
        Andrei Savu
      2. ZOOKEEPER-765.patch
        7 kB
        Andrei Savu
      3. zk.py
        4 kB
        Travis Crawford

        Issue Links

          Activity

          Travis Crawford created issue -
          Travis Crawford made changes -
          Field Original Value New Value
          Attachment zk.py [ 12443656 ]
          Patrick Hunt made changes -
          Assignee Travis Crawford [ traviscrawford ]
          Fix Version/s 3.4.0 [ 12314469 ]
          Component/s contrib-bindings [ 12312860 ]
          Andrei Savu made changes -
          Attachment ZOOKEEPER-765.patch [ 12449092 ]
          Andrei Savu made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Release Note Travis Crawford wrote a skeleton script that shows how to setup znode watches and how to react to events using the Python client libraries.
          Assignee Travis Crawford [ traviscrawford ] Andrei Savu [ savu.andrei ]
          Patrick Hunt made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Andrei Savu made changes -
          Attachment ZOOKEEPER-765.patch [ 12449429 ]
          Andrei Savu made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Mahadev konar made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Hadoop Flags [Reviewed]
          Release Note Travis Crawford wrote a skeleton script that shows how to setup znode watches and how to react to events using the Python client libraries. A skeleton script that shows how to setup znode watches and how to react to events using the Python client libraries.
          Resolution Fixed [ 1 ]
          Mahadev konar made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Jeff Hammerbacher made changes -
          Link This issue is related to ZOOKEEPER-395 [ ZOOKEEPER-395 ]

            People

            • Assignee:
              Andrei Savu
              Reporter:
              Travis Crawford
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development