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 {}