多谢 zhisheng , 用你的方法解决了。
做完整的savepoint的时候, hdfs 地址 用hdfs://ip:port/ 的方式访问新集群的hdfs。不用nameservice 的方式

zhisheng <[email protected]> 于2020年4月16日周四 下午4:37写道:

> > 如果我把任务迁移到另外一个集群,如何让它从老的集群的checkpoint 恢复
>
> 这种是不是可以先在旧集群对作业取消的时候做一次完整的 savepoint(地址填新集群的 HDFS 地址),然后在新集群的时候从 savepoint
> 启动
>
> Yangze Guo <[email protected]> 于2020年4月15日周三 下午3:52写道:
>
> > 1. flink会去读YARN_CONF_DIR or HADOOP_CONF_DIR这两个环境变量
> > 2. 我理解这和你flink运行的集群是解耦的,只要你dir的路径不变,就会从那个dir找checkpoint恢复
> >
> > Best,
> > Yangze Guo
> >
> > On Wed, Apr 15, 2020 at 3:38 PM tao wang <[email protected]> wrote:
> > >
> > > 多谢回复, 还有几个问题请教:
> > > 1、外部集群的hdfs-site, core-site 这些怎么配置?
> > > 2、另外一个角度, 如果我把任务迁移到另外一个集群,如何让它从老的集群的checkpoint 恢复。
> > >
> > > Yangze Guo <[email protected]> 于2020年4月15日周三 下午2:44写道:
> > >>
> > >> checkpoint的目录设置key为state.checkpoints.dir
> > >>
> > >> 你可以这样设置
> > >> state.checkpoints.dir: hdfs://namenode:port/flink/checkpoints/
> > >>
> > >>
> > >> Best,
> > >> Yangze Guo
> > >>
> > >> On Wed, Apr 15, 2020 at 1:45 PM tao wang <[email protected]> wrote:
> > >> >
> > >> > 现在有个场景, 集群上上了一些比较重要的任务,为了提高这些任务的性能,为它提供了一个专有的hdfs 集群用来存储checkpoint 。
> > >> >
> > >> > 但是现在不知道怎么配置才能让支持任务打到外部的hdfs集群。
> > >> >
> > >> > 谢谢!!
> >
>

回复