Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ public FlinkMergeHandle(HoodieWriteConfig config, String instantTime, HoodieTabl
* Use the fileId + "-" + rollNumber as the new fileId of a mini-batch write.
*/
protected String generatesDataFileName() {
return FSUtils.makeDataFileName(instantTime, writeToken, fileId + "-" + rollNumber, hoodieTable.getBaseFileExtension());
final String fileID = this.needBootStrap ? fileId : fileId + "-" + rollNumber;
return FSUtils.makeDataFileName(instantTime, writeToken, fileID, hoodieTable.getBaseFileExtension());
}

public boolean isNeedBootStrap() {
Expand Down Expand Up @@ -178,6 +179,12 @@ public void rollOver(Iterator<HoodieRecord<T>> newRecordsItr) {
}

public void finishWrite() {
// The file visibility should be kept by the configured ConsistencyGuard instance.
if (rolloverPaths.size() == 1) {
// only one flush action, no need to roll over
return;
}

for (int i = 0; i < rolloverPaths.size() - 1; i++) {
Path path = rolloverPaths.get(i);
try {
Expand Down