Skip to content

Comments

[SPARK-30667][FOLLOW-UP][CORE] Change BarrierTaskContext allGather method return type#27951

Closed
sarthfrey wants to merge 1 commit intoapache:masterfrom
sarthfrey:all-gather-api
Closed

[SPARK-30667][FOLLOW-UP][CORE] Change BarrierTaskContext allGather method return type#27951
sarthfrey wants to merge 1 commit intoapache:masterfrom
sarthfrey:all-gather-api

Conversation

@sarthfrey
Copy link
Contributor

This PR proposes that we change the return type of the BarrierTaskContext.allGather method to Array[String] instead of ArrayBuffer[String] since it is immutable. Based on discussion in #27640. cc @zhengruifeng @srowen

result = BarrierTaskContextMessageProtocol.BARRIER_RESULT_SUCCESS
case BarrierTaskContextMessageProtocol.ALL_GATHER_FUNCTION =>
val messages: ArrayBuffer[String] = context.asInstanceOf[BarrierTaskContext].allGather(
val messages: Array[String] = context.asInstanceOf[BarrierTaskContext].allGather(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably don't even need these types here and below, but it won't matter

@SparkQA
Copy link

SparkQA commented Mar 18, 2020

Test build #120000 has finished for PR 27951 at commit baab965.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon HyukjinKwon changed the title [SPARK-30667][CORE] Change BarrierTaskContext allGather method return type [SPARK-30667][FOLLOW-UP][CORE] Change BarrierTaskContext allGather method return type Mar 19, 2020
HyukjinKwon pushed a commit that referenced this pull request Mar 19, 2020
… type

This PR proposes that we change the return type of the `BarrierTaskContext.allGather` method to `Array[String]` instead of `ArrayBuffer[String]` since it is immutable. Based on discussion in #27640. cc zhengruifeng srowen

Closes #27951 from sarthfrey/all-gather-api.

Authored-by: sarthfrey-db <sarth.frey@databricks.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
(cherry picked from commit 6fd3138)
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
@HyukjinKwon
Copy link
Member

Merged to master and branch-3.0.

@sarthfrey sarthfrey deleted the all-gather-api branch March 20, 2020 22:25
sjincho pushed a commit to sjincho/spark that referenced this pull request Apr 15, 2020
… type

This PR proposes that we change the return type of the `BarrierTaskContext.allGather` method to `Array[String]` instead of `ArrayBuffer[String]` since it is immutable. Based on discussion in apache#27640. cc zhengruifeng srowen

Closes apache#27951 from sarthfrey/all-gather-api.

Authored-by: sarthfrey-db <sarth.frey@databricks.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants