Skip to content

[#1246] feat(tez): Support remote spill for unordered input. - #1250

Merged
roryqi merged 4 commits into
apache:masterfrom
zhengchenyu:ISSUE-1246
Oct 31, 2023
Merged

[#1246] feat(tez): Support remote spill for unordered input.#1250
roryqi merged 4 commits into
apache:masterfrom
zhengchenyu:ISSUE-1246

Conversation

@zhengchenyu

Copy link
Copy Markdown
Collaborator

What changes were proposed in this pull request?

When unordered input fetch data from shuffle server, if the fetched data is too large, will spill data to local filesystem.
This PR provide another way: spill data to remote filesystem.

Why are the changes needed?

Fix: #1246

Does this PR introduce any user-facing change?

No.

How was this patch tested?

unit test and tez example test on cluster.

@codecov-commenter

codecov-commenter commented Oct 20, 2023

Copy link
Copy Markdown

Codecov Report

Merging #1250 (b07b052) into master (4f56e59) will increase coverage by 0.99%.
Report is 2 commits behind head on master.
The diff coverage is 66.29%.

@@             Coverage Diff              @@
##             master    #1250      +/-   ##
============================================
+ Coverage     54.17%   55.17%   +0.99%     
- Complexity     2659     2669      +10     
============================================
  Files           396      377      -19     
  Lines         23013    20752    -2261     
  Branches       1971     1977       +6     
============================================
- Hits          12467    11449    -1018     
+ Misses         9777     8600    -1177     
+ Partials        769      703      -66     
Files Coverage Δ
...mon/shuffle/orderedgrouped/RssTezBypassWriter.java 70.96% <100.00%> (+25.80%) ⬆️
...a/org/apache/uniffle/common/RemoteStorageInfo.java 96.42% <100.00%> (+0.13%) ⬆️
...tez/runtime/library/input/RssUnorderedKVInput.java 0.00% <0.00%> (ø)
...n/shuffle/impl/RssSimpleFetchedInputAllocator.java 62.24% <67.56%> (+26.86%) ⬆️
...ime/library/common/shuffle/RemoteFetchedInput.java 63.63% <63.63%> (ø)

... and 28 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@roryqi roryqi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, minor comments.

}

@Override
public void free() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need consider the issues of thread safe?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don’t have to think about thread safety, it's impossible to run in parallel.
When write operation is done, then call commit, then send to completed queue, then read or free.
Other implement for FetchInput also does not consider thread safety.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK.

} else {
LOG.info("Allocate DiskFetchedInput, length:{}", actualSize);
return new DiskFetchedInput(
actualSize + 8,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use a constant variable instead of 8?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I will do it.

if (remoteSpillEnable) {
LOG.info("AllocateType RemoteFetchedInput, compressedSize:{}", compressedSize);
return new RemoteFetchedInput(
actualSize + 8,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto.

@roryqi roryqi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @zhengchenyu , merged to master.

@roryqi
roryqi merged commit 7b43bce into apache:master Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] [tez] Support remote spill for unordered input.

3 participants