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

Robert Kanter commented on YARN-6625:
-------------------------------------

I think the approach in the v2 patch is better and simpler.  Here's some 
feedback:
- I think we should flip around the logic in {{isValidUrl}}.  There's a lot of 
other types of bad response codes we could get (e.g. 500 if there's some kind 
of unhandled exception) and really only one good type (i.e. 200).  
- Let's use constants defined in {{HttpURLConnection}} for the codes instead of 
magic numbers.  
http://download.java.net/jdk7/archive/b123/docs/api/java/net/HttpURLConnection.html#HTTP_OK
- For for-each loops, I think the formatting is usually {{for (String rmId : 
rmIds)}} not {{for (String rmId: rmIds)}}
- Once {{isValidUrl}} returns {{true}} in the loop in {{findRedirectUrl}}, we 
should be able to {{break}}, right?  No reason to keep searching.
- The {{else}} and {{continue}} in the loop in {{findRedirectUrl}} doesn't seem 
to be needed.
- This newer solution should be unit testable.  You can setup a good and bad 
(mock) servlet and call {{findRedirectUrl}} to see that you get the good one.

> yarn application -list returns a tracking URL for AM that doesn't work in 
> secured and HA environment
> ----------------------------------------------------------------------------------------------------
>
>                 Key: YARN-6625
>                 URL: https://issues.apache.org/jira/browse/YARN-6625
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: amrmproxy
>    Affects Versions: 3.0.0-alpha2
>            Reporter: Yufei Gu
>            Assignee: Yufei Gu
>         Attachments: YARN-6625.001.patch, YARN-6625.002.patch
>
>
> The tracking URL given at the command line should work secured or not. The 
> tracking URLs are like http://node-2.abc.com:47014 and AM web server supposed 
> to redirect it to a RM address like this 
> http://node-1.abc.com:8088/proxy/application_1494544954891_0002/, but it 
> fails to do that because the connection is rejected when AM is talking to RM 
> admin service to get HA status.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to