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

    https://github.com/apache/spark/pull/17080#discussion_r104063068
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/SparkHadoopUtil.scala 
---
    @@ -82,17 +82,25 @@ class SparkHadoopUtil extends Logging {
         // the behavior of the old implementation of this code, for backwards 
compatibility.
         if (conf != null) {
           // Explicitly check for S3 environment variables
    -      if (System.getenv("AWS_ACCESS_KEY_ID") != null &&
    -          System.getenv("AWS_SECRET_ACCESS_KEY") != null) {
    -        val keyId = System.getenv("AWS_ACCESS_KEY_ID")
    -        val accessKey = System.getenv("AWS_SECRET_ACCESS_KEY")
    -
    +      val keyId = System.getenv("AWS_ACCESS_KEY_ID")
    +      val accessKey = System.getenv("AWS_SECRET_ACCESS_KEY")
    +      if (keyId != null && accessKey != null) {
             hadoopConf.set("fs.s3.awsAccessKeyId", keyId)
             hadoopConf.set("fs.s3n.awsAccessKeyId", keyId)
             hadoopConf.set("fs.s3a.access.key", keyId)
             hadoopConf.set("fs.s3.awsSecretAccessKey", accessKey)
             hadoopConf.set("fs.s3n.awsSecretAccessKey", accessKey)
             hadoopConf.set("fs.s3a.secret.key", accessKey)
    +
    +        val sessionToken = System.getenv("AWS_SESSION_TOKEN")
    +        if (sessionToken != null) {
    +          hadoopConf.set("fs.s3a.session.token", sessionToken)
    +          logDebug(s"Found 'AWS_ACCESS_KEY_ID', 'AWS_SECRET_ACCESS_KEY' 
and " +
    --- End diff --
    
    Mind removing the logs? They don't seem particularly useful.


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