Browse Source

HDFS-8231. StackTrace displayed at client while QuotaByStorageType exceeds (Contributed by J.Andreina and Xiaoyu Yao)

(cherry picked from commit c8d72907ff5a4cb9ce1effca8ad9b69689d11d1d)
Vinayakumar B 10 years ago
parent
commit
2ec356fcdb

+ 3 - 0
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

@@ -230,6 +230,9 @@ Release 2.8.0 - UNRELEASED
     HDFS-8217. During block recovery for truncate Log new Block Id in case of
     copy-on-truncate is true. (vinayakumarb)
 
+    HDFS-8231. StackTrace displayed at client while QuotaByStorageType exceeds
+    (J.Andreina and Xiaoyu Yao via vinayakumarb)
+
 Release 2.7.1 - UNRELEASED
 
   INCOMPATIBLE CHANGES

+ 7 - 0
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java

@@ -1427,6 +1427,7 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
                                      ParentNotDirectoryException.class,
                                      NSQuotaExceededException.class, 
                                      DSQuotaExceededException.class,
+                                     QuotaByStorageTypeExceededException.class,
                                      UnresolvedPathException.class,
                                      SnapshotAccessControlException.class);
     } finally {
@@ -1469,6 +1470,7 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
                                      FileNotFoundException.class,
                                      SafeModeException.class,
                                      DSQuotaExceededException.class,
+                                     QuotaByStorageTypeExceededException.class,
                                      UnsupportedOperationException.class,
                                      UnresolvedPathException.class,
                                      SnapshotAccessControlException.class);
@@ -1544,6 +1546,7 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
                                      FileNotFoundException.class,
                                      SafeModeException.class,
                                      DSQuotaExceededException.class,
+                                     QuotaByStorageTypeExceededException.class,
                                      UnresolvedPathException.class,
                                      SnapshotAccessControlException.class);
     } finally {
@@ -1600,6 +1603,7 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
       throw re.unwrapRemoteException(AccessControlException.class,
                                      NSQuotaExceededException.class,
                                      DSQuotaExceededException.class,
+                                     QuotaByStorageTypeExceededException.class,
                                      UnresolvedPathException.class,
                                      SnapshotAccessControlException.class);
     } finally {
@@ -1637,6 +1641,7 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
     } catch(RemoteException re) {
       throw re.unwrapRemoteException(AccessControlException.class,
                                      DSQuotaExceededException.class,
+                                     QuotaByStorageTypeExceededException.class,
                                      FileAlreadyExistsException.class,
                                      FileNotFoundException.class,
                                      ParentNotDirectoryException.class,
@@ -2650,6 +2655,7 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
                                      SafeModeException.class,
                                      NSQuotaExceededException.class,
                                      DSQuotaExceededException.class,
+                                     QuotaByStorageTypeExceededException.class,
                                      UnresolvedPathException.class,
                                      SnapshotAccessControlException.class);
     } finally {
@@ -2701,6 +2707,7 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
                                      FileNotFoundException.class,
                                      NSQuotaExceededException.class,
                                      DSQuotaExceededException.class,
+                                     QuotaByStorageTypeExceededException.class,
                                      UnresolvedPathException.class,
                                      SnapshotAccessControlException.class);
     } finally {

+ 2 - 0
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSOutputStream.java

@@ -44,6 +44,7 @@ import org.apache.hadoop.hdfs.protocol.ExtendedBlock;
 import org.apache.hadoop.hdfs.protocol.HdfsFileStatus;
 import org.apache.hadoop.hdfs.protocol.LocatedBlock;
 import org.apache.hadoop.hdfs.protocol.NSQuotaExceededException;
+import org.apache.hadoop.hdfs.protocol.QuotaByStorageTypeExceededException;
 import org.apache.hadoop.hdfs.protocol.SnapshotAccessControlException;
 import org.apache.hadoop.hdfs.protocol.UnresolvedPathException;
 import org.apache.hadoop.hdfs.protocol.datatransfer.PacketHeader;
@@ -245,6 +246,7 @@ public class DFSOutputStream extends FSOutputSummer
           IOException e = re.unwrapRemoteException(
               AccessControlException.class,
               DSQuotaExceededException.class,
+              QuotaByStorageTypeExceededException.class,
               FileAlreadyExistsException.class,
               FileNotFoundException.class,
               ParentNotDirectoryException.class,

+ 2 - 0
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DataStreamer.java

@@ -53,6 +53,7 @@ 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.NSQuotaExceededException;
+import org.apache.hadoop.hdfs.protocol.QuotaByStorageTypeExceededException;
 import org.apache.hadoop.hdfs.protocol.QuotaExceededException;
 import org.apache.hadoop.hdfs.protocol.UnresolvedPathException;
 import org.apache.hadoop.hdfs.protocol.datatransfer.BlockConstructionStage;
@@ -1543,6 +1544,7 @@ class DataStreamer extends Daemon {
                   AccessControlException.class,
                   NSQuotaExceededException.class,
                   DSQuotaExceededException.class,
+                  QuotaByStorageTypeExceededException.class,
                   UnresolvedPathException.class);
           if (ue != e) {
             throw ue; // no need to retry these exceptions

+ 2 - 0
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java

@@ -96,6 +96,7 @@ 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.NSQuotaExceededException;
+import org.apache.hadoop.hdfs.protocol.QuotaByStorageTypeExceededException;
 import org.apache.hadoop.hdfs.protocol.QuotaExceededException;
 import org.apache.hadoop.hdfs.protocol.RecoveryInProgressException;
 import org.apache.hadoop.hdfs.protocol.RollingUpgradeInfo;
@@ -404,6 +405,7 @@ class NameNodeRpcServer implements NamenodeProtocols {
         LeaseExpiredException.class,
         NSQuotaExceededException.class,
         DSQuotaExceededException.class,
+        QuotaByStorageTypeExceededException.class,
         AclException.class,
         FSLimitException.PathComponentTooLongException.class,
         FSLimitException.MaxDirectoryItemsExceededException.class,