keith-turner commented on code in PR #4691:
URL: https://github.com/apache/accumulo/pull/4691#discussion_r1687193608


##########
server/base/src/main/java/org/apache/accumulo/server/init/FileSystemInitializer.java:
##########
@@ -194,28 +215,24 @@ private void createMetadataFile(VolumeManager volmanager, 
String fileName,
         .forFile(file, fs, fs.getConf(), 
cs).withTableConfiguration(conf).build();
     tabletWriter.startDefaultLocalityGroup();
 
+    TreeMap<Key,Value> sorted = new TreeMap<>();
+    for (InitialTablet initialTablet : initialTablets) {
+      // sort file contents in memory, then play back to the file
+      for (Map.Entry<Key,Value> entry : 
initialTablet.createEntries().entrySet()) {
+        sorted.putAll(initialTablet.createEntries());
+      }

Review Comment:
   This seems to be putting all the entries for each entry doing redundant work.
   
   ```suggestion
        sorted.putAll(initialTablet.createEntries());
   ```



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