Sfoglia il codice sorgente

HDFS-3817. Merge change 1478433 from branch-1

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1.2@1478437 13f79535-47bb-0310-9956-ffa450edef68
Suresh Srinivas 12 anni fa
parent
commit
63853e98b8

+ 3 - 0
CHANGES.txt

@@ -616,6 +616,9 @@ Release 1.2.0 - 2013.04.16
     HADOOP-8711. Provide an option for IPC server users to avoid printing stack
     information for certain exceptions. (Brandon Li via suresh)
 
+    HDFS-3817. Avoid printing stack information for SafeModeException.
+    (Brandon Li via suresh)
+
 Release 1.1.2 - 2013.01.30
 
   INCOMPATIBLE CHANGES

+ 3 - 1
src/hdfs/org/apache/hadoop/hdfs/server/namenode/NameNode.java

@@ -324,7 +324,9 @@ public class NameNode implements ClientProtocol, DatanodeProtocol,
     this.server = RPC.getServer(this, socAddr.getHostName(),
         socAddr.getPort(), handlerCount, false, conf, namesystem
         .getDelegationTokenSecretManager());
-
+    // Set terse exception whose stack trace won't be logged
+    this.server.addTerseExceptions(SafeModeException.class);
+    
     // The rpc-server port can be ephemeral... ensure we have the correct info
     this.serverAddress = this.server.getListenerAddress(); 
     FileSystem.setDefaultUri(conf, getUri(serverAddress));