Skip to content

Conversation

@zsxwing
Copy link
Member

@zsxwing zsxwing commented May 4, 2016

What changes were proposed in this pull request?

Because this test extracts data from DStream.generatedRDDs before stopping, it may get data before checkpointing. Then after recovering from the checkpoint, recoveredOffsetRanges may contain something not in offsetRangesBeforeStop, which will fail the test. Adding Thread.sleep(1000) before ssc.stop() will reproduce this failure.

This PR just moves the logic of offsetRangesBeforeStop (also renamed to offsetRangesAfterStop) after ssc.stop() to fix the flaky test.

How was this patch tested?

Jenkins unit tests.

@zsxwing zsxwing changed the title Fix flaky test: o.a.s.streaming.kafka.DirectKafkaStreamSuite.offset recovery [SPARK-6005]Fix flaky test: o.a.s.streaming.kafka.DirectKafkaStreamSuite.offset recovery May 4, 2016
@zsxwing zsxwing changed the title [SPARK-6005]Fix flaky test: o.a.s.streaming.kafka.DirectKafkaStreamSuite.offset recovery [SPARK-6005][Tests]Fix flaky test: o.a.s.streaming.kafka.DirectKafkaStreamSuite.offset recovery May 4, 2016
@zsxwing
Copy link
Member Author

zsxwing commented May 4, 2016

cc @tdas

@SparkQA
Copy link

SparkQA commented May 4, 2016

Test build #57784 has finished for PR 12903 at commit 91115b8.

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

@tdas
Copy link
Contributor

tdas commented May 10, 2016

LGTM. Test for flakiness by running multiple times.

@SparkQA
Copy link

SparkQA commented May 10, 2016

Test build #2979 has finished for PR 12903 at commit 91115b8.

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

@SparkQA
Copy link

SparkQA commented May 10, 2016

Test build #2980 has finished for PR 12903 at commit 91115b8.

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

@SparkQA
Copy link

SparkQA commented May 10, 2016

Test build #2981 has finished for PR 12903 at commit 91115b8.

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

@SparkQA
Copy link

SparkQA commented May 10, 2016

Test build #2982 has finished for PR 12903 at commit 91115b8.

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

@zsxwing
Copy link
Member Author

zsxwing commented May 10, 2016

All tests passed. Merging to master and 2.0

asfgit pushed a commit that referenced this pull request May 10, 2016
…StreamSuite.offset recovery

## What changes were proposed in this pull request?

Because this test extracts data from `DStream.generatedRDDs` before stopping, it may get data before checkpointing. Then after recovering from the checkpoint, `recoveredOffsetRanges` may contain something not in `offsetRangesBeforeStop`, which will fail the test. Adding `Thread.sleep(1000)` before `ssc.stop()` will reproduce this failure.

This PR just moves the logic of `offsetRangesBeforeStop` (also renamed to `offsetRangesAfterStop`) after `ssc.stop()` to fix the flaky test.

## How was this patch tested?

Jenkins unit tests.

Author: Shixiong Zhu <[email protected]>

Closes #12903 from zsxwing/SPARK-6005.

(cherry picked from commit 9533f53)
Signed-off-by: Shixiong Zhu <[email protected]>
@asfgit asfgit closed this in 9533f53 May 10, 2016
@zsxwing zsxwing deleted the SPARK-6005 branch May 10, 2016 20:29
asfgit pushed a commit that referenced this pull request Jun 22, 2016
…StreamSuite.offset recovery

## What changes were proposed in this pull request?

Because this test extracts data from `DStream.generatedRDDs` before stopping, it may get data before checkpointing. Then after recovering from the checkpoint, `recoveredOffsetRanges` may contain something not in `offsetRangesBeforeStop`, which will fail the test. Adding `Thread.sleep(1000)` before `ssc.stop()` will reproduce this failure.

This PR just moves the logic of `offsetRangesBeforeStop` (also renamed to `offsetRangesAfterStop`) after `ssc.stop()` to fix the flaky test.

## How was this patch tested?

Jenkins unit tests.

Author: Shixiong Zhu <[email protected]>

Closes #12903 from zsxwing/SPARK-6005.

(cherry picked from commit 9533f53)
Signed-off-by: Sean Owen <[email protected]>
@srowen
Copy link
Member

srowen commented Jun 22, 2016

Also merged to 1.6

zzcclp pushed a commit to zzcclp/spark that referenced this pull request Jun 23, 2016
…StreamSuite.offset recovery

## What changes were proposed in this pull request?

Because this test extracts data from `DStream.generatedRDDs` before stopping, it may get data before checkpointing. Then after recovering from the checkpoint, `recoveredOffsetRanges` may contain something not in `offsetRangesBeforeStop`, which will fail the test. Adding `Thread.sleep(1000)` before `ssc.stop()` will reproduce this failure.

This PR just moves the logic of `offsetRangesBeforeStop` (also renamed to `offsetRangesAfterStop`) after `ssc.stop()` to fix the flaky test.

## How was this patch tested?

Jenkins unit tests.

Author: Shixiong Zhu <[email protected]>

Closes apache#12903 from zsxwing/SPARK-6005.

(cherry picked from commit 9533f53)
Signed-off-by: Sean Owen <[email protected]>
(cherry picked from commit 4fdac3c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants