[HUDI-3124] Bootstrap when timeline have completed instant (#4467)
Co-authored-by: yuzhaojing <yuzhaojing@bytedance.com>
This commit is contained in:
@@ -179,9 +179,6 @@ public class BootstrapOperator<I, O extends HoodieRecord<?>>
|
|||||||
protected void loadRecords(String partitionPath) throws Exception {
|
protected void loadRecords(String partitionPath) throws Exception {
|
||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
|
|
||||||
BaseFileUtils fileUtils = BaseFileUtils.getInstance(this.hoodieTable.getBaseFileFormat());
|
|
||||||
Schema schema = new TableSchemaResolver(this.hoodieTable.getMetaClient()).getTableAvroSchema();
|
|
||||||
|
|
||||||
final int parallelism = getRuntimeContext().getNumberOfParallelSubtasks();
|
final int parallelism = getRuntimeContext().getNumberOfParallelSubtasks();
|
||||||
final int maxParallelism = getRuntimeContext().getMaxNumberOfParallelSubtasks();
|
final int maxParallelism = getRuntimeContext().getMaxNumberOfParallelSubtasks();
|
||||||
final int taskID = getRuntimeContext().getIndexOfThisSubtask();
|
final int taskID = getRuntimeContext().getIndexOfThisSubtask();
|
||||||
@@ -193,6 +190,9 @@ public class BootstrapOperator<I, O extends HoodieRecord<?>>
|
|||||||
Option<HoodieInstant> latestCommitTime = commitsTimeline.filterCompletedInstants().lastInstant();
|
Option<HoodieInstant> latestCommitTime = commitsTimeline.filterCompletedInstants().lastInstant();
|
||||||
|
|
||||||
if (latestCommitTime.isPresent()) {
|
if (latestCommitTime.isPresent()) {
|
||||||
|
BaseFileUtils fileUtils = BaseFileUtils.getInstance(this.hoodieTable.getBaseFileFormat());
|
||||||
|
Schema schema = new TableSchemaResolver(this.hoodieTable.getMetaClient()).getTableAvroSchema();
|
||||||
|
|
||||||
List<FileSlice> fileSlices = this.hoodieTable.getSliceView()
|
List<FileSlice> fileSlices = this.hoodieTable.getSliceView()
|
||||||
.getLatestFileSlicesBeforeOrOn(partitionPath, latestCommitTime.get().getTimestamp(), true)
|
.getLatestFileSlicesBeforeOrOn(partitionPath, latestCommitTime.get().getTimestamp(), true)
|
||||||
.collect(toList());
|
.collect(toList());
|
||||||
|
|||||||
Reference in New Issue
Block a user