yarn集群高可用配置

首先在yarn集群的配置文件yarn-site.xml中加入以下代码

<property>
  <name>yarn.resourcemanager.am.max-attempts</name>
  <value>4</value>
  <description>
    The maximum number of application master execution attempts.
    Default value is 2, i.e., an application is restarted at most once.
  </description>
</property>

然后在./conf/flink-conf.yaml加上

yarn.application-attempts: 4