Skip to content

Commit

Permalink
Fixed word typo : environment and refactored load savepoint exception…
Browse files Browse the repository at this point in the history
… message
  • Loading branch information
yanghua authored and aljoscha committed Nov 11, 2019
1 parent 73193a8 commit 6dbfd26
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private Savepoint() {}
* Loads an existing savepoint. Useful if you want to query, modify, or extend
* the state of an existing application.
*
* @param env The execution enviornment used to transform the savepoint.
* @param env The execution environment used to transform the savepoint.
* @param path The path to an existing savepoint on disk.
* @param stateBackend The state backend of the savepoint.
*/
Expand All @@ -59,7 +59,7 @@ public static ExistingSavepoint load(ExecutionEnvironment env, String path, Stat
.stream()
.map(OperatorState::getMaxParallelism)
.max(Comparator.naturalOrder())
.orElseThrow(() -> new RuntimeException("Savepoint's must contain at least one operator"));
.orElseThrow(() -> new RuntimeException("Savepoint must contain at least one operator state."));

SavepointMetadata metadata = new SavepointMetadata(maxParallelism, savepoint.getMasterStates(), savepoint.getOperatorStates());
return new ExistingSavepoint(env, metadata, stateBackend);
Expand Down

0 comments on commit 6dbfd26

Please sign in to comment.