1
0

HUDI-170 Updating hoodie record before inserting it into ExternalSpillableMap (#866)

This commit is contained in:
Balaji Varadarajan
2019-08-30 09:03:37 -07:00
committed by vinoth chandar
parent 40dd4dd637
commit a6908ef44d
2 changed files with 22 additions and 3 deletions

View File

@@ -207,9 +207,10 @@ public class HoodieMergeHandle<T extends HoodieRecordPayload> extends HoodieWrit
while (newRecordsItr.hasNext()) {
HoodieRecord<T> record = newRecordsItr.next();
partitionPath = record.getPartitionPath();
keyToNewRecords.put(record.getRecordKey(), record);
// update the new location of the record, so we know where to find it next
record.setNewLocation(new HoodieRecordLocation(instantTime, fileId));
//NOTE: Once Records are added to map (spillable-map), DO NOT change it as they won't persist
keyToNewRecords.put(record.getRecordKey(), record);
}
logger.info("Number of entries in MemoryBasedMap => "
+ ((ExternalSpillableMap) keyToNewRecords).getInMemoryMapNumEntries()