Skip to content
This repository was archived by the owner on Jan 9, 2020. It is now read-only.

Commit 7ffea06

Browse files
committed
Merge commit 'c480574b3ac7ba83679ea1fba6739c1825093c1f' into nodeport-upload
2 parents 5cbdba0 + c480574 commit 7ffea06

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

resource-managers/kubernetes/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ To build a distribution of Spark with Kubernetes support, use the `dev/make-dist
2323
`kubernetes` profile as part of the build arguments. Any other build arguments can be specified as one would expect when
2424
building Spark normally. For example, to build Spark against Hadoop 2.7 and Kubernetes:
2525

26-
dev/make-distribution.sh --tgz -Phadoop2.7 -Pkubernetes
26+
dev/make-distribution.sh --tgz -Phadoop-2.7 -Pkubernetes
2727

2828
# Kubernetes Code Modules
2929

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ private[spark] class Client(
5858
"spark.kubernetes.driver.docker.image", s"spark-driver:$SPARK_VERSION")
5959
private val uploadedJars = sparkConf.getOption("spark.kubernetes.driver.uploads.jars")
6060
private val uiPort = sparkConf.getInt("spark.ui.port", DEFAULT_UI_PORT)
61+
private val driverLaunchTimeoutSecs = sparkConf.getTimeAsSeconds(
62+
"spark.kubernetes.driverLaunchTimeout", s"${DEFAULT_LAUNCH_TIMEOUT_SECONDS}s")
6163

6264
private val secretBase64String = {
6365
val secretBytes = new Array[Byte](128)
@@ -254,7 +256,7 @@ private[spark] class Client(
254256
.done()
255257
var submitSucceeded = false
256258
try {
257-
submitCompletedFuture.get(LAUNCH_TIMEOUT_SECONDS, TimeUnit.SECONDS)
259+
submitCompletedFuture.get(driverLaunchTimeoutSecs, TimeUnit.SECONDS)
258260
submitSucceeded = true
259261
} catch {
260262
case e: TimeoutException =>
@@ -290,10 +292,10 @@ private[spark] class Client(
290292
kubernetesClient.pods().withName(kubernetesAppId).get()
291293
} catch {
292294
case throwable: Throwable =>
293-
logError(s"Timed out while waiting $LAUNCH_TIMEOUT_SECONDS seconds for the" +
295+
logError(s"Timed out while waiting $driverLaunchTimeoutSecs seconds for the" +
294296
" driver pod to start, but an error occurred while fetching the driver" +
295297
" pod's details.", throwable)
296-
throw new SparkException(s"Timed out while waiting $LAUNCH_TIMEOUT_SECONDS" +
298+
throw new SparkException(s"Timed out while waiting $driverLaunchTimeoutSecs" +
297299
" seconds for the driver pod to start. Unfortunately, in attempting to fetch" +
298300
" the latest state of the pod, another error was thrown. Check the logs for" +
299301
" the error that was thrown in looking up the driver pod.", e)
@@ -440,7 +442,7 @@ private[spark] object Client extends Logging {
440442
private val DRIVER_LAUNCHER_CONTAINER_NAME = "spark-kubernetes-driver-launcher"
441443
private val SECURE_RANDOM = new SecureRandom()
442444
private val SPARK_SUBMISSION_SECRET_BASE_DIR = "/var/run/secrets/spark-submission"
443-
private val LAUNCH_TIMEOUT_SECONDS = 30
445+
private val DEFAULT_LAUNCH_TIMEOUT_SECONDS = 60
444446
private val SPARK_APP_NAME_LABEL = "spark-app-name"
445447

446448
def main(args: Array[String]): Unit = {

0 commit comments

Comments
 (0)