当前位置:网站首页>Yarn重启applications记录恢复
Yarn重启applications记录恢复
2022-07-01 13:00:00 【fanxl12】
Yarn重启applications记录恢复
Yarn重启applications记录恢复
修改yarn-core.xml配置文件
ResourceManager重启恢复
将yarn-site.xml中的
yarn.resourcemanager.recovery.enabled配置项设为true(默认是false)<property> <name>yarn.resourcemanager.recovery.enabled</name> <value>true</value> </property>配置
yarn.resourcemanager.store.class参数,该参数用来指定RM在重启之前将自己的状态保存在何种存储媒介上,目前有3种存储可选org.apache.hadoop.yarn.server.resourcemanager.recovery.FileSystemRMStateStore
默认值,是基于文件系统的存储(本地存储或者HDFS)。可以指定yarn.resourcemanager.fs.state-store.uri作为存储路径,如果指定这个yarn.resourcemanager.fs.state-store.uri必须要设置。org.apache.hadoop.yarn.server.resourcemanager.recovery.ZKRMStateStore
基于ZooKeeper的存储,当启用RM高可用时,只能选择这种方式。因为两个RM都有可能是活跃的(认为自己才是真正的RM),进而发生脑裂。基于ZK的存储可以通过隔离(fence)状态数据防止脑裂。可以指定hadoop.zk.address(ZK节点地址列表)和yarn.resourcemanager.zk-state-store.parent-path(状态数据的根节点路径)参数。org.apache.hadoop.yarn.server.resourcemanager.recovery.LeveldbRMStateStore
基于LevelDB的存储。它比前两种方式都更轻量级,占用的存储空间和I/O要小得多,并且支持更好的原子性操作。对性能有极致要求时采用。可以指定yarn.resourcemanager.leveldb-state-store.path作为存储路径。<property> <name>yarn.resourcemanager.store.class</name> <value>org.apache.hadoop.yarn.server.resourcemanager.recovery.FileSystemRMStateStore</value> </property>
配置yarn.resourcemanager.fs.state-store.uri,如果yarn.resourcemanager.store.class是org.apache.hadoop.yarn.server.resourcemanager.recovery.FileSystemRMStateStore需要配置,这里配置HDFS存储
<property> <name>yarn.resourcemanager.fs.state-store.uri</name> <value>hdfs://hadoop-master:9010/rmstore</value> </property>最后配置yarn.resourcemanager.work-preserving-recovery.scheduling-wait-ms,它表示从RM重启后从各个NM同步Container信息的等待时长,在此之后才会分配新的Container。默认值是10000(10秒),一般不需要改动。
<property> <name>yarn.resourcemanager.work-preserving-recovery.scheduling-wait-ms</name> <value>10000</value> </property>
配置NodeManager重启自动恢复
将yarn-site.xml中的
yarn.nodemanager.recovery.enabled配置项设为true(默认是false)<property> <name>yarn.nodemanager.recovery.enabled</name> <value>true</value> </property>配置
yarn.nodemanager.recovery.dir参数,指定NM在重启之前,将Container的状态写入此本地路径。默认值为${hadoop.tmp.dir}/yarn-nm-recovery<property> <name>yarn.nodemanager.recovery.dir</name> <value>/opt/topology/db_data/hadoop-data/yarn-nm-recovery</value> </property>配置
yarn.nodemanager.address参数,该参数为NM的RPC地址,默认为${yarn.nodemanager.hostname}:0,即随机使用临时端口。一定要指定为一个固定端口(如8041),否则NM重启之后会更换端口,就无法恢复Container的状态了<property> <name>yarn.nodemanager.address</name> <value>hadoop-master:45454</value> </property>
边栏推荐
猜你喜欢

MySQL statistical bill information (Part 2): data import and query

Use Net core access wechat official account development

Zabbix 6.0 源码安装以及 HA 配置
![[Niu Ke's questions -sql big factory interview real questions] no2 User growth scenario (a certain degree of information flow)](/img/a0/e9e7506c9c34986dc73562539c8410.png)
[Niu Ke's questions -sql big factory interview real questions] no2 User growth scenario (a certain degree of information flow)

【开发大杀器】之Idea

Manage nodejs with NVM (downgrade the high version to the low version)

mysql统计账单信息(下):数据导入及查询

logstash报错:Cannot reload pipeline, because the existing pipeline is not reloadable

Colorful five pointed star SVG dynamic web page background JS special effect

图灵奖得主Judea Pearl:最近值得一读的19篇因果推断论文
随机推荐
Colorful five pointed star SVG dynamic web page background JS special effect
Declare an abstract class vehicle, which contains the private variable numofwheel and the public functions vehicle (int), horn (), setnumofwheel (int) and getnumofwheel (). Subclass mot
Asp.netcore利用dynamic简化数据库访问
Run PowerShell script prompt "because running script is prohibited on this system" solution
机器学习—性能度量
我花上万学带货:3天赚3元,成交靠刷单
Which securities company has a low, safe and reliable account opening commission
Machine learning - performance metrics
【开发大杀器】之Idea
Wave animation color five pointed star loader loading JS special effects
[encounter Django] - (II) database configuration
leetcode:241. 为运算表达式设计优先级【dfs + eval】
SQLAlchemy在删除有外键约束的记录时,外键约束未起作用,何解?
The difference between memcpy and strcpy
CS5268优势替代AG9321MCQ Typec多合一扩展坞方案
Update a piece of data from the database. Will CDC get two pieces of data with OP fields D and C at the same time? I remember before, only OP was U
Use Net core access wechat official account development
Look at the sky at dawn and the clouds at dusk, and enjoy the beautiful pictures
高薪程序员&面试题精讲系列118之Session共享有哪些方案?
The sky is blue and misty