Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6026#discussion_r29991777
  
    --- Diff: yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala ---
    @@ -515,7 +515,28 @@ private[spark] class Client(
         logInfo("Setting up container launch context for our AM")
         val appId = newAppResponse.getApplicationId
         val appStagingDir = getAppStagingDir(appId)
    -    val localResources = prepareLocalResources(appStagingDir)
    +    var localResources: Map[String, LocalResource] = null
    +    try {
    +      localResources = prepareLocalResources(appStagingDir)
    +    } catch {
    +      case e: Throwable =>
    +        var stagingDirPath: Path = null
    --- End diff --
    
    I don't think this variable is needed? `appStagingDir` can be used 
everywhere except where it needs to be wrapped for `FileSystem`. Can 
`localResources` remain a `val` and receive the value of the `try` block?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to