[ 
https://issues.apache.org/jira/browse/YARN-1482?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13860850#comment-13860850
 ] 

Xuan Gong commented on YARN-1482:
---------------------------------

bq.You are starting the web-app directly in the RM as well as part of the 
RMActiveServices.

Move the startWebApp() from active service to Alway-on service. So, when the RM 
is running, no matter it is active or standby, the webAppProxy will be alway 
running (if it is embedded mode).

bq.Please add tests to verify the fail-over of web-app proxy in both embedded 
and stand-alone mode.

Add separate test to test both embedded and stand-alone mode.

I add this code
{code}
conf.set(YarnConfiguration.PROXY_ADDRESS, "0.0.0.0:9099");
{code}
in TestRMFailOver.java to pass the test case. Otherwise it will throw out this 
exception:
{code}
2014-01-02 13:55:47,824 INFO  service.AbstractService 
(AbstractService.java:noteFailure(272)) - Service 
org.apache.hadoop.yarn.client.api.impl.YarnClientImpl failed in state STARTED; 
cause: java.lang.IllegalArgumentException: ResourceManager does not support 
this protocol
java.lang.IllegalArgumentException: ResourceManager does not support this 
protocol
        at 
com.google.common.base.Preconditions.checkArgument(Preconditions.java:88)
        at 
org.apache.hadoop.yarn.server.api.ServerRMProxy.checkAllowedProtocols(ServerRMProxy.java:80)
        at 
org.apache.hadoop.yarn.client.ConfiguredRMFailoverProxyProvider.init(ConfiguredRMFailoverProxyProvider.java:58)
        at 
org.apache.hadoop.yarn.client.RMProxy.createRMFailoverProxyProvider(RMProxy.java:158)
        at org.apache.hadoop.yarn.client.RMProxy.createRMProxy(RMProxy.java:89)
        at 
org.apache.hadoop.yarn.client.ClientRMProxy.createRMProxy(ClientRMProxy.java:68)
        at 
org.apache.hadoop.yarn.client.api.impl.YarnClientImpl.serviceStart(YarnClientImpl.java:109)
        at 
org.apache.hadoop.service.AbstractService.start(AbstractService.java:193)
        at 
org.apache.hadoop.yarn.client.TestRMFailover.verifyClientConnection(TestRMFailover.java:114)
        at 
org.apache.hadoop.yarn.client.TestRMFailover.testExplicitFailover(TestRMFailover.java:132)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
        at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
        at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
{code}
I am not sure what is happening here. It might be a bug from miniYarnCluster.

Also, test the patch in single node cluster, it works as expected.

> WebApplicationProxy should be always-on w.r.t HA even if it is embedded in 
> the RM
> ---------------------------------------------------------------------------------
>
>                 Key: YARN-1482
>                 URL: https://issues.apache.org/jira/browse/YARN-1482
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Vinod Kumar Vavilapalli
>            Assignee: Xuan Gong
>         Attachments: YARN-1482.1.patch, YARN-1482.2.patch, YARN-1482.3.patch
>
>
> This way, even if an RM goes to standby mode, we can affect a redirect to the 
> active. And more importantly, users will not suddenly see all their links 
> stop working.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to