You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by lz...@apache.org on 2022/08/26 07:52:25 UTC

[flink-table-store] branch release-0.2 updated: [hotfix] Fix the typo in DDL, and correct the SQL job restore description

This is an automated email from the ASF dual-hosted git repository.

lzljs3620320 pushed a commit to branch release-0.2
in repository https://gitbox.apache.org/repos/asf/flink-table-store.git


The following commit(s) were added to refs/heads/release-0.2 by this push:
     new 9ad309fd [hotfix] Fix the typo in DDL, and correct the SQL job restore description
9ad309fd is described below

commit 9ad309fd2c715ba7be4dd91c1bb757e059f062df
Author: Jane Chan <55...@users.noreply.github.com>
AuthorDate: Fri Aug 26 15:51:34 2022 +0800

    [hotfix] Fix the typo in DDL, and correct the SQL job restore description
    
    This closes #277
---
 docs/content/docs/development/rescale-bucket.md | 26 ++++++++++++++++---------
 1 file changed, 17 insertions(+), 9 deletions(-)

diff --git a/docs/content/docs/development/rescale-bucket.md b/docs/content/docs/development/rescale-bucket.md
index 9cdf83e5..c937256a 100644
--- a/docs/content/docs/development/rescale-bucket.md
+++ b/docs/content/docs/development/rescale-bucket.md
@@ -80,8 +80,8 @@ are listed as follows.
 CREATE TABLE verified_orders (
     trade_order_id BIGINT,
     item_id BIGINT,
-    item_price DOUBLE
-    dt STRING
+    item_price DOUBLE,
+    dt STRING,
     PRIMARY KEY (dt, trade_order_id, item_id) NOT ENFORCED 
 ) PARTITIONED BY (dt)
 WITH (
@@ -114,6 +114,7 @@ and the job's latency keeps increasing. To improve the data freshness, users can
   ```
 - Switch to the batch mode and overwrite the current partition(s) to which the streaming job is writing
   ```sql
+  SET 'execution.runtime-mode' = 'batch';
   -- suppose today is 2022-06-22
   -- case 1: there is no late event which updates the historical partitions, thus overwrite today's partition is enough
   INSERT OVERWRITE verified_orders PARTITION (dt = '2022-06-22')
@@ -132,10 +133,17 @@ and the job's latency keeps increasing. To improve the data freshness, users can
   FROM verified_orders
   WHERE dt IN ('2022-06-20', '2022-06-21', '2022-06-22') AND order_status = 'verified'
   ```
-- After overwrite job finished, restore the streaming job from the savepoint 
-( see [Starting a Job from a Savepoint](https://nightlies.apache.org/flink/flink-docs-release-1.15/docs/deployment/cli/) )
-  ```bash
-  $ ./bin/flink run \
-      --fromSavepoint <savepointPath> \
-      ...
-   ```
+- After overwrite job finished, switch back to streaming mode. And now, the parallelism can be increased alongside with bucket number to restore the streaming job from the savepoint 
+( see [Start a SQL Job from a savepoint](https://nightlies.apache.org/flink/flink-docs-release-1.15/docs/dev/table/sqlclient/#start-a-sql-job-from-a-savepoint) )
+  ```sql
+  SET 'execution.runtime-mode' = 'streaming';
+  SET 'execution.savepoint.path' = <savepointPath>;
+
+  INSERT INTO verified_orders
+  SELECT trade_order_id,
+       item_id,
+       item_price,
+       DATE_FORMAT(gmt_create, 'yyyy-MM-dd') AS dt
+  FROM raw_orders
+  WHERE order_status = 'verified'
+  ```