manojpec commented on a change in pull request #4352:
URL: https://github.com/apache/hudi/pull/4352#discussion_r780126959
##########
File path:
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java
##########
@@ -735,14 +768,19 @@ protected void bootstrapCommit(List<DirectoryInfo>
partitionInfoList, String cre
List<String> partitions = partitionInfoList.stream().map(p ->
p.getRelativePath().isEmpty() ? NON_PARTITIONED_NAME :
p.getRelativePath()).collect(Collectors.toList());
final int totalFiles = partitionInfoList.stream().mapToInt(p ->
p.getTotalFiles()).sum();
+ final Map<MetadataPartitionType, HoodieData<HoodieRecord>>
partitionToRecordsMap = new HashMap<>();
// Record which saves the list of all partitions
HoodieRecord allPartitionRecord =
HoodieMetadataPayload.createPartitionListRecord(partitions);
if (partitions.isEmpty()) {
- // in case of boostrapping of a fresh table, there won't be any
partitions, but we need to make a boostrap commit
-
commit(engineContext.parallelize(Collections.singletonList(allPartitionRecord),
1), MetadataPartitionType.FILES.partitionPath(), createInstantTime, false);
+ // in case of bootstrapping of a fresh table, there won't be any
partitions, but we need to make a boostrap commit
+ final HoodieData<HoodieRecord> allPartitionRecordsRDD =
engineContext.parallelize(
+ Collections.singletonList(allPartitionRecord), 1);
+ partitionToRecordsMap.put(MetadataPartitionType.FILES,
allPartitionRecordsRDD);
+ commit(createInstantTime, partitionToRecordsMap, false);
Review comment:
Bootstrapping is not part of this PR. There is a separate ticket for it.
--
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]