Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address review comment from dongjoon-hyun
  • Loading branch information
HeartSaVioR committed Feb 7, 2019
commit c2d0e04b4ac11ec84dc8857c6dba3dca28bd27a6
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ private[spark] class MesosClusterScheduler(
private def getDriverEnvironment(desc: MesosDriverDescription): Environment = {
// TODO(mgummelt): Don't do this here. This should be passed as a --conf
val commandEnv = adjust(desc.command.environment, "SPARK_SUBMIT_OPTS", "")(
v => s"$v -Dspark.mesos.driver.frameworkId=${getDriverFrameworkID(desc)}"
v => s"$v -D${config.DRIVER_FRAMEWORK_ID.key}=${getDriverFrameworkID(desc)}"
)

val env = desc.conf.getAllWithPrefix(config.DRIVER_ENV_PREFIX) ++ commandEnv
Expand Down Expand Up @@ -423,7 +423,7 @@ private[spark] class MesosClusterScheduler(
case "container" => true
case "host" => false
case other =>
logWarning(s"Unknown spark.mesos.appJar.local.resolution.mode $other, using host.")
logWarning(s"Unknown ${config.APPLICATION_JAR_LOCAL_RESOLUTION_MODE} $other, using host.")
false
}
Copy link
Member

@dongjoon-hyun dongjoon-hyun Feb 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we have checkValue, we can simplify the above logic line 422 ~ 426, too.

isLocalJar && isContainerLocal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -554,8 +554,8 @@ trait MesosSchedulerUtils extends Logging {
* framework ID, the driver calls this method after the first registration.
*/
def unsetFrameworkID(sc: SparkContext) {
sc.conf.remove("spark.mesos.driver.frameworkId")
System.clearProperty("spark.mesos.driver.frameworkId")
sc.conf.remove(mesosConfig.DRIVER_FRAMEWORK_ID)
System.clearProperty(mesosConfig.DRIVER_FRAMEWORK_ID.key)
}

def mesosToTaskState(state: MesosTaskState): TaskState.TaskState = state match {
Expand Down