List of usage examples for org.apache.cassandra.db.commitlog CommitLog resetUnsafe
@VisibleForTesting synchronized public int resetUnsafe(boolean deleteSegments) throws IOException
From source file:org.springframework.cassandra.test.integration.EmbeddedCassandraServerHelper.java
License:Apache License
private static void cleanupAndRecreateDirectories() throws IOException { createCassandraDirectories();/*from w w w. j a va2 s .c o m*/ cleanup(); createCassandraDirectories(); CommitLog commitLog = CommitLog.instance; commitLog.getContext(); // 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.cassandra.test.util.EmbeddedCassandraServerHelper.java
License:Apache License
private static void cleanupAndRecreateDirectories() throws IOException { DatabaseDescriptor.daemonInitialization(); createCassandraDirectories();/*from w ww .j a va 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 }
From source file:org.springframework.data.cql.EmbeddedCassandraServerHelper.java
License:Apache License
private static void cleanupAndRecreateDirectories() throws IOException { DatabaseDescriptor.daemonInitialization(); createCassandraDirectories();// www. 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 }