Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/2194#discussion_r17016500
  
    --- Diff: core/src/main/scala/org/apache/spark/api/java/JavaRDDLike.scala 
---
    @@ -186,6 +186,62 @@ trait JavaRDDLike[T, This <: JavaRDDLike[T, This]] 
extends Serializable {
       }
     
       /**
    +   * :: 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.
    +   *
    +   * `preservesPartitioning` indicates 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[R](
    +      f: JFunction2[TaskContext, java.util.Iterator[T], 
java.util.Iterator[R]],
    +      preservesPartitioning: Boolean = false): JavaRDD[R] = {
    +
    +    new JavaRDD(rdd.mapPartitionsWithContext(
    +      ((a, b) => f(a, asJavaIterator(b))), 
preservesPartitioning)(fakeClassTag))(fakeClassTag)
    +  }
    +
    +
    +  /**
    +   * :: DeveloperApi ::
    +   * Return a new JavaDoubleRDD by applying a function to each partition 
of this RDD. This is a
    +   * variant of mapPartitions that also passes the TaskContext into the 
closure.
    +   *
    +   * `preservesPartitioning` indicates 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 mapPartitionsToDoubleWithContext(
    --- End diff --
    
    can we remove this one? I don't think it is needed for Hive, is it?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to