@@ -721,7 +721,7 @@ class PairRDDFunctions[K, V](self: RDD[(K, V)])
721721 outputFormatClass : Class [_ <: NewOutputFormat [_, _]],
722722 conf : Configuration = self.context.hadoopConfiguration)
723723 {
724- // keep the source-compatibility and distinct with the SparkConf
724+ // Rename this as hadoopConf internally to avoid shadowing (see SPARK-2038).
725725 val hadoopConf = conf
726726 val job = new NewAPIHadoopJob (hadoopConf)
727727 job.setOutputKeyClass(keyClass)
@@ -756,7 +756,7 @@ class PairRDDFunctions[K, V](self: RDD[(K, V)])
756756 outputFormatClass : Class [_ <: OutputFormat [_, _]],
757757 conf : JobConf = new JobConf (self.context.hadoopConfiguration),
758758 codec : Option [Class [_ <: CompressionCodec ]] = None ) {
759- // keep the source-compatibility and distinct with the SparkConf
759+ // Rename this as hadoopConf internally to avoid shadowing (see SPARK-2038).
760760 val hadoopConf = conf
761761 hadoopConf.setOutputKeyClass(keyClass)
762762 hadoopConf.setOutputValueClass(valueClass)
@@ -784,7 +784,7 @@ class PairRDDFunctions[K, V](self: RDD[(K, V)])
784784 * configured for a Hadoop MapReduce job.
785785 */
786786 def saveAsNewAPIHadoopDataset (conf : Configuration ) {
787- // keep the source-compatibility and distinct with the SparkConf
787+ // Rename this as hadoopConf internally to avoid shadowing (see SPARK-2038).
788788 val hadoopConf = conf
789789 val job = new NewAPIHadoopJob (hadoopConf)
790790 val formatter = new SimpleDateFormat (" yyyyMMddHHmm" )
@@ -844,7 +844,7 @@ class PairRDDFunctions[K, V](self: RDD[(K, V)])
844844 * MapReduce job.
845845 */
846846 def saveAsHadoopDataset (conf : JobConf ) {
847- // keep the source-compatibility and distinct with the SparkConf
847+ // Rename this as hadoopConf internally to avoid shadowing (see SPARK-2038).
848848 val hadoopConf = conf
849849 val outputFormatInstance = hadoopConf.getOutputFormat
850850 val keyClass = hadoopConf.getOutputKeyClass
0 commit comments