-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[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
Conversation
Test build #24586 has started for PR 3734 at commit
|
Test build #24586 has finished for PR 3734 at commit
|
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( |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
Test build #24634 has started for PR 3734 at commit
|
Test build #24634 has finished for PR 3734 at commit
|
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"))); |
There was a problem hiding this comment.
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
LGTM, just want to add an "-er" suffix to the name. Thanks for doing this! |
Test build #24669 has started for PR 3734 at commit
|
Done |
Test build #24669 has finished for PR 3734 at commit
|
Test PASSed. |
Ok looks good to me too. I'm merging this into master and 1.2 thanks! |
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>
No description provided.