Ngone51 commented on a change in pull request #27395: [SPARK-30667][CORE] Add 
allGather method to BarrierTaskContext
URL: https://github.com/apache/spark/pull/27395#discussion_r378608147
 
 

 ##########
 File path: 
core/src/test/scala/org/apache/spark/scheduler/BarrierTaskContextSuite.scala
 ##########
 @@ -52,6 +54,27 @@ class BarrierTaskContextSuite extends SparkFunSuite with 
LocalSparkContext {
     assert(times.max - times.min <= 1000)
   }
 
+  test("share messages with allGather() call") {
 
 Review comment:
   Shall we add extra tests for mix-in barrier & allGather, e.g.:
   
   ```
   rdd.barrier().mapPartitions { it =>
         val context = BarrierTaskContext.get()
         val partitionId = context.partitionId
         if (partitionId == 0) {
           context.barrier()
         } else {
           context.allGather("partitionId.toString")
         }
   }
   ```
   
   And,
   
   ```
   rdd.barrier().mapPartitions { it =>
         val context = BarrierTaskContext.get()
         ...
         context.barrier()
         ...
         context.allGather("")
   }
   ```

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to