Skip to content

Conversation

@Ngone51
Copy link
Member

@Ngone51 Ngone51 commented May 21, 2020

What changes were proposed in this pull request?

Change from messages.toList.iterator to Iterator.single(messages.toList).

Why are the changes needed?

In this test, the expected result of rdd2.collect().head should actually be List("0", "1", "2", "3") but is "0" now.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Updated test.

Thanks @WeichenXu123 reported this problem.

@Ngone51
Copy link
Member Author

Ngone51 commented May 21, 2020

@SparkQA
Copy link

SparkQA commented May 21, 2020

Test build #122920 has finished for PR 28596 at commit 2be2ca7.

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

Copy link
Contributor

@jiangxb1987 jiangxb1987 left a comment

Choose a reason for hiding this comment

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

LGTM

@jiangxb1987
Copy link
Contributor

retest this please

@SparkQA
Copy link

SparkQA commented May 22, 2020

Test build #122949 has finished for PR 28596 at commit 2be2ca7.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@Ngone51
Copy link
Member Author

Ngone51 commented May 22, 2020

retest this please

val messages = rdd2.collect().head
// All the task partitionIds are shared
for((x, i) <- messages.view.zipWithIndex) assert(x.toString == i.toString)
assert(messages === List("0", "1", "2", "3"))
Copy link
Contributor

Choose a reason for hiding this comment

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

We'd better verify the whole rdd collect array, not only the head of result array?

Copy link
Member Author

Choose a reason for hiding this comment

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

make sense.

@SparkQA
Copy link

SparkQA commented May 22, 2020

Test build #122959 has finished for PR 28596 at commit 2be2ca7.

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

@cloud-fan
Copy link
Contributor

LGTM

jiangxb1987 pushed a commit that referenced this pull request May 22, 2020
…sages with allGather() call"

### What changes were proposed in this pull request?

Change from `messages.toList.iterator` to `Iterator.single(messages.toList)`.

### Why are the changes needed?

In this test, the expected result of `rdd2.collect().head` should actually be `List("0", "1", "2", "3")` but is `"0"` now.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Updated test.

Thanks WeichenXu123 reported this problem.

Closes #28596 from Ngone51/fix_allgather_test.

Authored-by: yi.wu <[email protected]>
Signed-off-by: Xingbo Jiang <[email protected]>
(cherry picked from commit 83d0967)
Signed-off-by: Xingbo Jiang <[email protected]>
@jiangxb1987
Copy link
Contributor

Thanks, merged to master/3.0 !

@SparkQA
Copy link

SparkQA commented May 22, 2020

Test build #122962 has finished for PR 28596 at commit 021c0a5.

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

@Ngone51
Copy link
Member Author

Ngone51 commented May 22, 2020

thanks all!

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.

6 participants