Skip to content

Commit

Permalink
[SPARK-48080][K8S] Promote *MainAppResource and NonJVMResource to…
Browse files Browse the repository at this point in the history
… `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`.
- apache/spark-kubernetes-operator#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 <dhyun@apple.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
  • Loading branch information
dongjoon-hyun committed May 2, 2024
1 parent 9e12bd7 commit 66e2a35
Showing 1 changed file with 28 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 66e2a35

Please sign in to comment.