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
Fixed Scala style check errors
  • Loading branch information
liyinan926 committed Dec 4, 2017
commit 12f2797296d5aa5a8adf9bbb6cf5d510d747a48f
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ private[spark] object KubernetesFileUtils {
* - File URIs with scheme local:// resolve to just the path of the URI.
* - Otherwise, the URIs are returned as-is.
*/
def resolveSubmittedUris(fileUris: Iterable[String], fileDownloadPath: String)
: Iterable[String] = {
def resolveSubmittedUris(
fileUris: Iterable[String],
fileDownloadPath: String): Iterable[String] = {
fileUris.map { uri =>
val fileUri = Utils.resolveURI(uri)
val fileScheme = Option(fileUri.getScheme).getOrElse("file")
Expand Down Expand Up @@ -64,4 +65,4 @@ private[spark] object KubernetesFileUtils {
s"$fileDownloadPath/$fileName"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ private[spark] class BaseDriverConfigurationStep(
.endEnv()
.addNewEnv()
.withName(ENV_DRIVER_ARGS)
.withValue(appArgs.mkString(" "))
.withValue(appArgs.map(arg => "\"" + arg + "\"").mkString(" "))
.endEnv()
.addNewEnv()
.withName(ENV_DRIVER_BIND_ADDRESS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ private[spark] class DependencyResolutionStep(
driverContainer = driverContainerWithResolvedClasspath,
driverSparkConf = sparkConfResolvedSparkDependencies)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class BaseDriverConfigurationStepSuite extends SparkFunSuite {
private val DOCKER_IMAGE_PULL_POLICY = "IfNotPresent"
private val APP_NAME = "spark-test"
private val MAIN_CLASS = "org.apache.spark.examples.SparkPi"
private val APP_ARGS = Array("arg1", "arg2")
private val APP_ARGS = Array("arg1", "arg2", "arg 3")
private val CUSTOM_ANNOTATION_KEY = "customAnnotation"
private val CUSTOM_ANNOTATION_VALUE = "customAnnotationValue"
private val DRIVER_CUSTOM_ENV_KEY1 = "customDriverEnv1"
Expand Down Expand Up @@ -82,7 +82,7 @@ class BaseDriverConfigurationStepSuite extends SparkFunSuite {
assert(envs(ENV_SUBMIT_EXTRA_CLASSPATH) === "/opt/spark/spark-examples.jar")
assert(envs(ENV_DRIVER_MEMORY) === "256M")
assert(envs(ENV_DRIVER_MAIN_CLASS) === MAIN_CLASS)
assert(envs(ENV_DRIVER_ARGS) === "arg1 arg2")
assert(envs(ENV_DRIVER_ARGS) === "\"arg1\" \"arg2\" \"arg 3\"")
assert(envs(DRIVER_CUSTOM_ENV_KEY1) === "customDriverEnv1")
assert(envs(DRIVER_CUSTOM_ENV_KEY2) === "customDriverEnv2")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ private[spark] class DependencyResolutionStepSuite extends SparkFunSuite {
"/var/apps/jars/jar3.jar")
assert(resolvedDriverClasspath === expectedResolvedDriverClasspath)
}
}
}