Hi, Xuan Gong

Thanks very much.





At 2015-02-11 02:07:54, "Xuan Gong" <xg...@hortonworks.com> wrote:


Right now, RM HA does not use ZKFC. So, we can not use this command “yarn 
rmadmin -failover rm1 rm2” now.




If you use the default HA configuration, you set up a Automatic RM HA. In order 
to failover manually,  you have two options:

set up manual RM HA by set the configuration 
“yarn.resourcemanager.ha.automatic-failover.enable” as false. Then you can use 
command “yarn rmadmin –transitionToActive rm1”, “yarn rmadmin 
–transitionToStandby rm2” to control which rm goes to active by yourself.
If you really want to experiment the manual failover when automatic failover 
enabled, you can use command “yarn rmadmin –transitionToActive --forcemanual 
rm2"
Thanks


Xuan Gong




From: 郝东 <donhof...@163.com>
Reply-To: "user@hadoop.apache.org" <user@hadoop.apache.org>
Date: Tuesday, February 10, 2015 at 2:42 AM
To: "user@hadoop.apache.org" <user@hadoop.apache.org>
Subject: Can not execute failover for RM HA



I just set up ResourceManager HA. Both of the resourcemanagers started 
correctly. When I killed the active one, the other became active. But when I 
used the following command to do a manual failover, I got exceptions. I don't 
know what cause this problem. Could anyone help me ? Many Thanks!

Command:
yarn rmadmin -failover rm1 rm2

Exceptions:
Exception in thread "main" java.lang.UnsupportedOperationException: 
RMHAServiceTarget doesn't have a corresponding ZKFC address
    at 
org.apache.hadoop.yarn.client.RMHAServiceTarget.getZKFCAddress(RMHAServiceTarget.java:51)
    at 
org.apache.hadoop.ha.HAServiceTarget.getZKFCProxy(HAServiceTarget.java:94)
    at 
org.apache.hadoop.ha.HAAdmin.gracefulFailoverThroughZKFCs(HAAdmin.java:315)
    at org.apache.hadoop.ha.HAAdmin.failover(HAAdmin.java:286)
    at org.apache.hadoop.ha.HAAdmin.runCmd(HAAdmin.java:453)
    at org.apache.hadoop.ha.HAAdmin.run(HAAdmin.java:382)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.run(RMAdminCLI.java:318)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
    at org.apache.hadoop.yarn.client.cli.RMAdminCLI.main(RMAdminCLI.java:434)



Reply via email to