Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
uncleGen committed Feb 11, 2015
1 parent a60aea8 commit 463f02c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import org.apache.ivy.plugins.resolver.{ChainResolver, IBiblioResolver}
import org.apache.spark.deploy.rest._
import org.apache.spark.executor._
import org.apache.spark.util.{ChildFirstURLClassLoader, MutableURLClassLoader, Utils}
import org.apache.spark

/**
* Whether to submit, kill, or request the status of an application.
Expand Down Expand Up @@ -89,6 +90,10 @@ object SparkSubmit {
printStream.println("Run with --help for usage help or --verbose for debug output")
exitFn()
}
private[spark] def printVersionAndExit() = {
printStream.println(s"Spark Version: ${spark.SPARK_VERSION}")
exitFn()
}

def main(args: Array[String]) {
val appArgs = new SparkSubmitArguments(args)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,9 @@ private[spark] class SparkSubmitArguments(args: Seq[String], env: Map[String, St
verbose = true
parse(tail)

case ("--version") :: tail =>
SparkSubmit.printVersionAndExit()

case EQ_SEPARATED_OPT(opt, value) :: tail =>
parse(opt :: value :: tail)

Expand Down Expand Up @@ -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).
Expand Down

0 comments on commit 463f02c

Please sign in to comment.