Code Monkey home page Code Monkey logo

Comments (5)

ariesdevil avatar ariesdevil commented on August 21, 2024

This lib use zkpython as zookeeper client.
See:

from zookeeper import ZooKeeperException as ZookeeperError

from pymesos.

dan-at-teza avatar dan-at-teza commented on August 21, 2024

from pymesos.

ariesdevil avatar ariesdevil commented on August 21, 2024

https://github.com/douban/pymesos/releases/tag/0.3.10

from pymesos.

dan-at-teza avatar dan-at-teza commented on August 21, 2024

I wanted to follow up, because I'm not sure what the intention of the following code is:
https://github.com/douban/pymesos/blob/master/pymesos/detector.py

try:
    from zookeeper import ZooKeeperException as ZookeeperError
    from .zkpython import ZKClient, ChildrenWatch, DataWatch

    def adjust_zk_logging_level():
        pass
except ImportError:
    from kazoo.client import KazooClient as ZKClient
    from kazoo.recipe.watchers import ChildrenWatch, DataWatch
    from kazoo.exceptions import ZookeeperError

    def adjust_zk_logging_level():
        import logging
        import kazoo
        kazoo.client.log.setLevel(logging.WARNING)
        kazoo.protocol.connection.log.setLevel(logging.WARNING)

It looks to me like this code attempts to use the zkpython library, if available, and if not it falls back to kazoo.

kazoo is the pure python zookeeper client, which is preferable to me for the same reason that I'm attempting to use pymesos: it doesn't rely on native client libraries or installed headers.

I've been using kazoo, not zkpython, because I lack the zookeeper header files necessary to install zkpython. I would prefer to go the pure python route, since native libraries aren't available in my development environment (Mac OS X), or production (barebones Linux with no Internet access).

from pymesos.

ariesdevil avatar ariesdevil commented on August 21, 2024

@dan-at-teza zkpython used in our production and we have no reason to replace it. You could either make it configurable(PR is welcome) or use your fork version.

from pymesos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.