我正在尝试让Flink(1.2.0)在启用了HA的Hadoop集群(CDH 5.10.0)上运行,但是当我通过终止活动RM来测试它时,它会关闭整个集群。
我已在flink-conf.yml
中配置了Flink的HA:
high-availability: zookeeper
high-availability.zookeeper.quorum: zookeeper1:2181,zookeeper2:2181,zookeeper3:2181
high-availability.zookeeper.storageDir: hdfs:///tmp/flink/recovery
high-availability.zookeeper.path.root: /flink
high-availability.zookeeper.path.namespace: /cluster1
yarn.application-attempts: 2
然后我使用yarn-session.sh -n 2 -nm "Flink HA test"
当我尝试使用kill -9
终止活动RM时,YARN正确切换到备用RM,我可以将应用程序看作ACCEPTED
一分钟,但很快备用RM崩溃抛出以下异常:
2017-03-08 12:29:36,997 FATAL org.apache.hadoop.yarn.server.resourcemanager.ResourceManager: Error in handling event type APP_ATTEMPT_ADDED to the scheduler
java.lang.NullPointerException
at org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerApplicationAttempt.transferStateFromPreviousAttempt(SchedulerApplicationAttempt.java:601)
at org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler.addApplicationAttempt(FairScheduler.java:698)
at org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler.handle(FairScheduler.java:1303)
at org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler.handle(FairScheduler.java:123)
at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$SchedulerEventDispatcher$EventProcessor.run(ResourceManager.java:702)
at java.lang.Thread.run(Thread.java:745)
当我不配置Flink的HA时,问题就消失了。
知道可能导致它的原因吗?
答案 0 :(得分:0)
正如评论中所讨论的:
这可能是由错误配置引起的纱线问题。
鉴于此问题仅出现在非常旧的版本中(已不再受支持),因此可能无法添加更多细节。