Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adjust env name for spark presets #8

Merged
merged 1 commit into from
Sep 29, 2023
Merged
Changes from all commits
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
14 changes: 7 additions & 7 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ import (
)

type mainCmd struct {
SparkHome string `required:"" default:"/opt/spark" help:"spark home directory" env:"SPARK_HOME"`
SparkConfDir string `required:"" help:"directory with spark configuration presets" env:"SPARK_CONF_DIR"`
Master string `required:"" help:"spark master address" env:"SPARK_MASTER"`
DebugSubmit bool `help:"write spark-submit output to logger" env:"DEBUG_SPARK_SUBMIT"`
DevMode bool `help:"sets the logger output to development config"`
Debug bool `help:"enables debug logs" env:"DEBUG"`
SparkHome string `required:"" default:"/opt/spark" help:"spark home directory" env:"SPARK_HOME"`
SparkPresetDir string `required:"" help:"directory with spark configuration presets" env:"SPARK_PRESET_DIR"`
Master string `required:"" help:"spark master address" env:"SPARK_MASTER"`
DebugSubmit bool `help:"write spark-submit output to logger" env:"DEBUG_SPARK_SUBMIT"`
DevMode bool `help:"sets the logger output to development config"`
Debug bool `help:"enables debug logs" env:"DEBUG"`
}

var CLI struct {
Expand All @@ -47,7 +47,7 @@ func main() {

func (cmd *mainCmd) Run() {
cmd.setupLogger()
s, err := spark.New(cmd.SparkHome, cmd.SparkConfDir, cmd.Master, cmd.DebugSubmit)
s, err := spark.New(cmd.SparkHome, cmd.SparkPresetDir, cmd.Master, cmd.DebugSubmit)
if err != nil {
zap.L().Fatal("couldn't initialize spark dependency", zap.Error(err))
}
Expand Down