@Test @Ignore public void testPerformanceOfAccessingEvents() throws Exception { final RecordWriterFactory recordWriterFactory = (file, idGenerator, compressed, createToc) -> { final TocWriter tocWriter = createToc ? new StandardTocWriter(TocUtil.getTocFile(file), false, false) : null; return new EventIdFirstSchemaRecordWriter(file, idGenerator, tocWriter, compressed, 1024 * 1024, IdentifierLookup.EMPTY); }; final RecordReaderFactory recordReaderFactory = (file, logs, maxChars) -> RecordReaders.newRecordReader(file, logs, maxChars); final PartitionedWriteAheadEventStore store = new PartitionedWriteAheadEventStore(createConfig(), recordWriterFactory, recordReaderFactory, EventReporter.NO_OP, new EventFileManager()); store.initialize(); assertEquals(-1, store.getMaxEventId()); for (int i = 0; i < 100_000; i++) { final ProvenanceEventRecord event1 = createEvent(); store.addEvents(Collections.singleton(event1)); } final List<Long> eventIdList = Arrays.asList(4L, 80L, 1024L, 40_000L, 80_000L, 99_000L); while (true) { for (int i = 0; i < 100; i++) { time(() -> store.getEvents(eventIdList, EventAuthorizer.GRANT_ALL, EventTransformer.EMPTY_TRANSFORMER), "Fetch Events"); } Thread.sleep(1000L); } }
@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);  }