本文整理汇总了Python中utils.zk_teardown函数的典型用法代码示例。如果您正苦于以下问题:Python zk_teardown函数的具体用法?Python zk_teardown怎么用?Python zk_teardown使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zk_teardown函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: tearDownModule
def tearDownModule():
if utils.options.skip_teardown:
return
utils.zk_teardown()
utils.kill_sub_processes()
utils.remove_tmp_files()
示例2: teardown
def teardown():
if utils.options.skip_teardown:
return
teardown_procs = [
shard_0_master.teardown_mysql(),
shard_0_replica.teardown_mysql(),
shard_1_master.teardown_mysql(),
shard_1_replica.teardown_mysql(),
shard_2_master.teardown_mysql(),
shard_2_replica.teardown_mysql(),
shard_3_master.teardown_mysql(),
shard_3_replica.teardown_mysql(),
]
utils.wait_procs(teardown_procs, raise_on_error=False)
utils.zk_teardown()
utils.kill_sub_processes()
utils.remove_tmp_files()
shard_0_master.remove_tree()
shard_0_replica.remove_tree()
shard_1_master.remove_tree()
shard_1_replica.remove_tree()
shard_2_master.remove_tree()
shard_2_replica.remove_tree()
shard_3_master.remove_tree()
shard_3_replica.remove_tree()
示例3: teardown
def teardown():
if utils.options.skip_teardown:
return
teardown_procs = [
tablet_62344.teardown_mysql(),
tablet_62044.teardown_mysql(),
tablet_41983.teardown_mysql(),
tablet_31981.teardown_mysql(),
]
utils.wait_procs(teardown_procs, raise_on_error=False)
utils.zk_teardown()
utils.kill_sub_processes()
utils.remove_tmp_files()
tablet_62344.remove_tree()
tablet_62044.remove_tree()
tablet_41983.remove_tree()
tablet_31981.remove_tree()
path = os.path.join(utils.vtdataroot, 'snapshot')
try:
shutil.rmtree(path)
except OSError as e:
if utils.options.verbose:
print >> sys.stderr, e, path
示例4: tearDownModule
def tearDownModule():
logging.debug("in tearDownModule")
if utils.options.skip_teardown:
return
logging.debug("Tearing down the servers and setup")
teardown_procs = [shard_0_master.teardown_mysql(),
shard_0_replica.teardown_mysql(),
shard_1_master.teardown_mysql(),
shard_1_replica.teardown_mysql(),
]
utils.wait_procs(teardown_procs, raise_on_error=False)
utils.zk_teardown()
shard_0_master.kill_vttablet()
shard_0_replica.kill_vttablet()
shard_1_master.kill_vttablet()
shard_1_replica.kill_vttablet()
utils.kill_sub_processes()
utils.remove_tmp_files()
shard_0_master.remove_tree()
shard_0_replica.remove_tree()
shard_1_master.remove_tree()
shard_1_replica.remove_tree()
示例5: tearDownModule
def tearDownModule():
if utils.options.skip_teardown:
return
teardown_procs = [
tablet_62344.teardown_mysql(),
tablet_62044.teardown_mysql(),
tablet_41983.teardown_mysql(),
tablet_31981.teardown_mysql(),
]
utils.wait_procs(teardown_procs, raise_on_error=False)
utils.zk_teardown()
utils.kill_sub_processes()
utils.remove_tmp_files()
tablet_62344.remove_tree()
tablet_62044.remove_tree()
tablet_41983.remove_tree()
tablet_31981.remove_tree()
path = os.path.join(utils.vtdataroot, 'snapshot')
try:
shutil.rmtree(path)
except OSError as e:
logging.debug("removing snapshot %s: %s", path, str(e))
示例6: tearDownModule
def tearDownModule():
if utils.options.skip_teardown:
return
teardown_procs = [
shard_0_master.teardown_mysql(),
shard_0_replica1.teardown_mysql(),
shard_0_replica2.teardown_mysql(),
shard_0_rdonly.teardown_mysql(),
shard_0_backup.teardown_mysql(),
shard_1_master.teardown_mysql(),
shard_1_replica1.teardown_mysql(),
]
utils.wait_procs(teardown_procs, raise_on_error=False)
utils.zk_teardown()
utils.kill_sub_processes()
utils.remove_tmp_files()
shard_0_master.remove_tree()
shard_0_replica1.remove_tree()
shard_0_replica2.remove_tree()
shard_0_rdonly.remove_tree()
shard_0_backup.remove_tree()
shard_1_master.remove_tree()
shard_1_replica1.remove_tree()
示例7: tearDown
def tearDown(self):
self.tablet.kill_vttablet()
try:
utils.wait_procs([self.tablet.teardown_mysql()])
except:
# FIXME: remove
pass
if getattr(self, "txlogger", None):
self.txlogger.terminate()
utils.zk_teardown()
utils.kill_sub_processes()
utils.remove_tmp_files()
示例8: tearDownModule
def tearDownModule():
if utils.options.skip_teardown:
return
teardown_procs = [t.teardown_mysql() for t in tablets]
utils.wait_procs(teardown_procs, raise_on_error=False)
utils.zk_teardown()
utils.kill_sub_processes()
utils.remove_tmp_files()
for t in tablets:
t.remove_tree()
示例9: tearDownModule
def tearDownModule():
if utils.options.skip_teardown:
return
logging.debug("Tearing down the servers and setup")
teardown_procs = [master_tablet.teardown_mysql(), replica_tablet.teardown_mysql()]
utils.wait_procs(teardown_procs, raise_on_error=False)
utils.zk_teardown()
utils.kill_sub_processes()
utils.remove_tmp_files()
master_tablet.kill_vttablet()
replica_tablet.kill_vttablet()
master_tablet.remove_tree()
replica_tablet.remove_tree()
示例10: tearDownModule
def tearDownModule():
if utils.options.skip_teardown:
return
shard_0_master.kill_vttablet()
shard_0_slave.kill_vttablet()
teardown_procs = [
shard_0_master.teardown_mysql(),
shard_0_slave.teardown_mysql(),
]
utils.wait_procs(teardown_procs, raise_on_error=False)
utils.zk_teardown()
utils.kill_sub_processes()
utils.remove_tmp_files()
shard_0_master.remove_tree()
shard_0_slave.remove_tree()
示例11: tearDown
def tearDown(self):
try:
self.tablet.kill_vttablet()
except AttributeError:
print "Not killing vttablet - it wasn't running."
try:
utils.wait_procs([self.tablet.teardown_mysql()])
except:
# FIXME: remove
pass
if getattr(self, "txlogger", None):
self.txlogger.terminate()
utils.zk_teardown()
utils.kill_sub_processes()
utils.remove_tmp_files()
# self.tablet.remove_tree()
if getattr(self, "memcached", None):
self.memcached.terminate()