Skip to content

[SPARK-4883][Shuffle] Add a name to the directoryCleaner thread #3734

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

Closed
wants to merge 2 commits into from
Closed

[SPARK-4883][Shuffle] Add a name to the directoryCleaner thread #3734

wants to merge 2 commits into from

Conversation

zsxwing
Copy link
Member

@zsxwing zsxwing commented Dec 18, 2014

No description provided.

@SparkQA
Copy link

SparkQA commented Dec 18, 2014

Test build #24586 has started for PR 3734 at commit 71156d6.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Dec 18, 2014

Test build #24586 has finished for PR 3734 at commit 71156d6.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • trait ParquetTest
    • protected class CaseInsensitiveMap(map: Map[String, String]) extends Map[String, String]
    • class HiveThriftServer2Listener(val server: HiveServer2) extends SparkListener

@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/24586/
Test PASSed.

@@ -60,8 +61,11 @@
private final TransportConf conf;

public ExternalShuffleBlockManager(TransportConf conf) {
// TODO: Give this thread a name.
this(conf, Executors.newSingleThreadExecutor());
this(conf, Executors.newSingleThreadExecutor(
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe use NettyUtils.createThreadFactory() (could move that to JavaUtils too, less important).

Copy link
Member Author

Choose a reason for hiding this comment

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

Should it be daemon or not? If it's daemon, it may not have enough time to delete all files when the service is exiting.

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, this should be daemon, I think, otherwise it may prevent the JVM from exiting even when it's not doing anything. If we wanted to prevent the service from exiting before cleanup has completed, I would rather block in a stop() method until the queue of directories to delete has been drained, but I do not think this too important. Unlike Spark Executors, the graceful termination of this service should be uncorrelated with buildup of shuffle data.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree. Use NettyUtils.createThreadFactor now

@SparkQA
Copy link

SparkQA commented Dec 19, 2014

Test build #24634 has started for PR 3734 at commit cc74727.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Dec 19, 2014

Test build #24634 has finished for PR 3734 at commit cc74727.

  • 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/24634/
Test PASSed.

this(conf, Executors.newSingleThreadExecutor());
this(conf, Executors.newSingleThreadExecutor(
// Add `spark` prefix because it will run in NM in Yarn mode.
NettyUtils.createThreadFactory("spark-shuffle-directory-clean")));
Copy link
Contributor

Choose a reason for hiding this comment

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

super nit: "spark-shuffle-directory-cleaner" may be a slightly better name

@aarondav
Copy link
Contributor

LGTM, just want to add an "-er" suffix to the name. Thanks for doing this!

@SparkQA
Copy link

SparkQA commented Dec 20, 2014

Test build #24669 has started for PR 3734 at commit e6f2b61.

  • This patch merges cleanly.

@zsxwing
Copy link
Member Author

zsxwing commented Dec 20, 2014

Done

@SparkQA
Copy link

SparkQA commented Dec 20, 2014

Test build #24669 has finished for PR 3734 at commit e6f2b61.

  • 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/24669/
Test PASSed.

@andrewor14
Copy link
Contributor

Ok looks good to me too. I'm merging this into master and 1.2 thanks!

asfgit pushed a commit that referenced this pull request Dec 22, 2014
Author: zsxwing <zsxwing@gmail.com>

Closes #3734 from zsxwing/SPARK-4883 and squashes the following commits:

e6f2b61 [zsxwing] Fix the name
cc74727 [zsxwing] Add a name to the directoryCleaner thread

(cherry picked from commit 8773705)
Signed-off-by: Andrew Or <andrew@databricks.com>
@asfgit asfgit closed this in 8773705 Dec 22, 2014
@zsxwing zsxwing deleted the SPARK-4883 branch December 23, 2014 02:11
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.

5 participants