You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2024/05/02 03:41:57 UTC

(spark) branch master updated: [SPARK-48080][K8S] Promote `*MainAppResource` and `NonJVMResource` to `DeveloperApi`

This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 66e2a350fc55 [SPARK-48080][K8S] Promote `*MainAppResource` and `NonJVMResource` to `DeveloperApi`
66e2a350fc55 is described below

commit 66e2a350fc55946315b52557a41d276d52124938
Author: Dongjoon Hyun <dh...@apple.com>
AuthorDate: Wed May 1 20:41:48 2024 -0700

    [SPARK-48080][K8S] Promote `*MainAppResource` and `NonJVMResource` to `DeveloperApi`
    
    ### What changes were proposed in this pull request?
    
    This PR aims to promote `*MainAppResource` and `NonJVMResource` to `DeveloperApi`.
    
    ### Why are the changes needed?
    
    Since `Apache Spark Kubernetes Operator` depends on these traits and classes, we had better maintain it as a developer API officially from `Apache Spark 4.0.0`.
    - https://github.com/apache/spark-kubernetes-operator/pull/10
    
    Since there are no changes after `3.0.0`, these are defined as `Stable`.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Pass the CIs.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #46332 from dongjoon-hyun/SPARK-48080.
    
    Authored-by: Dongjoon Hyun <dh...@apple.com>
    Signed-off-by: Dongjoon Hyun <dh...@apple.com>
---
 .../spark/deploy/k8s/submit/MainAppResource.scala  | 33 ++++++++++++++++++----
 1 file changed, 28 insertions(+), 5 deletions(-)

diff --git a/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/MainAppResource.scala b/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/MainAppResource.scala
index a2e01fa2d9a0..398bb76376cf 100644
--- a/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/MainAppResource.scala
+++ b/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/MainAppResource.scala
@@ -16,15 +16,38 @@
  */
 package org.apache.spark.deploy.k8s.submit
 
-private[spark] sealed trait MainAppResource
+import org.apache.spark.annotation.{DeveloperApi, Since, Stable}
 
-private[spark] sealed trait NonJVMResource
+/**
+ * :: DeveloperApi ::
+ *
+ * All traits and classes in this file are used by K8s module and Spark K8s operator.
+ */
+
+@Stable
+@DeveloperApi
+@Since("2.3.0")
+sealed trait MainAppResource
+
+@Stable
+@DeveloperApi
+@Since("2.4.0")
+sealed trait NonJVMResource
 
-private[spark] case class JavaMainAppResource(primaryResource: Option[String])
+@Stable
+@DeveloperApi
+@Since("3.0.0")
+case class JavaMainAppResource(primaryResource: Option[String])
   extends MainAppResource
 
-private[spark] case class PythonMainAppResource(primaryResource: String)
+@Stable
+@DeveloperApi
+@Since("2.4.0")
+case class PythonMainAppResource(primaryResource: String)
   extends MainAppResource with NonJVMResource
 
-private[spark] case class RMainAppResource(primaryResource: String)
+@Stable
+@DeveloperApi
+@Since("2.4.0")
+case class RMainAppResource(primaryResource: String)
   extends MainAppResource with NonJVMResource


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org