apache / apache/hudi

Revisit the merging of HoodieDefaultTimeline

Open
#15,661 0 comments 0 reactions 0 assignees View on GitHub
from-jira priority:high type:improvement
Dominant language
Java
Stars
6.2k
Forks
2.5k
Avg merge
2d 4h
Merged PRs (30d)
112

Description

Revisit the logic below to see if there is inefficiency.  This is used by HoodieSyncClient.
{code:java}
public HoodieDefaultTimeline mergeTimeline(HoodieDefaultTimeline timeline) {
Stream instantStream = Stream.concat(instants.stream(), timeline.getInstants()).sorted();
Function> details = instant -> {
if (instants.stream().anyMatch(i -> i.equals(instant))) {
return this.getInstantDetails(instant);
} else {
return timeline.getInstantDetails(instant);
}
};
return new HoodieDefaultTimeline(instantStream, details);
} {code}

## JIRA info

- Link: https://issues.apache.org/jira/browse/HUDI-5481
- Type: Improvement

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with HoodieDefaultTimeline.mergeTimeline and its use by HoodieSyncClient. Examine the stream merging, sorting, and instant-detail lookup shown in the issue, then determine whether the current logic is inefficient. Done means the inefficiency question is answered and any resulting change is validated for HoodieSyncClient.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data-engineering, stream-processing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.