瀏覽代碼

HDFS-15607. Addendum: Create trash dir when allowing snapshottable dir (#2448)

Siyao Meng 4 年之前
父節點
當前提交
fbd2220167

+ 2 - 1
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java

@@ -19,6 +19,7 @@
 package org.apache.hadoop.hdfs;
 
 
+import org.apache.hadoop.security.AccessControlException;
 import org.apache.hadoop.thirdparty.com.google.common.annotations.VisibleForTesting;
 import org.apache.hadoop.thirdparty.com.google.common.base.Preconditions;
 import org.apache.hadoop.thirdparty.com.google.common.collect.Lists;
@@ -2146,7 +2147,7 @@ public class DistributedFileSystem extends FileSystem
               trashRoot + ". Rename or delete it, then try again.");
         }
       }
-    } catch (FileNotFoundException ignored) {
+    } catch (FileNotFoundException | AccessControlException ignored) {
     }
   }