[
https://issues.apache.org/jira/browse/YARN-6314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15922719#comment-15922719
]
Junping Du commented on YARN-6314:
----------------------------------
Thanks [~xgong] for reporting the issue and deliver a fix. Several comments
here:
{code}
+ @QueryParam(YarnWebServiceParams.REDIRECT) String redirect) {
{code}
We'd better use boolean (default value is false) instead of string for
indicating request is a redirected one or not. Also, "redirect" could cause a
bit confusing here as it could mean two things: 1. this request to AHS can be
redirected to NM; 2. this request is already redirected by NM, so we cannot
redirect it again. I believe our use case here mean the later one, but we
should document it somewhere to get rid of any confusion. btw, use "redirected"
may be better.
{noformat}
+ if (nodeHttpAddress == null || nodeHttpAddress.isEmpty()
+ || redirectRequest) {
{noformat}
There is also a check outside of this code block for (nodeHttpAddress == null
|| nodeHttpAddress.isEmpty()). So if NM address is provided by user in the
beginning, it sounds like we will still redirect the request to NM back and
forth?
> Potential infinite redirection on YARN log redirection web service
> ------------------------------------------------------------------
>
> Key: YARN-6314
> URL: https://issues.apache.org/jira/browse/YARN-6314
> Project: Hadoop YARN
> Issue Type: Sub-task
> Reporter: Xuan Gong
> Assignee: Xuan Gong
> Attachments: YARN-6314.1.patch
>
>
> In YARN-6113, we have added a re-direct NM web service to get container logs
> which could cause the potential infinite redirection.
> It can happens when:
> * Call AHS web service to get a running/finished AM container log for a
> running application.
> * AHS web service would re-direct the request the specific NM given the
> application is still running. And the NM would handle the request
> * If the log file we requested has already been aggregated and deleted from
> NM, the NM would re-direct the request back to AHS.
> In this case, we would do step 2 and step 3 infinite times.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]