yarn rmadmin has a few HA-specific command options to check the health/state of an RM, and transition to Active/Standby. Commands for HA take service id of RM set by yarn.resourcemanager.ha.rm-ids as argument.
$ yarn rmadmin -getServiceState rm1 active $ yarn rmadmin -getServiceState rm2 standby
If automatic failover is enabled, you can not use manual transition command. Though you can override this by –forcemanual flag, you need caution.
$ yarn rmadmin -transitionToStandby rm1 Automatic failover is enabled for org.apache.hadoop.yarn.client.RMHAServiceTarget@1d8299fd Refusing to manually manage HA state, since it may cause a split-brain scenario or other incorrect state. If you are very sure you know what you are doing, please specify the forcemanual flag.
See YarnCommands for more details.
ResourceManager Web UI servicesAssuming a standby RM is up and running, the Standby automatically redirects all web requests to the Active, except for the “About” page.
假设一个备用RM被提升为活跃,该备用RM会自动重定向到所有提到活跃RM的请求,除了“About”页面
Web ServicesAssuming a standby RM is up and running, RM web-services described at ResourceManager REST APIs when invoked on a standby RM are automatically redirected to the Active RM.
假设一个备用RM被提升为活跃,RM web-service在ResourceManager REST APIs 描述的用来将一个备用RM自动重定向活跃RM。
*由于译者本身能力有限,所以译文中肯定会出现表述不正确的地方,请大家多多包涵,也希望大家能够指出文中翻译得不对或者不准确的地方,共同探讨进步,谢谢。
下面关于Hadoop的文章您也可能喜欢,不妨看看:
Ubuntu14.04下Hadoop2.4.1单机/伪分布式安装配置教程
CentOS安装和配置Hadoop2.2.0