use of org.neo4j.causalclustering.core.consensus.log.DummyRaftableContentSerializer in project neo4j by neo4j.
the class SegmentedRaftLogVerificationIT method createRaftLog.
@Override
protected RaftLog createRaftLog() throws Throwable {
FileSystemAbstraction fsa = fsRule.get();
File directory = new File(RAFT_LOG_DIRECTORY_NAME);
fsa.mkdir(directory);
long rotateAtSizeBytes = 128;
int readerPoolSize = 8;
LogProvider logProvider = getInstance();
CoreLogPruningStrategy pruningStrategy = new CoreLogPruningStrategyFactory(raft_log_pruning_strategy.getDefaultValue(), logProvider).newInstance();
SegmentedRaftLog newRaftLog = new SegmentedRaftLog(fsa, directory, rotateAtSizeBytes, new DummyRaftableContentSerializer(), logProvider, readerPoolSize, Clocks.systemClock(), new OnDemandJobScheduler(), pruningStrategy);
newRaftLog.init();
newRaftLog.start();
return newRaftLog;
}
use of org.neo4j.causalclustering.core.consensus.log.DummyRaftableContentSerializer in project neo4j by neo4j.
the class SegmentedRaftLogContractTest method createRaftLog.
@Override
public RaftLog createRaftLog() {
File directory = new File(RAFT_LOG_DIRECTORY_NAME);
FileSystemAbstraction fileSystem = fsRule.get();
fileSystem.mkdir(directory);
LogProvider logProvider = getInstance();
CoreLogPruningStrategy pruningStrategy = new CoreLogPruningStrategyFactory("1 entries", logProvider).newInstance();
return life.add(new SegmentedRaftLog(fileSystem, directory, 1024, new DummyRaftableContentSerializer(), logProvider, 8, Clocks.fakeClock(), new OnDemandJobScheduler(), pruningStrategy));
}
use of org.neo4j.causalclustering.core.consensus.log.DummyRaftableContentSerializer in project neo4j by neo4j.
the class SegmentedConcurrentStressIT method createRaftLog.
@Override
public SegmentedRaftLog createRaftLog(FileSystemAbstraction fsa, File dir) throws Throwable {
long rotateAtSize = 8 * 1024 * 1024;
LogProvider logProvider = getInstance();
int readerPoolSize = 8;
CoreLogPruningStrategy pruningStrategy = new CoreLogPruningStrategyFactory(raft_log_pruning_strategy.getDefaultValue(), logProvider).newInstance();
SegmentedRaftLog raftLog = new SegmentedRaftLog(fsa, dir, rotateAtSize, new DummyRaftableContentSerializer(), logProvider, readerPoolSize, Clocks.fakeClock(), new OnDemandJobScheduler(), pruningStrategy);
raftLog.start();
return raftLog;
}
use of org.neo4j.causalclustering.core.consensus.log.DummyRaftableContentSerializer in project neo4j by neo4j.
the class SegmentedRaftLogCursorIT method createRaftLog.
private SegmentedRaftLog createRaftLog(long rotateAtSize, String pruneStrategy) {
if (fileSystem == null) {
fileSystem = new EphemeralFileSystemAbstraction();
}
File directory = new File(RAFT_LOG_DIRECTORY_NAME);
fileSystem.mkdir(directory);
LogProvider logProvider = getInstance();
CoreLogPruningStrategy pruningStrategy = new CoreLogPruningStrategyFactory(pruneStrategy, logProvider).newInstance();
SegmentedRaftLog newRaftLog = new SegmentedRaftLog(fileSystem, directory, rotateAtSize, new DummyRaftableContentSerializer(), logProvider, 8, Clocks.systemClock(), new OnDemandJobScheduler(), pruningStrategy);
life.add(newRaftLog);
life.init();
life.start();
return newRaftLog;
}
use of org.neo4j.causalclustering.core.consensus.log.DummyRaftableContentSerializer in project neo4j by neo4j.
the class SegmentedRaftLogRotationTest method createRaftLog.
private SegmentedRaftLog createRaftLog(long rotateAtSize) throws IOException {
LogProvider logProvider = getInstance();
CoreLogPruningStrategy pruningStrategy = new CoreLogPruningStrategyFactory(raft_log_pruning_strategy.getDefaultValue(), logProvider).newInstance();
return new SegmentedRaftLog(fileSystemRule.get(), testDirectory.directory(), rotateAtSize, new DummyRaftableContentSerializer(), logProvider, 0, Clocks.fakeClock(), new OnDemandJobScheduler(), pruningStrategy);
}
Aggregations