|
@@ -20,6 +20,7 @@ package org.apache.hadoop.hdfs.server.namenode;
|
|
|
import static org.apache.hadoop.hdfs.protocol.HdfsConstants.MAX_PATH_DEPTH;
|
|
|
import static org.apache.hadoop.hdfs.protocol.HdfsConstants.MAX_PATH_LENGTH;
|
|
|
|
|
|
+import java.io.FileNotFoundException;
|
|
|
import java.io.IOException;
|
|
|
import java.net.InetSocketAddress;
|
|
|
import java.util.Arrays;
|
|
@@ -27,19 +28,24 @@ import java.util.Collection;
|
|
|
import java.util.HashMap;
|
|
|
|
|
|
import org.apache.commons.logging.Log;
|
|
|
+import org.apache.hadoop.HadoopIllegalArgumentException;
|
|
|
import org.apache.hadoop.conf.Configuration;
|
|
|
import org.apache.hadoop.fs.CommonConfigurationKeys;
|
|
|
import org.apache.hadoop.fs.ContentSummary;
|
|
|
import org.apache.hadoop.fs.CreateFlag;
|
|
|
+import org.apache.hadoop.fs.FileAlreadyExistsException;
|
|
|
import org.apache.hadoop.fs.FsServerDefaults;
|
|
|
+import org.apache.hadoop.fs.InvalidPathException;
|
|
|
import org.apache.hadoop.fs.Options;
|
|
|
import org.apache.hadoop.fs.Path;
|
|
|
+import org.apache.hadoop.fs.ParentNotDirectoryException;
|
|
|
import org.apache.hadoop.fs.UnresolvedLinkException;
|
|
|
import org.apache.hadoop.fs.permission.FsPermission;
|
|
|
import org.apache.hadoop.fs.permission.PermissionStatus;
|
|
|
import static org.apache.hadoop.hdfs.DFSConfigKeys.*;
|
|
|
import org.apache.hadoop.hdfs.HDFSPolicyProvider;
|
|
|
import org.apache.hadoop.hdfs.HdfsConfiguration;
|
|
|
+import org.apache.hadoop.hdfs.protocol.AlreadyBeingCreatedException;
|
|
|
import org.apache.hadoop.hdfs.protocol.Block;
|
|
|
import org.apache.hadoop.hdfs.protocol.BlockListAsLongs;
|
|
|
import org.apache.hadoop.hdfs.protocol.ClientProtocol;
|
|
@@ -52,6 +58,8 @@ import org.apache.hadoop.hdfs.protocol.HdfsConstants;
|
|
|
import org.apache.hadoop.hdfs.protocol.HdfsFileStatus;
|
|
|
import org.apache.hadoop.hdfs.protocol.LocatedBlock;
|
|
|
import org.apache.hadoop.hdfs.protocol.LocatedBlocks;
|
|
|
+import org.apache.hadoop.hdfs.protocol.QuotaExceededException;
|
|
|
+import org.apache.hadoop.hdfs.protocol.RecoveryInProgressException;
|
|
|
import org.apache.hadoop.hdfs.protocol.UnregisteredNodeException;
|
|
|
import org.apache.hadoop.hdfs.protocol.UnresolvedPathException;
|
|
|
import org.apache.hadoop.hdfs.protocol.HdfsConstants.DatanodeReportType;
|
|
@@ -164,7 +172,18 @@ class NameNodeRpcServer implements NamenodeProtocols {
|
|
|
nn.setRpcServerAddress(conf, rpcAddress);
|
|
|
|
|
|
// Set terse exception whose stack trace won't be logged
|
|
|
- this.server.addTerseExceptions(SafeModeException.class);
|
|
|
+ this.server.addTerseExceptions(SafeModeException.class,
|
|
|
+ FileNotFoundException.class,
|
|
|
+ HadoopIllegalArgumentException.class,
|
|
|
+ FileAlreadyExistsException.class,
|
|
|
+ InvalidPathException.class,
|
|
|
+ ParentNotDirectoryException.class,
|
|
|
+ UnresolvedLinkException.class,
|
|
|
+ AlreadyBeingCreatedException.class,
|
|
|
+ QuotaExceededException.class,
|
|
|
+ RecoveryInProgressException.class,
|
|
|
+ AccessControlException.class,
|
|
|
+ InvalidToken.class);
|
|
|
}
|
|
|
|
|
|
/**
|