Skip to content

Commit 78091dd

Browse files
Add EventLogURI to commandContext and update Spark event log directory handling (#99)
1 parent 5909784 commit 78091dd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

internal/pkg/object/command/sparkeks/sparkeks.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ var (
9494
type commandContext struct {
9595
JobsURI string `yaml:"jobs_uri,omitempty" json:"jobs_uri,omitempty"`
9696
WrapperURI string `yaml:"wrapper_uri,omitempty" json:"wrapper_uri,omitempty"`
97+
EventLogURI string `yaml:"event_log_uri,omitempty" json:"event_log_uri,omitempty"`
9798
Properties map[string]string `yaml:"properties,omitempty" json:"properties,omitempty"`
9899
KubeNamespace string `yaml:"kube_namespace,omitempty" json:"kube_namespace,omitempty"`
99100
}
@@ -670,9 +671,10 @@ func applySparkOperatorConfig(execCtx *executionContext) {
670671
// Add default spark properties
671672
sparkApp.Spec.SparkConf[sparkAppNameProperty] = execCtx.appName
672673

673-
if execCtx.logURI != "" {
674-
logURI := updateS3ToS3aURI(execCtx.logURI)
675-
sparkApp.Spec.SparkConf[sparkEventLogDirProperty] = logURI
674+
// Set spark event log directory for spark history server
675+
if execCtx.commandContext.EventLogURI != "" {
676+
eventLogURI := updateS3ToS3aURI(execCtx.commandContext.EventLogURI)
677+
sparkApp.Spec.SparkConf[sparkEventLogDirProperty] = eventLogURI
676678
}
677679

678680
if sparkSubmitParams := getSparkSubmitParameters(jobContext); sparkSubmitParams != nil {

0 commit comments

Comments
 (0)