Browse Source

HDFS-3462. TestDFSClientRetries.busyTest() should restore default xceiver count in the config. Contributed by Madhukara Phatak. (harsh)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1343798 13f79535-47bb-0310-9956-ffa450edef68
Harsh J 13 years ago
parent
commit
5cf21e4383

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

@@ -151,6 +151,9 @@ Trunk (unreleased changes)
 
     HDFS-3368. Missing blocks due to bad DataNodes coming up and down. (shv)
 
+    HDFS-3462. TestDFSClientRetries.busyTest() should restore default
+    xceiver count in the config. (Madhukara Phatak via harsh)
+
 Release 2.0.1-alpha - UNRELEASED
   
   INCOMPATIBLE CHANGES

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

@@ -526,7 +526,7 @@ public class TestDFSClientRetries extends TestCase {
     short replicationFactor = 1;
     long blockSize = 128*1024*1024; // DFS block size
     int bufferSize = 4096;
-    
+    int originalXcievers = conf.getInt(DFSConfigKeys.DFS_DATANODE_MAX_RECEIVER_THREADS_KEY,0);
     conf.setInt(DFSConfigKeys.DFS_DATANODE_MAX_RECEIVER_THREADS_KEY, xcievers);
     conf.setInt(DFSConfigKeys.DFS_CLIENT_MAX_BLOCK_ACQUIRE_FAILURES_KEY, 
                 retries);
@@ -605,6 +605,7 @@ public class TestDFSClientRetries extends TestCase {
       e.printStackTrace();
       ret = false;
     } finally {
+      conf.setInt(DFSConfigKeys.DFS_DATANODE_MAX_RECEIVER_THREADS_KEY,originalXcievers);
       fs.delete(file1, false);
       cluster.shutdown();
     }