HDFS-17621. Make PathIsNotEmptyDirectoryException terse (#7036). Contributed by dzcxzl.

This commit is contained in:
cxzl25 2024-09-23 15:37:30 +08:00 committed by GitHub
parent 50fcfd8b29
commit ae63d8edd5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -56,6 +56,7 @@
import java.util.stream.Collectors;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.PathIsNotEmptyDirectoryException;
import org.apache.hadoop.hdfs.HAUtil;
import org.apache.hadoop.hdfs.protocol.UnresolvedPathException;
import org.apache.hadoop.thirdparty.com.google.common.cache.CacheBuilder;
@ -368,7 +369,8 @@ public RouterRpcServer(Configuration conf, Router router,
NotReplicatedYetException.class,
IOException.class,
ConnectException.class,
RetriableException.class);
RetriableException.class,
PathIsNotEmptyDirectoryException.class);
this.rpcServer.addSuppressedLoggingExceptions(
StandbyException.class, UnresolvedPathException.class);

View File

@ -54,6 +54,7 @@
import org.apache.hadoop.conf.ReconfigurationTaskStatus;
import org.apache.hadoop.crypto.CryptoProtocolVersion;
import org.apache.hadoop.fs.BatchedRemoteIterator.BatchedEntries;
import org.apache.hadoop.fs.PathIsNotEmptyDirectoryException;
import org.apache.hadoop.hdfs.AddBlockFlag;
import org.apache.hadoop.fs.CacheFlag;
import org.apache.hadoop.fs.CommonConfigurationKeys;
@ -541,7 +542,8 @@ public NameNodeRpcServer(Configuration conf, NameNode nn)
FSLimitException.PathComponentTooLongException.class,
FSLimitException.MaxDirectoryItemsExceededException.class,
DisallowedDatanodeException.class,
XAttrNotFoundException.class);
XAttrNotFoundException.class,
PathIsNotEmptyDirectoryException.class);
clientRpcServer.addSuppressedLoggingExceptions(StandbyException.class,
UnresolvedPathException.class);