Edge for Private Cloud v. 4.16.09
反熵维护
Apache Cassandra 环节点需要定期维护,以确保所有节点之间的一致性。如需执行此维护,请使用 Cassandra“nodetool -h localhost repair”命令。
在单区域或单数据中心 Apigee 安装中,在一个 Cassandra 节点上使用命令“nodetool -h localhost repair”,以确保环中所有节点的一致性。在多区域或多数据中心 Apigee 安装中,在环中的每个节点(跨所有区域或数据中心)上使用“nodetool -h localhost repair -pr”。
如需详细了解“被遗忘的删除”和 Cassandra 一致性,以及如何使用“nodetool”,请参阅:
http://wiki.apache.org/cassandra/Operations - Consistency
重要提示:Apigee 不建议在未联系 Apigee Customer Success 的情况下添加、移动或移除 Cassandra 节点。Apigee 系统会使用 Cassandra 节点的 IP 地址跟踪这些节点,如果在执行环维护时未在 Apigee 环境元数据上执行相应更新,则会导致不良结果。
日志文件维护
Cassandra 日志存储在每个节点上的 /<inst_root>/apigee/var/log/cassandra 目录中。默认情况下,最多可以创建 50 个日志文件,每个文件的大小上限为 20 MB;达到此上限后,系统会在创建新日志时删除旧日志。
如果您发现 Cassandra 日志文件占用过多空间,可以通过修改 log4j 设置来修改为日志文件分配的空间量。
- 修改 /<install_dir>/apigee/customer/application/cassandra.properties 以设置以下属性。如果该文件不存在,请创建它:
conf_log4j-server_log4j.appender.r.maxfilesize=20MB # max file size
conf_log4j-server_log4j.appender.r.maxbackupindex=50 # max open files - 使用以下命令重启 Cassandra:
$ /<install_dir>/apigee/apigee-service/bin/apigee-service apigee-cassandra restart