Jian He commented on YARN-3546:

bq. Let's consider below situation,
Hi [~sandflee], it's a valid situation. But waitForSchedulerAppAttemptAdded is 
really just a test utility method, it's not used in any production code. The 
whole MockRM is used for testing only.

> 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

Reply via email to