You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by st...@apache.org on 2007/10/15 23:05:24 UTC

svn commit: r584919 - in /lucene/hadoop/trunk/src/contrib/hbase: CHANGES.txt src/test/org/apache/hadoop/hbase/HBaseClusterTestCase.java src/test/org/apache/hadoop/hbase/TestHStoreFile.java src/test/org/apache/hadoop/hbase/TestRegionServerExit.java

Author: stack
Date: Mon Oct 15 14:05:23 2007
New Revision: 584919

URL: http://svn.apache.org/viewvc?rev=584919&view=rev
Log:
HADOOP-2059 In tests, exceptions in min dfs shutdown should not fail test
            (e.g. nightly #272)

Modified:
    lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt
    lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/HBaseClusterTestCase.java
    lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHStoreFile.java
    lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestRegionServerExit.java

Modified: lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt?rev=584919&r1=584918&r2=584919&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt Mon Oct 15 14:05:23 2007
@@ -9,6 +9,8 @@
   OPTIMIZATIONS
 
   BUG FIXES
+   HADOOP-2059 In tests, exceptions in min dfs shutdown should not fail test
+               (e.g. nightly #272)
 
   IMPROVEMENTS
     HADOOP-2401 Add convenience put method that takes writable

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/HBaseClusterTestCase.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/HBaseClusterTestCase.java?rev=584919&r1=584918&r2=584919&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/HBaseClusterTestCase.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/HBaseClusterTestCase.java Mon Oct 15 14:05:23 2007
@@ -79,18 +79,24 @@
 
   @Override
   protected void setUp() throws Exception {
-    super.setUp();
     this.cluster =
       new MiniHBaseCluster(this.conf, this.regionServers, this.miniHdfs);
+    super.setUp();
   }
 
   @Override
   protected void tearDown() throws Exception {
     super.tearDown();
+    HConnectionManager.deleteConnection(conf);
     if (this.cluster != null) {
-      this.cluster.shutdown();
+      try {
+        this.cluster.shutdown();
+      } catch (Exception e) {
+        LOG.warn("Closing mini dfs", e);
+      }
     }
-    HConnectionManager.deleteConnection(conf);
+    // ReflectionUtils.printThreadInfo(new PrintWriter(System.out),
+    //  "Temporary end-of-test thread dump debugging HADOOP-2040: " + getName());
   }
 
   
@@ -129,4 +135,4 @@
       }
     }
   }
-}
\ No newline at end of file
+}

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHStoreFile.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHStoreFile.java?rev=584919&r1=584918&r2=584919&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHStoreFile.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestHStoreFile.java Mon Oct 15 14:05:23 2007
@@ -20,6 +20,7 @@
 package org.apache.hadoop.hbase;
 
 import java.io.IOException;
+import java.io.PrintWriter;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -31,6 +32,7 @@
 import org.apache.hadoop.io.SequenceFile;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.io.WritableComparable;
+import org.apache.hadoop.util.ReflectionUtils;
 
 /**
  * Test HStoreFile
@@ -45,19 +47,25 @@
   /** {@inheritDoc} */
   @Override
   public void setUp() throws Exception {
-    super.setUp();
     this.cluster = new MiniDFSCluster(this.conf, 2, true, (String[])null);
     this.fs = cluster.getFileSystem();
     this.dir = new Path(DIR, getName());
+    super.setUp();
   }
   
   /** {@inheritDoc} */
   @Override
   public void tearDown() throws Exception {
+    super.tearDown();
     if (this.cluster != null) {
-      this.cluster.shutdown();
+      try {
+        this.cluster.shutdown();
+      } catch (Exception e) {
+        LOG.warn("Closing down mini DFS", e);
+      }
     }
-    super.tearDown();
+    // ReflectionUtils.printThreadInfo(new PrintWriter(System.out),
+    //  "Temporary end-of-test thread dump debugging HADOOP-2040: " + getName());
   }
   
   private Path writeMapFile(final String name)
@@ -382,4 +390,4 @@
       this.fs.delete(p);
     }
   }
-}
\ No newline at end of file
+}

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestRegionServerExit.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestRegionServerExit.java?rev=584919&r1=584918&r2=584919&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestRegionServerExit.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/TestRegionServerExit.java Mon Oct 15 14:05:23 2007
@@ -67,7 +67,7 @@
    * Test abort of region server.
    * @throws IOException
    */
-  public void REMOVEtestCleanExit() throws IOException {
+  public void testCleanExit() throws IOException {
     // When the META table can be opened, the region servers are running
     new HTable(this.conf, HConstants.META_TABLE_NAME);
     // Create table and add a row.