-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-14437][Core]Use the address that NettyBlockTransferService listens to create BlockManagerId #12240
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
|
cc @vanzin |
|
Test build #55236 has finished for PR 12240 at commit
|
| * A BlockTransferService that uses Netty to fetch a set of blocks at at time. | ||
| */ | ||
| class NettyBlockTransferService(conf: SparkConf, securityManager: SecurityManager, numCores: Int) | ||
| private[spark] class NettyBlockTransferService( |
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.
@rxin is it a mistake that NettyBlockTransferService was public?
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.
Never mind. Just found it's in network package
|
Test build #55237 has finished for PR 12240 at commit
|
|
Test build #55239 has finished for PR 12240 at commit
|
|
Test build #55242 has finished for PR 12240 at commit
|
|
Test build #55250 has finished for PR 12240 at commit
|
|
Test build #55317 has finished for PR 12240 at commit
|
|
retest this please |
1 similar comment
|
retest this please |
|
Test build #55364 has finished for PR 12240 at commit
|
|
retest this please |
|
Test build #55376 has finished for PR 12240 at commit
|
|
retest this please |
|
Test build #55379 has finished for PR 12240 at commit
|
|
LGTM. |
|
Thanks, Merging to master. |
…e listens to create BlockManagerId apache#12240
What changes were proposed in this pull request?
Here is why SPARK-14437 happens:
BlockManagerId is created using NettyBlockTransferService.hostName which comes from
customHostname. AndExecutorwill setcustomHostnameto the hostname which is detected by the driver. However, the driver may not be able to detect the correct address in some complicated network (Netty's Channel.remoteAddress doesn't always return a connectable address). In such case,BlockManagerIdwill be created using a wrong hostname.To fix this issue, this PR uses
hostnameprovided bySparkEnv.createto createNettyBlockTransferServiceand setNettyBlockTransferService.hostnameto this one directly. A bonus of this approach is NettyBlockTransferService won't bound to0.0.0.0which is much safer.How was this patch tested?
Manually checked the bound address using local-cluster.