ctubbsii commented on code in PR #6464:
URL: https://github.com/apache/accumulo/pull/6464#discussion_r3548210071


##########
core/src/main/java/org/apache/accumulo/core/clientImpl/bulk/Bulk.java:
##########
@@ -167,13 +167,16 @@ public int hashCode() {
   }
 
   public static class Files implements Iterable<FileInfo> {
-    final Map<String,FileInfo> files = new HashMap<>();
+    final Map<String,FileInfo> files;
 
     public Files(Collection<FileInfo> files) {
+      this.files = new HashMap<>(files.size(), 1.0f);

Review Comment:
   I think the 1.0 load factor prevents resizing until you try to exceed the 
current size. So this avoids an unnecessary resize as we're filling it up with 
a known quantity.



-- 
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]

Reply via email to