You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Jian He (JIRA)" <ji...@apache.org> on 2015/09/15 12:59:46 UTC

[jira] [Commented] (YARN-4078) getPendingResourceRequestForAttempt is present in AbstractYarnScheduler should be present in YarnScheduler interface instead

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

Jian He commented on YARN-4078:
-------------------------------

thanks [~Naganarasimha], 
- type cast not needed in TestWorkpreservingRMRestart and TestAbstractYarnScheduler
{code}
    YarnScheduler scheduler =
        (YarnScheduler) rm2.getResourceScheduler();
{code}
- I think we can expose a getApplicationAttempt in the scheduler interface which is more general and so getPendingResourceRequestForAttempt need not be exposed? 

> 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
(v6.3.4#6332)