@Test public void testGetEvent() throws IOException { final RepositoryConfiguration config = createConfig(); final PartitionedWriteAheadEventStore store = new PartitionedWriteAheadEventStore(config, writerFactory, readerFactory, EventReporter.NO_OP, new EventFileManager()); store.initialize(); final int numEvents = 20; final List<ProvenanceEventRecord> events = new ArrayList<>(numEvents); for (int i = 0; i < numEvents; i++) { final ProvenanceEventRecord event = createEvent(); store.addEvents(Collections.singleton(event)); events.add(event); } for (int i = 0; i < numEvents; i++) { final ProvenanceEventRecord event = store.getEvent(i).get(); assertEquals(events.get(i), event); } assertFalse(store.getEvent(-1L).isPresent()); assertFalse(store.getEvent(20L).isPresent()); }
@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);  }