ddanielr commented on code in PR #4691:
URL: https://github.com/apache/accumulo/pull/4691#discussion_r1681308391
##########
server/base/src/main/java/org/apache/accumulo/server/init/FileSystemInitializer.java:
##########
@@ -194,28 +215,19 @@ private void createMetadataFile(VolumeManager volmanager,
String fileName,
.forFile(file, fs, fs.getConf(),
cs).withTableConfiguration(conf).build();
tabletWriter.startDefaultLocalityGroup();
- for (Map.Entry<Key,Value> entry : sorted.entrySet()) {
- tabletWriter.append(entry.getKey(), entry.getValue());
+ for (InitialTablet initialTablet : initialTablets) {
+ // sort file contents in memory, then play back to the file
+ for (Map.Entry<Key,Value> entry :
initialTablet.createEntries().entrySet()) {
+ tabletWriter.append(entry.getKey(), entry.getValue());
+ }
Review Comment:
I used a treeMap inside of `InitalTablet.createEntries()` so it should be
sorted for each individual tablet.
However, this section does use combined initalTablets output so there is no
guarantee that it is sorted.
Added the sort logic back in for this.
--
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]