From fbd2220167fb5b26c9148464dbb76988a2d2fbb4 Mon Sep 17 00:00:00 2001 From: Siyao Meng <50227127+smengcl@users.noreply.github.com> Date: Tue, 10 Nov 2020 12:13:15 -0800 Subject: [PATCH] HDFS-15607. Addendum: Create trash dir when allowing snapshottable dir (#2448) --- .../java/org/apache/hadoop/hdfs/DistributedFileSystem.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java index f1fd520f41d..076dbdd1767 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java +++ b/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) { } }