Skip to content

Commit 6d5b84e

Browse files
author
Marcelo Vanzin
committed
Fix wrong system property being set.
This was added by the fix to SPARK-2668: a stray equal sign was creating a bad system property, and the Jetty initialization code was tripping on it. Also fixed a "MatchError" that could be hit in ApplicationMaster.
1 parent 8b0933d commit 6d5b84e

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -401,17 +401,17 @@ private[spark] class ApplicationMaster(args: ApplicationMasterArguments,
401401
// it has an uncaught exception thrown out. It needs a shutdown hook to set SUCCEEDED.
402402
status = FinalApplicationStatus.SUCCEEDED
403403
} catch {
404-
case e: InvocationTargetException => {
404+
case e: InvocationTargetException =>
405405
e.getCause match {
406-
case _: InterruptedException => {
406+
case _: InterruptedException =>
407407
// Reporter thread can interrupt to stop user class
408-
}
408+
409+
case e => throw e
409410
}
410-
}
411411
} finally {
412412
logDebug("Finishing main")
413+
finalStatus = status
413414
}
414-
finalStatus = status
415415
}
416416
}
417417
userClassThread.setName("Driver")

yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ private[spark] trait ClientBase extends Logging {
348348
}
349349

350350
// For log4j configuration to reference
351-
javaOpts += "-D=spark.yarn.app.container.log.dir=" + ApplicationConstants.LOG_DIR_EXPANSION_VAR
351+
javaOpts += ("-Dspark.yarn.app.container.log.dir=" + ApplicationConstants.LOG_DIR_EXPANSION_VAR)
352352

353353
val userClass =
354354
if (args.userClass != null) {

yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ExecutorRunnableUtil.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ trait ExecutorRunnableUtil extends Logging {
9898
*/
9999

100100
// For log4j configuration to reference
101-
javaOpts += "-D=spark.yarn.app.container.log.dir=" + ApplicationConstants.LOG_DIR_EXPANSION_VAR
101+
javaOpts += ("-Dspark.yarn.app.container.log.dir=" + ApplicationConstants.LOG_DIR_EXPANSION_VAR)
102102

103103
val commands = Seq(Environment.JAVA_HOME.$() + "/bin/java",
104104
"-server",

0 commit comments

Comments
 (0)