Search in sources :

Example 36 with Catalog

use of io.aeron.archive.Catalog in project aeron by real-logic.

the class ArchiveToolTests method checksumAllSegmentFile.

@Test
void checksumAllSegmentFile() {
    checksum(out, archiveDir, true, crc32(), epochClock);
    assertFalse(verify(out, archiveDir, allOf(VerifyOption.class), crc32(), epochClock, (file) -> false));
    try (Catalog catalog = openCatalogReadOnly(archiveDir, epochClock)) {
        assertRecording(catalog, validRecording0, VALID, 356725588, 0, TERM_LENGTH + 64, 15, 100, 0, 2, "ch2", "src2");
        assertRecording(catalog, validRecording1, VALID, -1571032591, 1024, 1024, 16, 200, 0, 2, "ch2", "src2");
        assertRecording(catalog, validRecording2, VALID, 114203747, TERM_LENGTH * 3 + 96, TERM_LENGTH * 3 + 96, 17, 300, 0, 2, "ch2", "src2");
        assertRecording(catalog, validRecording3, VALID, 963969455, 7 * TERM_LENGTH + 96, 11 * TERM_LENGTH + 320, 18, 400, 7, 13, "ch2", "src2");
        assertRecording(catalog, validRecording4, INVALID, 162247708, 21 * TERM_LENGTH + (TERM_LENGTH - 64), 22 * TERM_LENGTH + 992, 19, 1, -25, 7, "ch2", "src2");
        assertRecording(catalog, validRecording51, VALID, -940881948, 0, 64 + PAGE_SIZE, 20, 777, 0, 20, "ch2", "src2");
        assertRecording(catalog, validRecording6, VALID, -175549265, 352, 960, 23, 700, 0, 6, "ch2", "src2");
    }
}
Also used : ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) Arrays(java.util.Arrays) FRAME_ALIGNMENT(io.aeron.logbuffer.FrameDescriptor.FRAME_ALIGNMENT) RECORDING_SEGMENT_SUFFIX(io.aeron.archive.Archive.Configuration.RECORDING_SEGMENT_SUFFIX) Catalog(io.aeron.archive.Catalog) IoUtil(org.agrona.IoUtil) ByteBuffer(java.nio.ByteBuffer) ArrayList(java.util.ArrayList) READ(java.nio.file.StandardOpenOption.READ) ByteBuffer.allocate(java.nio.ByteBuffer.allocate) Files.createTempDirectory(java.nio.file.Files.createTempDirectory) EnumSet.allOf(java.util.EnumSet.allOf) AeronArchive(io.aeron.archive.client.AeronArchive) Path(java.nio.file.Path) WRITE(java.nio.file.StandardOpenOption.WRITE) MethodSource(org.junit.jupiter.params.provider.MethodSource) PrintStream(java.io.PrintStream) MutableBoolean(org.agrona.collections.MutableBoolean) LogBufferDescriptor.positionBitsToShift(io.aeron.logbuffer.LogBufferDescriptor.positionBitsToShift) ArchiveTool(io.aeron.archive.ArchiveTool) Collections.emptySet(java.util.Collections.emptySet) VERIFY_ALL_SEGMENT_FILES(io.aeron.archive.ArchiveTool.VerifyOption.VERIFY_ALL_SEGMENT_FILES) IOException(java.io.IOException) Mockito.times(org.mockito.Mockito.times) Checksum(io.aeron.archive.checksum.Checksum) Arguments(org.junit.jupiter.params.provider.Arguments) File(java.io.File) Mockito(org.mockito.Mockito) INVALID(io.aeron.archive.codecs.RecordingState.INVALID) VALID(io.aeron.archive.codecs.RecordingState.VALID) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) List(java.util.List) Collections.addAll(java.util.Collections.addAll) org.junit.jupiter.api(org.junit.jupiter.api) Executable(org.junit.jupiter.api.function.Executable) APPLY_CHECKSUM(io.aeron.archive.ArchiveTool.VerifyOption.APPLY_CHECKSUM) EnumSet.of(java.util.EnumSet.of) Assertions(org.junit.jupiter.api.Assertions) RecordingState(io.aeron.archive.codecs.RecordingState) EpochClock(org.agrona.concurrent.EpochClock) DataHeaderFlyweight(io.aeron.protocol.DataHeaderFlyweight) Checksums.crc32(io.aeron.archive.checksum.Checksums.crc32) Archive.segmentFileName(io.aeron.archive.Archive.segmentFileName) FileChannel(java.nio.channels.FileChannel) Files.deleteIfExists(java.nio.file.Files.deleteIfExists) LogBufferDescriptor.computeTermIdFromPosition(io.aeron.logbuffer.LogBufferDescriptor.computeTermIdFromPosition) Catalog(io.aeron.archive.Catalog) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 37 with Catalog

use of io.aeron.archive.Catalog in project aeron by real-logic.

the class ArchiveToolTests method checksumRecordingAllSegmentFiles.

@Test
void checksumRecordingAllSegmentFiles() {
    checksumRecording(out, archiveDir, validRecording3, true, crc32(), epochClock);
    assertTrue(verifyRecording(out, archiveDir, validRecording3, allOf(VerifyOption.class), crc32(), epochClock, (file) -> false));
    try (Catalog catalog = openCatalogReadOnly(archiveDir, epochClock)) {
        assertRecording(catalog, validRecording3, VALID, 963969455, 7 * TERM_LENGTH + 96, 11 * TERM_LENGTH + 320, 18, 100, 7, 13, "ch2", "src2");
    }
}
Also used : ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) Arrays(java.util.Arrays) FRAME_ALIGNMENT(io.aeron.logbuffer.FrameDescriptor.FRAME_ALIGNMENT) RECORDING_SEGMENT_SUFFIX(io.aeron.archive.Archive.Configuration.RECORDING_SEGMENT_SUFFIX) Catalog(io.aeron.archive.Catalog) IoUtil(org.agrona.IoUtil) ByteBuffer(java.nio.ByteBuffer) ArrayList(java.util.ArrayList) READ(java.nio.file.StandardOpenOption.READ) ByteBuffer.allocate(java.nio.ByteBuffer.allocate) Files.createTempDirectory(java.nio.file.Files.createTempDirectory) EnumSet.allOf(java.util.EnumSet.allOf) AeronArchive(io.aeron.archive.client.AeronArchive) Path(java.nio.file.Path) WRITE(java.nio.file.StandardOpenOption.WRITE) MethodSource(org.junit.jupiter.params.provider.MethodSource) PrintStream(java.io.PrintStream) MutableBoolean(org.agrona.collections.MutableBoolean) LogBufferDescriptor.positionBitsToShift(io.aeron.logbuffer.LogBufferDescriptor.positionBitsToShift) ArchiveTool(io.aeron.archive.ArchiveTool) Collections.emptySet(java.util.Collections.emptySet) VERIFY_ALL_SEGMENT_FILES(io.aeron.archive.ArchiveTool.VerifyOption.VERIFY_ALL_SEGMENT_FILES) IOException(java.io.IOException) Mockito.times(org.mockito.Mockito.times) Checksum(io.aeron.archive.checksum.Checksum) Arguments(org.junit.jupiter.params.provider.Arguments) File(java.io.File) Mockito(org.mockito.Mockito) INVALID(io.aeron.archive.codecs.RecordingState.INVALID) VALID(io.aeron.archive.codecs.RecordingState.VALID) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) List(java.util.List) Collections.addAll(java.util.Collections.addAll) org.junit.jupiter.api(org.junit.jupiter.api) Executable(org.junit.jupiter.api.function.Executable) APPLY_CHECKSUM(io.aeron.archive.ArchiveTool.VerifyOption.APPLY_CHECKSUM) EnumSet.of(java.util.EnumSet.of) Assertions(org.junit.jupiter.api.Assertions) RecordingState(io.aeron.archive.codecs.RecordingState) EpochClock(org.agrona.concurrent.EpochClock) DataHeaderFlyweight(io.aeron.protocol.DataHeaderFlyweight) Checksums.crc32(io.aeron.archive.checksum.Checksums.crc32) Archive.segmentFileName(io.aeron.archive.Archive.segmentFileName) FileChannel(java.nio.channels.FileChannel) Files.deleteIfExists(java.nio.file.Files.deleteIfExists) LogBufferDescriptor.computeTermIdFromPosition(io.aeron.logbuffer.LogBufferDescriptor.computeTermIdFromPosition) Catalog(io.aeron.archive.Catalog) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 38 with Catalog

use of io.aeron.archive.Catalog in project aeron by real-logic.

the class ArchiveToolTests method verifyAllOptionsTruncateOnPageStraddle.

@Test
void verifyAllOptionsTruncateOnPageStraddle() {
    final Checksum checksum = crc32();
    try (Catalog catalog = openCatalogReadWrite(archiveDir, epochClock, MIN_CAPACITY, checksum, null)) {
        catalog.forEach((recordingDescriptorOffset, headerEncoder, headerDecoder, descriptorEncoder, descriptorDecoder) -> catalog.updateChecksum(recordingDescriptorOffset));
    }
    assertFalse(verify(out, archiveDir, allOf(VerifyOption.class), checksum, epochClock, (file) -> true));
    try (Catalog catalog = openCatalogReadOnly(archiveDir, epochClock)) {
        assertRecording(catalog, invalidRecording0, INVALID, -119969720, NULL_POSITION, NULL_POSITION, 1, NULL_TIMESTAMP, 0, 1, "ch1", "src1");
        assertRecording(catalog, invalidRecording1, INVALID, 768794941, FRAME_ALIGNMENT - 7, NULL_POSITION, 2, NULL_TIMESTAMP, 0, 1, "ch1", "src1");
        assertRecording(catalog, invalidRecording2, INVALID, -1340428433, 1024, FRAME_ALIGNMENT * 2, 3, NULL_TIMESTAMP, 0, 1, "ch1", "src1");
        assertRecording(catalog, invalidRecording3, INVALID, 1464972620, 0, FRAME_ALIGNMENT * 5 + 11, 4, NULL_TIMESTAMP, 0, 1, "ch1", "src1");
        assertRecording(catalog, invalidRecording4, INVALID, 21473288, SEGMENT_LENGTH, NULL_POSITION, 5, NULL_TIMESTAMP, 0, 1, "ch1", "src1");
        assertRecording(catalog, invalidRecording5, INVALID, -2119992405, 0, SEGMENT_LENGTH, 6, NULL_TIMESTAMP, 0, 1, "ch1", "src1");
        assertRecording(catalog, invalidRecording6, INVALID, 2054096463, 0, NULL_POSITION, 7, NULL_TIMESTAMP, 0, 1, "ch1", "src1");
        assertRecording(catalog, invalidRecording7, INVALID, -1050175867, 0, NULL_POSITION, 8, NULL_TIMESTAMP, 0, 1, "ch1", "src1");
        assertRecording(catalog, invalidRecording8, INVALID, -504693275, 0, NULL_POSITION, 9, NULL_TIMESTAMP, 0, 1, "ch1", "src1");
        assertRecording(catalog, invalidRecording9, INVALID, -2036430506, 0, NULL_POSITION, 10, NULL_TIMESTAMP, 0, 1, "ch1", "src1");
        assertRecording(catalog, invalidRecording10, INVALID, -414736820, 128, NULL_POSITION, 11, NULL_TIMESTAMP, 0, 1, "ch1", "src1");
        assertRecording(catalog, invalidRecording11, INVALID, 1983095657, 0, NULL_POSITION, 12, NULL_TIMESTAMP, 5, 1, "ch1", "src1");
        assertRecording(catalog, invalidRecording12, INVALID, -1308504240, 0, NULL_POSITION, 13, NULL_TIMESTAMP, 9, 6, "ch1", "src1");
        assertRecording(catalog, invalidRecording13, INVALID, -273182324, 0, NULL_POSITION, 14, NULL_TIMESTAMP, 0, 13, "ch1", "src1");
        assertRecording(catalog, invalidRecording14, INVALID, 213018412, 128, NULL_POSITION, -14, 41, -14, 0, "ch1", "src1");
        assertRecording(catalog, validRecording0, VALID, 356725588, 0, TERM_LENGTH + 64, 15, 100, 0, 2, "ch2", "src2");
        assertRecording(catalog, validRecording1, VALID, -1571032591, 1024, 1024, 16, 200, 0, 2, "ch2", "src2");
        assertRecording(catalog, validRecording2, VALID, 114203747, TERM_LENGTH * 3 + 96, TERM_LENGTH * 3 + 96, 17, 300, 0, 2, "ch2", "src2");
        assertRecording(catalog, validRecording3, INVALID, 963969455, 7 * TERM_LENGTH + 96, 7 * TERM_LENGTH + 128, 18, NULL_TIMESTAMP, 7, 13, "ch2", "src2");
        assertRecording(catalog, validRecording4, INVALID, 162247708, 21 * TERM_LENGTH + (TERM_LENGTH - 64), 22 * TERM_LENGTH + 992, 19, 1, -25, 7, "ch2", "src2");
        assertRecording(catalog, validRecording51, VALID, -940881948, 0, 64 + PAGE_SIZE, 20, 777, 0, 20, "ch2", "src2");
        assertRecording(catalog, validRecording52, INVALID, 1046083782, 0, NULL_POSITION, 21, NULL_TIMESTAMP, 0, 52, "ch2", "src2");
        assertRecording(catalog, validRecording53, INVALID, 428178649, 0, NULL_POSITION, 22, NULL_TIMESTAMP, 0, 53, "ch2", "src2");
        assertRecording(catalog, validRecording6, VALID, -175549265, 352, 960, 23, 400, 0, 6, "ch2", "src2");
    }
    Mockito.verify(out, times(24)).println(any(String.class));
}
Also used : ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) Arrays(java.util.Arrays) FRAME_ALIGNMENT(io.aeron.logbuffer.FrameDescriptor.FRAME_ALIGNMENT) RECORDING_SEGMENT_SUFFIX(io.aeron.archive.Archive.Configuration.RECORDING_SEGMENT_SUFFIX) Catalog(io.aeron.archive.Catalog) IoUtil(org.agrona.IoUtil) ByteBuffer(java.nio.ByteBuffer) ArrayList(java.util.ArrayList) READ(java.nio.file.StandardOpenOption.READ) ByteBuffer.allocate(java.nio.ByteBuffer.allocate) Files.createTempDirectory(java.nio.file.Files.createTempDirectory) EnumSet.allOf(java.util.EnumSet.allOf) AeronArchive(io.aeron.archive.client.AeronArchive) Path(java.nio.file.Path) WRITE(java.nio.file.StandardOpenOption.WRITE) MethodSource(org.junit.jupiter.params.provider.MethodSource) PrintStream(java.io.PrintStream) MutableBoolean(org.agrona.collections.MutableBoolean) LogBufferDescriptor.positionBitsToShift(io.aeron.logbuffer.LogBufferDescriptor.positionBitsToShift) ArchiveTool(io.aeron.archive.ArchiveTool) Collections.emptySet(java.util.Collections.emptySet) VERIFY_ALL_SEGMENT_FILES(io.aeron.archive.ArchiveTool.VerifyOption.VERIFY_ALL_SEGMENT_FILES) IOException(java.io.IOException) Mockito.times(org.mockito.Mockito.times) Checksum(io.aeron.archive.checksum.Checksum) Arguments(org.junit.jupiter.params.provider.Arguments) File(java.io.File) Mockito(org.mockito.Mockito) INVALID(io.aeron.archive.codecs.RecordingState.INVALID) VALID(io.aeron.archive.codecs.RecordingState.VALID) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) List(java.util.List) Collections.addAll(java.util.Collections.addAll) org.junit.jupiter.api(org.junit.jupiter.api) Executable(org.junit.jupiter.api.function.Executable) APPLY_CHECKSUM(io.aeron.archive.ArchiveTool.VerifyOption.APPLY_CHECKSUM) EnumSet.of(java.util.EnumSet.of) Assertions(org.junit.jupiter.api.Assertions) RecordingState(io.aeron.archive.codecs.RecordingState) EpochClock(org.agrona.concurrent.EpochClock) DataHeaderFlyweight(io.aeron.protocol.DataHeaderFlyweight) Checksums.crc32(io.aeron.archive.checksum.Checksums.crc32) Archive.segmentFileName(io.aeron.archive.Archive.segmentFileName) FileChannel(java.nio.channels.FileChannel) Files.deleteIfExists(java.nio.file.Files.deleteIfExists) LogBufferDescriptor.computeTermIdFromPosition(io.aeron.logbuffer.LogBufferDescriptor.computeTermIdFromPosition) Checksum(io.aeron.archive.checksum.Checksum) Catalog(io.aeron.archive.Catalog) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 39 with Catalog

use of io.aeron.archive.Catalog in project aeron by real-logic.

the class ArchiveToolTests method deleteOrphanedSegmentsDeletesSegmentFilesForAllRecordings.

@Test
void deleteOrphanedSegmentsDeletesSegmentFilesForAllRecordings() throws IOException {
    final long rec1;
    final long rec2;
    try (Catalog catalog = new Catalog(archiveDir, epochClock, 1024, true, null, null)) {
        rec1 = catalog.addNewRecording(0, NULL_POSITION, NULL_TIMESTAMP, NULL_TIMESTAMP, 0, SEGMENT_LENGTH, TERM_LENGTH, MTU_LENGTH, 42, 5, "some ch", "some ch", "rec1");
        rec2 = catalog.addNewRecording(1_000_000, 1024 * 1024 * 1024, NULL_TIMESTAMP, NULL_TIMESTAMP, 0, SEGMENT_LENGTH, TERM_LENGTH, MTU_LENGTH, 1, 1, "ch2", "ch2", "rec2");
        catalog.invalidateRecording(rec2);
    }
    final File file11 = createFile(segmentFileName(rec1, -1));
    final File file12 = createFile(segmentFileName(rec1, 0));
    final File file13 = createFile(segmentFileName(rec1, Long.MAX_VALUE));
    final File file14 = createFile(rec1 + "-will-be-deleted.rec");
    final File file15 = createFile(rec1 + "-will-be-skipped.txt");
    final File file16 = createFile(rec1 + "-.rec");
    final File file17 = createFile(rec1 + "invalid_file_name.rec");
    final File file21 = createFile(segmentFileName(rec2, 0));
    final File file22 = createFile(segmentFileName(rec2, segmentFileBasePosition(1_000_000, 1_000_000, TERM_LENGTH, SEGMENT_LENGTH)));
    final File file23 = createFile(segmentFileName(rec2, segmentFileBasePosition(1_000_000, 5_000_000, TERM_LENGTH, SEGMENT_LENGTH)));
    final File file24 = createFile(segmentFileName(rec2, segmentFileBasePosition(1_000_000, 1024 * 1024 * 1024, TERM_LENGTH, SEGMENT_LENGTH)));
    final File file25 = createFile(segmentFileName(rec2, segmentFileBasePosition(1_000_000, Long.MAX_VALUE, TERM_LENGTH, SEGMENT_LENGTH)));
    deleteOrphanedSegments(out, archiveDir, epochClock);
    assertFileExists(file12, file13, file15, file17);
    assertFileDoesNotExist(file11, file14, file16);
    assertFileExists(file22, file23, file24);
    assertFileDoesNotExist(file21, file25);
}
Also used : File(java.io.File) Catalog(io.aeron.archive.Catalog) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 40 with Catalog

use of io.aeron.archive.Catalog in project aeron by real-logic.

the class CatalogTest method shouldFixTimestampAndPositionAfterFailureSamePage.

@SuppressWarnings("ResultOfMethodCallIgnored")
@Test
void shouldFixTimestampAndPositionAfterFailureSamePage() throws Exception {
    final long newRecordingId = newRecording();
    new File(archiveDir, segmentFileName(newRecordingId, 0)).createNewFile();
    new File(archiveDir, segmentFileName(newRecordingId, SEGMENT_LENGTH)).createNewFile();
    new File(archiveDir, segmentFileName(newRecordingId, 2 * SEGMENT_LENGTH)).createNewFile();
    final File segmentFile = new File(archiveDir, segmentFileName(newRecordingId, 3 * SEGMENT_LENGTH));
    try (FileChannel log = FileChannel.open(segmentFile.toPath(), READ, WRITE, CREATE)) {
        final ByteBuffer bb = allocate(HEADER_LENGTH);
        final DataHeaderFlyweight flyweight = new DataHeaderFlyweight(bb);
        flyweight.frameLength(1024);
        log.write(bb);
        bb.clear();
        flyweight.frameLength(128);
        log.write(bb, 1024);
        bb.clear();
        flyweight.frameLength(0);
        log.write(bb, 1024 + 128);
    }
    try (Catalog catalog = new Catalog(archiveDir, clock)) {
        assertTrue(catalog.forEntry(newRecordingId, (recordingDescriptorOffset, headerEncoder, headerDecoder, descriptorEncoder, descriptorDecoder) -> {
            assertEquals(NULL_TIMESTAMP, descriptorDecoder.stopTimestamp());
            assertEquals(NULL_POSITION, descriptorDecoder.stopPosition());
        }));
    }
    currentTimeMs = 42L;
    try (Catalog catalog = new Catalog(archiveDir, null, 0, CAPACITY, clock, null, segmentFileBuffer)) {
        assertTrue(catalog.forEntry(newRecordingId, (recordingDescriptorOffset, headerEncoder, headerDecoder, descriptorEncoder, descriptorDecoder) -> {
            assertEquals(42L, descriptorDecoder.stopTimestamp());
            assertEquals(SEGMENT_LENGTH * 3 + 1024L + 128L, descriptorDecoder.stopPosition());
        }));
    }
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) Catalog(io.aeron.archive.Catalog) UnsafeBuffer(org.agrona.concurrent.UnsafeBuffer) IoUtil(org.agrona.IoUtil) ByteBuffer(java.nio.ByteBuffer) FILE_IO_MAX_LENGTH_DEFAULT(io.aeron.archive.Archive.Configuration.FILE_IO_MAX_LENGTH_DEFAULT) CatalogHeaderEncoder(io.aeron.archive.codecs.CatalogHeaderEncoder) ByteBuffer.allocate(java.nio.ByteBuffer.allocate) READ_WRITE(java.nio.channels.FileChannel.MapMode.READ_WRITE) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) NULL_POSITION(io.aeron.archive.client.AeronArchive.NULL_POSITION) MethodSource(org.junit.jupiter.params.provider.MethodSource) ValueSource(org.junit.jupiter.params.provider.ValueSource) HEADER_LENGTH(io.aeron.protocol.DataHeaderFlyweight.HEADER_LENGTH) RecordingDescriptorHeaderDecoder(io.aeron.archive.codecs.RecordingDescriptorHeaderDecoder) Files(java.nio.file.Files) StandardOpenOption(java.nio.file.StandardOpenOption) IOException(java.io.IOException) BufferUtil(org.agrona.BufferUtil) Checksum(io.aeron.archive.checksum.Checksum) Arguments(org.junit.jupiter.params.provider.Arguments) ArrayUtil(org.agrona.collections.ArrayUtil) File(java.io.File) NULL_TIMESTAMP(io.aeron.archive.client.AeronArchive.NULL_TIMESTAMP) RecordingDescriptorDecoder(io.aeron.archive.codecs.RecordingDescriptorDecoder) Test(org.junit.jupiter.api.Test) US_ASCII(java.nio.charset.StandardCharsets.US_ASCII) INVALID(io.aeron.archive.codecs.RecordingState.INVALID) VALID(io.aeron.archive.codecs.RecordingState.VALID) AfterEach(org.junit.jupiter.api.AfterEach) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) Stream(java.util.stream.Stream) ArchiveException(io.aeron.archive.client.ArchiveException) Assertions(org.junit.jupiter.api.Assertions) EpochClock(org.agrona.concurrent.EpochClock) Matchers.is(org.hamcrest.Matchers.is) DataHeaderFlyweight(io.aeron.protocol.DataHeaderFlyweight) Checksums.crc32(io.aeron.archive.checksum.Checksums.crc32) Archive.segmentFileName(io.aeron.archive.Archive.segmentFileName) FileChannel(java.nio.channels.FileChannel) Matchers.containsString(org.hamcrest.Matchers.containsString) CATALOG_FILE_NAME(io.aeron.archive.Archive.Configuration.CATALOG_FILE_NAME) MappedByteBuffer(java.nio.MappedByteBuffer) FileChannel(java.nio.channels.FileChannel) DataHeaderFlyweight(io.aeron.protocol.DataHeaderFlyweight) File(java.io.File) ByteBuffer(java.nio.ByteBuffer) MappedByteBuffer(java.nio.MappedByteBuffer) Catalog(io.aeron.archive.Catalog) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Aggregations

Catalog (io.aeron.archive.Catalog)98 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)78 Test (org.junit.jupiter.api.Test)52 File (java.io.File)44 Checksum (io.aeron.archive.checksum.Checksum)40 ByteBuffer (java.nio.ByteBuffer)36 FileChannel (java.nio.channels.FileChannel)36 DataHeaderFlyweight (io.aeron.protocol.DataHeaderFlyweight)34 IOException (java.io.IOException)34 INVALID (io.aeron.archive.codecs.RecordingState.INVALID)30 VALID (io.aeron.archive.codecs.RecordingState.VALID)30 EpochClock (org.agrona.concurrent.EpochClock)30 Archive.segmentFileName (io.aeron.archive.Archive.segmentFileName)26 Checksums.crc32 (io.aeron.archive.checksum.Checksums.crc32)26 ByteBuffer.allocate (java.nio.ByteBuffer.allocate)26 IoUtil (org.agrona.IoUtil)26 Assertions (org.junit.jupiter.api.Assertions)26 Arguments (org.junit.jupiter.params.provider.Arguments)26 MethodSource (org.junit.jupiter.params.provider.MethodSource)26 Path (java.nio.file.Path)24