[ 
https://issues.apache.org/jira/browse/FLINK-17312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17092441#comment-17092441
 ] 

lun zhang commented on FLINK-17312:
-----------------------------------

[~jark] support DML hint is awesome.But it'll break the  ANSI _SQL rule. Can we 
try another way like add a option *restore-savepoint-path* config in the sink 
table source. So we can support each insert DML has the own_ 
_*restore-savepoint-path* ._

 

_for eg:_

_in env.yml_

 

_tables:_

 

_{{tables:}}_

  _{{- name: sink_table}}_

  _{{type: sink}}_

  _{{update-mode: append}}_

  _{{connector: --}}_

  _{{restore-savepoint-path: xxx}}_

 

_{{when you try "insert into sink_table select * from xxx" it will support read 
restore-savepoint and restart the job.}}_

 __ 

 

> Support sql client start with restore savepoint
> -----------------------------------------------
>
>                 Key: FLINK-17312
>                 URL: https://issues.apache.org/jira/browse/FLINK-17312
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / Client
>    Affects Versions: 1.10.0, 1.11.0
>            Reporter: lun zhang
>            Priority: Major
>              Labels: pull-request-available
>
> Now flink support stop or cancel a flink job by *flink cancel -s 
> savepointpath* . And you can restart the jar flink job from *flink run -s 
> savepointpath* .
> But in sql client, we can't specific the restart savepoint .
> By help of [~ykt836] and [~lzljs3620320] we have two way to go.
>  # the most easy way, set in envirment.yml. I've pull a request for it.It's  
> add *restore-savepoint-path prop* in Excution part.You can set 
> *restore-savepoint-path* in envirment.yml or just in command line( by *_set 
> execution.restore-savepoint-path=xxx_*). When we update a "insert" DML.It'll 
> add restore-savepoint-path in job graph.And restart with the last 
> restore-savepoint.But in this way we can only unset 
> *_execution.restore-savepoint-path_* _when you update two or more *insert*_ 
> DML. 
>  # support by DML hit(for eg: "*insert into tb select * from tb2 with 
> (restore-savepoint-path = 'xxx')*". It's very useful if you want insert two 
> or more DML in one sql client session. But It's may token more work to go.We 
> need support a new DML hit.
> In my opinion, the way 2 is most elegant to go.But it'll take much more 
> working on it.Restart two or more stop with savepoint job is not usual in 
> real world.So it's better to just add this in envirment variable.When we 
> submit our job only need check the env variable and set the restore-savepoint 
> in job graph.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to