1
0

[HUDI-453] Fix throw failed to archive commits error when writing data to MOR/COW table

This commit is contained in:
lamber-ken
2019-12-24 23:22:37 +08:00
committed by Balaji Varadarajan
parent 01c25d6aff
commit 58c5bed40a

View File

@@ -249,6 +249,13 @@ public class HoodieCommitArchiveLog {
LOG.info("Wrapper schema " + wrapperSchema.toString());
List<IndexedRecord> records = new ArrayList<>();
for (HoodieInstant hoodieInstant : instants) {
// filter empty instant, like *.commit.requested
byte[] instantDetails = commitTimeline.getInstantDetails(hoodieInstant).get();
if (instantDetails == null || instantDetails.length == 0 ) {
continue;
}
try {
records.add(convertToAvroRecord(commitTimeline, hoodieInstant));
if (records.size() >= this.config.getCommitArchivalBatchSize()) {