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_r378004681
##########
File path: core/src/main/scala/org/apache/spark/BarrierCoordinator.scala
##########
@@ -173,7 +204,18 @@ private[spark] class BarrierCoordinator(
requesters: ArrayBuffer[RpcCallContext],
numTasks: Int): Boolean = {
if (requesters.size == numTasks) {
- requesters.foreach(_.reply(()))
+ if (requestMethodToSync == RequestMethod.BARRIER) {
+ requesters.foreach(_.reply(""))
+ }
+ else if (requestMethodToSync == RequestMethod.ALL_GATHER) {
+ val jsonArray = JArray(
+ allGatherMessages.map(
+ (msg) => JString(msg)
+ ).toList
+ )
+ val json: String = compact(render(jsonArray))
Review comment:
I'm not clear about user case, actually. But, may I ask why we change to
use Json format?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]