Author: cnauroth
Date: Thu Jul 18 04:00:40 2013
New Revision: 1504357

URL: http://svn.apache.org/r1504357
Log:
HDFS-5003. Merging change r1504356 from branch-1 to branch-1-win.

Modified:
    hadoop/common/branches/branch-1-win/CHANGES.txt
    
hadoop/common/branches/branch-1-win/src/test/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java

Modified: hadoop/common/branches/branch-1-win/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/common/branches/branch-1-win/CHANGES.txt?rev=1504357&r1=1504356&r2=1504357&view=diff
==============================================================================
--- hadoop/common/branches/branch-1-win/CHANGES.txt (original)
+++ hadoop/common/branches/branch-1-win/CHANGES.txt Thu Jul 18 04:00:40 2013
@@ -68,6 +68,9 @@ Release 1.3.0 - unreleased
     HADOOP-9678. TestRPC#testStopsAllThreads intermittently fails on Windows.
     (Ivan Mitic via cnauroth)
 
+    HDFS-5003. TestNNThroughputBenchmark failed caused by existing directories.
+    (Xi Fang via cnauroth)
+
 Release 1.2.1 - Unreleased 
 
   INCOMPATIBLE CHANGES

Modified: 
hadoop/common/branches/branch-1-win/src/test/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java
URL: 
http://svn.apache.org/viewvc/hadoop/common/branches/branch-1-win/src/test/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java?rev=1504357&r1=1504356&r2=1504357&view=diff
==============================================================================
--- 
hadoop/common/branches/branch-1-win/src/test/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java
 (original)
+++ 
hadoop/common/branches/branch-1-win/src/test/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java
 Thu Jul 18 04:00:40 2013
@@ -102,7 +102,7 @@ public class NNThroughputBenchmark {
     config.set("dfs.hosts.exclude", "${hadoop.tmp.dir}/dfs/hosts/exclude");
     File excludeFile = new File(config.get("dfs.hosts.exclude", "exclude"));
     if(! excludeFile.exists()) {
-      if(!excludeFile.getParentFile().mkdirs())
+      if(!excludeFile.getParentFile().exists() && 
!excludeFile.getParentFile().mkdirs())
         throw new IOException("NNThroughputBenchmark: cannot mkdir " + 
excludeFile);
     }
     new FileOutputStream(excludeFile).close();


Reply via email to