use of org.apache.hudi.common.table.timeline.HoodieTimeline.METADATA_BOOTSTRAP_INSTANT_TS in project hudi by apache.
the class AbstractTableFileSystemView method addBootstrapBaseFileIfPresent.
protected HoodieFileGroup addBootstrapBaseFileIfPresent(HoodieFileGroup fileGroup) {
boolean hasBootstrapBaseFile = fileGroup.getAllFileSlices().anyMatch(fs -> fs.getBaseInstantTime().equals(METADATA_BOOTSTRAP_INSTANT_TS));
if (hasBootstrapBaseFile) {
HoodieFileGroup newFileGroup = new HoodieFileGroup(fileGroup);
newFileGroup.getAllFileSlices().filter(fs -> fs.getBaseInstantTime().equals(METADATA_BOOTSTRAP_INSTANT_TS)).forEach(fs -> fs.setBaseFile(addBootstrapBaseFileIfPresent(fs.getFileGroupId(), fs.getBaseFile().get())));
return newFileGroup;
}
return fileGroup;
}
Aggregations