spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject [1/4] git commit: Fix access to Secure HDFS
Date Sat, 09 Nov 2013 21:48:04 GMT
Updated Branches:
  refs/heads/master 72a601ec3 -> 8af99f235


Fix access to Secure HDFS


Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/5f9ed517
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/5f9ed517
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/5f9ed517

Branch: refs/heads/master
Commit: 5f9ed51719c294626087a86c2bcceea7ba2f698b
Parents: 3d4ad84
Author: tgravescs <tgraves_cs@yahoo.com>
Authored: Fri Nov 8 08:41:57 2013 -0600
Committer: tgravescs <tgraves_cs@yahoo.com>
Committed: Fri Nov 8 08:41:57 2013 -0600

----------------------------------------------------------------------
 core/src/main/scala/org/apache/spark/rdd/HadoopRDD.scala | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/5f9ed517/core/src/main/scala/org/apache/spark/rdd/HadoopRDD.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/rdd/HadoopRDD.scala b/core/src/main/scala/org/apache/spark/rdd/HadoopRDD.scala
index 32901a5..47e958b 100644
--- a/core/src/main/scala/org/apache/spark/rdd/HadoopRDD.scala
+++ b/core/src/main/scala/org/apache/spark/rdd/HadoopRDD.scala
@@ -132,6 +132,8 @@ class HadoopRDD[K, V](
 
   override def getPartitions: Array[Partition] = {
     val jobConf = getJobConf()
+    // add the credentials here as this can be called before SparkContext initialized
+    SparkHadoopUtil.get.addCredentials(jobConf)
     val inputFormat = getInputFormat(jobConf)
     if (inputFormat.isInstanceOf[Configurable]) {
       inputFormat.asInstanceOf[Configurable].setConf(jobConf)


Mime
View raw message