我有这个zookeeper配置:
texture_size
我的autopurge.snapRetainCount=10
autopurge.purgeInterval=1
snapCount=3000000
目录很大,没有/opt/zookeeper-3.4.11/data
发生。
我尝试用autopurge
清理这个混乱,但它什么也没做。
zkCleanup.sh
我的zkCleanup.sh https://pastebin.com/Q9XSpSfz
UPD:从新的动物园清理脚本中记录:
sysadmin@clickhouse-node1:/opt/zookeeper-3.4.11/bin$ ls /opt/zookeeper-3.4.11/data/version-2/ | wc -l
18
sysadmin@clickhouse-node1:/opt/zookeeper-3.4.11/bin$ ./zkCleanup.sh -n 10
sysadmin@clickhouse-node1:/opt/zookeeper-3.4.11/bin$ ls /opt/zookeeper-3.4.11/data/version-2/ | wc -l
18
sysadmin@clickhouse-node1:/opt/zookeeper-3.4.11$ ls data/version-2/
log.9028ed00e log.902eafb66 log.903362dcb log.90374bde5 log.903b5f685 log.903f8e16a log.b000000a8 log.b004d4eac log.b0083c3e1
log.902b9c065 log.9030ece30 log.903590e4a log.90395a935 log.903d9b0f0 log.90421e5d6 log.b002462e2 log.b0068bba3 log.b00a38f08
什么也没发生
知道如何解决这个问题吗?
答案 0 :(得分:1)
dataDir
中的 dataLogDir
和conf/zoo.cfg
是相对路径,以下说明可能有所帮助:
cd /opt/zookeeper-3.4.11
./bin/zkCleanup.sh -n 10
然后您可以看到输出:
Removing file: Mar 15, 2018 1:57:16 PM data/log/version-2/log.9028ed00e
Removing file: Mar 12, 2018 5:33:11 PM data/log/version-2/log.902eafb66
答案 1 :(得分:0)
https://clickhouse.yandex/docs/en/operations/tips/#zookeeper Clickhouse需要zookeper 3.5 +
答案 2 :(得分:0)
这是3.4.11 docker image https://github.com/apache/zookeeper/pull/475
中zkCleanup.sh中的错误简单修复是从
编辑zkCleanup.shorg.apache.zookeeper.server.PurgeTxnLog“$ ZOODATALOGDIR”“$ ZOODATADIR”$ *
到
org.apache.zookeeper.server.PurgeTxnLog“$ ZOODATADIR”“$ ZOODATALOGDIR”$ *