Skip to content

Commit

Permalink
[FLINK-34454][doc/test] Rename state recovery options in tests and do…
Browse files Browse the repository at this point in the history
…c examples
  • Loading branch information
Zakelly committed Feb 22, 2024
1 parent 643754c commit 2bbf11b
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 105 deletions.
6 changes: 3 additions & 3 deletions docs/content.zh/docs/dev/table/sqlClient.md
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ SET 'yarn.application.queue' = 'root';
SET 'parallelism.default' = '100';
-- restore from the specific savepoint path
SET 'execution.savepoint.path' = '/tmp/flink-savepoints/savepoint-cca7bc-bb1e257f0dab';
SET 'execution.state-recovery.path' = '/tmp/flink-savepoints/savepoint-cca7bc-bb1e257f0dab';
INSERT INTO pageviews_enriched
SELECT *
Expand Down Expand Up @@ -862,7 +862,7 @@ Flink SQL> INSERT INTO MyTableSink SELECT * FROM MyTableSource;
Flink supports to start the job with specified savepoint. In SQL Client, it's allowed to use `SET` command to specify the path of the savepoint.
```sql
Flink SQL> SET 'execution.savepoint.path' = '/tmp/flink-savepoints/savepoint-cca7bc-bb1e257f0dab';
Flink SQL> SET 'execution.state-recovery.path' = '/tmp/flink-savepoints/savepoint-cca7bc-bb1e257f0dab';
[INFO] Session property has been set.
-- all the following DML statements will be restroed from the specified savepoint path
Expand All @@ -874,7 +874,7 @@ When the path to savepoint is specified, Flink will try to restore the state fro
Because the specified savepoint path will affect all the following DML statements, you can use `RESET` command to reset this config option, i.e. disable restoring from savepoint.
```sql
Flink SQL> RESET execution.savepoint.path;
Flink SQL> RESET execution.state-recovery.path;
[INFO] Session property has been reset.
```
Expand Down
6 changes: 3 additions & 3 deletions docs/content/docs/dev/table/sqlClient.md
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ SET 'yarn.application.queue' = 'root';
SET 'parallelism.default' = '100';
-- restore from the specific savepoint path
SET 'execution.savepoint.path' = '/tmp/flink-savepoints/savepoint-cca7bc-bb1e257f0dab';
SET 'execution.state-recovery.path' = '/tmp/flink-savepoints/savepoint-cca7bc-bb1e257f0dab';
INSERT INTO pageviews_enriched
SELECT *
Expand Down Expand Up @@ -800,7 +800,7 @@ Flink SQL> INSERT INTO MyTableSink SELECT * FROM MyTableSource;
Flink supports to start the job with specified savepoint. In SQL Client, it's allowed to use `SET` command to specify the path of the savepoint.
```sql
Flink SQL> SET 'execution.savepoint.path' = '/tmp/flink-savepoints/savepoint-cca7bc-bb1e257f0dab';
Flink SQL> SET 'execution.state-recovery.path' = '/tmp/flink-savepoints/savepoint-cca7bc-bb1e257f0dab';
[INFO] Session property has been set.
-- all the following DML statements will be restroed from the specified savepoint path
Expand All @@ -812,7 +812,7 @@ When the path to savepoint is specified, Flink will try to restore the state fro
Because the specified savepoint path will affect all the following DML statements, you can use `RESET` command to reset this config option, i.e. disable restoring from savepoint.
```sql
Flink SQL> RESET execution.savepoint.path;
Flink SQL> RESET execution.state-recovery.path;
[INFO] Session property has been reset.
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public class ExecutionCheckpointingOptions {
/**
* @Deprecated Use {@link StateRecoveryOptions#CHECKPOINT_ID_OF_IGNORED_IN_FLIGHT_DATA} instead.
*/
@Deprecated
@Deprecated @Documentation.ExcludeFromDocumentation
public static final ConfigOption<Long> CHECKPOINT_ID_OF_IGNORED_IN_FLIGHT_DATA =
ConfigOptions.key("execution.checkpointing.recover-without-channel-state.checkpoint-id")
.longType()
Expand Down Expand Up @@ -304,7 +304,7 @@ public class ExecutionCheckpointingOptions {
* CheckpointConfig#enableApproximateLocalRecovery(boolean)}, but there is no good reason behind
* this. @Deprecated Use {@link StateRecoveryOptions#APPROXIMATE_LOCAL_RECOVERY} instead.
*/
@Internal @Documentation.ExcludeFromDocumentation @Deprecated
@Internal @Deprecated @Documentation.ExcludeFromDocumentation
public static final ConfigOption<Boolean> APPROXIMATE_LOCAL_RECOVERY =
key("execution.checkpointing.approximate-local-recovery")
.booleanType()
Expand Down
142 changes: 71 additions & 71 deletions flink-table/flink-sql-client/src/test/resources/sql/set.q
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,22 @@ reset 'table.resources.download-dir';

# list the configured configuration
set;
+--------------------------------------------+-----------+
| key | value |
+--------------------------------------------+-----------+
| execution.attached | true |
| execution.savepoint-restore-mode | NO_CLAIM |
| execution.savepoint.ignore-unclaimed-state | false |
| execution.shutdown-on-attached-exit | false |
| execution.target | remote |
| jobmanager.rpc.address | $VAR_JOBMANAGER_RPC_ADDRESS |
| pipeline.classpaths | [] |
| pipeline.jars | [] |
| rest.port | $VAR_REST_PORT |
| sql-client.display.print-time-cost | false |
| sql-client.execution.result-mode | tableau |
| table.exec.legacy-cast-behaviour | DISABLED |
+--------------------------------------------+-----------+
+-------------------------------------------------+-----------+
| key | value |
+-------------------------------------------------+-----------+
| execution.attached | true |
| execution.shutdown-on-attached-exit | false |
| execution.state-recovery.claim-mode | NO_CLAIM |
| execution.state-recovery.ignore-unclaimed-state | false |
| execution.target | remote |
| jobmanager.rpc.address | $VAR_JOBMANAGER_RPC_ADDRESS |
| pipeline.classpaths | [] |
| pipeline.jars | [] |
| rest.port | $VAR_REST_PORT |
| sql-client.display.print-time-cost | false |
| sql-client.execution.result-mode | tableau |
| table.exec.legacy-cast-behaviour | DISABLED |
+-------------------------------------------------+-----------+
12 rows in set
!ok

Expand All @@ -99,19 +99,19 @@ reset;
!info

set;
+--------------------------------------------+-----------+
| key | value |
+--------------------------------------------+-----------+
| execution.attached | true |
| execution.savepoint-restore-mode | NO_CLAIM |
| execution.savepoint.ignore-unclaimed-state | false |
| execution.shutdown-on-attached-exit | false |
| execution.target | remote |
| jobmanager.rpc.address | $VAR_JOBMANAGER_RPC_ADDRESS |
| pipeline.classpaths | [] |
| pipeline.jars | [] |
| rest.port | $VAR_REST_PORT |
+--------------------------------------------+-----------+
+-------------------------------------------------+-----------+
| key | value |
+-------------------------------------------------+-----------+
| execution.attached | true |
| execution.shutdown-on-attached-exit | false |
| execution.state-recovery.claim-mode | NO_CLAIM |
| execution.state-recovery.ignore-unclaimed-state | false |
| execution.target | remote |
| jobmanager.rpc.address | $VAR_JOBMANAGER_RPC_ADDRESS |
| pipeline.classpaths | [] |
| pipeline.jars | [] |
| rest.port | $VAR_REST_PORT |
+-------------------------------------------------+-----------+
9 rows in set
!ok

Expand Down Expand Up @@ -140,20 +140,20 @@ set 'sql-client.verbose' = 'true';
!info
set;
+--------------------------------------------+-----------+
| key | value |
+--------------------------------------------+-----------+
| execution.attached | true |
| execution.savepoint-restore-mode | NO_CLAIM |
| execution.savepoint.ignore-unclaimed-state | false |
| execution.shutdown-on-attached-exit | false |
| execution.target | remote |
| jobmanager.rpc.address | $VAR_JOBMANAGER_RPC_ADDRESS |
| pipeline.classpaths | [] |
| pipeline.jars | [] |
| rest.port | $VAR_REST_PORT |
| sql-client.verbose | true |
+--------------------------------------------+-----------+
+-------------------------------------------------+-----------+
| key | value |
+-------------------------------------------------+-----------+
| execution.attached | true |
| execution.shutdown-on-attached-exit | false |
| execution.state-recovery.claim-mode | NO_CLAIM |
| execution.state-recovery.ignore-unclaimed-state | false |
| execution.target | remote |
| jobmanager.rpc.address | $VAR_JOBMANAGER_RPC_ADDRESS |
| pipeline.classpaths | [] |
| pipeline.jars | [] |
| rest.port | $VAR_REST_PORT |
| sql-client.verbose | true |
+-------------------------------------------------+-----------+
10 rows in set
!ok
Expand All @@ -166,20 +166,20 @@ reset 'execution.attached';
!info
set;
+--------------------------------------------+-----------+
| key | value |
+--------------------------------------------+-----------+
| execution.attached | true |
| execution.savepoint-restore-mode | NO_CLAIM |
| execution.savepoint.ignore-unclaimed-state | false |
| execution.shutdown-on-attached-exit | false |
| execution.target | remote |
| jobmanager.rpc.address | $VAR_JOBMANAGER_RPC_ADDRESS |
| pipeline.classpaths | [] |
| pipeline.jars | [] |
| rest.port | $VAR_REST_PORT |
| sql-client.verbose | true |
+--------------------------------------------+-----------+
+-------------------------------------------------+-----------+
| key | value |
+-------------------------------------------------+-----------+
| execution.attached | true |
| execution.shutdown-on-attached-exit | false |
| execution.state-recovery.claim-mode | NO_CLAIM |
| execution.state-recovery.ignore-unclaimed-state | false |
| execution.target | remote |
| jobmanager.rpc.address | $VAR_JOBMANAGER_RPC_ADDRESS |
| pipeline.classpaths | [] |
| pipeline.jars | [] |
| rest.port | $VAR_REST_PORT |
| sql-client.verbose | true |
+-------------------------------------------------+-----------+
10 rows in set
!ok
Expand All @@ -198,20 +198,20 @@ SHOW JARS;
!ok
set;
+--------------------------------------------+-----------+
| key | value |
+--------------------------------------------+-----------+
| execution.attached | true |
| execution.savepoint-restore-mode | NO_CLAIM |
| execution.savepoint.ignore-unclaimed-state | false |
| execution.shutdown-on-attached-exit | false |
| execution.target | remote |
| jobmanager.rpc.address | $VAR_JOBMANAGER_RPC_ADDRESS |
| pipeline.classpaths | [] |
| pipeline.jars | [] |
| rest.port | $VAR_REST_PORT |
| sql-client.verbose | true |
+--------------------------------------------+-----------+
+-------------------------------------------------+-----------+
| key | value |
+-------------------------------------------------+-----------+
| execution.attached | true |
| execution.shutdown-on-attached-exit | false |
| execution.state-recovery.claim-mode | NO_CLAIM |
| execution.state-recovery.ignore-unclaimed-state | false |
| execution.target | remote |
| jobmanager.rpc.address | $VAR_JOBMANAGER_RPC_ADDRESS |
| pipeline.classpaths | [] |
| pipeline.jars | [] |
| rest.port | $VAR_REST_PORT |
| sql-client.verbose | true |
+-------------------------------------------------+-----------+
10 rows in set
!ok
Expand Down
52 changes: 26 additions & 26 deletions flink-table/flink-sql-gateway/src/test/resources/sql/set.q
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ reset table.resources.download-dir;

set;
!output
+--------------------------------------------+-----------+
| key | value |
+--------------------------------------------+-----------+
| execution.attached | true |
| execution.savepoint-restore-mode | NO_CLAIM |
| execution.savepoint.ignore-unclaimed-state | false |
| execution.shutdown-on-attached-exit | false |
| execution.target | remote |
| jobmanager.rpc.address | localhost |
| pipeline.classpaths | [] |
| pipeline.jars | [] |
| rest.port | $VAR_REST_PORT |
+--------------------------------------------+-----------+
+-------------------------------------------------+-----------+
| key | value |
+-------------------------------------------------+-----------+
| execution.attached | true |
| execution.shutdown-on-attached-exit | false |
| execution.state-recovery.claim-mode | NO_CLAIM |
| execution.state-recovery.ignore-unclaimed-state | false |
| execution.target | remote |
| jobmanager.rpc.address | localhost |
| pipeline.classpaths | [] |
| pipeline.jars | [] |
| rest.port | $VAR_REST_PORT |
+-------------------------------------------------+-----------+
9 rows in set
!ok

Expand All @@ -51,18 +51,18 @@ java.lang.IllegalArgumentException: No enum constant org.apache.flink.table.api.

set;
!output
+--------------------------------------------+-----------+
| key | value |
+--------------------------------------------+-----------+
| execution.attached | true |
| execution.savepoint-restore-mode | NO_CLAIM |
| execution.savepoint.ignore-unclaimed-state | false |
| execution.shutdown-on-attached-exit | false |
| execution.target | remote |
| jobmanager.rpc.address | localhost |
| pipeline.classpaths | [] |
| pipeline.jars | [] |
| rest.port | $VAR_REST_PORT |
+--------------------------------------------+-----------+
+-------------------------------------------------+-----------+
| key | value |
+-------------------------------------------------+-----------+
| execution.attached | true |
| execution.shutdown-on-attached-exit | false |
| execution.state-recovery.claim-mode | NO_CLAIM |
| execution.state-recovery.ignore-unclaimed-state | false |
| execution.target | remote |
| jobmanager.rpc.address | localhost |
| pipeline.classpaths | [] |
| pipeline.jars | [] |
| rest.port | $VAR_REST_PORT |
+-------------------------------------------------+-----------+
9 rows in set
!ok

0 comments on commit 2bbf11b

Please sign in to comment.