zookeeper_client icon indicating copy to clipboard operation
zookeeper_client copied to clipboard

create() usage is wrong in README

Open ekoontz opened this issue 13 years ago • 0 comments

currently shows:

z.create("/bacon","text to be stored in the new node",0)

but should be:

z.create(:path => "/bacon", :data => "text to be stored in the new node")

Also, 3rd arg, version, does not seem to be supported by the create() method):

ruby-1.9.2-p180 >  z.create(:path => "/bacon2", :data => "text to be stored in the new node", :version => "0")
ZookeeperExceptions::ZookeeperException::BadArguments: Supported arguments are: [:path, :data, :acl, :ephemeral,    
:sequence, :callback, :callback_context], but arguments [:path, :data, :version] were supplied instead
from /Users/ekoontz/.rvm/gems/ruby-1.9.2-p180/gems/zookeeper-0.4.4/lib/zookeeper.rb:252:in `assert_supported_keys'
from /Users/ekoontz/.rvm/gems/ruby-1.9.2-p180/gems/zookeeper-0.4.4/lib/zookeeper.rb:102:in `create'
from (irb):6
from /Users/ekoontz/.rvm/rubies/ruby-1.9.2-p180/bin/irb:17:in `<main>'
ruby-1.9.2-p180 > 

ekoontz avatar May 16 '11 20:05 ekoontz