[
https://issues.apache.org/jira/browse/KNOX-719?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15876166#comment-15876166
]
Sumit Gupta commented on KNOX-719:
----------------------------------
Thanks [~jeffreyr97], the patch is much cleaner but there is still some
handling of the redirects that is missing. I see that you handle the error code
for temporary redirect but don't actually use the Location header to get the
active resource manager and instead fall to the next in the configured list.
Did I read the code correctly on this? I guess this will eventually work (in
the case that there are only two resource managers, this will always work, but
not if there are more than 2) although it is inefficient and doesn't leverage
the information in the redirect.
Can you incorporate the Location header into the algorithm? Also please reflect
that in the HA test case. Here is a capture of the wire level response that I
got from a standby node while testing your patch:
{code}
2017-02-21 10:33:26,836 DEBUG http.wire (Wire.java:wire(72)) - http-outgoing-3
<< "HTTP/1.1 307 TEMPORARY_REDIRECT[\r][\n]"
2017-02-21 10:33:26,836 DEBUG http.wire (Wire.java:wire(72)) - http-outgoing-3
<< "Cache-Control: no-cache[\r][\n]"
2017-02-21 10:33:26,836 DEBUG http.wire (Wire.java:wire(72)) - http-outgoing-3
<< "Expires: Tue, 21 Feb 2017 15:33:10 GMT[\r][\n]"
2017-02-21 10:33:26,836 DEBUG http.wire (Wire.java:wire(72)) - http-outgoing-3
<< "Date: Tue, 21 Feb 2017 15:33:10 GMT[\r][\n]"
2017-02-21 10:33:26,837 DEBUG http.wire (Wire.java:wire(72)) - http-outgoing-3
<< "Pragma: no-cache[\r][\n]"
2017-02-21 10:33:26,837 DEBUG http.wire (Wire.java:wire(72)) - http-outgoing-3
<< "Expires: Tue, 21 Feb 2017 15:33:10 GMT[\r][\n]"
2017-02-21 10:33:26,837 DEBUG http.wire (Wire.java:wire(72)) - http-outgoing-3
<< "Date: Tue, 21 Feb 2017 15:33:10 GMT[\r][\n]"
2017-02-21 10:33:26,837 DEBUG http.wire (Wire.java:wire(72)) - http-outgoing-3
<< "Pragma: no-cache[\r][\n]"
2017-02-21 10:33:26,837 DEBUG http.wire (Wire.java:wire(72)) - http-outgoing-3
<< "Content-Type: text/plain; charset=UTF-8[\r][\n]"
2017-02-21 10:33:26,838 DEBUG http.wire (Wire.java:wire(72)) - http-outgoing-3
<< "Set-Cookie:
hadoop.auth="u=guest&p=guest&t=simple&e=1487727190428&s=HHYrOaSQdmy11ZS22Fc/of2A3Xs=";
Path=/; HttpOnly[\r][\n]"
2017-02-21 10:33:26,838 DEBUG http.wire (Wire.java:wire(72)) - http-outgoing-3
<< "X-Frame-Options: SAMEORIGIN[\r][\n]"
2017-02-21 10:33:26,838 DEBUG http.wire (Wire.java:wire(72)) - http-outgoing-3
<< "Location:
http://c6401.ambari.apache.org:8088/ws/v1/cluster/?user.name=guest[\r][\n]"
2017-02-21 10:33:26,838 DEBUG http.wire (Wire.java:wire(72)) - http-outgoing-3
<< "Content-Length: 73[\r][\n]"
2017-02-21 10:33:26,838 DEBUG http.wire (Wire.java:wire(72)) - http-outgoing-3
<< "Server: Jetty(6.1.26.hwx)[\r][\n]"
2017-02-21 10:33:26,838 DEBUG http.wire (Wire.java:wire(72)) - http-outgoing-3
<< "[\r][\n]"
2017-02-21 10:33:26,839 DEBUG http.wire (Wire.java:wire(72)) - http-outgoing-3
<< "This is standby RM. The redirect url is:
/ws/v1/cluster/?user.name=guest[\n]"
{code}
> Knox support for Yarn Resource Manager HA
> -----------------------------------------
>
> Key: KNOX-719
> URL: https://issues.apache.org/jira/browse/KNOX-719
> Project: Apache Knox
> Issue Type: Bug
> Affects Versions: 0.6.0, 0.7.0, 0.8.0, 0.9.0, 0.10.0, 0.11.0
> Reporter: Jeffrey E Rodriguez
> Assignee: Jeffrey E Rodriguez
> Fix For: 0.12.0
>
> Attachments: KNOX-719-2.patch
>
>
> This would support both REST/UI YARN Resource Manager HA. Based on other HA
> providers added in Knox.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)