use of org.apache.flink.runtime.state.CheckpointStorageLocationReference in project flink by apache.
the class FsStorageLocationReferenceTest method testDecodingGarbage.
@Test(expected = IllegalArgumentException.class)
public void testDecodingGarbage() {
final byte[] bytes = new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C };
decodePathFromReference(new CheckpointStorageLocationReference(bytes));
}
use of org.apache.flink.runtime.state.CheckpointStorageLocationReference in project flink by apache.
the class FsStorageLocationReferenceTest method testEncodeAndDecode.
@Test
public void testEncodeAndDecode() throws Exception {
final Path path = randomPath(new Random());
try {
CheckpointStorageLocationReference ref = encodePathAsReference(path);
Path decoded = decodePathFromReference(ref);
assertEquals(path, decoded);
} catch (Exception | Error e) {
// if something goes wrong, help by printing the problematic path
log.error("ERROR FOR PATH " + path);
throw e;
}
}
use of org.apache.flink.runtime.state.CheckpointStorageLocationReference in project flink by apache.
the class CheckpointSerializationTest method testSuspendingCheckpointBarrierSerialization.
@Test
public void testSuspendingCheckpointBarrierSerialization() throws Exception {
CheckpointOptions suspendSavepointToSerialize = new CheckpointOptions(SavepointType.suspend(SavepointFormatType.CANONICAL), new CheckpointStorageLocationReference(STORAGE_LOCATION_REF));
testCheckpointBarrierSerialization(suspendSavepointToSerialize);
}
use of org.apache.flink.runtime.state.CheckpointStorageLocationReference in project flink by apache.
the class CheckpointSerializationTest method testSavepointBarrierSerialization.
@Test
public void testSavepointBarrierSerialization() throws Exception {
CheckpointOptions savepointToSerialize = new CheckpointOptions(SavepointType.savepoint(SavepointFormatType.CANONICAL), new CheckpointStorageLocationReference(STORAGE_LOCATION_REF));
testCheckpointBarrierSerialization(savepointToSerialize);
}
Aggregations