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

    https://github.com/apache/spark/pull/5307#discussion_r27931054
  
    --- Diff: 
yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala ---
    @@ -552,8 +558,47 @@ private[spark] class ApplicationMaster(
         }
       }
     
    +  /** set  "MapReduceShuffleToken" before registerAM
    +    * @return
    +    */
    +  private def initJobCredentialsAndUGI() = {
    +    val sc = sparkContextRef.get()
    +    val conf = if (sc != null) sc.getConf else sparkConf
    +    val isEncryptedShuffle = if (conf != null) {
    +      conf.getBoolean("spark.encrypted.shuffle", false)
    +    } else {
    +      false
    +    }
    +    if (isEncryptedShuffle) {
    --- End diff --
    
    Another instance of this code that could use some cleaning up.
    
    I wonder if it would make sense to have a `CryptoConf` object that wraps a 
`SparkConf` (like `SSLOptions`).


---
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