mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
better
This commit is contained in:
parent
d07b3763ef
commit
1f8d43235f
@ -1186,6 +1186,15 @@ class ClickHouseCluster:
|
||||
if self.with_zookeeper and self.base_zookeeper_cmd:
|
||||
logging.debug('Setup ZooKeeper')
|
||||
logging.debug(f'Creating internal ZooKeeper dirs: {self.zookeeper_dirs_to_create}')
|
||||
if self.use_keeper:
|
||||
for i in range(1,4):
|
||||
if os.path.exists(self.keeper_instance_dir_prefix + f"{i}"):
|
||||
shutil.rmtree(self.keeper_instance_dir_prefix + f"{i}")
|
||||
else:
|
||||
for i in range(1,3):
|
||||
if os.path.exists(self.zookeeper_instance_dir_prefix + f"{i}"):
|
||||
shutil.rmtree(self.zookeeper_instance_dir_prefix + f"{i}")
|
||||
|
||||
for dir in self.zookeeper_dirs_to_create:
|
||||
os.makedirs(dir)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user