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