问题描述
我正在创建一个 Spring Boot 应用程序,它使用 Yarn 作为资源管理器。 我正在使用客户端的下一个 application.yml 配置:
spring:
hadoop:
resources:
- file:/etc/hadoop/conf/core-site.xml
- file:/etc/hadoop/conf/yarn-site.xml
- file:/etc/hadoop/conf/hdfs-site.xml
yarn:
appName: "sby-test"
applicationDir: "/app/sby-test"
client:
files:
- "file:container.jar"
- "file:appmaster.jar"
localizer:
patterns:
- "*.jar"
- "*.yml"
- "*.properties"
launchcontext:
archiveFile: appmaster.jar
<property>
<name>yarn.resourcemanager.address</name>
<value>127.0.0.1:8032</value>
</property>
但是当我尝试在具有多个纱线地址的集群上启动此应用程序时,例如
<property>
<name>yarn.resourcemanager.address.yarn1</name>
<value>127.0.0.1:8032</value>
</property>
<property>
<name>yarn.resourcemanager.address.yarn2</name>
<value>127.0.0.2:8032</value>
</property>
它因异常而失败
Caused by: org.springframework.yarn.YarnSystemException: Call From node1.of.the.cluster/127.0.0.1 to 0.0.0.0:8032 Failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused;
它没有找到任何资源管理器地址,可能是因为 yarn-site.xml 文件中没有 yarn.resourcemanager.address 属性。
有什么方法可以设置一个后缀(例如在我的例子中是 yarn1),它会在 spring boot 寻找资源管理器地址时应用?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)