Skip to content

Commit

Permalink
Remove MASTER as a field (minor)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Or committed Jan 23, 2015
1 parent 9e21b72 commit 63c05b3
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ private[spark] object DriverStatusRequestField
case object ACTION extends DriverStatusRequestField
case object CLIENT_SPARK_VERSION extends DriverStatusRequestField
case object MESSAGE extends DriverStatusRequestField
case object MASTER extends DriverStatusRequestField
case object DRIVER_ID extends DriverStatusRequestField
override val requiredFields = Seq(ACTION, CLIENT_SPARK_VERSION, MASTER, DRIVER_ID)
override val requiredFields = Seq(ACTION, CLIENT_SPARK_VERSION, DRIVER_ID)
override val optionalFields = Seq(MESSAGE)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@ private[spark] object DriverStatusResponseField
case object ACTION extends DriverStatusResponseField
case object SERVER_SPARK_VERSION extends DriverStatusResponseField
case object MESSAGE extends DriverStatusResponseField
case object MASTER extends DriverStatusResponseField
case object DRIVER_ID extends DriverStatusResponseField
case object SUCCESS extends DriverStatusResponseField
// Standalone specific fields
case object DRIVER_STATE extends DriverStatusResponseField
case object WORKER_ID extends DriverStatusResponseField
case object WORKER_HOST_PORT extends DriverStatusResponseField
override val requiredFields = Seq(ACTION, SERVER_SPARK_VERSION, MASTER, DRIVER_ID, SUCCESS)
override val requiredFields = Seq(ACTION, SERVER_SPARK_VERSION, DRIVER_ID, SUCCESS)
override val optionalFields = Seq(MESSAGE, DRIVER_STATE, WORKER_ID, WORKER_HOST_PORT)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ private[spark] object KillDriverRequestField
case object ACTION extends KillDriverRequestField
case object CLIENT_SPARK_VERSION extends KillDriverRequestField
case object MESSAGE extends KillDriverRequestField
case object MASTER extends KillDriverRequestField
case object DRIVER_ID extends KillDriverRequestField
override val requiredFields = Seq(ACTION, CLIENT_SPARK_VERSION, MASTER, DRIVER_ID)
override val requiredFields = Seq(ACTION, CLIENT_SPARK_VERSION, DRIVER_ID)
override val optionalFields = Seq(MESSAGE)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ private[spark] object KillDriverResponseField
case object ACTION extends KillDriverResponseField
case object SERVER_SPARK_VERSION extends KillDriverResponseField
case object MESSAGE extends KillDriverResponseField
case object MASTER extends KillDriverResponseField
case object DRIVER_ID extends KillDriverResponseField
case object SUCCESS extends KillDriverResponseField
override val requiredFields = Seq(ACTION, SERVER_SPARK_VERSION, MESSAGE, MASTER, DRIVER_ID, SUCCESS)
override val requiredFields = Seq(ACTION, SERVER_SPARK_VERSION, MESSAGE, DRIVER_ID, SUCCESS)
override val optionalFields = Seq.empty
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ private[spark] class StandaloneRestClient extends SubmitRestClient {
val em = Option(args.executorMemory).map { m => Utils.memoryStringToMb(m).toString }.orNull
val message = new SubmitDriverRequestMessage()
.setField(CLIENT_SPARK_VERSION, sparkVersion)
.setField(MASTER, args.master)
.setField(APP_NAME, args.name)
.setField(APP_RESOURCE, args.primaryResource)
.setFieldIfNotNull(MAIN_CLASS, args.mainClass)
Expand All @@ -116,7 +115,6 @@ private[spark] class StandaloneRestClient extends SubmitRestClient {
import KillDriverRequestField._
new KillDriverRequestMessage()
.setField(CLIENT_SPARK_VERSION, sparkVersion)
.setField(MASTER, master)
.setField(DRIVER_ID, driverId)
}

Expand All @@ -127,7 +125,6 @@ private[spark] class StandaloneRestClient extends SubmitRestClient {
import DriverStatusRequestField._
new DriverStatusRequestMessage()
.setField(CLIENT_SPARK_VERSION, sparkVersion)
.setField(MASTER, master)
.setField(DRIVER_ID, driverId)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ private[spark] class StandaloneRestServerHandler(
new SubmitDriverResponseMessage()
.setField(SERVER_SPARK_VERSION, sparkVersion)
.setField(MESSAGE, response.message)
.setField(MASTER, masterUrl)
.setField(SUCCESS, response.success.toString)
.setFieldIfNotNull(DRIVER_ID, response.driverId.orNull)
}
Expand All @@ -79,7 +78,6 @@ private[spark] class StandaloneRestServerHandler(
new KillDriverResponseMessage()
.setField(SERVER_SPARK_VERSION, sparkVersion)
.setField(MESSAGE, response.message)
.setField(MASTER, masterUrl)
.setField(DRIVER_ID, driverId)
.setField(SUCCESS, response.success.toString)
}
Expand All @@ -98,7 +96,6 @@ private[spark] class StandaloneRestServerHandler(
}
new DriverStatusResponseMessage()
.setField(SERVER_SPARK_VERSION, sparkVersion)
.setField(MASTER, masterUrl)
.setField(DRIVER_ID, driverId)
.setField(SUCCESS, response.found.toString)
.setFieldIfNotNull(DRIVER_STATE, response.state.map(_.toString).orNull)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ private[spark] object SubmitDriverRequestField
case object ACTION extends SubmitDriverRequestField
case object CLIENT_SPARK_VERSION extends SubmitDriverRequestField
case object MESSAGE extends SubmitDriverRequestField
case object MASTER extends SubmitDriverRequestField
case object APP_NAME extends SubmitDriverRequestField
case object APP_RESOURCE extends SubmitDriverRequestField
case object MAIN_CLASS extends SubmitDriverRequestField
Expand All @@ -51,7 +50,7 @@ private[spark] object SubmitDriverRequestField
case object APP_ARGS extends SubmitDriverRequestField
case object SPARK_PROPERTIES extends SubmitDriverRequestField
case object ENVIRONMENT_VARIABLES extends SubmitDriverRequestField
override val requiredFields = Seq(ACTION, CLIENT_SPARK_VERSION, MASTER, APP_NAME, APP_RESOURCE)
override val requiredFields = Seq(ACTION, CLIENT_SPARK_VERSION, APP_NAME, APP_RESOURCE)
override val optionalFields = Seq(MESSAGE, MAIN_CLASS, JARS, FILES, PY_FILES, DRIVER_MEMORY,
DRIVER_CORES, DRIVER_EXTRA_JAVA_OPTIONS, DRIVER_EXTRA_CLASS_PATH, DRIVER_EXTRA_LIBRARY_PATH,
SUPERVISE_DRIVER, EXECUTOR_MEMORY, TOTAL_EXECUTOR_CORES, APP_ARGS, SPARK_PROPERTIES,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ private[spark] object SubmitDriverResponseField
case object ACTION extends SubmitDriverResponseField
case object SERVER_SPARK_VERSION extends SubmitDriverResponseField
case object MESSAGE extends SubmitDriverResponseField
case object MASTER extends SubmitDriverResponseField
case object SUCCESS extends SubmitDriverResponseField
case object DRIVER_ID extends SubmitDriverResponseField
override val requiredFields = Seq(ACTION, SERVER_SPARK_VERSION, MESSAGE, MASTER, SUCCESS)
override val requiredFields = Seq(ACTION, SERVER_SPARK_VERSION, MESSAGE, SUCCESS)
override val optionalFields = Seq(DRIVER_ID)
}

Expand Down

0 comments on commit 63c05b3

Please sign in to comment.