Skip to content

Commit 6112270

Browse files
committed
SPARK-1203 fix saving to hdfs from yarn
Author: Thomas Graves <[email protected]> Closes #173 from tgravescs/SPARK-1203 and squashes the following commits: 4fd5ded [Thomas Graves] adding import 964e3f7 [Thomas Graves] SPARK-1203 fix saving to hdfs from yarn
1 parent d55ec86 commit 6112270

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/src/main/scala/org/apache/spark/rdd/PairRDDFunctions.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import org.apache.hadoop.mapreduce.lib.output.{FileOutputFormat => NewFileOutput
4141
import org.apache.hadoop.mapred.SparkHadoopWriter
4242

4343
import org.apache.spark._
44+
import org.apache.spark.deploy.SparkHadoopUtil
4445
import org.apache.spark.Partitioner.defaultPartitioner
4546
import org.apache.spark.SparkContext._
4647
import org.apache.spark.partial.{BoundedDouble, PartialResult}
@@ -723,6 +724,7 @@ class PairRDDFunctions[K: ClassTag, V: ClassTag](self: RDD[(K, V)])
723724
if (valueClass == null) {
724725
throw new SparkException("Output value class not set")
725726
}
727+
SparkHadoopUtil.get.addCredentials(conf)
726728

727729
logDebug("Saving as hadoop file of type (" + keyClass.getSimpleName + ", " +
728730
valueClass.getSimpleName + ")")

0 commit comments

Comments
 (0)