cshannon commented on code in PR #5103:
URL: https://github.com/apache/accumulo/pull/5103#discussion_r1856684608


##########
server/manager/src/main/java/org/apache/accumulo/manager/compaction/coordinator/CompactionCoordinator.java:
##########
@@ -852,10 +852,14 @@ public boolean test(TabletMetadata tabletMetadata) {
                   final FileSystem fs = vol.getFileSystem();
                   for (ExternalCompactionId ecid : ecidsForTablet) {
                     final String fileSuffix = "_tmp_" + ecid.canonical();
-                    FileStatus[] files = fs.listStatus(new Path(volPath), 
(path) -> {
-                      return path.getName().endsWith(fileSuffix);
-                    });
-                    if (files.length > 0) {
+                    FileStatus[] files = null;
+                    try {
+                      files = fs.listStatus(new Path(volPath),
+                          (path) -> path.getName().endsWith(fileSuffix));
+                    } catch (FileNotFoundException e) {
+                      LOG.trace("Failed to list tablet dir {}", volPath, e);

Review Comment:
   You could, the result is going to be the same either way so if you want to 
use continue instead in the catch that's fine. There was already an if 
statement checking the size files.length > 0 so i just switched that to check 
for null.



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