-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-16148] [Scheduler] Allow for underscores in TaskLocation in the Executor ID #13858
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
|
Jenkins test this please |
|
Test build #61098 has finished for PR 13858 at commit
|
|
@tmagrino could you add a simple test here:
|
|
I had an outstanding comment from the previous PR too: #13857 (comment) |
|
My apologies @srowen, I missed the comment somehow! I refactored a little bit to make it more obvious what's going on there (using |
Also updated the comment to indicate the string format which includes the executor id.
ec4f920 to
0aed80a
Compare
|
You can always revert the commits in question and push, which become new commits, but that's fine. They're all squashed in the end. You can also manually squash and force-push if you like. |
|
I opted to force push a cleaned up version, thanks! |
| if (splits.length != 3) { | ||
| val hostAndExecutorId = str.stripPrefix(executorLocationTag) | ||
| val splits = hostAndExecutorId.split("_", 2) | ||
| if (splits.length != 2) { |
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.
Not important, but you could just use require here.
| new ExecutorCacheTaskLocation(splits(1), splits(2)) | ||
| val hostAndExecutorId = str.stripPrefix(executorLocationTag) | ||
| val splits = hostAndExecutorId.split("_", 2) | ||
| require(splits.length == 2, "Illegal executor location format: " + str) |
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.
You can use string interpolation here but not worth changing if that's the only thing left
|
Jenkins test this please |
|
Test build #61371 has finished for PR 13858 at commit
|
|
LGTM. Merging to master, 2.0 and 1.6. Thanks! |
… Executor ID ## What changes were proposed in this pull request? Previously, the TaskLocation implementation would not allow for executor ids which include underscores. This tweaks the string split used to get the hostname and executor id, allowing for underscores in the executor id. This addresses the JIRA found here: https://issues.apache.org/jira/browse/SPARK-16148 This is moved over from a previous PR against branch-1.6: #13857 ## How was this patch tested? Ran existing unit tests for core and streaming. Manually ran a simple streaming job with an executor whose id contained underscores and confirmed that the job ran successfully. This is my original work and I license the work to the project under the project's open source license. Author: Tom Magrino <[email protected]> Closes #13858 from tmagrino/fixtasklocation. (cherry picked from commit ae14f36) Signed-off-by: Shixiong Zhu <[email protected]>
… Executor ID ## What changes were proposed in this pull request? Previously, the TaskLocation implementation would not allow for executor ids which include underscores. This tweaks the string split used to get the hostname and executor id, allowing for underscores in the executor id. This addresses the JIRA found here: https://issues.apache.org/jira/browse/SPARK-16148 This is moved over from a previous PR against branch-1.6: #13857 ## How was this patch tested? Ran existing unit tests for core and streaming. Manually ran a simple streaming job with an executor whose id contained underscores and confirmed that the job ran successfully. This is my original work and I license the work to the project under the project's open source license. Author: Tom Magrino <[email protected]> Closes #13858 from tmagrino/fixtasklocation. (cherry picked from commit ae14f36) Signed-off-by: Shixiong Zhu <[email protected]>
… Executor ID ## What changes were proposed in this pull request? Previously, the TaskLocation implementation would not allow for executor ids which include underscores. This tweaks the string split used to get the hostname and executor id, allowing for underscores in the executor id. This addresses the JIRA found here: https://issues.apache.org/jira/browse/SPARK-16148 This is moved over from a previous PR against branch-1.6: apache#13857 ## How was this patch tested? Ran existing unit tests for core and streaming. Manually ran a simple streaming job with an executor whose id contained underscores and confirmed that the job ran successfully. This is my original work and I license the work to the project under the project's open source license. Author: Tom Magrino <[email protected]> Closes apache#13858 from tmagrino/fixtasklocation. (cherry picked from commit ae14f36) Signed-off-by: Shixiong Zhu <[email protected]> (cherry picked from commit 0cb06c9)
| val hostAndExecutorId = str.stripPrefix(executorLocationTag) | ||
| val splits = hostAndExecutorId.split("_", 2) | ||
| require(splits.length == 2, "Illegal executor location format: " + str) | ||
| val Array(host, executorId) = splits |
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.
it's usually better to just do splits(0) and splits(1) rather than using pattern matching here.
What changes were proposed in this pull request?
Previously, the TaskLocation implementation would not allow for executor ids which include underscores. This tweaks the string split used to get the hostname and executor id, allowing for underscores in the executor id.
This addresses the JIRA found here: https://issues.apache.org/jira/browse/SPARK-16148
This is moved over from a previous PR against branch-1.6: #13857
How was this patch tested?
Ran existing unit tests for core and streaming. Manually ran a simple streaming job with an executor whose id contained underscores and confirmed that the job ran successfully.
This is my original work and I license the work to the project under the project's open source license.