Skip to content

Commit

Permalink
[hotfix][config] Add env.isUnalignedCheckpointsEnabled() (java/scala/…
Browse files Browse the repository at this point in the history
…python)

The next commits adds a force option, so this method is needed for
consistency.
  • Loading branch information
rkhachatryan authored and AHeise committed Nov 3, 2020
1 parent d0458aa commit 13576c5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -771,3 +771,9 @@ def _generate_stream_graph(self, clear_transformations: bool = False, job_name:
j_stream_graph.setJobName(job_name)

return j_stream_graph

def is_unaligned_checkpoints_enabled(self):
"""
Returns whether Unaligned Checkpoints are enabled.
"""
return self._j_stream_execution_environment.isUnalignedCheckpointsEnabled()
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,14 @@ public boolean isForceCheckpointing() {
return checkpointCfg.isForceCheckpointing();
}

/**
* Returns whether Unaligned Checkpoints are enabled.
*/
@PublicEvolving
public boolean isUnalignedCheckpointsEnabled() {
return checkpointCfg.isUnalignedCheckpointsEnabled();
}

/**
* Returns the checkpointing mode (exactly-once vs. at-least-once).
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,11 @@ class StreamExecutionEnvironment(javaEnv: JavaEnv) {
def registerCachedFile(filePath: String, name: String, executable: Boolean): Unit = {
javaEnv.registerCachedFile(filePath, name, executable)
}

/**
* Returns whether Unaligned Checkpoints are enabled.
*/
def isUnalignedCheckpointsEnabled: Boolean = javaEnv.isUnalignedCheckpointsEnabled
}

object StreamExecutionEnvironment {
Expand Down

0 comments on commit 13576c5

Please sign in to comment.