[
https://issues.apache.org/jira/browse/ZOOKEEPER-921?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nicholas Knight updated ZOOKEEPER-921:
--
Attachment: zktest.py
Script showing issue. This has been tested with a ZooKeeper 3.3.1 instance,
with both the bindings in the 3.3.1 source tree, and those from an svn checkout
of trunk (from within the last few hours). Results were identical with both
bindings.
If '/SomeDir' exists, but '/SomeDir/last_modified' does not, this is the
erroneous output from the script:
{noformat}
2010-11-08 16:53:04,916:2623(0x7fff71077c20):zoo_i...@log_env@660: Client
environment:zookeeper.version=zookeeper C client 3.4.0
2010-11-08 16:53:04,916:2623(0x7fff71077c20):zoo_i...@log_env@664: Client
environment:host.name=Nicholas-Knights-MacBook-Pro.local
2010-11-08 16:53:04,916:2623(0x7fff71077c20):zoo_i...@log_env@671: Client
environment:os.name=Darwin
2010-11-08 16:53:04,916:2623(0x7fff71077c20):zoo_i...@log_env@672: Client
environment:os.arch=10.4.0
2010-11-08 16:53:04,916:2623(0x7fff71077c20):zoo_i...@log_env@673: Client
environment:os.version=Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT
2010; root:xnu-1504.7.4~1/RELEASE_I386
2010-11-08 16:53:04,916:2623(0x7fff71077c20):zoo_i...@log_env@681: Client
environment:user.name=nknight
2010-11-08 16:53:04,917:2623(0x7fff71077c20):zoo_i...@log_env@689: Client
environment:user.home=/Users/nknight
2010-11-08 16:53:04,917:2623(0x7fff71077c20):zoo_i...@log_env@701: Client
environment:user.dir=/Users/nknight
2010-11-08 16:53:04,917:2623(0x7fff71077c20):zoo_i...@zookeeper_init@729:
Initiating client connection, host=127.0.0.1:2181 sessionTimeout=1
watcher=0x0 sessionId=0 sessionPasswd= context=0x0 flags=0
2010-11-08 16:53:04,917:2623(0x100602000):zoo_i...@check_events@1587: initiated
connection to server [127.0.0.1:2181]
2010-11-08 16:53:04,919:2623(0x100602000):zoo_i...@check_events@1634: session
establishment complete on server [127.0.0.1:2181], sessionId=0x12c2a04fa7501ab,
negotiated timeout=1
Traceback (most recent call last):
File "zktest.py", line 21, in
logger.debug("Boom?")
File
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/__init__.py",
line 1008, in debug
if self.isEnabledFor(DEBUG):
File
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/__init__.py",
line 1206, in isEnabledFor
return level >= self.getEffectiveLevel()
File
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/__init__.py",
line 1194, in getEffectiveLevel
while logger:
TypeError: an integer is required
{noformat}
If the node already exists (as is the case if you run the script a second
time), you get expected results:
{noformat}
2010-11-08 16:55:55,555:2630(0x7fff71077c20):zoo_i...@log_env@660: Client
environment:zookeeper.version=zookeeper C client 3.4.0
2010-11-08 16:55:55,555:2630(0x7fff71077c20):zoo_i...@log_env@664: Client
environment:host.name=Nicholas-Knights-MacBook-Pro.local
2010-11-08 16:55:55,555:2630(0x7fff71077c20):zoo_i...@log_env@671: Client
environment:os.name=Darwin
2010-11-08 16:55:55,555:2630(0x7fff71077c20):zoo_i...@log_env@672: Client
environment:os.arch=10.4.0
2010-11-08 16:55:55,555:2630(0x7fff71077c20):zoo_i...@log_env@673: Client
environment:os.version=Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT
2010; root:xnu-1504.7.4~1/RELEASE_I386
2010-11-08 16:55:55,555:2630(0x7fff71077c20):zoo_i...@log_env@681: Client
environment:user.name=nknight
2010-11-08 16:55:55,556:2630(0x7fff71077c20):zoo_i...@log_env@689: Client
environment:user.home=/Users/nknight
2010-11-08 16:55:55,556:2630(0x7fff71077c20):zoo_i...@log_env@701: Client
environment:user.dir=/Users/nknight
2010-11-08 16:55:55,556:2630(0x7fff71077c20):zoo_i...@zookeeper_init@729:
Initiating client connection, host=127.0.0.1:2181 sessionTimeout=1
watcher=0x0 sessionId=0 sessionPasswd= context=0x0 flags=0
2010-11-08 16:55:55,557:2630(0x100602000):zoo_i...@check_events@1587: initiated
connection to server [127.0.0.1:2181]
2010-11-08 16:55:55,558:2630(0x100602000):zoo_i...@check_events@1634: session
establishment complete on server [127.0.0.1:2181], sessionId=0x12c2a04fa7501ac,
negotiated timeout=1
Caught exception: NodeExistsException('node exists',)
DEBUG:Boom:Boom?
{noformat}
If /SomeDir doesn't exist, you also get expected results:
{noformat}
2010-11-08 16:56:59,198:2634(0x7fff71077c20):zoo_i...@log_env@660: Client
environment:zookeeper.version=zookeeper C client 3.4.0
2010-11-08 16:56:59,198:2634(0x7fff71077c20):zoo_i...@log_env@664: Client
environment:host.name=Nicholas-Knights-MacBook-Pro.local
2010-11-08 16:56:59,198:2634(0x7fff71077c20):zoo_i...@log_env@671: Client
environment:os.name=Darwin
2010-11-08 16:56:59,198:2634(0x7fff71077c20):zoo_i...@log_env@672: Client
environment:os.arch=10.4.0
2010-11-08 16:56:59,198:2634(0x7fff71077