Skip to content

Commit

Permalink
revert the behavior of "-v"
Browse files Browse the repository at this point in the history
  • Loading branch information
uncleGen committed Feb 13, 2015
1 parent 015ddee commit 9f2127c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
11 changes: 9 additions & 2 deletions core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +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
import org.apache.spark._

/**
* Whether to submit, kill, or request the status of an application.
Expand Down Expand Up @@ -91,7 +91,14 @@ object SparkSubmit {
exitFn()
}
private[spark] def printVersionAndExit() = {
printStream.println(s"Spark Version: ${spark.SPARK_VERSION}")
printStream.println("""Welcome to
____ __
/ __/__ ___ _____/ /__
_\ \/ _ \/ _ `/ __/ '_/
/___/ .__/\_,_/_/ /_/\_\ version %s
/_/
""".format(SPARK_VERSION))
printStream.println("Type --help for more information.")
exitFn()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,11 +413,11 @@ private[spark] class SparkSubmitArguments(args: Seq[String], env: Map[String, St
case ("--help" | "-h") :: tail =>
printUsageAndExit(0)

case ("--verbose") :: tail =>
case ("--verbose" | "-v") :: tail =>
verbose = true
parse(tail)

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

case EQ_SEPARATED_OPT(opt, value) :: tail =>
Expand Down Expand Up @@ -487,8 +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, Print additional debug output
| --version, -v Print the version of current Spark
| --verbose, -v Print additional debug output
| --version, 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 9f2127c

Please sign in to comment.