-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-35546][Shuffle] Enable push-based shuffle when multiple app attempts are enabled and manage concurrent access to the state in a better way #33078
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
Closed
Closed
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
5db9524
SPARK-35546 Enable push-based shuffle when multiple app attempts are …
zhouyejoe 00b3d52
Address comments
zhouyejoe 1db1c43
Address comments
zhouyejoe a60cc8d
fix failed unit test
zhouyejoe 7244c33
Address comments. Some UTs are to be added
zhouyejoe c5d2e4c
Address comments. Fix failed unit tests.
zhouyejoe 5e7a1ec
fix failed unit tests
zhouyejoe dbcf3fa
fix java code style
zhouyejoe 5075231
adding unit tests
zhouyejoe 481b92a
Address comments
zhouyejoe 6080850
fix failed unit test
zhouyejoe 91f39cd
Catch the NPE and throw RuntimeException to make the error more clear
zhouyejoe a04d215
Revert "Catch the NPE and throw RuntimeException to make the error mo…
zhouyejoe 892fbd3
Remove set to null for dataChannels, indexFile and metaFile in AppShu…
zhouyejoe 1a2eb32
Add isOpen before close the fileChannel
zhouyejoe fab51d4
Address comments, add unit test
zhouyejoe 79816ad
Update Precondition.checkNotNull to Precondition.checkArgument
zhouyejoe 1de689b
Address comments
zhouyejoe 5310991
Merge remote-tracking branch 'upstream/master' into SPARK-35546
zhouyejoe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
546 changes: 324 additions & 222 deletions
546
...twork-shuffle/src/main/java/org/apache/spark/network/shuffle/RemoteBlockPushResolver.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,12 +32,15 @@ | |
| */ | ||
| public class FinalizeShuffleMerge extends BlockTransferMessage { | ||
| public final String appId; | ||
| public final int appAttemptId; | ||
| public final int shuffleId; | ||
|
|
||
| public FinalizeShuffleMerge( | ||
| String appId, | ||
| int appAttemptId, | ||
| int shuffleId) { | ||
| this.appId = appId; | ||
| this.appAttemptId = appAttemptId; | ||
| this.shuffleId = shuffleId; | ||
| } | ||
|
|
||
|
|
@@ -48,13 +51,14 @@ protected BlockTransferMessage.Type type() { | |
|
|
||
| @Override | ||
| public int hashCode() { | ||
| return Objects.hashCode(appId, shuffleId); | ||
| return Objects.hashCode(appId, appAttemptId, shuffleId); | ||
| } | ||
|
|
||
| @Override | ||
| public String toString() { | ||
| return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE) | ||
| .append("appId", appId) | ||
| .append("attemptId", appAttemptId) | ||
| .append("shuffleId", shuffleId) | ||
| .toString(); | ||
| } | ||
|
|
@@ -64,25 +68,28 @@ public boolean equals(Object other) { | |
| if (other != null && other instanceof FinalizeShuffleMerge) { | ||
| FinalizeShuffleMerge o = (FinalizeShuffleMerge) other; | ||
| return Objects.equal(appId, o.appId) | ||
| && appAttemptId == appAttemptId | ||
|
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 fixed by the following. |
||
| && shuffleId == o.shuffleId; | ||
| } | ||
| return false; | ||
| } | ||
|
|
||
| @Override | ||
| public int encodedLength() { | ||
| return Encoders.Strings.encodedLength(appId) + 4; | ||
| return Encoders.Strings.encodedLength(appId) + 4 + 4; | ||
| } | ||
|
|
||
| @Override | ||
| public void encode(ByteBuf buf) { | ||
| Encoders.Strings.encode(buf, appId); | ||
| buf.writeInt(appAttemptId); | ||
| buf.writeInt(shuffleId); | ||
| } | ||
|
|
||
| public static FinalizeShuffleMerge decode(ByteBuf buf) { | ||
| String appId = Encoders.Strings.decode(buf); | ||
| int attemptId = buf.readInt(); | ||
| int shuffleId = buf.readInt(); | ||
| return new FinalizeShuffleMerge(appId, shuffleId); | ||
| return new FinalizeShuffleMerge(appId, attemptId, shuffleId); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.