hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sangjin Lee (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-5184) Fix up incompatible changes introduced on ContainerStatus and NodeReport
Date Fri, 28 Oct 2016 21:23:58 GMT

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

Sangjin Lee commented on YARN-5184:

In the patch, the methods throw UnsupportedException. I had suggested this in an offline discussion
with Sangjin, but I am not sure about it now. With this update, the downstream classes would
continue to compile. This, however, can lead to RuntimeExceptions which is likely worse than
compile time issues. I guess it depends on whether these methods end up being called. I can't
think of a good solution, but thought I should bring this up.

I thought about that, and I think the risk is pretty minimal. No subclass/user of this class
that exists today would be affected because they do not invoke the new methods as obviously
they don't know the new methods. The only downside is later if a new subclass is created and
forgets to override these methods (which will not be caught by the compiler). But then I suppose
these classes are not really to be subclassed by users of Hadoop other than test or mock cases.

Another way to solve it would be to provide real implementations that would work for all cases.
But I don't think that's possible as the real implementations come from PBImpl classes...

> Fix up incompatible changes introduced on ContainerStatus and NodeReport
> ------------------------------------------------------------------------
>                 Key: YARN-5184
>                 URL: https://issues.apache.org/jira/browse/YARN-5184
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: api
>    Affects Versions: 2.9.0
>            Reporter: Karthik Kambatla
>            Assignee: Karthik Kambatla
>            Priority: Blocker
>         Attachments: YARN-5184-branch-2.8.poc.patch, YARN-5184-branch-2.poc.patch
> YARN-2882 and YARN-5430 broke compatibility by adding abstract methods to ContainerStatus.
Since ContainerStatus is a Public-Stable class, adding abstract methods to this class breaks
any extensions. 
> To fix this, we should add default implementations to these new methods and not leave
them as abstract. 

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org

View raw message