Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Change the default of autoStopActiveSparkContexts to true
  • Loading branch information
attilapiros committed May 11, 2023
commit ff891aaac78450b8a7c2e38daf5009dc2582aa39
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ private[spark] class SparkSubmit extends Logging {
if (args.master.startsWith("k8s") && !isShell(args.primaryResource) &&
!isSqlShell(args.mainClass) && !isThriftServer(args.mainClass) &&
!isConnectServer(args.mainClass) &&
sparkConf.getBoolean("spark.kubernetes.submit.autoStopActiveSparkContexts", false)) {
sparkConf.getBoolean("spark.kubernetes.submit.autoStopActiveSparkContexts", true)) {
try {
SparkContext.getActive.foreach(_.stop())
} catch {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ private[spark] object Config extends Logging {
.doc("When set to true, Spark on Kubernetes will stop all active Spark contexts once " +
"non-shell application' main methods are finished.")
.booleanConf
.createWithDefault(false)
.createWithDefault(true)

val KUBERNETES_SCHEDULER_NAME =
ConfigBuilder("spark.kubernetes.scheduler.name")
Expand Down