Github user tgravescs commented on a diff in the pull request: https://github.com/apache/spark/pull/2676#discussion_r19825969 --- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala --- @@ -661,7 +662,10 @@ class SparkContext(config: SparkConf) extends Logging { fClass: Class[F], kClass: Class[K], vClass: Class[V]): RDD[(K, V)] = { - new NewHadoopRDD(this, fClass, kClass, vClass, conf) + // Add necessary security credentials to the JobConf. Required to access secure HDFS. + val jconf = new JobConf(conf) + SparkHadoopUtil.get.addCredentials(jconf) + new NewHadoopRDD(this, fClass, kClass, vClass, jconf) --- End diff -- Sorry I don't see what you are referring to in hadoopFile? Do you mean hadoopRDD, which already takes a Jobconf? We need a JobConf for addCredentials routine to work. I could look at add the credentials another way but the nice thing about creating another JobConf is if the user passes in a JobConf instance creating a new one handles transferring any credentials from that one as well.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org