danny0405 commented on code in PR #6630:
URL: https://github.com/apache/hudi/pull/6630#discussion_r971870133
##########
hudi-client/hudi-client-common/src/test/java/org/apache/hudi/testutils/HoodieWriteableTestTable.java:
##########
@@ -152,27 +151,21 @@ public Path withInserts(String partition, String fileId,
List<HoodieRecord> reco
return baseFilePath;
}
- public Map<String, List<HoodieLogFile>> withLogAppends(List<HoodieRecord>
records) throws Exception {
+ public Map<String, List<HoodieLogFile>> withAppends(String partition, String
fileId, List<HoodieRecord> records) throws Exception {
Map<String, List<HoodieLogFile>> partitionToLogfilesMap = new HashMap<>();
- for (List<HoodieRecord> groupedRecords : records.stream()
Review Comment:
Is there any special reason we rename the method from `withLogAppends` to
`withAppends` ?
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/index/bucket/HoodieSimpleBucketIndex.java:
##########
@@ -52,10 +54,20 @@ private Map<Integer, HoodieRecordLocation>
loadPartitionBucketIdFileIdMapping(
Map<Integer, HoodieRecordLocation> bucketIdToFileIdMapping = new
HashMap<>();
hoodieTable.getMetaClient().reloadActiveTimeline();
HoodieIndexUtils
- .getLatestBaseFilesForPartition(partition, hoodieTable)
- .forEach(file -> {
- String fileId = file.getFileId();
- String commitTime = file.getCommitTime();
+ .getLatestFileSlicesForPartition(partition, hoodieTable)
+ .forEach(fileSlice -> {
+ String fileId;
+ String commitTime;
Review Comment:
I mean there is no need to decide whether the base file exists, just use the
methods above should work well.
--
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]