Skip to content

Commit c51bc56

Browse files
committed
Addressed more comments
1 parent 9d9c841 commit c51bc56

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/Config.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ private[spark] object Config extends Logging {
155155
ConfigBuilder("spark.kubernetes.mountDependencies.timeout")
156156
.doc("Timeout before aborting the attempt to download and unpack dependencies from remote " +
157157
"locations into the driver and executor pods.")
158-
.timeConf(TimeUnit.MINUTES)
159-
.createWithDefault(5)
158+
.timeConf(TimeUnit.SECONDS)
159+
.createWithDefault(300)
160160

161161
val INIT_CONTAINER_MAX_THREAD_POOL_SIZE =
162162
ConfigBuilder("spark.kubernetes.mountDependencies.maxSimultaneousDownloads")

resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/DriverConfigOrchestrator.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ private[spark] class DriverConfigOrchestrator(
127127
Nil
128128
}
129129

130-
val initContainerBootstrapStep = if (areAnyFilesNonContainerLocal(sparkJars ++ sparkFiles)) {
130+
val initContainerBootstrapStep = if (existNonContainerLocalFiles(sparkJars ++ sparkFiles)) {
131131
val orchestrator = new InitContainerConfigOrchestrator(
132132
sparkJars,
133133
sparkFiles,
@@ -162,7 +162,7 @@ private[spark] class DriverConfigOrchestrator(
162162
mountSecretsStep
163163
}
164164

165-
private def areAnyFilesNonContainerLocal(files: Seq[String]): Boolean = {
165+
private def existNonContainerLocalFiles(files: Seq[String]): Boolean = {
166166
files.exists { uri =>
167167
Utils.resolveURI(uri).getScheme != "local"
168168
}

resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/rest/k8s/SparkPodInitContainer.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ private[spark] class SparkPodInitContainer(
7373
private def downloadFiles(
7474
filesCommaSeparated: Option[String],
7575
downloadDir: File,
76-
errMessageOnDestinationNotADirectory: String): Unit = {
76+
errMessage: String): Unit = {
7777
filesCommaSeparated.foreach { files =>
78-
require(downloadDir.isDirectory, errMessageOnDestinationNotADirectory)
78+
require(downloadDir.isDirectory, errMessage)
7979
Utils.stringToSeq(files).foreach { file =>
8080
Future[Unit] {
8181
fileFetcher.fetchFile(file, downloadDir)

resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/KubernetesClusterManager.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ private[spark] class KubernetesClusterManager extends ExternalClusterManager wit
4949
val initContainerConfigMapKey = sparkConf.get(INIT_CONTAINER_CONFIG_MAP_KEY_CONF)
5050

5151
if (initContainerConfigMap.isEmpty) {
52-
logWarning("The executor's init-container config map was not specified. Executors will " +
52+
logWarning("The executor's init-container config map is not specified. Executors will " +
5353
"therefore not attempt to fetch remote or submitted dependencies.")
5454
}
5555

5656
if (initContainerConfigMapKey.isEmpty) {
57-
logWarning("The executor's init-container config map key was not specified. Executors will " +
57+
logWarning("The executor's init-container config map key is not specified. Executors will " +
5858
"therefore not attempt to fetch remote or submitted dependencies.")
5959
}
6060

0 commit comments

Comments
 (0)