Browse Source

HDFS-3936. MiniDFSCluster shutdown races with BlocksMap usage. Contributed by Eli Collins

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1387255 13f79535-47bb-0310-9956-ffa450edef68
Eli Collins 12 years ago
parent
commit
7e3776ca6e

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

@@ -242,6 +242,8 @@ Release 2.0.3-alpha - Unreleased
 
 
     HDFS-3924. Multi-byte id in HdfsVolumeId. (Andrew Wang via atm)
     HDFS-3924. Multi-byte id in HdfsVolumeId. (Andrew Wang via atm)
 
 
+    HDFS-3936. MiniDFSCluster shutdown races with BlocksMap usage. (eli)
+
 Release 2.0.2-alpha - 2012-09-07 
 Release 2.0.2-alpha - 2012-09-07 
 
 
   INCOMPATIBLE CHANGES
   INCOMPATIBLE CHANGES

+ 1 - 1
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlocksMap.java

@@ -94,7 +94,7 @@ class BlocksMap {
   }
   }
 
 
   void close() {
   void close() {
-    blocks = null;
+    // Empty blocks once GSet#clear is implemented (HDFS-3940)
   }
   }
 
 
   BlockCollection getBlockCollection(Block b) {
   BlockCollection getBlockCollection(Block b) {

+ 1 - 1
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSClientRetries.java

@@ -830,7 +830,7 @@ public class TestDFSClientRetries {
   }
   }
 
 
   /** Test client retry with namenode restarting. */
   /** Test client retry with namenode restarting. */
-  @Test
+  @Test(timeout=300000)
   public void testNamenodeRestart() throws Exception {
   public void testNamenodeRestart() throws Exception {
     namenodeRestartTest(new Configuration(), false);
     namenodeRestartTest(new Configuration(), false);
   }
   }

+ 2 - 2
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHDFS.java

@@ -80,7 +80,7 @@ public class TestWebHDFS {
     }
     }
   }
   }
 
 
-  @Test
+  @Test(timeout=300000)
   public void testLargeFile() throws Exception {
   public void testLargeFile() throws Exception {
     largeFileTest(200L << 20); //200MB file length
     largeFileTest(200L << 20); //200MB file length
   }
   }
@@ -202,7 +202,7 @@ public class TestWebHDFS {
   }
   }
 
 
   /** Test client retry with namenode restarting. */
   /** Test client retry with namenode restarting. */
-  @Test
+  @Test(timeout=300000)
   public void testNamenodeRestart() throws Exception {
   public void testNamenodeRestart() throws Exception {
     ((Log4JLogger)NamenodeWebHdfsMethods.LOG).getLogger().setLevel(Level.ALL);
     ((Log4JLogger)NamenodeWebHdfsMethods.LOG).getLogger().setLevel(Level.ALL);
     final Configuration conf = WebHdfsTestUtil.createConf();
     final Configuration conf = WebHdfsTestUtil.createConf();