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

sandflee commented on YARN-3546:
--------------------------------

sorry for my explanation. Let's consider below situation,
1, am1 crashed , rmAppAttempt1 send ATTEMPT_REMOVE event to scheduler
2, scheduler stops schedulerAppAttempt1(not clear), waits for rmAppAttempt2  
added to scheduler
3, at this time If we use waitForSchedulerAppAttemptAdded(attempt2) it will be 
true, and maybe it's not the expected action

> 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