From 99b223a022f21d6a49b3da468e845a26ab08ad32 Mon Sep 17 00:00:00 2001 From: Patrick Wendell Date: Tue, 8 Apr 2014 17:45:18 -0700 Subject: [PATCH] Cleaning up annotations --- .../org/apache/spark/annotations/AlphaComponent.java | 5 +++-- .../org/apache/spark/annotations/DeveloperApi.java | 9 +++++++-- .../org/apache/spark/annotations/Experimental.java | 10 ++++++++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/core/src/main/scala/org/apache/spark/annotations/AlphaComponent.java b/core/src/main/scala/org/apache/spark/annotations/AlphaComponent.java index d54767ab84c7e..61a4fb32ae6e6 100644 --- a/core/src/main/scala/org/apache/spark/annotations/AlphaComponent.java +++ b/core/src/main/scala/org/apache/spark/annotations/AlphaComponent.java @@ -19,7 +19,8 @@ import java.lang.annotation.*; -@Retention(RetentionPolicy.SOURCE) -@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, +/** A new component of Spark which may have unstable API's. */ +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE, ElementType.PACKAGE}) public @interface AlphaComponent {} diff --git a/core/src/main/scala/org/apache/spark/annotations/DeveloperApi.java b/core/src/main/scala/org/apache/spark/annotations/DeveloperApi.java index 74c63ea949b3e..808e8e4e2b153 100644 --- a/core/src/main/scala/org/apache/spark/annotations/DeveloperApi.java +++ b/core/src/main/scala/org/apache/spark/annotations/DeveloperApi.java @@ -19,7 +19,12 @@ import java.lang.annotation.*; -@Retention(RetentionPolicy.SOURCE) -@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, +/** + * A lower-level, unstable API intended for developers. + * + * Developer API's might change or be removed in minor versions of Spark. + */ +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE, ElementType.PACKAGE}) public @interface DeveloperApi {} diff --git a/core/src/main/scala/org/apache/spark/annotations/Experimental.java b/core/src/main/scala/org/apache/spark/annotations/Experimental.java index 58445cc2c1e86..643540f5330d8 100644 --- a/core/src/main/scala/org/apache/spark/annotations/Experimental.java +++ b/core/src/main/scala/org/apache/spark/annotations/Experimental.java @@ -19,7 +19,13 @@ import java.lang.annotation.*; -@Retention(RetentionPolicy.SOURCE) -@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, +/** + * An experimental user-facing API. + * + * Experimental API's might change or be removed in minor versions of Spark, or be adopted as + * first-class Spark API's. + */ +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE, ElementType.PACKAGE}) public @interface Experimental {}