Skip to content

Commit

Permalink
[FLINK-23041][webui] Renamed alignment_timeout to aligned_checkpoint_…
Browse files Browse the repository at this point in the history
…timeout in WebUI

This closes apache#16227
  • Loading branch information
akalash authored and dawidwys committed Jun 29, 2021
1 parent 5040eaa commit 9d449ff
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 21 deletions.
14 changes: 8 additions & 6 deletions docs/content/docs/ops/state/unaligned_checkpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,25 @@ backpressure. Then, checkpointing time becomes mostly independent of the end-to-
aware unaligned checkpointing adds to I/O to the state storage, so you shouldn't use it when the
I/O to the state storage is actually the bottleneck during checkpointing.

### Alignment timeout
### Aligned checkpoint timeout

After enabling unaligned checkpoints, you can also specify the alignment timeout programmatically:
After enabling unaligned checkpoints, you can also specify the aligned checkpoint timeout
programmatically:

```java
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
env.getCheckpointConfig().setAlignmentTimeout(Duration.ofSeconds(30));
env.getCheckpointConfig().setAlignedCheckpointTimeout(Duration.ofSeconds(30));
```

or in the `flink-conf.yml` configuration file:

```
execution.checkpointing.alignment-timeout: 30 s
execution.checkpointing.aligned-checkpoint-timeout: 30 s
```

When activated, each checkpoint will still begin as an aligned checkpoint, but if the alignment time
for some subtask exceeds this timeout, then the checkpoint will proceed as an unaligned checkpoint.
When activated, each checkpoint will still begin as an aligned checkpoint, but if the time between
the start of the global checkpoint and the start of the checkpoint on a subtask exceeds the aligned
checkpoint timeout, then the checkpoint will proceed as an unaligned checkpoint.

## Limitations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</thead>
<tbody>
<tr>
<td><h5>execution.checkpointing.alignment-timeout</h5></td>
<td><h5>execution.checkpointing.aligned-checkpoint-timeout</h5></td>
<td style="word-wrap: break-word;">0 ms</td>
<td>Duration</td>
<td>Only relevant if <code class="highlighter-rouge">execution.checkpointing.unaligned</code> is enabled.<br /><br />If timeout is 0, checkpoints will always start unaligned.<br /><br />If timeout has a positive value, checkpoints will start aligned. If during checkpointing, checkpoint start delay exceeds this timeout, alignment will timeout and checkpoint barrier will start working as unaligned checkpoint.</td>
Expand Down
6 changes: 3 additions & 3 deletions docs/layouts/shortcodes/generated/rest_v1_dispatcher.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@
"type" : "object",
"id" : "urn:jsonschema:org:apache:flink:runtime:rest:messages:DashboardConfiguration:Features",
"properties" : {
"web-submit" : {
"web-cancel" : {
"type" : "boolean"
},
"web-cancel" : {
"web-submit" : {
"type" : "boolean"
}
}
Expand Down Expand Up @@ -2181,7 +2181,7 @@
"type" : "object",
"id" : "urn:jsonschema:org:apache:flink:runtime:rest:messages:checkpoints:CheckpointConfigInfo",
"properties" : {
"alignment_timeout" : {
"aligned_checkpoint_timeout" : {
"type" : "integer"
},
"checkpoint_storage" : {
Expand Down
2 changes: 1 addition & 1 deletion flink-runtime-web/src/test/resources/rest_api_v1.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,7 @@
"tolerable_failed_checkpoints" : {
"type" : "integer"
},
"alignment_timeout" : {
"aligned_checkpoint_timeout" : {
"type" : "integer"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export interface CheckPointConfigInterface {
checkpoint_storage: string;
unaligned_checkpoints: boolean;
tolerable_failed_checkpoints: number;
alignment_timeout: number;
aligned_checkpoint_timeout: number;
}

export interface CheckPointDetailInterface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@
<td>{{ checkPointConfig['unaligned_checkpoints'] ? 'Enabled' : 'Disabled' }}</td>
</tr>
<tr *ngIf="checkPointConfig['unaligned_checkpoints']">
<td>Alignment timeout</td>
<td>{{ checkPointConfig['alignment_timeout'] | humanizeDuration}}</td>
<td>Aligned checkpoint timeout</td>
<td>{{ checkPointConfig['aligned_checkpoint_timeout'] | humanizeDuration}}</td>
</tr>
<tr *ngIf="checkPointConfig['externalization']">
<td>Persist Checkpoints Externally</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class CheckpointConfigInfo implements ResponseBody {
public static final String FIELD_NAME_TOLERABLE_FAILED_CHECKPOINTS =
"tolerable_failed_checkpoints";

public static final String FIELD_NAME_ALIGNMENT_TIMEOUT = "alignment_timeout";
public static final String FIELD_NAME_ALIGNED_CHECKPOINT_TIMEOUT = "aligned_checkpoint_timeout";

@JsonProperty(FIELD_NAME_PROCESSING_MODE)
private final ProcessingMode processingMode;
Expand Down Expand Up @@ -92,8 +92,8 @@ public class CheckpointConfigInfo implements ResponseBody {
@JsonProperty(FIELD_NAME_TOLERABLE_FAILED_CHECKPOINTS)
private final int tolerableFailedCheckpoints;

@JsonProperty(FIELD_NAME_ALIGNMENT_TIMEOUT)
private final long alignmentTimeout;
@JsonProperty(FIELD_NAME_ALIGNED_CHECKPOINT_TIMEOUT)
private final long alignedCheckpointTimeout;

@JsonCreator
public CheckpointConfigInfo(
Expand All @@ -108,7 +108,7 @@ public CheckpointConfigInfo(
@JsonProperty(FIELD_NAME_CHECKPOINT_STORAGE) String checkpointStorage,
@JsonProperty(FIELD_NAME_UNALIGNED_CHECKPOINTS) boolean unalignedCheckpoints,
@JsonProperty(FIELD_NAME_TOLERABLE_FAILED_CHECKPOINTS) int tolerableFailedCheckpoints,
@JsonProperty(FIELD_NAME_ALIGNMENT_TIMEOUT) long alignmentTimeout) {
@JsonProperty(FIELD_NAME_ALIGNED_CHECKPOINT_TIMEOUT) long alignedCheckpointTimeout) {
this.processingMode = Preconditions.checkNotNull(processingMode);
this.checkpointInterval = checkpointInterval;
this.checkpointTimeout = checkpointTimeout;
Expand All @@ -119,7 +119,7 @@ public CheckpointConfigInfo(
this.checkpointStorage = Preconditions.checkNotNull(checkpointStorage);
this.unalignedCheckpoints = unalignedCheckpoints;
this.tolerableFailedCheckpoints = tolerableFailedCheckpoints;
this.alignmentTimeout = alignmentTimeout;
this.alignedCheckpointTimeout = alignedCheckpointTimeout;
}

@Override
Expand All @@ -141,7 +141,7 @@ public boolean equals(Object o) {
&& Objects.equals(checkpointStorage, that.checkpointStorage)
&& unalignedCheckpoints == that.unalignedCheckpoints
&& tolerableFailedCheckpoints == that.tolerableFailedCheckpoints
&& alignmentTimeout == that.alignmentTimeout;
&& alignedCheckpointTimeout == that.alignedCheckpointTimeout;
}

@Override
Expand All @@ -157,7 +157,7 @@ public int hashCode() {
checkpointStorage,
unalignedCheckpoints,
tolerableFailedCheckpoints,
alignmentTimeout);
alignedCheckpointTimeout);
}

/** Contains information about the externalized checkpoint configuration. */
Expand Down

0 comments on commit 9d449ff

Please sign in to comment.