milleruntime commented on a change in pull request #2231:
URL: https://github.com/apache/accumulo/pull/2231#discussion_r688435861
##########
File path:
server/manager/src/main/java/org/apache/accumulo/manager/upgrade/Upgrader9to10.java
##########
@@ -738,33 +739,36 @@ static Path resolveRelativeDelete(String oldDelete,
String upgradeProperty) {
/**
* Remove old temporary map files to prevent problems during recovery.
*/
- static void dropSortedMapWALFiles(VolumeManager vm) {
- Path recoveryDir = new Path("/accumulo/recovery");
- try {
- if (!vm.exists(recoveryDir)) {
- log.info("There are no recovery files in /accumulo/recovery");
- return;
- }
- List<Path> directoriesToDrop = new ArrayList<>();
- for (FileStatus walDir : vm.listStatus(recoveryDir)) {
- // map files will be in a directory starting with "part"
- Path walDirPath = walDir.getPath();
- for (FileStatus dirOrFile : vm.listStatus(walDirPath)) {
- if (dirOrFile.isDirectory()) {
- directoriesToDrop.add(walDirPath);
- break;
+ static void dropSortedMapWALFiles(ServerContext context) {
+ VolumeManager vm = context.getVolumeManager();
+ for (Volume volume : vm.getVolumes()) {
+ Path recoveryDir = volume.prefixChild("/accumulo/recovery");
Review comment:
Even better, I think I can use the method in `ServerConstants` to get
the directories. Check it out:
https://github.com/apache/accumulo/blob/618ba7a9f88342ea7c8d692ce19df34d88bf07c8/server/base/src/main/java/org/apache/accumulo/server/ServerConstants.java#L169
--
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]