分布式调度框架。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

17 lines
417 B

import time
import sys
from kazoo.client import KazooClient
class ZkClient:
def __init__(self):
self.zk = KazooClient(hosts=sys.argv[1])
self.zk.start()
def del_node(self):
self.zk.delete(sys.argv[2], recursive=True)
print('deleted success')
def __del__(self):
self.zk.stop()
if __name__ == '__main__':
zkclient = ZkClient()
zkclient.del_node()
time.sleep(2)