[HUDI-3365] Make sure Metadata Table records are updated appropriately on HDFS (#4739)
- This change makes sure MT records are updated appropriately on HDFS: previously after Log File append operations MT records were updated w/ just the size of the deltas being appended to the original files, which have been found to be the cause of issues in case of Rollbacks that were instead updating MT with records bearing the full file-size. - To make sure that we hedge against similar issues going f/w, this PR alleviates this discrepancy and streamlines the flow of MT table always ingesting records bearing full file-sizes.
This commit is contained in:
@@ -285,7 +285,7 @@ public class FileCreateUtils {
|
||||
|
||||
public static void createBaseFile(String basePath, String partitionPath, String instantTime, String fileId)
|
||||
throws Exception {
|
||||
createBaseFile(basePath, partitionPath, instantTime, fileId, 0);
|
||||
createBaseFile(basePath, partitionPath, instantTime, fileId, 1);
|
||||
}
|
||||
|
||||
public static void createBaseFile(String basePath, String partitionPath, String instantTime, String fileId, long length)
|
||||
|
||||
@@ -1057,6 +1057,7 @@ public class HoodieTestTable {
|
||||
writeStat.setPartitionPath(partition);
|
||||
writeStat.setPath(partition + "/" + fileName);
|
||||
writeStat.setTotalWriteBytes(fileIdInfo.getValue());
|
||||
writeStat.setFileSizeInBytes(fileIdInfo.getValue());
|
||||
writeStats.add(writeStat);
|
||||
}
|
||||
}
|
||||
@@ -1082,6 +1083,7 @@ public class HoodieTestTable {
|
||||
writeStat.setPartitionPath(partition);
|
||||
writeStat.setPath(partition + "/" + fileName);
|
||||
writeStat.setTotalWriteBytes(fileIdInfo.getValue()[1]);
|
||||
writeStat.setFileSizeInBytes(fileIdInfo.getValue()[1]);
|
||||
writeStats.add(writeStat);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user