You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-zh@flink.apache.org by 酷酷的浑蛋 <ap...@163.com> on 2020/04/02 10:30:55 UTC

回复: 从savepoint不能恢复问题

关键我的程序是flink-sql,其它的算子基本都设置过uid了,flink-sql可以设置uid吗,或者说sql中的自动分配的uid怎么查找呢


| |
apache22
|
|
apache22@163.com
|
签名由网易邮箱大师定制
在2020年4月2日 18:22,Yangze Guo<ka...@gmail.com> 写道:
如果没有显示指定的话,operator id将是一个随机生成的值[1].
当从savepoint恢复时,将依据这些id来匹配,如果发生了变化,可能是你修改了你的jobGraph。Flink推荐显示的指定operator
id字面量。[2]

[1] https://ci.apache.org/projects/flink/flink-docs-master/ops/state/savepoints.html#assigning-operator-ids
[2] https://ci.apache.org/projects/flink/flink-docs-master/ops/state/savepoints.html#faq

Best,
Yangze Guo

On Thu, Apr 2, 2020 at 6:01 PM 酷酷的浑蛋 <ap...@163.com> wrote:



Failed to rollback to checkpoint/savepoint hdfs://xxx/savepoint-9d5b7a-66c0340f6672. Cannot map checkpoint/savepoint state for operator cbc357ccb763df2852fee8c4fc7d55f2 to the new program, because the operator is not available in the new program. If you want to allow to skip this, you can set the --allowNonRestoredState option on the CLI.


像上面这个错误,我怎么根据 operator cbc357ccb763df2852fee8c4fc7d55f2 去找是我程序中的哪个算子不能恢复呢?
| |
apache22
|
|
apache22@163.com
|
签名由网易邮箱大师定制

Re: 从savepoint不能恢复问题

Posted by Congxian Qiu <qc...@gmail.com>.
Hi
Savepoint 你可以理解为 OperatorId -> State 的一个映射[1],如果你不指定 OperatorId
则会随机生成一个,所以一般会需要用户指定一个 OperatorId。
另外你使用 SQL,可能 SQL 代码发生变更后,导致最终的作业 DAG 图已经变掉了,也就无法恢复了,首先,你可以看一下你两次执行的作业最终的
DAG 图是否完全一样,另外,可以看一下是否指定了 OperatorId

[1]
https://ci.apache.org/projects/flink/flink-docs-release-1.10/ops/state/savepoints.html
Best,
Congxian


LakeShen <sh...@gmail.com> 于2020年4月3日周五 上午10:24写道:

> Hi ,
>
> 这种情况可能是你改变的 Flink SQL 的拓扑结构,导致部分算子的 uid 发生变化,然后在从状态恢复的时候,没有找到算子的状态。
> 所以在开发 SQL 任务的时候,一般更改 SQL 代码时,不要改变其拓扑结构,SQL 任务上线后,就不要在轻意改了。
>
> Best,
> LakeShen
>
> 酷酷的浑蛋 <ap...@163.com> 于2020年4月2日周四 下午6:31写道:
>
> > 关键我的程序是flink-sql,其它的算子基本都设置过uid了,flink-sql可以设置uid吗,或者说sql中的自动分配的uid怎么查找呢
> >
> >
> > | |
> > apache22
> > |
> > |
> > apache22@163.com
> > |
> > 签名由网易邮箱大师定制
> > 在2020年4月2日 18:22,Yangze Guo<ka...@gmail.com> 写道:
> > 如果没有显示指定的话,operator id将是一个随机生成的值[1].
> > 当从savepoint恢复时,将依据这些id来匹配,如果发生了变化,可能是你修改了你的jobGraph。Flink推荐显示的指定operator
> > id字面量。[2]
> >
> > [1]
> >
> https://ci.apache.org/projects/flink/flink-docs-master/ops/state/savepoints.html#assigning-operator-ids
> > [2]
> >
> https://ci.apache.org/projects/flink/flink-docs-master/ops/state/savepoints.html#faq
> >
> > Best,
> > Yangze Guo
> >
> > On Thu, Apr 2, 2020 at 6:01 PM 酷酷的浑蛋 <ap...@163.com> wrote:
> >
> >
> >
> > Failed to rollback to checkpoint/savepoint
> > hdfs://xxx/savepoint-9d5b7a-66c0340f6672. Cannot map checkpoint/savepoint
> > state for operator cbc357ccb763df2852fee8c4fc7d55f2 to the new program,
> > because the operator is not available in the new program. If you want to
> > allow to skip this, you can set the --allowNonRestoredState option on the
> > CLI.
> >
> >
> > 像上面这个错误,我怎么根据 operator cbc357ccb763df2852fee8c4fc7d55f2
> 去找是我程序中的哪个算子不能恢复呢?
> > | |
> > apache22
> > |
> > |
> > apache22@163.com
> > |
> > 签名由网易邮箱大师定制
> >
>

Re: 从savepoint不能恢复问题

Posted by LakeShen <sh...@gmail.com>.
Hi ,

这种情况可能是你改变的 Flink SQL 的拓扑结构,导致部分算子的 uid 发生变化,然后在从状态恢复的时候,没有找到算子的状态。
所以在开发 SQL 任务的时候,一般更改 SQL 代码时,不要改变其拓扑结构,SQL 任务上线后,就不要在轻意改了。

Best,
LakeShen

酷酷的浑蛋 <ap...@163.com> 于2020年4月2日周四 下午6:31写道:

> 关键我的程序是flink-sql,其它的算子基本都设置过uid了,flink-sql可以设置uid吗,或者说sql中的自动分配的uid怎么查找呢
>
>
> | |
> apache22
> |
> |
> apache22@163.com
> |
> 签名由网易邮箱大师定制
> 在2020年4月2日 18:22,Yangze Guo<ka...@gmail.com> 写道:
> 如果没有显示指定的话,operator id将是一个随机生成的值[1].
> 当从savepoint恢复时,将依据这些id来匹配,如果发生了变化,可能是你修改了你的jobGraph。Flink推荐显示的指定operator
> id字面量。[2]
>
> [1]
> https://ci.apache.org/projects/flink/flink-docs-master/ops/state/savepoints.html#assigning-operator-ids
> [2]
> https://ci.apache.org/projects/flink/flink-docs-master/ops/state/savepoints.html#faq
>
> Best,
> Yangze Guo
>
> On Thu, Apr 2, 2020 at 6:01 PM 酷酷的浑蛋 <ap...@163.com> wrote:
>
>
>
> Failed to rollback to checkpoint/savepoint
> hdfs://xxx/savepoint-9d5b7a-66c0340f6672. Cannot map checkpoint/savepoint
> state for operator cbc357ccb763df2852fee8c4fc7d55f2 to the new program,
> because the operator is not available in the new program. If you want to
> allow to skip this, you can set the --allowNonRestoredState option on the
> CLI.
>
>
> 像上面这个错误,我怎么根据 operator cbc357ccb763df2852fee8c4fc7d55f2 去找是我程序中的哪个算子不能恢复呢?
> | |
> apache22
> |
> |
> apache22@163.com
> |
> 签名由网易邮箱大师定制
>