-
Notifications
You must be signed in to change notification settings - Fork 29.3k
[SPARK-32077][CORE] Support host-local shuffle data reading when external shuffle service is disabled #28911
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
Changes from 33 commits
0815e75
dc6e7b8
b1c6ac0
64037cf
285fd70
904335a
9e3c875
5e12b68
3960b44
27c5f5c
8a5811f
05598f8
23181b6
eb6eb9a
5fdf1bc
d192db8
db2500a
5c767da
0d25492
f6cfcbc
0a144e3
b44f1cb
342ae60
613ffab
cd3e30d
da8d78a
7d9036a
0372bd8
17f1b60
530d63c
b14d611
3f7ea0b
2aa71f6
054bf69
5fbd6bb
8c5fdb3
9aa6974
09665e2
6d21906
5ea8f24
57f3e1d
d70e757
6b97be5
5e98eca
8f16c17
7c38190
a35807b
a23ab17
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -1415,10 +1415,11 @@ package object config { | |||
|
|
||||
| private[spark] val SHUFFLE_HOST_LOCAL_DISK_READING_ENABLED = | ||||
| ConfigBuilder("spark.shuffle.readHostLocalDisk") | ||||
| .doc(s"If enabled (and `${SHUFFLE_USE_OLD_FETCH_PROTOCOL.key}` is disabled and external " + | ||||
| s"shuffle `${SHUFFLE_SERVICE_ENABLED.key}` is enabled), shuffle " + | ||||
| "blocks requested from those block managers which are running on the same host are read " + | ||||
| "from the disk directly instead of being fetched as remote blocks over the network.") | ||||
| .doc(s"If enabled (and `${SHUFFLE_USE_OLD_FETCH_PROTOCOL.key}` is disabled, shuffle " + | ||||
| "blocks requested from those block managers which are running on the same host are " + | ||||
| "read from the disk directly instead of being fetched as remote blocks over the " + | ||||
| "network. Note that for k8s workloads, this only works when nodes are using " + | ||||
| "non-isolated container storage.") | ||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is correct, but shall we remove this comment which is specific to some resource manager? MESOS has been using Container for a long time, too.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point 👍
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Ngone51 on containerized resource manager having a non-isolated container storage won't be enough, as for this feature to work we need to detect this non-isolation. Currently this is done by using the some host in the blockmanager ID which works only for YARN and standalone mode, is not it?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
IIUC, from @holdenk 's previous comment and @dongjoon-hyun 's comment, it should also work for Mesos/K8s when they're using the non-isolated container.
I don't. To be honest, I'm not familiar with the containerized resource manager. I'm also not sure what the plan you're meaning here. Is it only needed for the containerized resource manager?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry for the confusion. My statement: this feature does not work on containerized systems even on non-isolated storage based containers as on those system AFAIK all the containers (running the executors and block managers along) have different hostnames (and IP addresses). This feature currently is built on detecting the shared storage by the reused hostnames: spark/core/src/main/scala/org/apache/spark/storage/ShuffleBlockFetcherIterator.scala Line 307 in 6b97be5
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you four your clarification. If that's the truth, I think we should point it out at doc. cc @dongjoon-hyun @holdenk |
||||
| .version("3.0.0") | ||||
| .booleanConf | ||||
| .createWithDefault(true) | ||||
|
|
||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -113,6 +113,15 @@ class NettyBlockRpcServer( | |
| s"when there is not sufficient space available to store the block.") | ||
| responseContext.onFailure(exception) | ||
| } | ||
|
|
||
| case getLocalDirs: GetLocalDirsForExecutors => | ||
| assert(getLocalDirs.appId == appId) | ||
| assert(getLocalDirs.execIds.length == 1) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Although we have these assertions, what happen when this
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This's a good point. I've changed it to reply to the sender with the error if the request fails assertion. Thus, the sender could handle the error as fetch failure. |
||
| val execId = getLocalDirs.execIds.head | ||
| val dirs = blockManager.getLocalDiskDirs | ||
| responseContext | ||
| .onSuccess(new LocalDirsForExecutors(Map(execId -> dirs).asJava).toByteBuffer) | ||
|
|
||
| } | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.