Skip to content

Commit c596fce

Browse files
committed
[SPARK-44995][K8S] Promote SparkKubernetesClientFactory to DeveloperApi
### What changes were proposed in this pull request? This PR aims to promote `SparkKubernetesClientFactory` as **stable** `DeveloperApi` in order to maintain it officially in a backward compatible way at Apache Spark 4.0.0. ### Why are the changes needed? Like SPARK-35280 and SPARK-37497, `SparkKubernetesClientFactory` is also able to be used to develop new `ExternalClusterManager` for K8s environment. - #32406 - #34751 ### Does this PR introduce _any_ user-facing change? No. Previously, it was `private[spark]`. ### How was this patch tested? Manual review because this is only a visibility change. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #42709 from dongjoon-hyun/SPARK-44995. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent 5db58f9 commit c596fce

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/SparkKubernetesClientFactory.scala

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,28 @@ import okhttp3.Dispatcher
3030
import okhttp3.OkHttpClient
3131

3232
import org.apache.spark.SparkConf
33+
import org.apache.spark.annotation.{DeveloperApi, Since, Stable}
3334
import org.apache.spark.deploy.k8s.Config._
3435
import org.apache.spark.internal.Logging
3536
import org.apache.spark.internal.config.ConfigEntry
3637
import org.apache.spark.util.ThreadUtils
3738

3839
/**
40+
* :: DeveloperApi ::
41+
*
3942
* Spark-opinionated builder for Kubernetes clients. It uses a prefix plus common suffixes to
4043
* parse configuration keys, similar to the manner in which Spark's SecurityManager parses SSL
4144
* options for different components.
45+
*
46+
* This can be used to implement new ExternalClusterManagers.
47+
*
48+
* @since 4.0.0
4249
*/
43-
private[spark] object SparkKubernetesClientFactory extends Logging {
50+
@Stable
51+
@DeveloperApi
52+
object SparkKubernetesClientFactory extends Logging {
4453

54+
@Since("4.0.0")
4555
def createKubernetesClient(
4656
master: String,
4757
namespace: Option[String],

0 commit comments

Comments
 (0)