hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tgra...@apache.org
Subject svn commit: r1415489 - /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
Date Fri, 30 Nov 2012 03:40:34 GMT
Author: tgraves
Date: Fri Nov 30 03:40:32 2012
New Revision: 1415489

URL: http://svn.apache.org/viewvc?rev=1415489&view=rev
Log:
HADOOP-9108. Add a method to clear terminateCalled to ExitUtil for test cases (Kihwal Lee
via tgraves)

Modified:
    hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java

Modified: hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java?rev=1415489&r1=1415488&r2=1415489&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
(original)
+++ hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
Fri Nov 30 03:40:32 2012
@@ -1146,11 +1146,14 @@ public class MiniDFSCluster {
    */
   public void shutdown() {
     LOG.info("Shutting down the Mini HDFS Cluster");
+    boolean hasExitError = ExitUtil.terminateCalled();
+    ExitUtil.clearTerminateCalled();
     if (checkExitOnShutdown)  {
-     if (ExitUtil.terminateCalled()) {
+     if (hasExitError) {
        throw new AssertionError("Test resulted in an unexpected exit");
      }
     }
+    
     shutdownDataNodes();
     for (NameNodeInfo nnInfo : nameNodes) {
       NameNode nameNode = nnInfo.nameNode;



Mime
View raw message