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

    https://github.com/apache/spark/pull/6883#discussion_r32776196
  
    --- Diff: core/src/main/scala/org/apache/spark/api/java/JavaPairRDD.scala 
---
    @@ -515,6 +515,76 @@ class JavaPairRDD[K, V](val rdd: RDD[(K, V)])
       }
     
       /**
    +   * Same as join, but uses a block join, otherwise known as a replicate 
fragment join.
    +   * This is useful in cases where the data has extreme skew.
    +   * The input params leftReplication and rightReplication control the 
replication of the left
    +   * (this rdd) and right (other rdd) respectively.
    +   */
    +  def blockJoin[W](other: JavaPairRDD[K, W], leftReplication: Int, 
rightReplication: Int, 
    +    partitioner: Partitioner): JavaPairRDD[K, (V, W)] = {
    +    fromRDD(rdd.blockJoin(other, leftReplication, rightReplication, 
partitioner))
    +  }
    +
    +  /**
    +   * Same as join, but uses a block join, otherwise known as a replicate 
fragment join.
    +   * This is useful in cases where the data has extreme skew.
    +   * The input params leftReplication and rightReplication control the 
replication of the left
    +   * (this rdd) and right (other rdd) respectively.
    +   */
    +  def blockJoin[W](other: JavaPairRDD[K, W], leftReplication: Int, 
rightReplication: Int) 
    +      : JavaPairRDD[K, (V, W)] = {
    +    fromRDD(rdd.blockJoin(other, leftReplication, rightReplication))
    +  }
    +
    +  /**
    +   * Same as leftOuterJoin, but uses a block join, otherwise known as a 
replicate fragment join.
    +   * This is useful in cases where the data has extreme skew.
    +   * The input param rightReplication controls the replication of the 
right (other rdd).
    +   */
    +  def blockLeftOuterJoin[W](other: JavaPairRDD[K, W], rightReplication: 
Int,
    +    partitioner: Partitioner): JavaPairRDD[K, (V, Optional[W])] = {
    +    fromRDD(rdd.blockLeftOuterJoin(other, rightReplication, 
partitioner).mapValues{ case (v, w) =>
    --- End diff --
    
    need space after `.mapValues`


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