keith-turner commented on a change in pull request #2231:
URL: https://github.com/apache/accumulo/pull/2231#discussion_r687872575
##########
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");
+ try {
+ if (!vm.exists(recoveryDir)) {
+ log.info("There are no recovery files in /accumulo/recovery");
Review comment:
Could include the volume in the log message.
##########
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:
I suspect `/accumulo` is not needed as it will be [part of the
volume](https://github.com/apache/accumulo/blob/7db0561cac3d42ba09d1fb038dad1ff1a03afc46/assemble/conf/accumulo.properties#L24).
Also there is constant `RECOVERY_DIR` in ServerConstants that could be used.
--
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]