Skip to content

Conversation

cleaton
Copy link

@cleaton cleaton commented Feb 3, 2015

A slow receiver might not have enough time to shutdown cleanly even when graceful shutdown is used. This PR extends graceful waiting to make sure all receivers have deregistered and that the receiver job has terminated.

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@tdas
Copy link
Contributor

tdas commented Feb 3, 2015

ok to test.

@SparkQA
Copy link

SparkQA commented Feb 3, 2015

Test build #26662 has started for PR 4338 at commit 3d0bd35.

  • This patch merges cleanly.

override def run() {
logInfo("Receiving started")
for(i <- 1 to totalRecords) {
Thread.sleep(recordsPerSecond * 1000)
Copy link
Contributor

Choose a reason for hiding this comment

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

I dont get the logic here. Should the delay be inverse of recordsPerSecond? Higher the rate, lower the delay?

@tdas
Copy link
Contributor

tdas commented Feb 3, 2015

@cleaton Thanks for this PR. It looks reasonably good, except a few minor comments. Could you please address them very soon? I would like to merge this today for Spark 1.3.

@cleaton
Copy link
Author

cleaton commented Feb 3, 2015

@tdas I will address it now. I have one question though. Don't you think there at least should be some sort of timeout while waiting for the receivers to deregister? I am afraid that if a receiver can not de-register for whatever reason the shutdown sequence will be stuck forever.

edit: this might not be a problem since dead/stuck receivers will timeout and become de-registered?

@SparkQA
Copy link

SparkQA commented Feb 3, 2015

Test build #26662 has finished for PR 4338 at commit 3d0bd35.

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

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/26662/
Test PASSed.

@SparkQA
Copy link

SparkQA commented Feb 3, 2015

Test build #26674 has started for PR 4338 at commit a9cf223.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Feb 3, 2015

Test build #26674 has finished for PR 4338 at commit a9cf223.

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

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/26674/
Test PASSed.

@tdas
Copy link
Contributor

tdas commented Feb 3, 2015

Alright, I like this. I am merging this. Please submit the other PR as well :)

asfgit pushed a commit that referenced this pull request Feb 3, 2015
…job to terminate

A slow receiver might not have enough time to shutdown cleanly even when graceful shutdown is used. This PR extends graceful waiting to make sure all receivers have deregistered and that the receiver job has terminated.

Author: Jesper Lundgren <[email protected]>

Closes #4338 from cleaton/stopreceivers and squashes the following commits:

a9cf223 [Jesper Lundgren] remove cleaner.ttl config
f969b6e [Jesper Lundgren] fix inversed logic in unit test
3d0bd35 [Jesper Lundgren] switch boleans to match running status instead of terminated
9a9ff88 [Jesper Lundgren] wait for receivers to shutdown and receiver job to terminate
d179372 [Jesper Lundgren] Add graceful shutdown unit test covering slow receiver onStop

(cherry picked from commit 1e8b539)
Signed-off-by: Tathagata Das <[email protected]>
asfgit pushed a commit that referenced this pull request Feb 3, 2015
…job to terminate

A slow receiver might not have enough time to shutdown cleanly even when graceful shutdown is used. This PR extends graceful waiting to make sure all receivers have deregistered and that the receiver job has terminated.

Author: Jesper Lundgren <[email protected]>

Closes #4338 from cleaton/stopreceivers and squashes the following commits:

a9cf223 [Jesper Lundgren] remove cleaner.ttl config
f969b6e [Jesper Lundgren] fix inversed logic in unit test
3d0bd35 [Jesper Lundgren] switch boleans to match running status instead of terminated
9a9ff88 [Jesper Lundgren] wait for receivers to shutdown and receiver job to terminate
d179372 [Jesper Lundgren] Add graceful shutdown unit test covering slow receiver onStop

(cherry picked from commit 1e8b539)
Signed-off-by: Tathagata Das <[email protected]>
@asfgit asfgit closed this in 1e8b539 Feb 3, 2015
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