zookeeper 1.2.10-java → 1.2.11-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +8 -0
 - data/README.markdown +14 -0
 - data/ext/c_zookeeper.rb +8 -5
 - data/ext/zookeeper_base.rb +2 -1
 - data/lib/zookeeper.rb +35 -19
 - data/lib/zookeeper/client.rb +2 -2
 - data/lib/zookeeper/version.rb +1 -1
 - metadata +10 -26
 
    
        data/CHANGELOG
    CHANGED
    
    | 
         @@ -1,3 +1,11 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            v1.2.11 remove dependency on backports gem
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
              * Somewhat naively we were requiring the backports gem to provide
         
     | 
| 
      
 4 
     | 
    
         
            +
                Kernel#require_relative. This release implements similar functionlity
         
     | 
| 
      
 5 
     | 
    
         
            +
                inside the Zookeeper module and doesn't affect the global namespace.
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
                We apologise for the inconvenience.
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
       1 
9 
     | 
    
         
             
            v1.2.10 minor bug fix in java code
         
     | 
| 
       2 
10 
     | 
    
         | 
| 
       3 
11 
     | 
    
         
             
              * Don't obscure a legitimate exception because of an unexpected nil
         
     | 
    
        data/README.markdown
    CHANGED
    
    | 
         @@ -28,6 +28,20 @@ Portions contributed to the open source community by HPDC, L.P. 
     | 
|
| 
       28 
28 
     | 
    
         | 
| 
       29 
29 
     | 
    
         
             
            sudo gem install zookeeper
         
     | 
| 
       30 
30 
     | 
    
         | 
| 
      
 31 
     | 
    
         
            +
            ### rbenv is awesome
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
            Let me start out by saying I prefer rvm, and that I really don't know a whole lot about linking on OS X. Or Linux. Any suggestions or constructive insults would be greatly appreciated if you have insight into what i'm doing wrong here.
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
            So, it seems that [ruby-build][] doesn't use `--enable-shared` by default. I'm told this is for speed. 
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
            If you run into problems with installing this gem (specifically with linking ex. `Undefined symbols for architecture x86_64`) and you're using rbenv, for now you need to ensure that your ruby was built with `--enable-shared`. I'm sorry for the inconvenience. (no, really)
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
            ```shell
         
     | 
| 
      
 40 
     | 
    
         
            +
            ~ $ CONFIGURE_OPTS='--enable-shared --disable-install-doc' rbenv install 1.9.3-p194
         
     | 
| 
      
 41 
     | 
    
         
            +
            ```
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
            [ruby-build]: https://github.com/sstephenson/ruby-build
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
       31 
45 
     | 
    
         
             
            ## Usage
         
     | 
| 
       32 
46 
     | 
    
         | 
| 
       33 
47 
     | 
    
         
             
            Connect to a server:
         
     | 
    
        data/ext/c_zookeeper.rb
    CHANGED
    
    | 
         @@ -1,8 +1,11 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
             
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
      
 1 
     | 
    
         
            +
            Zookeeper.require_lib(
         
     | 
| 
      
 2 
     | 
    
         
            +
              'zookeeper/logger',
         
     | 
| 
      
 3 
     | 
    
         
            +
              'zookeeper/common',
         
     | 
| 
      
 4 
     | 
    
         
            +
              'zookeeper/constants',
         
     | 
| 
      
 5 
     | 
    
         
            +
              'zookeeper/exceptions' # zookeeper_c depends on exceptions defined in here
         
     | 
| 
      
 6 
     | 
    
         
            +
            )
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            Zookeeper.require_root 'ext/zookeeper_c'
         
     | 
| 
       6 
9 
     | 
    
         | 
| 
       7 
10 
     | 
    
         
             
            # require File.expand_path('../zookeeper_c', __FILE__)
         
     | 
| 
       8 
11 
     | 
    
         | 
    
        data/ext/zookeeper_base.rb
    CHANGED
    
    
    
        data/lib/zookeeper.rb
    CHANGED
    
    | 
         @@ -8,29 +8,45 @@ require 'benchmark' 
     | 
|
| 
       8 
8 
     | 
    
         
             
            require 'logging'
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
            module Zookeeper
         
     | 
| 
       11 
     | 
    
         
            -
               
     | 
| 
       12 
     | 
    
         
            -
            end
         
     | 
| 
      
 11 
     | 
    
         
            +
              ZOOKEEPER_ROOT = File.expand_path('../..', __FILE__)
         
     | 
| 
       13 
12 
     | 
    
         | 
| 
       14 
     | 
    
         
            -
            require  
     | 
| 
      
 13 
     | 
    
         
            +
              # require a path relative to the lib directory
         
     | 
| 
      
 14 
     | 
    
         
            +
              # this is to avoid monkeying explicitly with $LOAD_PATH
         
     | 
| 
      
 15 
     | 
    
         
            +
              #
         
     | 
| 
      
 16 
     | 
    
         
            +
              # @private
         
     | 
| 
      
 17 
     | 
    
         
            +
              def self.require_lib(*relpaths)
         
     | 
| 
      
 18 
     | 
    
         
            +
                relpaths.each do |relpath|
         
     | 
| 
      
 19 
     | 
    
         
            +
                  require File.join(ZOOKEEPER_ROOT, 'lib', relpath)
         
     | 
| 
      
 20 
     | 
    
         
            +
                end
         
     | 
| 
      
 21 
     | 
    
         
            +
              end
         
     | 
| 
       15 
22 
     | 
    
         | 
| 
       16 
     | 
    
         
            -
            require ' 
     | 
| 
      
 23 
     | 
    
         
            +
              # require a path that's relative to ZOOKEEPER_ROOT
         
     | 
| 
      
 24 
     | 
    
         
            +
              # @private
         
     | 
| 
      
 25 
     | 
    
         
            +
              def self.require_root(*relpaths)
         
     | 
| 
      
 26 
     | 
    
         
            +
                relpaths.each do |relpath|
         
     | 
| 
      
 27 
     | 
    
         
            +
                  require File.join(ZOOKEEPER_ROOT, relpath)
         
     | 
| 
      
 28 
     | 
    
         
            +
                end
         
     | 
| 
      
 29 
     | 
    
         
            +
              end
         
     | 
| 
      
 30 
     | 
    
         
            +
            end
         
     | 
| 
       17 
31 
     | 
    
         | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
     | 
    
         
            -
             
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
             
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
      
 32 
     | 
    
         
            +
            Zookeeper.require_lib(
         
     | 
| 
      
 33 
     | 
    
         
            +
              'zookeeper/core_ext',
         
     | 
| 
      
 34 
     | 
    
         
            +
              'zookeeper/monitor',
         
     | 
| 
      
 35 
     | 
    
         
            +
              'zookeeper/logger',
         
     | 
| 
      
 36 
     | 
    
         
            +
              'zookeeper/forked',
         
     | 
| 
      
 37 
     | 
    
         
            +
              'zookeeper/latch',
         
     | 
| 
      
 38 
     | 
    
         
            +
              'zookeeper/acls',
         
     | 
| 
      
 39 
     | 
    
         
            +
              'zookeeper/constants',
         
     | 
| 
      
 40 
     | 
    
         
            +
              'zookeeper/exceptions',
         
     | 
| 
      
 41 
     | 
    
         
            +
              'zookeeper/continuation',
         
     | 
| 
      
 42 
     | 
    
         
            +
              'zookeeper/common',
         
     | 
| 
      
 43 
     | 
    
         
            +
              'zookeeper/callbacks',
         
     | 
| 
      
 44 
     | 
    
         
            +
              'zookeeper/stat',
         
     | 
| 
      
 45 
     | 
    
         
            +
              'zookeeper/client_methods'
         
     | 
| 
      
 46 
     | 
    
         
            +
            )
         
     | 
| 
       30 
47 
     | 
    
         | 
| 
       31 
48 
     | 
    
         
             
            # ok, now we construct the client
         
     | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
     | 
    
         
            -
            require_relative 'zookeeper/client'
         
     | 
| 
      
 49 
     | 
    
         
            +
            Zookeeper.require_lib 'zookeeper/client'
         
     | 
| 
       34 
50 
     | 
    
         | 
| 
       35 
51 
     | 
    
         
             
            module Zookeeper
         
     | 
| 
       36 
52 
     | 
    
         
             
              include Constants
         
     | 
| 
         @@ -90,7 +106,7 @@ module Zookeeper 
     | 
|
| 
       90 
106 
     | 
    
         
             
            end
         
     | 
| 
       91 
107 
     | 
    
         | 
| 
       92 
108 
     | 
    
         
             
            # just for first test, get rid of this soon
         
     | 
| 
       93 
     | 
    
         
            -
             
     | 
| 
      
 109 
     | 
    
         
            +
            Zookeeper.require_lib 'zookeeper/compatibility'
         
     | 
| 
       94 
110 
     | 
    
         | 
| 
       95 
111 
     | 
    
         
             
            if ENV['ZKRB_DEBUG']
         
     | 
| 
       96 
112 
     | 
    
         
             
              Zookeeper.debug_level = Zookeeper::Constants::ZOO_LOG_LEVEL_DEBUG
         
     | 
    
        data/lib/zookeeper/client.rb
    CHANGED
    
    | 
         @@ -3,9 +3,9 @@ 
     | 
|
| 
       3 
3 
     | 
    
         
             
            # or which class we're subclassing.
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
            if defined?(::JRUBY_VERSION)
         
     | 
| 
       6 
     | 
    
         
            -
               
     | 
| 
      
 6 
     | 
    
         
            +
              Zookeeper.require_root('java/java_base')
         
     | 
| 
       7 
7 
     | 
    
         
             
            else
         
     | 
| 
       8 
     | 
    
         
            -
               
     | 
| 
      
 8 
     | 
    
         
            +
              Zookeeper.require_root('ext/zookeeper_base')
         
     | 
| 
       9 
9 
     | 
    
         
             
            end
         
     | 
| 
       10 
10 
     | 
    
         | 
| 
       11 
11 
     | 
    
         | 
    
        data/lib/zookeeper/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,13 +1,13 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification 
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: zookeeper
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version 
         
     | 
| 
       4 
     | 
    
         
            -
              hash:  
     | 
| 
      
 4 
     | 
    
         
            +
              hash: 9
         
     | 
| 
       5 
5 
     | 
    
         
             
              prerelease: 
         
     | 
| 
       6 
6 
     | 
    
         
             
              segments: 
         
     | 
| 
       7 
7 
     | 
    
         
             
              - 1
         
     | 
| 
       8 
8 
     | 
    
         
             
              - 2
         
     | 
| 
       9 
     | 
    
         
            -
              -  
     | 
| 
       10 
     | 
    
         
            -
              version: 1.2. 
     | 
| 
      
 9 
     | 
    
         
            +
              - 11
         
     | 
| 
      
 10 
     | 
    
         
            +
              version: 1.2.11
         
     | 
| 
       11 
11 
     | 
    
         
             
            platform: java
         
     | 
| 
       12 
12 
     | 
    
         
             
            authors: 
         
     | 
| 
       13 
13 
     | 
    
         
             
            - Phillip Pearson
         
     | 
| 
         @@ -20,28 +20,12 @@ autorequire: 
     | 
|
| 
       20 
20 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       21 
21 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       22 
22 
     | 
    
         | 
| 
       23 
     | 
    
         
            -
            date: 2012-07- 
     | 
| 
      
 23 
     | 
    
         
            +
            date: 2012-07-18 00:00:00 Z
         
     | 
| 
       24 
24 
     | 
    
         
             
            dependencies: 
         
     | 
| 
       25 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       26 
     | 
    
         
            -
              name: backports
         
     | 
| 
       27 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       28 
     | 
    
         
            -
              requirement: &id001 !ruby/object:Gem::Requirement 
         
     | 
| 
       29 
     | 
    
         
            -
                none: false
         
     | 
| 
       30 
     | 
    
         
            -
                requirements: 
         
     | 
| 
       31 
     | 
    
         
            -
                - - ~>
         
     | 
| 
       32 
     | 
    
         
            -
                  - !ruby/object:Gem::Version 
         
     | 
| 
       33 
     | 
    
         
            -
                    hash: 25
         
     | 
| 
       34 
     | 
    
         
            -
                    segments: 
         
     | 
| 
       35 
     | 
    
         
            -
                    - 2
         
     | 
| 
       36 
     | 
    
         
            -
                    - 5
         
     | 
| 
       37 
     | 
    
         
            -
                    - 1
         
     | 
| 
       38 
     | 
    
         
            -
                    version: 2.5.1
         
     | 
| 
       39 
     | 
    
         
            -
              type: :runtime
         
     | 
| 
       40 
     | 
    
         
            -
              version_requirements: *id001
         
     | 
| 
       41 
25 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       42 
26 
     | 
    
         
             
              name: logging
         
     | 
| 
       43 
27 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       44 
     | 
    
         
            -
              requirement: & 
     | 
| 
      
 28 
     | 
    
         
            +
              requirement: &id001 !ruby/object:Gem::Requirement 
         
     | 
| 
       45 
29 
     | 
    
         
             
                none: false
         
     | 
| 
       46 
30 
     | 
    
         
             
                requirements: 
         
     | 
| 
       47 
31 
     | 
    
         
             
                - - ~>
         
     | 
| 
         @@ -53,11 +37,11 @@ dependencies: 
     | 
|
| 
       53 
37 
     | 
    
         
             
                    - 2
         
     | 
| 
       54 
38 
     | 
    
         
             
                    version: 1.7.2
         
     | 
| 
       55 
39 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       56 
     | 
    
         
            -
              version_requirements: * 
     | 
| 
      
 40 
     | 
    
         
            +
              version_requirements: *id001
         
     | 
| 
       57 
41 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       58 
42 
     | 
    
         
             
              name: slyphon-log4j
         
     | 
| 
       59 
43 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       60 
     | 
    
         
            -
              requirement: & 
     | 
| 
      
 44 
     | 
    
         
            +
              requirement: &id002 !ruby/object:Gem::Requirement 
         
     | 
| 
       61 
45 
     | 
    
         
             
                none: false
         
     | 
| 
       62 
46 
     | 
    
         
             
                requirements: 
         
     | 
| 
       63 
47 
     | 
    
         
             
                - - "="
         
     | 
| 
         @@ -69,11 +53,11 @@ dependencies: 
     | 
|
| 
       69 
53 
     | 
    
         
             
                    - 15
         
     | 
| 
       70 
54 
     | 
    
         
             
                    version: 1.2.15
         
     | 
| 
       71 
55 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       72 
     | 
    
         
            -
              version_requirements: * 
     | 
| 
      
 56 
     | 
    
         
            +
              version_requirements: *id002
         
     | 
| 
       73 
57 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       74 
58 
     | 
    
         
             
              name: slyphon-zookeeper_jar
         
     | 
| 
       75 
59 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       76 
     | 
    
         
            -
              requirement: & 
     | 
| 
      
 60 
     | 
    
         
            +
              requirement: &id003 !ruby/object:Gem::Requirement 
         
     | 
| 
       77 
61 
     | 
    
         
             
                none: false
         
     | 
| 
       78 
62 
     | 
    
         
             
                requirements: 
         
     | 
| 
       79 
63 
     | 
    
         
             
                - - "="
         
     | 
| 
         @@ -85,7 +69,7 @@ dependencies: 
     | 
|
| 
       85 
69 
     | 
    
         
             
                    - 5
         
     | 
| 
       86 
70 
     | 
    
         
             
                    version: 3.3.5
         
     | 
| 
       87 
71 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       88 
     | 
    
         
            -
              version_requirements: * 
     | 
| 
      
 72 
     | 
    
         
            +
              version_requirements: *id003
         
     | 
| 
       89 
73 
     | 
    
         
             
            description: |+
         
     | 
| 
       90 
74 
     | 
    
         
             
              A low-level multi-Ruby wrapper around the ZooKeeper API bindings. For a
         
     | 
| 
       91 
75 
     | 
    
         
             
              friendlier interface, see http://github.com/slyphon/zk. Currently supported:
         
     |