浏览代码

HADOOP-2040 Hudson hangs AFTER test has finished

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@594715 13f79535-47bb-0310-9956-ffa450edef68
Michael Stack 17 年之前
父节点
当前提交
8ee82b2f56

+ 1 - 0
src/contrib/hbase/CHANGES.txt

@@ -30,6 +30,7 @@ Trunk (unreleased changes)
    HADOOP-2156 BufferUnderflowException for un-named HTableDescriptors
    HADOOP-2161 getRow() is orders of magnitudes slower than get(), even on rows
                with one column (Clint Morgan and Stack)
+   HADOOP-2040 Hudson hangs AFTER test has finished
 
   IMPROVEMENTS
     HADOOP-2401 Add convenience put method that takes writable

+ 4 - 8
src/contrib/hbase/src/test/org/apache/hadoop/hbase/MiniHBaseCluster.java

@@ -224,23 +224,20 @@ public class MiniHBaseCluster implements HConstants {
    */
   public void shutdown() {
     this.hbaseCluster.shutdown();
-
     try {
       if (shutdownDFS && cluster != null) {
         FileSystem fs = cluster.getFileSystem();
-
-        LOG.info("Shutting down Mini DFS ");
-        cluster.shutdown();
-
         if (fs != null) {
           LOG.info("Shutting down FileSystem");
           fs.close();
         }
+        if (this.cluster != null) {
+          LOG.info("Shutting down Mini DFS ");
+          cluster.shutdown();
+        }
       }
-
     } catch (IOException e) {
       LOG.error("shutdown", e);
-
     } finally {
       // Delete all DFS files
       if(deleteOnExit) {
@@ -248,7 +245,6 @@ public class MiniHBaseCluster implements HConstants {
             StaticTestEnvironment.TEST_DIRECTORY_KEY), "dfs"));
       }
     }
-
   }
 
   private void deleteFile(File f) {