Module Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Dict Str NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str AugAssignAdd NameStore Call AttributeLoad Str attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args defaults body If CompareNotEq AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list Expr Call NameLoad FunctionDef arguments args NameParam defaults body If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr Str Str Return NameLoad decorator_list Assign NameStore Call NameLoad Str Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults TupleLoad NameLoad body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad NameLoad attr body Return Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr If AttributeLoad NameLoad attr body Assign NameStore ListLoad For NameStore Call NameLoad TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr BinOpMod Str Call AttributeLoad Str attr NameLoad With Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str NameStore body Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad BinOpAdd BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Assign NameStore ListLoad Str Str AttributeLoad NameLoad attr Str BinOpMod Str NameLoad Str BinOpMod Str NameLoad Str Str NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str If NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str orelse Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str With Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Str Str NameStore body Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Return Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr If CompareNotEq AttributeLoad AttributeLoad NameLoad attr attr Num body Expr Call AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Num Num body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad Assign NameStore NameLoad Assign NameStore ListLoad For NameStore Call NameLoad NameLoad body Assign NameStore Call NameLoad BinOpAdd NameLoad Num NameLoad BinOpAdd NameLoad Num BinOpAdd NameLoad Num BinOpAdd NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore Num For NameStore Call NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad AttributeLoad NameLoad attr NameLoad NameLoad keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body For NameStore Call NameLoad Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Import alias Expr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam defaults body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A code N/A logging N/A os N/A os.path N/A shutil N/A signal N/A subprocess N/A tempfile N/A traceback itertools chain collections namedtuple glob glob N/A log N/A N/A logging getLogger __name__ debug N/A N/A sig frame N/A N/A N/A Interrupt running process, and provide a python prompt for
    interactive debugging. N/A d N/A _frame frame N/A N/A N/A d update N/A frame f_globals N/A N/A N/A d update N/A frame f_locals N/A i N/A N/A code InteractiveConsole d N/A message Signal recieved : entering python shell.
Traceback:
 N/A message N/A N/A join N/A N/A traceback format_stack frame N/A N/A N/A i interact message N/A listen N/A N/A N/A N/A N/A N/A N/A os name nt N/A N/A N/A N/A signal signal N/A signal SIGUSR1 debug N/A N/A N/A listen to_java_compatible_path N/A N/A path N/A N/A N/A N/A N/A os name nt N/A N/A path N/A N/A path replace \ / N/A path N/A N/A ServerInfo N/A namedtuple ServerInfo server_id client_port election_port leader_port admin_port ManagedZooKeeper N/A object N/A N/A Class to manage the running of a ZooKeeper instance for testing.

    Note: no attempt is made to probe the ZooKeeper instance is
    actually available, or that the selected port is free. In the
    future, we may want to do that, especially when run in a
    Hudson/Buildbot context, to ensure more test robustness. __init__ N/A N/A self software_path server_info peers classpath N/A N/A None N/A N/A Define the ZooKeeper test instance.

        @param install_path: The path to the install for ZK
        @param port: The port to run the managed ZK instance
         N/A N/A self install_path software_path N/A N/A self _classpath classpath N/A N/A self server_info server_info N/A N/A self host 127.0.0.1 N/A N/A self peers peers N/A N/A self working_path N/A N/A tempfile mkdtemp N/A N/A self _running False N/A run N/A N/A self N/A N/A N/A Run the ZooKeeper instance under a temporary directory.

        Writes ZK log messages to zookeeper.log in the current directory.
         N/A N/A self running N/A N/A N/A config_path N/A N/A N/A os path join N/A self working_path zoo.cfg N/A log_path N/A N/A N/A os path join N/A self working_path log N/A log4j_path N/A N/A N/A os path join N/A self working_path log4j.properties N/A data_path N/A N/A N/A os path join N/A self working_path data N/A N/A N/A N/A N/A os path exists N/A self working_path N/A N/A N/A N/A os mkdir N/A self working_path N/A N/A N/A N/A N/A os path exists log_path N/A N/A N/A N/A os mkdir log_path N/A N/A N/A N/A N/A os path exists data_path N/A N/A N/A N/A os mkdir data_path N/A N/A open config_path w config N/A N/A N/A N/A config write N/A 
tickTime=2000
dataDir=%s
clientPort=%s
maxClientCnxns=0
admin.serverPort=%s
 N/A N/A to_java_compatible_path data_path N/A N/A self server_info client_port N/A N/A self server_info admin_port N/A N/A self peers N/A N/A servers_cfg N/A N/A p N/A chain N/A N/A self server_info N/A self peers N/A N/A N/A N/A servers_cfg append N/A server.%s=localhost:%s:%s N/A N/A p server_id N/A p leader_port N/A p election_port N/A N/A open config_path a config N/A N/A N/A N/A config write N/A 
initLimit=4
syncLimit=2
%s
 N/A N/A join servers_cfg N/A N/A open N/A N/A N/A os path join data_path myid w myid_file N/A N/A N/A N/A myid_file write N/A str N/A N/A self server_info server_id N/A N/A open log4j_path w log4j N/A N/A N/A N/A log4j write N/A 
# DEFAULT: console appender only
log4j.rootLogger=INFO, ROLLINGFILE
log4j.appender.ROLLINGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.ROLLINGFILE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L] - %m%n
log4j.appender.ROLLINGFILE=org.apache.log4j.RollingFileAppender
log4j.appender.ROLLINGFILE.Threshold=DEBUG
log4j.appender.ROLLINGFILE.File= N/A to_java_compatible_path N/A N/A N/A self working_path N/A os sep zookeeper.log
 N/A args N/A java -cp N/A self classpath -Dreadonlymode.enabled=true N/A -Dzookeeper.log.dir=%s log_path -Dzookeeper.root.logger=INFO,CONSOLE N/A -Dlog4j.configuration=file:%s log4j_path -Djava.awt.headless=true org.apache.zookeeper.server.quorum.QuorumPeerMain config_path N/A N/A self process N/A N/A subprocess Popen args args N/A N/A N/A log info Started zookeeper process %s using args %s N/A N/A self process pid args N/A N/A self _running True N/A classpath N/A N/A self N/A N/A N/A Get the classpath necessary to run ZooKeeper. N/A N/A self _classpath N/A N/A N/A self _classpath N/A jars N/A glob N/A N/A N/A os path join N/A self install_path zookeeper-*.jar N/A jars N/A N/A N/A N/A jars extend N/A glob N/A N/A N/A os path join N/A self install_path lib/*.jar N/A N/A N/A jars extend N/A glob N/A N/A N/A os path join N/A self install_path log4j-*.jar N/A N/A N/A jars extend N/A glob N/A N/A N/A os path join N/A self install_path slf4j-api-*.jar N/A N/A N/A jars extend N/A glob N/A N/A N/A os path join N/A self install_path slf4j-log4j-*.jar N/A N/A jars N/A glob N/A N/A N/A os path join N/A self install_path build/zookeeper-*.jar N/A N/A N/A jars extend N/A glob N/A N/A N/A os path join N/A self install_path build/lib/*.jar N/A N/A N/A N/A os pathsep join jars N/A property address N/A N/A self N/A N/A N/A Get the address of the ZooKeeper instance. N/A N/A %s:%s N/A N/A self host N/A self client_port N/A property running N/A N/A self N/A N/A N/A N/A self _running N/A property client_port N/A N/A self N/A N/A N/A N/A N/A self server_info client_port N/A property reset N/A N/A self N/A N/A N/A Stop the zookeeper instance, cleaning out its on disk-data. N/A N/A N/A self stop N/A N/A N/A shutil rmtree N/A N/A N/A os path join N/A self working_path data True N/A N/A N/A os mkdir N/A N/A N/A os path join N/A self working_path data N/A N/A open N/A N/A N/A os path join N/A self working_path data myid w fh N/A N/A N/A N/A fh write N/A str N/A N/A self server_info server_id N/A stop N/A N/A self N/A N/A N/A Stop the Zookeeper instance, retaining on disk state. N/A N/A N/A self running N/A N/A N/A N/A N/A N/A self process terminate N/A N/A N/A N/A self process wait N/A N/A N/A N/A self process returncode 0 N/A N/A N/A N/A log warn Zookeeper process %s failed to terminate with non-zero return code (it terminated with %s return code instead) N/A N/A self process pid N/A N/A self process returncode N/A N/A self _running False N/A destroy N/A N/A self N/A N/A N/A Stop the ZooKeeper instance and destroy its on disk-state N/A N/A N/A self stop N/A N/A N/A shutil rmtree N/A self working_path True N/A N/A ZookeeperCluster N/A object N/A __init__ N/A N/A self install_path classpath size port_offset N/A None None 3 20000 N/A N/A N/A self _install_path install_path N/A N/A self _classpath classpath N/A N/A self _servers N/A N/A port port_offset N/A peers N/A N/A i N/A range size N/A N/A info N/A ServerInfo N/A i 1 port N/A port 1 N/A port 2 N/A port 3 N/A N/A N/A peers append info N/A port 10 N/A i N/A range size N/A N/A server_peers N/A list peers N/A server_info N/A N/A server_peers pop i N/A N/A N/A N/A self _servers append N/A ManagedZooKeeper N/A self _install_path server_info server_peers classpath N/A self _classpath N/A __getitem__ N/A N/A self k N/A N/A N/A N/A N/A self _servers N/A k N/A __iter__ N/A N/A self N/A N/A N/A N/A iter N/A self _servers N/A start N/A N/A self N/A N/A N/A server N/A reversed N/A list self N/A N/A N/A N/A server run N/A time N/A N/A N/A time sleep 2 N/A stop N/A N/A self N/A N/A N/A server self N/A N/A N/A N/A server stop N/A N/A self _servers N/A N/A terminate N/A N/A self N/A N/A N/A server self N/A N/A N/A N/A server destroy N/A reset N/A N/A self N/A N/A N/A server self N/A N/A N/A N/A server reset N/A N/A