hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Busbey <bus...@cloudera.com>
Subject Re: Compatibility guidelines for toString overrides
Date Thu, 12 May 2016 20:40:01 GMT
As a downstream user of Hadoop, it would be much clearer if the
toString functions included the appropriate annotations to say they're
non-public, evolving, or whatever.

Most downstream users of Hadoop aren't going to remember in-detail
exceptions to the java API compatibility rules, once they see that a
class is labeled Public/Stable, they're going to presume that applies
to all non-private members.

On Thu, May 12, 2016 at 9:32 AM, Colin McCabe <cmccabe@apache.org> wrote:
> Hi all,
>
> Recently a discussion came up on HADOOP-13028 about the wisdom of
> overloading S3AInputStream#toString to output statistics information.
> It's a difficult judgement for me to make, since I'm not aware of any
> compatibility guidelines for InputStream#toString.  Do we have
> compatibility guidelines for toString functions?
>
> It seems like the output of toString functions is usually used as a
> debugging aid, rather than as a stable format suitable for UI display or
> object serialization.  Clearly, there are a few cases where we might
> want to specifically declare that a toString method is a stable API.
> However, I think if we attempt to treat the toString output of all
> public classes as stable, we will have greatly increased the API
> surface.  Should we formalize this and declare that toString functions
> are @Unstable, Evolving unless declared otherwise?
>
> best,
> Colin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: common-dev-unsubscribe@hadoop.apache.org
> For additional commands, e-mail: common-dev-help@hadoop.apache.org
>



-- 
busbey

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


Mime
View raw message