changing caching behavior on indexedrdds
This commit is contained in:
parent
3bb6e019d4
commit
327a4db9f7
|
@ -58,6 +58,12 @@ class IndexedRDD[K: ClassManifest, V: ClassManifest](
|
||||||
override def getPartitions: Array[Partition] = tuples.getPartitions
|
override def getPartitions: Array[Partition] = tuples.getPartitions
|
||||||
override def getPreferredLocations(s: Partition): Seq[String] = tuples.getPreferredLocations(s)
|
override def getPreferredLocations(s: Partition): Seq[String] = tuples.getPreferredLocations(s)
|
||||||
|
|
||||||
|
override def cache: IndexedRDD[K,V] = {
|
||||||
|
index.cache
|
||||||
|
valuesRDD.cache
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct a new IndexedRDD that is indexed by only the keys in the RDD
|
* Construct a new IndexedRDD that is indexed by only the keys in the RDD
|
||||||
|
|
Loading…
Reference in a new issue