-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-24203][core] Make executor's bindAddress configurable #26331
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
|
Hi, @nishchalv . |
789b4af to
608d427
Compare
|
@dongjoon-hyun fixed the build. |
0937237 to
62974f8
Compare
|
Jenkins, test this please. |
|
Test build #113070 has finished for PR 26331 at commit
|
|
Oh interesting, this could potentially help with an issue I've been seeing in Kubeflow with Spark under certain scenarios. I'll try and take a proper look next week if no one else has a chance. |
|
Let's CC the folks from the previous PR for their thoughts too: @lukmajercak & @bjliu & @vanzin |
|
@nishchalv can you run the Kubernetes integration tests? I know this isn't directly changing anything there so I think think this is going to trigger the K8s CI but I think with a core change like this it's good to make sure the different cluster managers work as much as possible |
|
|
||
| Arguments(driverUrl, executorId, hostname, cores, appId, workerUrl, | ||
| if (bindAddress == null) { | ||
| bindAddress = hostname |
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.
We need a new test case for this code path, @nishchalv .
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.
@dongjoon-hyun Added couple of test cases.
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.
Thank you!
| -1, | ||
| executorConf, | ||
| new SecurityManager(executorConf), | ||
| numUsableCores = 0, |
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.
Do we need this line in this PR?
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.
I think this is needed unless we add extra method in RpcEnv object.
|
Thanks guys for picking this up. We internally patched this a while ago and have been running with this change since. |
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.
Looks ok, if you ignore how weird it is to have an internal API that isn't used by anyone, except people external to the project extending internal classes...
Also, Dongjoon's question.
| ioEncryptionKey: Option[Array[Byte]], | ||
| isLocal: Boolean): SparkEnv = { | ||
| createExecutorEnv(conf, executorId, hostname, | ||
| hostname, numCores, ioEncryptionKey, isLocal); |
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.
drop the semi-colon
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.
Sure, will do.
62974f8 to
10acb05
Compare
|
LGTM except the extra test requested by @dongjoon-hyun Thanks! |
10acb05 to
c2a2b95
Compare
dbtsai
left a comment
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.
LGTM. Waiting the build.
dongjoon-hyun
left a comment
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.
+1, LGTM. Thank you for updating, @nishchalv .
|
Retest this please. |
jiangxb1987
left a comment
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.
LGTM
|
Merged into master. Thanks! |
|
Test build #113726 has finished for PR 26331 at commit
|
|
Hi, any plan to merge this to Spark 2.4? Thanks! |
What changes were proposed in this pull request?
With this change, executor's bindAddress is passed as an input parameter for RPCEnv.create.
A previous PR #21261 which addressed the same, was using a Spark Conf property to get the bindAddress which wouldn't have worked for multiple executors.
This PR is to enable anyone overriding CoarseGrainedExecutorBackend with their custom one to be able to invoke CoarseGrainedExecutorBackend.main() along with the option to configure bindAddress.
Why are the changes needed?
This is required when Kernel-based Virtual Machine (KVM)'s are used inside Linux container where the hostname is not the same as container hostname.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Tested by running jobs with executors on KVMs inside a linux container.