JobCheckpointingSettings settings = new JobCheckpointingSettings( triggerVertices, ackVertices,
/** * Tests that disabled checkpointing sets the checkpointing interval to Long.MAX_VALUE. */ @Test public void testDisabledCheckpointing() throws Exception { StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); StreamGraph streamGraph = new StreamGraph(env); assertFalse("Checkpointing enabled", streamGraph.getCheckpointConfig().isCheckpointingEnabled()); JobGraph jobGraph = StreamingJobGraphGenerator.createJobGraph(streamGraph); JobCheckpointingSettings snapshottingSettings = jobGraph.getCheckpointingSettings(); assertEquals(Long.MAX_VALUE, snapshottingSettings.getCheckpointCoordinatorConfiguration().getCheckpointInterval()); }
SerializedValue<Factory[]> serializedConfiguredHooks = jg.getCheckpointingSettings().getMasterHooks(); assertNotNull(serializedConfiguredHooks);
gen.writeStringField("mode", settings.isExactlyOnce() ? "exactly_once" : "at_least_once"); gen.writeNumberField("interval", settings.getCheckpointInterval()); gen.writeNumberField("timeout", settings.getCheckpointTimeout()); gen.writeNumberField("min_pause", settings.getMinPauseBetweenCheckpoints()); gen.writeNumberField("max_concurrent", settings.getMaxConcurrentCheckpoints()); ExternalizedCheckpointSettings externalization = settings.getExternalizedCheckpointSettings(); gen.writeObjectFieldStart("externalization");
JobCheckpointingSettings settings = new JobCheckpointingSettings( triggerVertices, ackVertices,
/** * Checks if the checkpointing was enabled for this job graph * * @return true if checkpointing enabled */ public boolean isCheckpointingEnabled() { if (snapshotSettings == null) { return false; } long checkpointInterval = snapshotSettings.getCheckpointCoordinatorConfiguration().getCheckpointInterval(); return checkpointInterval > 0 && checkpointInterval < Long.MAX_VALUE; }
JobCheckpointingSettings settings = new JobCheckpointingSettings( triggerVertices, ackVertices,
/** * Checks if the checkpointing was enabled for this job graph * * @return true if checkpointing enabled */ public boolean isCheckpointingEnabled() { if (snapshotSettings == null) { return false; } long checkpointInterval = snapshotSettings.getCheckpointCoordinatorConfiguration().getCheckpointInterval(); return checkpointInterval > 0 && checkpointInterval < Long.MAX_VALUE; }
JobCheckpointingSettings settings = new JobCheckpointingSettings( triggerVertices, ackVertices, commitVertices, interval, cfg.getCheckpointTimeout(), cfg.getMinPauseBetweenCheckpoints(),