Java Code Examples for org.apache.flink.runtime.checkpoint.CheckpointRetentionPolicy#RETAIN_ON_FAILURE
The following examples show how to use
org.apache.flink.runtime.checkpoint.CheckpointRetentionPolicy#RETAIN_ON_FAILURE .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JobCheckpointingSettingsTest.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
/** * Tests that the settings are actually serializable. */ @Test public void testIsJavaSerializable() throws Exception { JobCheckpointingSettings settings = new JobCheckpointingSettings( Arrays.asList(new JobVertexID(), new JobVertexID()), Arrays.asList(new JobVertexID(), new JobVertexID()), Arrays.asList(new JobVertexID(), new JobVertexID()), new CheckpointCoordinatorConfiguration( 1231231, 1231, 112, 12, CheckpointRetentionPolicy.RETAIN_ON_FAILURE, false), new SerializedValue<>(new MemoryStateBackend())); JobCheckpointingSettings copy = CommonTestUtils.createCopySerializable(settings); assertEquals(settings.getVerticesToAcknowledge(), copy.getVerticesToAcknowledge()); assertEquals(settings.getVerticesToConfirm(), copy.getVerticesToConfirm()); assertEquals(settings.getVerticesToTrigger(), copy.getVerticesToTrigger()); assertEquals(settings.getCheckpointCoordinatorConfiguration(), copy.getCheckpointCoordinatorConfiguration()); assertNotNull(copy.getDefaultStateBackend()); assertTrue(copy.getDefaultStateBackend().deserializeValue(this.getClass().getClassLoader()).getClass() == MemoryStateBackend.class); }
Example 2
Source File: JobCheckpointingSettingsTest.java From flink with Apache License 2.0 | 6 votes |
/** * Tests that the settings are actually serializable. */ @Test public void testIsJavaSerializable() throws Exception { JobCheckpointingSettings settings = new JobCheckpointingSettings( Arrays.asList(new JobVertexID(), new JobVertexID()), Arrays.asList(new JobVertexID(), new JobVertexID()), Arrays.asList(new JobVertexID(), new JobVertexID()), new CheckpointCoordinatorConfiguration( 1231231, 1231, 112, 12, CheckpointRetentionPolicy.RETAIN_ON_FAILURE, false, false, 0), new SerializedValue<>(new MemoryStateBackend())); JobCheckpointingSettings copy = CommonTestUtils.createCopySerializable(settings); assertEquals(settings.getVerticesToAcknowledge(), copy.getVerticesToAcknowledge()); assertEquals(settings.getVerticesToConfirm(), copy.getVerticesToConfirm()); assertEquals(settings.getVerticesToTrigger(), copy.getVerticesToTrigger()); assertEquals(settings.getCheckpointCoordinatorConfiguration(), copy.getCheckpointCoordinatorConfiguration()); assertNotNull(copy.getDefaultStateBackend()); assertTrue(copy.getDefaultStateBackend().deserializeValue(this.getClass().getClassLoader()).getClass() == MemoryStateBackend.class); }
Example 3
Source File: JobCheckpointingSettingsTest.java From flink with Apache License 2.0 | 5 votes |
/** * Tests that the settings are actually serializable. */ @Test public void testIsJavaSerializable() throws Exception { JobCheckpointingSettings settings = new JobCheckpointingSettings( Arrays.asList(new JobVertexID(), new JobVertexID()), Arrays.asList(new JobVertexID(), new JobVertexID()), Arrays.asList(new JobVertexID(), new JobVertexID()), new CheckpointCoordinatorConfiguration( 1231231, 1231, 112, 12, CheckpointRetentionPolicy.RETAIN_ON_FAILURE, false, false, false, 0), new SerializedValue<>(new MemoryStateBackend())); JobCheckpointingSettings copy = CommonTestUtils.createCopySerializable(settings); assertEquals(settings.getVerticesToAcknowledge(), copy.getVerticesToAcknowledge()); assertEquals(settings.getVerticesToConfirm(), copy.getVerticesToConfirm()); assertEquals(settings.getVerticesToTrigger(), copy.getVerticesToTrigger()); assertEquals(settings.getCheckpointCoordinatorConfiguration(), copy.getCheckpointCoordinatorConfiguration()); assertNotNull(copy.getDefaultStateBackend()); assertTrue(copy.getDefaultStateBackend().deserializeValue(this.getClass().getClassLoader()).getClass() == MemoryStateBackend.class); }