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

Jian He commented on YARN-3546:
-------------------------------

[~sandflee], inside the scheduler, every application only has one attempt. so 
the current attempt is the attempt corresponding to the appAttemptId. So the 
name 'getAppAttempt(attemptId)' is matching with the internal implementation. 
If you agree, we can close this jira. 


> AbstractYarnScheduler.getApplicationAttempt seems misleading,  and there're 
> some misuse of it
> ---------------------------------------------------------------------------------------------
>
>                 Key: YARN-3546
>                 URL: https://issues.apache.org/jira/browse/YARN-3546
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: resourcemanager
>            Reporter: sandflee
>
> I'm not familiar with scheduler,  with first eyes, I thought this func 
> returns the schdulerAppAttempt info corresponding to appAttemptId, but 
> actually it returns the current schdulerAppAttempt.
> It seems misled others too, such as
> TestWorkPreservingRMRestart.waitForNumContainersToRecover
> MockRM.waitForSchedulerAppAttemptAdded
> should I rename it to T getCurrentSchedulerApplicationAttempt(ApplicationId 
> applicationid)
> or returns null  if current attempt id not equals to the request attempt id ?
> comment preferred!



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to