From d7aa12e0e6849235523d404b3c97b3b567f58001 Mon Sep 17 00:00:00 2001 From: Arpit Agarwal Date: Thu, 27 Feb 2014 23:31:55 +0000 Subject: [PATCH] HADOOP-10374. InterfaceAudience annotations should have RetentionPolicy.RUNTIME. (Contributed by Enis Soztutar) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1572783 13f79535-47bb-0310-9956-ffa450edef68 --- .../hadoop/classification/InterfaceAudience.java | 14 +++++++++++--- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/hadoop-common-project/hadoop-annotations/src/main/java/org/apache/hadoop/classification/InterfaceAudience.java b/hadoop-common-project/hadoop-annotations/src/main/java/org/apache/hadoop/classification/InterfaceAudience.java index cd62a9469c..04d5511359 100644 --- a/hadoop-common-project/hadoop-annotations/src/main/java/org/apache/hadoop/classification/InterfaceAudience.java +++ b/hadoop-common-project/hadoop-annotations/src/main/java/org/apache/hadoop/classification/InterfaceAudience.java @@ -18,6 +18,8 @@ package org.apache.hadoop.classification; import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; /** * Annotation to inform users of a package, class or method's intended audience. @@ -46,20 +48,26 @@ public class InterfaceAudience { /** * Intended for use by any project or application. */ - @Documented public @interface Public {}; + @Documented + @Retention(RetentionPolicy.RUNTIME) + public @interface Public {}; /** * Intended only for the project(s) specified in the annotation. * For example, "Common", "HDFS", "MapReduce", "ZooKeeper", "HBase". */ - @Documented public @interface LimitedPrivate { + @Documented + @Retention(RetentionPolicy.RUNTIME) + public @interface LimitedPrivate { String[] value(); }; /** * Intended for use only within Hadoop itself. */ - @Documented public @interface Private {}; + @Documented + @Retention(RetentionPolicy.RUNTIME) + public @interface Private {}; private InterfaceAudience() {} // Audience can't exist on its own } diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index d7b44ddb83..db5808d448 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -346,6 +346,9 @@ Release 2.4.0 - UNRELEASED HADOOP-9454. Support multipart uploads for s3native. (Jordan Mendelson and Akira AJISAKA via atm) + HADOOP-10374. InterfaceAudience annotations should have + RetentionPolicy.RUNTIME (Enis Soztutar via Arpit Agarwal) + OPTIMIZATIONS BUG FIXES