Skip to content

Commit 9e21b72

Browse files
author
Andrew Or
committed
Action -> SparkSubmitAction (minor)
1 parent 51c5ca6 commit 9e21b72

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ import org.apache.spark.deploy.rest.StandaloneRestClient
3131
* Whether to submit, kill, or request the status of an application.
3232
* The latter two operations are currently supported only for standalone cluster mode.
3333
*/
34-
private[spark] object Action extends Enumeration {
35-
type Action = Value
34+
private[spark] object SparkSubmitAction extends Enumeration {
35+
type SparkSubmitAction = Value
3636
val SUBMIT, KILL, REQUEST_STATUS = Value
3737
}
3838

@@ -82,9 +82,9 @@ object SparkSubmit {
8282
printStream.println(appArgs)
8383
}
8484
appArgs.action match {
85-
case Action.SUBMIT => submit(appArgs)
86-
case Action.KILL => kill(appArgs)
87-
case Action.REQUEST_STATUS => requestStatus(appArgs)
85+
case SparkSubmitAction.SUBMIT => submit(appArgs)
86+
case SparkSubmitAction.KILL => kill(appArgs)
87+
case SparkSubmitAction.REQUEST_STATUS => requestStatus(appArgs)
8888
}
8989
}
9090

core/src/main/scala/org/apache/spark/deploy/SparkSubmitArguments.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import java.util.jar.JarFile
2222

2323
import scala.collection.mutable.{ArrayBuffer, HashMap}
2424

25+
import org.apache.spark.deploy.SparkSubmitAction.SparkSubmitAction
2526
import org.apache.spark.util.Utils
26-
import org.apache.spark.deploy.Action.Action
2727

2828
/**
2929
* Parses and encapsulates arguments from the spark-submit script.
@@ -60,11 +60,11 @@ private[spark] class SparkSubmitArguments(args: Seq[String], env: Map[String, St
6060
var driverToKill: String = null
6161
var driverToRequestStatusFor: String = null
6262

63-
def action: Action = {
63+
def action: SparkSubmitAction = {
6464
(driverToKill, driverToRequestStatusFor) match {
65-
case (null, null) => Action.SUBMIT
66-
case (_, null) => Action.KILL
67-
case (null, _) => Action.REQUEST_STATUS
65+
case (null, null) => SparkSubmitAction.SUBMIT
66+
case (_, null) => SparkSubmitAction.KILL
67+
case (null, _) => SparkSubmitAction.REQUEST_STATUS
6868
case _ => SparkSubmit.printErrorAndExit(
6969
"Requested to both kill and request status for a driver. Choose only one.")
7070
null // never reached
@@ -189,9 +189,9 @@ private[spark] class SparkSubmitArguments(args: Seq[String], env: Map[String, St
189189
/** Ensure that required fields exists. Call this only once all defaults are loaded. */
190190
private def validateArguments(): Unit = {
191191
action match {
192-
case Action.SUBMIT => validateSubmitArguments()
193-
case Action.KILL => validateKillArguments()
194-
case Action.REQUEST_STATUS => validateStatusRequestArguments()
192+
case SparkSubmitAction.SUBMIT => validateSubmitArguments()
193+
case SparkSubmitAction.KILL => validateKillArguments()
194+
case SparkSubmitAction.REQUEST_STATUS => validateStatusRequestArguments()
195195
}
196196
}
197197

0 commit comments

Comments
 (0)