Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxr committed Jul 23, 2014
1 parent 357575c commit 3b1ba19
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Expand Up @@ -39,7 +39,7 @@ class PartitionwiseSampledRDDPartition(val prev: Partition, val seed: Long)
*
* @param prev RDD to be sampled
* @param sampler a random sampler
* @param preservesPartitioning whether the partitioner of the parent RDD should be preserved
* @param preservesPartitioning whether the sampler preserves the partitioner of the parent RDD
* @param seed random seed
* @tparam T input RDD item type
* @tparam U sampled RDD item type
Expand Down
12 changes: 6 additions & 6 deletions core/src/main/scala/org/apache/spark/rdd/RDD.scala
Expand Up @@ -586,8 +586,8 @@ abstract class RDD[T: ClassTag](

/**
* Return a new RDD by applying a function to each partition of this RDD. Note that
* `preservesPartitioning` means whether to preserve the partitioner of this RDD, which should be
* `false` unless this is a pair RDD and the input function doesn't modify the keys.
* `preservesPartitioning` means whether the input function preserves the partitioner, which
* should be `false` unless this is a pair RDD and the input function doesn't modify the keys.
*/
def mapPartitions[U: ClassTag](
f: Iterator[T] => Iterator[U], preservesPartitioning: Boolean = false): RDD[U] = {
Expand All @@ -597,8 +597,8 @@ abstract class RDD[T: ClassTag](

/**
* Return a new RDD by applying a function to each partition of this RDD, while tracking the index
* of the original partition. Note that `preservesPartitioning` means whether to preserve the
* partitioner of this RDD, which should be `false` unless this is a pair RDD and the input
* of the original partition. Note that `preservesPartitioning` means whether the input function
* preserves the partitioner, which should be `false` unless this is a pair RDD and the input
* function doesn't modify the keys.
*/
def mapPartitionsWithIndex[U: ClassTag](
Expand All @@ -611,8 +611,8 @@ abstract class RDD[T: ClassTag](
* :: DeveloperApi ::
* Return a new RDD by applying a function to each partition of this RDD. This is a variant of
* mapPartitions that also passes the TaskContext into the closure. Note that
* `preservesPartitioning` means whether to preserve the partitioner of this RDD, which should be
* `false` unless this is a pair RDD and the input function doesn't modify the keys.
* `preservesPartitioning` means whether the input function preserves the partitioner, which
* should be `false` unless this is a pair RDD and the input function doesn't modify the keys.
*/
@DeveloperApi
def mapPartitionsWithContext[U: ClassTag](
Expand Down

0 comments on commit 3b1ba19

Please sign in to comment.