nsivabalan commented on code in PR #7711:
URL: https://github.com/apache/hudi/pull/7711#discussion_r1082026700
##########
hudi-common/src/main/java/org/apache/hudi/common/table/view/AbstractTableFileSystemView.java:
##########
@@ -104,9 +104,9 @@ private String getPartitionPathFor(HoodieBaseFile baseFile)
{
/**
* Initialize the view.
*/
- protected void init(HoodieTableMetaClient metaClient, HoodieTimeline
visibleActiveTimeline) {
+ protected void init(HoodieTableMetaClient metaClient, HoodieTimeline
visibleActiveCompletedTimeline) {
Review Comment:
I will pull this down and ensure all callers to this method are passing in
completed timeline.
##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieDefaultTimeline.java:
##########
@@ -386,7 +386,13 @@ public boolean containsInstant(String ts) {
@Override
public boolean containsOrBeforeTimelineStarts(String instant) {
- return getInstantsAsStream().anyMatch(s ->
s.getTimestamp().equals(instant)) || isBeforeTimelineStarts(instant);
+ if (containsInstant(instant)) {
Review Comment:
guess we can revert this change. I assume this is not required
##########
hudi-common/src/main/java/org/apache/hudi/common/model/HoodieFileGroup.java:
##########
@@ -146,14 +157,14 @@ public Option<FileSlice>
getLatestFileSlicesIncludingInflight() {
/**
* Provides a stream of committed file slices, sorted reverse base commit
time.
*/
- public Stream<FileSlice> getAllFileSlices() {
- if (!timeline.empty()) {
+ public Stream<FileSlice> getAllCommittedFileSlices() {
Review Comment:
I don't think we need to fix the method name. we already have a method
called isFileSliceCommitted. so that should suffice.
##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/dto/FileGroupDTO.java:
##########
@@ -50,13 +50,13 @@ public static FileGroupDTO fromFileGroup(HoodieFileGroup
fileGroup) {
dto.partition = fileGroup.getPartitionPath();
dto.id = fileGroup.getFileGroupId().getFileId();
dto.slices =
fileGroup.getAllRawFileSlices().map(FileSliceDTO::fromFileSlice).collect(Collectors.toList());
- dto.timeline = TimelineDTO.fromTimeline(fileGroup.getTimeline());
+ dto.timeline =
TimelineDTO.fromTimeline(fileGroup.getVisibleActiveCompletedTimeline());
Review Comment:
may be we should store entire timeline in DTO (complete write timeline).
while constructing the FileGroup from DTO object, we can split it into
complete and entire write timeline. wdyt
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]