Merge pull request #876 from mbautin/master_hadoop_rdd_conf
Make HadoopRDD's configuration accessible
This commit is contained in:
commit
94bb7fd46e
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue