Merge pull request #876 from mbautin/master_hadoop_rdd_conf

Make HadoopRDD's configuration accessible
This commit is contained in:
Reynold Xin 2013-08-30 12:05:13 -07:00
commit 94bb7fd46e
2 changed files with 6 additions and 1 deletions

View file

@ -34,7 +34,7 @@ import org.apache.hadoop.util.ReflectionUtils
import spark.{Dependency, Logging, Partition, RDD, SerializableWritable, SparkContext, SparkEnv, TaskContext}
import spark.util.NextIterator
import org.apache.hadoop.conf.Configurable
import org.apache.hadoop.conf.{Configuration, Configurable}
/**
@ -132,4 +132,6 @@ class HadoopRDD[K, V](
override def checkpoint() {
// Do nothing. Hadoop RDD should not be checkpointed.
}
def getConf: Configuration = confBroadcast.value.value
}

View file

@ -120,4 +120,7 @@ class NewHadoopRDD[K, V](
val theSplit = split.asInstanceOf[NewHadoopPartition]
theSplit.serializableHadoopSplit.value.getLocations.filter(_ != "localhost")
}
def getConf: Configuration = confBroadcast.value.value
}