hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsz Wo (Nicholas), SZE (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-5073) Hadoop 1.0 Interface Classification - scope (visibility - public/private) and stability
Date Fri, 04 Sep 2009 19:16:57 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-5073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12751576#action_12751576

Tsz Wo (Nicholas), SZE commented on HADOOP-5073:

It is hard to get nested annotations correct.  I still think that Public, LimitedPrivate and
Private are values of Audience.

If we are going to do nested annotations, I suggest to followings:
- Audience indeed is an annotation container.  So it should be a class with a private constructor
but not itself an annotation.  Otherwise, someone may use @Audience later.
- We also have to repeat   @Documented and @Inherited for each nested annotations.
- From the [doc|http://java.sun.com/javase/6/docs/technotes/guides/language/annotations.html],
it says "In annotations with a single element, the element should be named value, ... ". 
So the "target" in LimitedPrivate should be renamed to "value".

public final class Audience {
  private Audience() {}

  public @interface Public {}

  public @interface LimitedPrivate {
    String[] value();

  public @interface Private {}

> Hadoop 1.0 Interface Classification - scope (visibility - public/private) and stability
> ---------------------------------------------------------------------------------------
>                 Key: HADOOP-5073
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5073
>             Project: Hadoop Common
>          Issue Type: Sub-task
>            Reporter: Sanjay Radia
>            Assignee: Sanjay Radia
>         Attachments: 5073_demo.png, c5073_20090825.patch, c5073_20090825.png, HADOOP-5073.patch,
Nested.png, Picture 1.png
> This jira proposes an interface classification for hadoop interfaces.
> The discussion was started in email alias core-dev@hadoop.apache.org in Nov 2008.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message