请帮忙解决我的问题。我使用Ubuntu14.04,Java 8,Cassandra2.1.3。对不起我是初学者。如何从dir: /var/lib/cassandra/提交日志中提取和反序列化commitLog?据我所知,我们可以为Maven cassandra使用lib,方法CommitLogReplayer.recover在哪里?例如,如果我开始恢复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); -别帮我。
我错了什么?
发布于 2016-01-20 16:52:40
使用setClientMode(true),将不会有反序列化数据的上下文,除非您自己创建cf元数据。即使这样,这也是一个非常重要的项目,因为突变的应用与C*紧密耦合在一起。这就是说,这不是不可能的,但你将无法使用CommitLogReplayer,因为它试图应用突变。不过,这是一个很好的开始编写自己的东西的地方(直到CommitLogReplayer.replayMutation,您可以重用很多)。
https://stackoverflow.com/questions/34904660
复制相似问题