-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-5732][CORE]:Add an option to print the spark version in spark script. #4522
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -413,10 +413,13 @@ private[spark] class SparkSubmitArguments(args: Seq[String], env: Map[String, St | |
| case ("--help" | "-h") :: tail => | ||
| printUsageAndExit(0) | ||
|
|
||
| case ("--verbose" | "-v") :: tail => | ||
| case ("--verbose") :: tail => | ||
| verbose = true | ||
| parse(tail) | ||
|
|
||
| case ("--version" | "-v") :: tail => | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Eh, I don't think you should just change behavior of
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it remains open to question.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMHO it would be better to keep the compatible behavior to the old version, not to change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, I will remain the behavior of |
||
| SparkSubmit.printVersionAndExit() | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some binaries, like Java, don't exit just because the version is printed. Rather than push some flow control and exit from the argument parsing code, this could become another flag in the args object, that later causes version to print in the normal flow.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMHO, we may just need to print the version information as simply as possible, just like what the option |
||
|
|
||
| case EQ_SEPARATED_OPT(opt, value) :: tail => | ||
| parse(opt :: value :: tail) | ||
|
|
||
|
|
@@ -484,7 +487,8 @@ private[spark] class SparkSubmitArguments(args: Seq[String], env: Map[String, St | |
| | --proxy-user NAME User to impersonate when submitting the application. | ||
| | | ||
| | --help, -h Show this help message and exit | ||
| | --verbose, -v Print additional debug output | ||
| | --verbose, Print additional debug output | ||
| | --version, -v Print the version of current Spark | ||
| | | ||
| | Spark standalone with cluster deploy mode only: | ||
| | --driver-cores NUM Cores for driver (Default: 1). | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need
Unitreturn type