@Nonnull @Override public final RunnableFuture<SnapshotResult<KeyedStateHandle>> snapshot( long checkpointId, long timestamp, @Nonnull CheckpointStreamFactory streamFactory, @Nonnull CheckpointOptions checkpointOptions) throws Exception { if (kvStateInformation.isEmpty()) { if (LOG.isDebugEnabled()) { LOG.debug("Asynchronous RocksDB snapshot performed on empty keyed state at {}. Returning null.", timestamp); } return DoneFuture.of(SnapshotResult.empty()); } else { return doSnapshot(checkpointId, timestamp, streamFactory, checkpointOptions); } }
@Override public RunnableFuture<SnapshotResult<KeyedStateHandle>> snapshot(long checkpointId, long timestamp, CheckpointStreamFactory streamFactory, CheckpointOptions checkpointOptions) throws Exception { return DoneFuture.of(SnapshotResult.empty()); }
public static <T extends StateObject> SnapshotResult<T> of(@Nullable T jobManagerState) { return jobManagerState != null ? new SnapshotResult<>(jobManagerState, null) : empty(); }
public static <T extends StateObject> SnapshotResult<T> of(@Nullable T jobManagerState) { return jobManagerState != null ? new SnapshotResult<>(jobManagerState, null) : empty(); }
public static <T extends StateObject> SnapshotResult<T> of(@Nullable T jobManagerState) { return jobManagerState != null ? new SnapshotResult<>(jobManagerState, null) : empty(); }
@Nonnull @Override public final RunnableFuture<SnapshotResult<KeyedStateHandle>> snapshot( long checkpointId, long timestamp, @Nonnull CheckpointStreamFactory streamFactory, @Nonnull CheckpointOptions checkpointOptions) throws Exception { if (kvStateInformation.isEmpty()) { if (LOG.isDebugEnabled()) { LOG.debug("Asynchronous RocksDB snapshot performed on empty keyed state at {}. Returning null.", timestamp); } return DoneFuture.of(SnapshotResult.empty()); } else { return doSnapshot(checkpointId, timestamp, streamFactory, checkpointOptions); } }
@Nonnull @Override public final RunnableFuture<SnapshotResult<KeyedStateHandle>> snapshot( long checkpointId, long timestamp, @Nonnull CheckpointStreamFactory streamFactory, @Nonnull CheckpointOptions checkpointOptions) throws Exception { if (kvStateInformation.isEmpty()) { if (LOG.isDebugEnabled()) { LOG.debug("Asynchronous RocksDB snapshot performed on empty keyed state at {}. Returning null.", timestamp); } return DoneFuture.of(SnapshotResult.empty()); } else { return doSnapshot(checkpointId, timestamp, streamFactory, checkpointOptions); } }
return DoneFuture.of(SnapshotResult.empty());
return DoneFuture.of(SnapshotResult.empty());
return DoneFuture.of(SnapshotResult.empty());
return SnapshotResult.empty();
return SnapshotResult.empty();
return SnapshotResult.empty();
@Nonnull @Override public SnapshotResult<StreamStateHandle> closeAndFinalizeCheckpointStreamResult() throws IOException { final StreamStateHandle primaryStreamStateHandle; try { primaryStreamStateHandle = outputStream.closeAndGetPrimaryHandle(); } catch (IOException primaryEx) { try { outputStream.close(); } catch (IOException closeEx) { primaryEx = ExceptionUtils.firstOrSuppressed(closeEx, primaryEx); } throw primaryEx; } StreamStateHandle secondaryStreamStateHandle = null; try { secondaryStreamStateHandle = outputStream.closeAndGetSecondaryHandle(); } catch (IOException secondaryEx) { LOG.warn("Exception from secondary/local checkpoint stream.", secondaryEx); } if (primaryStreamStateHandle != null) { if (secondaryStreamStateHandle != null) { return SnapshotResult.withLocalState(primaryStreamStateHandle, secondaryStreamStateHandle); } else { return SnapshotResult.of(primaryStreamStateHandle); } } else { return SnapshotResult.empty(); } }
@Nonnull @Override public SnapshotResult<StreamStateHandle> closeAndFinalizeCheckpointStreamResult() throws IOException { final StreamStateHandle primaryStreamStateHandle; try { primaryStreamStateHandle = outputStream.closeAndGetPrimaryHandle(); } catch (IOException primaryEx) { try { outputStream.close(); } catch (IOException closeEx) { primaryEx = ExceptionUtils.firstOrSuppressed(closeEx, primaryEx); } throw primaryEx; } StreamStateHandle secondaryStreamStateHandle = null; try { secondaryStreamStateHandle = outputStream.closeAndGetSecondaryHandle(); } catch (IOException secondaryEx) { LOG.warn("Exception from secondary/local checkpoint stream.", secondaryEx); } if (primaryStreamStateHandle != null) { if (secondaryStreamStateHandle != null) { return SnapshotResult.withLocalState(primaryStreamStateHandle, secondaryStreamStateHandle); } else { return SnapshotResult.of(primaryStreamStateHandle); } } else { return SnapshotResult.empty(); } }
@Nonnull @Override public SnapshotResult<StreamStateHandle> closeAndFinalizeCheckpointStreamResult() throws IOException { final StreamStateHandle primaryStreamStateHandle; try { primaryStreamStateHandle = outputStream.closeAndGetPrimaryHandle(); } catch (IOException primaryEx) { try { outputStream.close(); } catch (IOException closeEx) { primaryEx = ExceptionUtils.firstOrSuppressed(closeEx, primaryEx); } throw primaryEx; } StreamStateHandle secondaryStreamStateHandle = null; try { secondaryStreamStateHandle = outputStream.closeAndGetSecondaryHandle(); } catch (IOException secondaryEx) { LOG.warn("Exception from secondary/local checkpoint stream.", secondaryEx); } if (primaryStreamStateHandle != null) { if (secondaryStreamStateHandle != null) { return SnapshotResult.withLocalState(primaryStreamStateHandle, secondaryStreamStateHandle); } else { return SnapshotResult.of(primaryStreamStateHandle); } } else { return SnapshotResult.empty(); } }
return DoneFuture.of(SnapshotResult.empty());