我在Windows机器上运行了2节点测试集群。
复制因子:2
Cassandra版本:3.10
出于某种原因, - validate 或 - 预览标志的 nodetool repair 命令根本没有执行,看起来像解析错误。我不确定它是否与Windows连接或我做错了什么。以下是验证标记的结果(预览标记收到类似结果):
C:\apache-cassandra\bin>nodetool repair --validate
nodetool: Keyspace [--validate] does not exist.
C:\apache-cassandra\bin>nodetool repair TSDB --validate
[2018-02-13 19:03:49,474] Unknown keyspace/cf pair (TSDB.--validate)
[2018-02-13 19:03:49,475] Repair command #13 finished with error
error: Repair job has failed with the error message: [2018-02-13 19:03:49,474] Unknown keyspace/cf pair (TSDB
.--validate)
-- StackTrace --
java.lang.RuntimeException: Repair job has failed with the error message: [2018-02-13 19:03:49,474] Unknown k
eyspace/cf pair (TSDB.--validate)
at org.apache.cassandra.tools.RepairRunner.progress(RepairRunner.java:116)
at org.apache.cassandra.utils.progress.jmx.JMXNotificationProgressListener.handleNotification(JMXNoti
ficationProgressListener.java:77)
at com.sun.jmx.remote.internal.ClientNotifForwarder$NotifFetcher.dispatchNotification(Unknown Source)
at com.sun.jmx.remote.internal.ClientNotifForwarder$NotifFetcher.doRun(Unknown Source)
at com.sun.jmx.remote.internal.ClientNotifForwarder$NotifFetcher.run(Unknown Source)
at com.sun.jmx.remote.internal.ClientNotifForwarder$LinearExecutor$1.run(Unknown Source)
C:\apache-cassandra\bin>nodetool repair TSDB snapshots --validate
[2018-02-13 19:04:05,185] Unknown keyspace/cf pair (TSDB.--validate)
[2018-02-13 19:04:05,186] Repair command #14 finished with error
error: Repair job has failed with the error message: [2018-02-13 19:04:05,185] Unknown keyspace/cf pair (TSDB
.--validate)
-- StackTrace --
java.lang.RuntimeException: Repair job has failed with the error message: [2018-02-13 19:04:05,185] Unknown k
eyspace/cf pair (TSDB.--validate)
at org.apache.cassandra.tools.RepairRunner.progress(RepairRunner.java:116)
at org.apache.cassandra.utils.progress.jmx.JMXNotificationProgressListener.handleNotification(JMXNoti
ficationProgressListener.java:77)
at com.sun.jmx.remote.internal.ClientNotifForwarder$NotifFetcher.dispatchNotification(Unknown Source)
at com.sun.jmx.remote.internal.ClientNotifForwarder$NotifFetcher.doRun(Unknown Source)
at com.sun.jmx.remote.internal.ClientNotifForwarder$NotifFetcher.run(Unknown Source)
at com.sun.jmx.remote.internal.ClientNotifForwarder$LinearExecutor$1.run(Unknown Source)
如何克服此错误并在修复前启动验证?
答案 0 :(得分:1)
此版本中没有--validate
和--preview
选项。直到4.0。验证修复会自动发生,作为您不需要指定的修复的一部分。你不能单独运行它来测试一致性。