1
请帮我解决问题。我使用Ubuntu 14.04,Java 8,Cassandra 2.1.3。对不起,我是初学者。如何从dir提取和反序列化commitLog:/ var/lib/cassandra/commitlog? 据我了解,我们可能会使用lib for Maven cassandra-all,方法CommitLogReplayer.recover在哪里?如果我开始恢复commitLog,例如:Cassandra 2.1.3。如何提取CommitLog
CommitLogReplayer.recover(new File("/var/lib/cassandra/commitlog/CommitLog-4-1453270991708.log"));
我得到异常:
Expecting URI in variable: [cassandra.config]. Please prefix the file with file:/// for local files or file://<server>/ for remote files. Aborting. If you are executing this from an external tool, it needs to set Config.setClientMode(true) to avoid loading configuration.
Fatal configuration error; unable to start. See log for stacktrace.
Config.setClientMode(true);
- 不要帮我。
我错了什么?
谢谢克里斯!如果我理解正确的C * src的标准方法不帮我解决这个任务?我需要用我的解决方案覆盖或重写这些方法? – Javis
正确,如果您尝试检查提交日志的内容,则没有内置任何内容来执行此操作。如果您只想恢复提交日志,请结帐https://docs.datastax.com/en/cassandra/2.1/cassandra/configuration/configLogArchive_t.html。您可以设置还原选项并重新启动节点以在节点上重播它们。 –
感谢您的帮助克里斯!我会考虑换一种解决方案。 – Javis