NM负责启动和管理节点上的containers。AM通过containers来运行任务。

Health Checker Service 创建检查服务

    NM运行一个检查服务来检查节点的状态,该服务可以使用用户自定义的检查脚本。如果节点检查不通过,NM通过heart beat通知RM,RM将不再使用该节点上新增的container。
Disk Checker 磁盘检查
    disk checker会检查NM使用到的磁盘,如local-dirs and log-dirs(本地文件、日志文件)、 configured using yarn.nodemanager.local-dirs and yarn.nodemanager.log-dirs respectively等。检查包括权限、空闲空间、磁盘是否只读等。如果磁盘检查失败,NM不会使用那些有问题的磁盘,但仍将将节点标记为healthy,但是如果相当数量(可以设置值)的磁盘检查失败后,则会将节点标记为unheathy。
    磁盘检查的参数:
Configuration Name Allowed Values Description
yarn.nodemanager.disk-health-checker.enable true, false Enable or disable the disk health checker service
yarn.nodemanager.disk-health-checker.interval-ms Positive integer The interval, in milliseconds, at which the disk checker should run; the default value is 2 minutes
yarn.nodemanager.disk-health-checker.min-healthy-disks Float between 0-1 The minimum fraction of disks that must pass the check for the NodeManager to mark the node as healthy; the default is 0.25
yarn.nodemanager.disk-health-checker.max-disk-utilization-per-disk-percentage Float between 0-100 The maximum percentage of disk space that may be utilized before a disk is marked as unhealthy by the disk checker service. This check is run for every disk used by the NodeManager. The default value is 90 i.e. 90% of the disk can be used.
yarn.nodemanager.disk-health-checker.min-free-space-per-disk-mb Integer The minimum amount of free space that must be available on the disk for the disk checker service to mark the disk as healthy. This check is run for every disk used by the NodeManager. The default value is 0 i.e. the entire disk can be used.

External Health Script 附件健康检查脚本
    用户可以添加额外的健康检查脚本。如果该脚本以非0的状态退出、超时、抛出异常等,则该节点标记为unhealty。注意:如果因为权限问题,该脚本无法被执行,节点也会被标记为unhealthy.附加创建检查脚本不是必须的,如果没胡附加健康检查脚本,则只运行disk checker。
参数:
Configuration Name Allowed Values Description
yarn.nodemanager.health-checker.interval-ms Postive integer The interval, in milliseconds, at which health checker service runs; the default value is 10 minutes.
yarn.nodemanager.health-checker.script.timeout-ms Postive integer The timeout for the health script that’s executed; the default value is 20 minutes.
yarn.nodemanager.health-checker.script.path String Absolute path to the health check script to be run.
yarn.nodemanager.health-checker.script.opts String Arguments to be passed to the script when the script is executed.

NodeManager Restart NM重启

    NM restart保证了在NM重启的过程中,节点上的container能正常运行。NM会把必要的信息存储在节点上的statu-store中,当NM重启后会加载这些信息,然后恢复NM的正常运行。
步骤如下:

Step 1. To enable NM Restart functionality, set the following property in conf/yarn-site.xml to true.  启用NM restart

Property Value
yarn.nodemanager.recovery.enabled true, (default value is set to false)

Step 2. Configure a path to the local file-system directory where the NodeManager can save its run state.  配置state-store

Property Description
yarn.nodemanager.recovery.dir The local filesystem directory in which the node manager will store state when recovery is enabled. The default value is set to$hadoop.tmp.dir/yarn-nm-recovery.

Step 3. Configure a valid RPC address for the NodeManager.  重启后NM可能会使用不同的端口导致client连接失效,因此要把随机端口改成固定端口

Property Description
yarn.nodemanager.address Ephemeral ports (port 0, which is default) cannot be used for the NodeManager’s RPC server specified via yarn.nodemanager.address as it can make NM use different ports before and after a restart. This will break any previously running clients that were communicating with the NM before restart. Explicitly setting yarn.nodemanager.address to an address with specific port number (for e.g 0.0.0.0:45454) is a precondition for enabling NM restart.

Step 4. Auxiliary services.   辅助服务  应用程序应该支持重启

  • NodeManagers in a YARN cluster can be configured to run auxiliary services. For a completely functional NM restart, YARN relies on any auxiliary service configured to also support recovery. This usually includes (1) avoiding usage of ephemeral ports so that previously running clients (in this case, usually containers) are not disrupted after restart and (2) having the auxiliary service itself support recoverability by reloading any previous state when NodeManager restarts and reinitializes the auxiliary service.

  • A simple example for the above is the auxiliary service ‘ShuffleHandler’ for MapReduce (MR). ShuffleHandler respects the above two requirements already, so users/admins don’t have do anything for it to support NM restart: (1) The configuration property mapreduce.shuffle.port controls which port the ShuffleHandler on a NodeManager host binds to, and it defaults to a non-ephemeral port. (2) The ShuffleHandler service also already supports recovery of previous state after NM restarts.  ShuffleHandler支持NM的重启











十二:NodeManager的更多相关文章

  1. CentOS7安装CDH 第十二章:YARN的资源调优

    相关文章链接 CentOS7安装CDH 第一章:CentOS7系统安装 CentOS7安装CDH 第二章:CentOS7各个软件安装和启动 CentOS7安装CDH 第三章:CDH中的问题和解决方法 ...

  2. 前端开发中SEO的十二条总结

    一. 合理使用title, description, keywords二. 合理使用h1 - h6, h1标签的权重很高, 注意使用频率三. 列表代码使用ul, 重要文字使用strong标签四. 图片 ...

  3. CRL快速开发框架系列教程十二(MongoDB支持)

    本系列目录 CRL快速开发框架系列教程一(Code First数据表不需再关心) CRL快速开发框架系列教程二(基于Lambda表达式查询) CRL快速开发框架系列教程三(更新数据) CRL快速开发框 ...

  4. 我的MYSQL学习心得(十二) 触发器

    我的MYSQL学习心得(十二) 触发器 我的MYSQL学习心得(一) 简单语法 我的MYSQL学习心得(二) 数据类型宽度 我的MYSQL学习心得(三) 查看字段长度 我的MYSQL学习心得(四) 数 ...

  5. Web 前端开发精华文章推荐(jQuery、HTML5、CSS3)【系列十二】

    2012年12月12日,[<Web 前端开发人员和设计师必读文章>系列十二]和大家见面了.梦想天空博客关注 前端开发 技术,分享各种增强网站用户体验的 jQuery 插件,展示前沿的 HT ...

  6. 第十二章Fundamental Data Types 基本数据类型

    目录: 12.1 数值概论 12.2整数 12.3浮点数 12.4 字符和字符串 12.5布尔变量 12.6枚举类型 12.7具名常量 12.8数组 12.9创建你自己的类型 12.1   数值概论 ...

  7. [分享] IT天空的二十二条军规

    Una 发表于 2014-9-19 20:25:06 https://www.itsk.com/thread-335975-1-1.html IT天空的二十二条军规 第一条.你不是什么都会,也不是什么 ...

  8. Bootstrap <基础三十二>模态框(Modal)插件

    模态框(Modal)是覆盖在父窗体上的子窗体.通常,目的是显示来自一个单独的源的内容,可以在不离开父窗体的情况下有一些互动.子窗体可提供信息.交互等. 如果您想要单独引用该插件的功能,那么您需要引用  ...

  9. Bootstrap <基础二十二>超大屏幕(Jumbotron)

    Bootstrap 支持的另一个特性,超大屏幕(Jumbotron).顾名思义该组件可以增加标题的大小,并为登陆页面内容添加更多的外边距(margin).使用超大屏幕(Jumbotron)的步骤如下: ...

  10. Bootstrap <基础十二>下拉菜单(Dropdowns)

    Bootstrap 下拉菜单.下拉菜单是可切换的,是以列表格式显示链接的上下文菜单.这可以通过与 下拉菜单(Dropdown) JavaScript 插件 的互动来实现. 如需使用下列菜单,只需要在 ...

随机推荐

  1. iOS原生混合RN开发最佳实践

    iOS原生混合RN开发详解 做过原生iOS开发或者Android开发的同学们肯定也都了解Hybrid,有一些Hybrid的开发经验,目前我们企业开发中运用最广泛的Hybrid App技术就是原生与H5 ...

  2. Oracle登录失败:监听程序当前无法识别连接描述符中请求的服务

    Oracle11g下载地址:https://pan.baidu.com/s/1p3RwLUTAl1Ys4yXmXJ3OVQ 安装步骤视频链接:https://pan.baidu.com/s/1c0FC ...

  3. jQuery 动画效果 与 动画队列

    基础效果 .hide([duration ] [,easing ] [,complete ]) 用于隐藏元素,没有参数的时候等同于直接设置 display 属性 $('.target').hide() ...

  4. 第一篇:百问网ubuntu安装注意事项和部分配置

    目录 一.开启虚拟化技术 二.ubuntu部分设置 一.开启虚拟化技术 ​ 64位机,需要使用cpu-z.SecurAble软件来检查:CPU是否支持VT虚拟化技术 cpu-z使用(软件) 第一步:以 ...

  5. STM32(13)——SPI

    简介: SPI,Serial Peripheral interface串行外围设备接口. 接口应用在:EEPROM, FLASH,实时时钟,AD 转换器,还有数字信号处理器和数字信号解码器之间. 特点 ...

  6. 运用busybox构建最小根文件系统

    平台:vmware下ubuntu14.04前期准备:安装交叉编译环境arm-linux-gcc-4.5.1;下载完成BusyBox 1.23.2一.busybox构建1.make menuconfig ...

  7. ssm中需要注意的问题

    1.在controller中需要加注解 @Controller @RequestMapping("url") @Autowired private CardService card ...

  8. MySQL高级第三章——查询截取分析

    一.查询分析 1.永远小表驱动大表 使用小的数据集驱动大的数据集. //复习 EXISTS 的知识:SELECT ... FROM tb WHERE EXISTS (subquery) 是因为前后数据 ...

  9. See You Again——我最后的汇编程序

    汇编语言:课程设计2 前言 由于本人水平不够,这里的课程设计2的程序实现并没有像王爽书中所说的那样可以不依赖于操作系统运行. 这里的程序依然要在dos下运行,而且没有实现引导现有操作系统的功能. 该程 ...

  10. 北京Uber优步司机奖励政策(12月13日)

    滴快车单单2.5倍,注册地址:http://www.udache.com/ 如何注册Uber司机(全国版最新最详细注册流程)/月入2万/不用抢单:http://www.cnblogs.com/mfry ...