List of usage examples for org.apache.cassandra.db.commitlog CommitLog getCurrentPosition
public CommitLogPosition getCurrentPosition()
From source file:org.springframework.data.cassandra.test.util.EmbeddedCassandraServerHelper.java
License:Apache License
private static void cleanupAndRecreateDirectories() throws IOException { DatabaseDescriptor.daemonInitialization(); createCassandraDirectories();/*w w w . j a v a 2s . c om*/ cleanup(); createCassandraDirectories(); CommitLog commitLog = CommitLog.instance; commitLog.getCurrentPosition(); // wait for commit log allocator instantiation to avoid hanging on a race condition commitLog.resetUnsafe(true); // cleanup screws w/ CommitLog, this brings it back to safe state }
From source file:org.springframework.data.cql.EmbeddedCassandraServerHelper.java
License:Apache License
private static void cleanupAndRecreateDirectories() throws IOException { DatabaseDescriptor.daemonInitialization(); createCassandraDirectories();//from ww w.ja v a 2 s. c om cleanup(); createCassandraDirectories(); CommitLog commitLog = CommitLog.instance; commitLog.getCurrentPosition(); // wait for commit log allocator instantiation to avoid hanging on a race condition commitLog.resetUnsafe(true); // cleanup screws w/ CommitLog, this brings it back to safe state }