Naganarasimha G R commented on YARN-4078:

Hi [~jianhe],
Thanks for the review, will correct the first point but for the second one i 
have few queries
bq. I think we can expose a getApplicationAttempt in the scheduler interface 
which is more general and so getPendingResourceRequestForAttempt need not be 
I had considered this before refactoring but there are following problems :
* {{SchedulerApplicationAttempt}} (or its subclasses) which is returned by 
{{AbstractYarnScheduler.getApplicationAttempt}} is currently with {{private}} 
annotation. so was not sure with exposing it under the public interface 
* Currently AbstractYarnScheduler definition is {{AbstractYarnScheduler <T 
extends SchedulerApplicationAttempt, N extends SchedulerNode>... }}, Also 
generics used here was very much linked with lot of classes and method inside. 
So was not sure whether its good idea to push this getApplicationAttempt method 
from {{AbstractYarnScheduler  to YarnScheduler}}

> getPendingResourceRequestForAttempt is present in AbstractYarnScheduler 
> should be present in YarnScheduler interface instead  
> -----------------------------------------------------------------------------------------------------------------------------
>                 Key: YARN-4078
>                 URL: https://issues.apache.org/jira/browse/YARN-4078
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: resourcemanager
>            Reporter: Naganarasimha G R
>            Assignee: Naganarasimha G R
>            Priority: Minor
>         Attachments: YARN-4078.20150915.patch
> Currently getPendingResourceRequestForAttempt is present in 
> {{AbstractYarnScheduler}}.
> *But in AppInfo,  we are calling this method by typecasting it to 
> AbstractYarnScheduler, which is incorrect.*
> Because if a custom scheduler is to be added, it will implement 
> YarnScheduler, not AbstractYarnScheduler.
> This method should be moved to YarnScheduler or it should have a guarded 
> check like in other places (RMAppAttemptBlock.getBlackListedNodes) 

This message was sent by Atlassian JIRA

Reply via email to