Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tgravescs committed Oct 6, 2014
1 parent e8cc261 commit 9c2efbf
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -355,7 +355,8 @@ private[spark] class ApplicationMaster(args: ApplicationMasterArguments,

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

while (!driverUp && !finished && count < numTries) {
Expand Down Expand Up @@ -411,7 +412,7 @@ private[spark] class ApplicationMaster(args: ApplicationMasterArguments,
* This allows us to catch that and properly set the YARN application status and
* cleanup if needed.
*/
private def setupSystemSecurityManager() = {
private def setupSystemSecurityManager(): Unit = {
try {
var stopped = false
System.setSecurityManager(new java.lang.SecurityManager() {
Expand All @@ -429,8 +430,7 @@ private[spark] class ApplicationMaster(args: ApplicationMasterArguments,
}
}
// required for the checkExit to work properly
override def checkPermission(perm: java.security.Permission): Unit = {
}
override def checkPermission(perm: java.security.Permission): Unit = {}
})
}
catch {
Expand Down Expand Up @@ -468,7 +468,7 @@ private[spark] class ApplicationMaster(args: ApplicationMasterArguments,
e.getCause match {
case _: InterruptedException =>
// Reporter thread can interrupt to stop user class
case e: Throwable =>
case e: Exception =>
finish(FinalApplicationStatus.FAILED,
ApplicationMaster.EXIT_EXCEPTION_USER_CLASS,
"User class threw exception: " + e.getMessage)
Expand Down

0 comments on commit 9c2efbf

Please sign in to comment.