danny0405 commented on code in PR #9275:
URL: https://github.com/apache/hudi/pull/9275#discussion_r1280043171
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/table/action/bootstrap/SparkBootstrapCommitActionExecutor.java:
##########
@@ -223,47 +221,11 @@ protected void commit(Option<Map<String, String>>
extraMetadata, HoodieWriteMeta
LOG.info("Finished writing bootstrap index for source " +
config.getBootstrapSourceBasePath() + " in table "
+ config.getBasePath());
}
-
- commit(extraMetadata, result, bootstrapSourceAndStats.values().stream()
+ commit(result.getWriteStatuses(), result,
bootstrapSourceAndStats.values().stream()
.flatMap(f ->
f.stream().map(Pair::getValue)).collect(Collectors.toList()));
LOG.info("Committing metadata bootstrap !!");
}
- protected void commit(Option<Map<String, String>> extraMetadata,
HoodieWriteMetadata<HoodieData<WriteStatus>> result, List<HoodieWriteStat>
stats) {
- String actionType = table.getMetaClient().getCommitActionType();
- LOG.info("Committing " + instantTime + ", action Type " + actionType);
- // Create a Hoodie table which encapsulated the commits and files visible
- HoodieSparkTable table = HoodieSparkTable.create(config, context);
-
- HoodieActiveTimeline activeTimeline = table.getActiveTimeline();
- HoodieCommitMetadata metadata = new HoodieCommitMetadata();
-
- result.setCommitted(true);
- stats.forEach(stat -> metadata.addWriteStat(stat.getPartitionPath(),
stat));
- result.setWriteStats(stats);
-
- // Finalize write
- finalizeWrite(instantTime, stats, result);
- // add in extra metadata
- if (extraMetadata.isPresent()) {
Review Comment:
Can you elaborate a little more about the extra metadata handling?
--
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]