You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/04/04 04:07:29 UTC

[GitHub] [spark] Ngone51 edited a comment on issue #28117: [SPARK-31344][CORE] Polish implementation of barrier() and allGather()

Ngone51 edited a comment on issue #28117: [SPARK-31344][CORE] Polish implementation of barrier() and allGather()
URL: https://github.com/apache/spark/pull/28117#issuecomment-608968979
 
 
   This PR tried to address comment https://github.com/apache/spark/pull/27395#pullrequestreview-357681136 , but please note that we can not simply build `barrier()` on top of `allGather("")`, because we need a way do distinguish these two different calls to prevent following illegal case:
   
   ```scala
   rdd.barrier().mapPartitions { iter =>
      val context = BarrierTaskContext.get()
      val partitionId = context.partitionId
      if (partitionId == 0) {
        context.barrier()
      } else {
        context.allGather(partitionId.toString)
      }
     iter
    }
   ``` 
   
   ping @sarthfrey @jiangxb1987 @mengxr Please take a look, thanks!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org