rmahindra123 commented on code in PR #9455:
URL: https://github.com/apache/hudi/pull/9455#discussion_r1298102723
##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadata.java:
##########
@@ -375,14 +375,16 @@ private Map<String, HoodieRecord<HoodieMetadataPayload>>
fetchBaseFileRecordsByK
? reader.getRecordsByKeysIterator(sortedKeys)
: reader.getRecordsByKeyPrefixIterator(sortedKeys);
- return toStream(records)
+ Map<String, HoodieRecord<HoodieMetadataPayload>> result = toStream(records)
.map(record -> {
GenericRecord data = (GenericRecord) record.getData();
return Pair.of(
(String) (data).get(HoodieMetadataPayload.KEY_FIELD_NAME),
composeRecord(data, partitionName));
})
.collect(Collectors.toMap(Pair::getKey, Pair::getValue));
+ records.close();
Review Comment:
add fix
--
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]