changing caching behavior on indexedrdds

This commit is contained in:
Joseph E. Gonzalez 2013-08-15 16:36:26 -07:00
parent 3bb6e019d4
commit 327a4db9f7

View file

@ -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