Skip to content

Commit

Permalink
Added constant "SHUTDOWN_HOOK_PRIORITY" to ApplicationMaster
Browse files Browse the repository at this point in the history
  • Loading branch information
sarutak committed Sep 13, 2014
1 parent 54eb68f commit ee6f1aa
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,8 @@ private[spark] class ApplicationMaster(args: ApplicationMasterArguments,
}

// Use higher priority than FileSystem.
val priority = 20
assert(priority > FileSystem.SHUTDOWN_HOOK_PRIORITY)
ShutdownHookManager.get().addShutdownHook(cleanupHook, 20)
assert(ApplicationMaster.SHUTDOWN_HOOK_PRIORITY > FileSystem.SHUTDOWN_HOOK_PRIORITY)
ShutdownHookManager.get().addShutdownHook(cleanupHook, ApplicationMaster.SHUTDOWN_HOOK_PRIORITY)

// Call this to force generation of secret so it gets populated into the
// Hadoop UGI. This has to happen before the startUserClass which does a
Expand Down Expand Up @@ -408,6 +407,8 @@ private[spark] class ApplicationMaster(args: ApplicationMasterArguments,

object ApplicationMaster extends Logging {

private val SHUTDOWN_HOOK_PRIORITY: Int = 30

private var master: ApplicationMaster = _

def main(args: Array[String]) = {
Expand Down

0 comments on commit ee6f1aa

Please sign in to comment.