[Improvement] Use ShuffleSegment to replace BufferSegment and FileBasedShuffleSegment
- Dominant language
- Java
- Stars
- 454
- Forks
- 172
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 5
Description
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
### Search before asking
- [X] I have searched in the [issues](https://github.com/apache/incubator-uniffle/issues?q=is%3Aissue) and found no similar issues.
### What would you like to be improved?
Now the BufferSegment class and FileBasedShuffleSegment class both six fields, represents a segment.
```java
private long blockId;
private long offset;
private int length;
private int uncompressLength;
private long crc;
private long taskAttemptId;
```
To add a new ShuffleSegment to replace these two class can make the code easier to maintain.
### How should we improve?
To simplify the code.
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
Contributor guide
Research direction
Start by locating BufferSegment and FileBasedShuffleSegment and all of their usages. Compare how their six fields are constructed and consumed, then identify the existing segment-related tests. Done means both classes are replaced by ShuffleSegment without changing segment behavior and the relevant tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100