-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add snapshot isolation for Archived timeline
- Loading branch information
Showing
7 changed files
with
257 additions
and
323 deletions.
There are no files selected for viewing
197 changes: 93 additions & 104 deletions
197
...lient/hudi-client-common/src/main/java/org/apache/hudi/client/HoodieTimelineArchiver.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 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
28 changes: 28 additions & 0 deletions
28
hudi-client/hudi-client-common/src/test/java/org/apache/hudi/DummyInstantTriple.java
This file contains 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.apache.hudi; | ||
|
||
import org.apache.hudi.client.utils.InstantTriple; | ||
import org.apache.hudi.common.table.HoodieTableMetaClient; | ||
import org.apache.hudi.common.table.timeline.HoodieInstant; | ||
import org.apache.hudi.common.util.Option; | ||
|
||
/** | ||
* Instant triple for testing. | ||
*/ | ||
public class DummyInstantTriple extends InstantTriple { | ||
private final byte[] commitMetadata; | ||
|
||
/** | ||
* Only for testing purpose. | ||
*/ | ||
public DummyInstantTriple(HoodieInstant completed, byte[] commitMetadata) { | ||
super(new HoodieInstant(HoodieInstant.State.REQUESTED, completed.getAction(), completed.getTimestamp()), | ||
new HoodieInstant(HoodieInstant.State.INFLIGHT, completed.getAction(), completed.getTimestamp()), | ||
completed); | ||
this.commitMetadata = commitMetadata; | ||
} | ||
|
||
@Override | ||
public Option<byte[]> getCommitMetadata(HoodieTableMetaClient metaClient) { | ||
return Option.of(this.commitMetadata); | ||
} | ||
} |
This file contains 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.