@Test public void testSingleWriteThenRead() throws IOException { final PartitionedWriteAheadEventStore store = new PartitionedWriteAheadEventStore(createConfig(), writerFactory, readerFactory, EventReporter.NO_OP, new EventFileManager()); store.initialize(); assertEquals(-1, store.getMaxEventId()); final ProvenanceEventRecord event1 = createEvent(); final StorageResult result = store.addEvents(Collections.singleton(event1)); final StorageSummary summary = result.getStorageLocations().values().iterator().next(); final long eventId = summary.getEventId(); final ProvenanceEventRecord eventWithId = addId(event1, eventId); assertEquals(0, store.getMaxEventId()); final ProvenanceEventRecord read = store.getEvent(eventId).get(); assertEquals(eventWithId, read); }
@Override public void initialize() throws IOException { if (repoConfig.isCompressOnRollover()) { for (int i = 0; i < repoConfig.getIndexThreadPoolSize(); i++) { final EventFileCompressor compressor = new EventFileCompressor(filesToCompress, fileManager); compressionExecutor.submit(compressor); fileCompressors.add(compressor); } } super.initialize(); }
PartitionedWriteAheadEventStore extends PartitionedEventStore { @Override public void initialize() throws IOException { if (repoConfig.isCompressOnRollover()) { for (int i = 0; i < repoConfig.getIndexThreadPoolSize(); i++) { final EventFileCompressor compressor = new EventFileCompressor(filesToCompress, fileManager); compressionExecutor.submit(compressor); fileCompressors.add(compressor); } } super.initialize(); } }
PartitionedWriteAheadEventStore extends PartitionedEventStore { @Override public void initialize() throws IOException { if (repoConfig.isCompressOnRollover()) { for (int i = 0; i < repoConfig.getIndexThreadPoolSize(); i++) { final EventFileCompressor compressor = new EventFileCompressor(filesToCompress, fileManager); compressionExecutor.submit(compressor); fileCompressors.add(compressor); } } super.initialize(); } PartitionedWriteAheadEventStore(final RepositoryConfiguration repoConfig, final RecordWriterFactory recordWriterFactory,
        final RecordReaderFactory recordReaderFactory, final EventReporter eventReporter, final EventFileManager fileManager); }
PartitionedWriteAheadEventStore extends PartitionedEventStore { @Override public void initialize() throws IOException { if (repoConfig.isCompressOnRollover()) { for (int i = 0; i < repoConfig.getIndexThreadPoolSize(); i++) { final EventFileCompressor compressor = new EventFileCompressor(filesToCompress, fileManager); compressionExecutor.submit(compressor); fileCompressors.add(compressor); } } super.initialize(); } PartitionedWriteAheadEventStore(final RepositoryConfiguration repoConfig, final RecordWriterFactory recordWriterFactory,
        final RecordReaderFactory recordReaderFactory, final EventReporter eventReporter, final EventFileManager fileManager); @Override void initialize(); @Override void close(); @Override void reindexLatestEvents(final EventIndex eventIndex); }
PartitionedWriteAheadEventStore extends PartitionedEventStore { @Override public void initialize() throws IOException { if (repoConfig.isCompressOnRollover()) { for (int i = 0; i < repoConfig.getIndexThreadPoolSize(); i++) { final EventFileCompressor compressor = new EventFileCompressor(filesToCompress, fileManager); compressionExecutor.submit(compressor); fileCompressors.add(compressor); } } super.initialize(); } PartitionedWriteAheadEventStore(final RepositoryConfiguration repoConfig, final RecordWriterFactory recordWriterFactory,
        final RecordReaderFactory recordReaderFactory, final EventReporter eventReporter, final EventFileManager fileManager); @Override void initialize(); @Override void close(); @Override void reindexLatestEvents(final EventIndex eventIndex);  }