Skip to content

Commit 9c2efbf

Browse files
committed
review comments
1 parent e8cc261 commit 9c2efbf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
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
@@ -355,7 +355,8 @@ private[spark] class ApplicationMaster(args: ApplicationMasterArguments,
355355

356356
// spark driver should already be up since it launched us, but we don't want to
357357
// wait forever, so wait 100 seconds max to match the cluster mode setting.
358-
// Leave this config unpublished for now.
358+
// Leave this config unpublished for now. SPARK-3779 to investigating changing
359+
// this config to be time based.
359360
val numTries = sparkConf.getInt("spark.yarn.applicationMaster.waitTries", 1000)
360361

361362
while (!driverUp && !finished && count < numTries) {
@@ -411,7 +412,7 @@ private[spark] class ApplicationMaster(args: ApplicationMasterArguments,
411412
* This allows us to catch that and properly set the YARN application status and
412413
* cleanup if needed.
413414
*/
414-
private def setupSystemSecurityManager() = {
415+
private def setupSystemSecurityManager(): Unit = {
415416
try {
416417
var stopped = false
417418
System.setSecurityManager(new java.lang.SecurityManager() {
@@ -429,8 +430,7 @@ private[spark] class ApplicationMaster(args: ApplicationMasterArguments,
429430
}
430431
}
431432
// required for the checkExit to work properly
432-
override def checkPermission(perm: java.security.Permission): Unit = {
433-
}
433+
override def checkPermission(perm: java.security.Permission): Unit = {}
434434
})
435435
}
436436
catch {
@@ -468,7 +468,7 @@ private[spark] class ApplicationMaster(args: ApplicationMasterArguments,
468468
e.getCause match {
469469
case _: InterruptedException =>
470470
// Reporter thread can interrupt to stop user class
471-
case e: Throwable =>
471+
case e: Exception =>
472472
finish(FinalApplicationStatus.FAILED,
473473
ApplicationMaster.EXIT_EXCEPTION_USER_CLASS,
474474
"User class threw exception: " + e.getMessage)

0 commit comments

Comments
 (0)