ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-510

zkpython lumps all exceptions as IOError, needs specialized exceptions for KeeperException types

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.0
    • Fix Version/s: 3.2.2, 3.3.0
    • Component/s: contrib-bindings
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The current zkpython bindings always throw "IOError("text")" exceptions, even for ZK specific exceptions such as NODEEXISTS. This makes it difficult (error prone) to handle exceptions in python code. You can't easily pickup a connection loss vs a node exists for example. Of course you could match the error string, but this seems like a bad idea imo.

      We need to add specific exception types to the python binding that map directly to KeeperException/java types. It would also be useful to include the information provided by the KeeperException (like path in some cases), etc... as part of the error thrown to the python code. Would probably be a good idea to stay as close to java api as possible wrt mapping the errors.

      1. ZOOKEEPER-510.patch
        12 kB
        Henry Robinson
      2. ZOOKEEPER-510.patch
        16 kB
        Patrick Hunt
      3. ZOOKEEPER-510.patch
        16 kB
        Patrick Hunt
      4. ZOOKEEPER-510.patch
        29 kB
        Henry Robinson
      5. ZOOKEEPER-510-incref.patch
        0.8 kB
        Henry Robinson

        Activity

        Patrick Hunt created issue -
        Henry Robinson made changes -
        Field Original Value New Value
        Assignee Henry Robinson [ henryr ]
        Henry Robinson made changes -
        Attachment ZOOKEEPER-510.patch [ 12421085 ]
        Patrick Hunt made changes -
        Attachment ZOOKEEPER-510.patch [ 12421124 ]
        Patrick Hunt made changes -
        Attachment ZOOKEEPER-510.patch [ 12421155 ]
        Henry Robinson made changes -
        Attachment ZOOKEEPER-510.patch [ 12421360 ]
        Henry Robinson made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Mahadev konar made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags [Reviewed]
        Resolution Fixed [ 1 ]
        Patrick Hunt made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Henry Robinson made changes -
        Attachment ZOOKEEPER-510-incref.patch [ 12421957 ]
        Patrick Hunt made changes -
        Status Reopened [ 4 ] Patch Available [ 10002 ]
        Patrick Hunt made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Patrick Hunt made changes -
        Fix Version/s 3.2.2 [ 12314335 ]
        Patrick Hunt made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Henry Robinson
            Reporter:
            Patrick Hunt
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development