Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-29161][CORE][SQL][STREAMING] Unify default wait time for waitUntilEmpty #25837

Conversation

HeartSaVioR
Copy link
Contributor

@HeartSaVioR HeartSaVioR commented Sep 18, 2019

What changes were proposed in this pull request?

This is a follow-up of the review comment.

This patch unifies the default wait time to be 10 seconds as it would fit most of UTs (as they have smaller timeouts) and doesn't bring additional latency since it will return if the condition is met.

This patch doesn't touch the one which waits 100000 milliseconds (100 seconds), to not break anything unintentionally, though I'd rather questionable that we really need to wait for 100 seconds.

Why are the changes needed?

It simplifies the test code and get rid of various heuristic values on timeout.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

CI build will test the patch, as it would be the best environment to test the patch (builds are running there).

@SparkQA
Copy link

SparkQA commented Sep 18, 2019

Test build #110942 has finished for PR 25837 at commit dea3952.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

* Exposed for testing.
*/
@throws(classOf[TimeoutException])
def waitUntilEmpty(): Unit = {
Copy link
Member

Choose a reason for hiding this comment

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

can we make it private[spark]?

@HeartSaVioR HeartSaVioR changed the title [MINOR][CORE][SQL][STREAMING] Unify default wait time for waitUntilEmpty [SPARK-29161][CORE][SQL][STREAMING] Unify default wait time for waitUntilEmpty Sep 18, 2019
@HyukjinKwon
Copy link
Member

Looks good if tests pass.

@SparkQA
Copy link

SparkQA commented Sep 19, 2019

Test build #110945 has finished for PR 25837 at commit 0c7f990.

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

@HeartSaVioR
Copy link
Contributor Author

"metadata not propagated" not relevant to this patch.

@HeartSaVioR
Copy link
Contributor Author

retest this, please

@SparkQA
Copy link

SparkQA commented Sep 19, 2019

Test build #110950 has finished for PR 25837 at commit 769c1ee.

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

@SparkQA
Copy link

SparkQA commented Sep 19, 2019

Test build #110956 has finished for PR 25837 at commit 769c1ee.

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

Copy link
Contributor

@gaborgsomogyi gaborgsomogyi left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Member

@srowen srowen left a comment

Choose a reason for hiding this comment

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

Looks OK in principle.

@@ -180,7 +180,7 @@ class CoarseGrainedSchedulerBackendSuite extends SparkFunSuite with LocalSparkCo
backend.driverEndpoint.askSync[Boolean](
RegisterExecutor("3", mockEndpointRef, mockAddress.host, 1, logUrls, attributes, Map.empty))

sc.listenerBus.waitUntilEmpty(executorUpTimeout.toMillis)
sc.listenerBus.waitUntilEmpty()
Copy link
Member

Choose a reason for hiding this comment

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

For my understanding, is this reducing the original timeout because it was 1 minutes before (private val executorUpTimeout = 1.minute)? It seems that this file's two instances are the only place to reduce the timeout unlike the other places.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah right. My bad that's 60000 ms. I'll just roll them back.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rolled back.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM. Thanks, @HeartSaVioR .

@dongjoon-hyun
Copy link
Member

Since this passed Jenkins already and the last commit is recovered to the original code, we don't need to wait the new Jenkins. The current one also will fail at in an hour (at midnight PST). I'll merge this to master.

Thank you, @HeartSaVioR , @HyukjinKwon , @gaborgsomogyi , @srowen .

@SparkQA
Copy link

SparkQA commented Sep 20, 2019

Test build #111045 has finished for PR 25837 at commit 8e661f7.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HeartSaVioR
Copy link
Contributor Author

Thanks all for reviewing and merging!

@HeartSaVioR HeartSaVioR deleted the MINOR-unify-default-wait-time-for-wait-until-empty branch September 20, 2019 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants