keith-turner commented on code in PR #3501:
URL: https://github.com/apache/accumulo/pull/3501#discussion_r1231536776
##########
core/src/main/java/org/apache/accumulo/core/metadata/schema/TabletMetadata.java:
##########
@@ -506,6 +518,12 @@ public static <E extends Entry<Key,Value>> TabletMetadata
convertRow(Iterator<E>
if (buildKeyValueMap) {
te.keyValues = kvBuilder.build();
}
+ te.filesSupplier = Suppliers.memoize(() -> {
+ ImmutableMap.Builder<StoredTabletFile,DataFileValue> fb =
ImmutableMap.builder();
+ te.rawFiles.forEach(pair -> fb.put(new StoredTabletFile(pair.getFirst()),
+ new DataFileValue((pair.getSecond()))));
+ return fb.build();
Review Comment:
For this case the rest of the code is using immutable map builders and those
make sense in the other parts of the code. For this code it could use stream,
but personally I would rather keep it consistent with the code in the immediate
vicinity.
--
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]