Author: cnauroth
Date: Thu Jul 18 03:52:06 2013
New Revision: 1504356
URL: http://svn.apache.org/r1504356
Log:
HDFS-5003. TestNNThroughputBenchmark failed caused by existing directories.
Contributed by Xi Fang.
Modified:
hadoop/common/branches/branch-1/CHANGES.txt
hadoop/common/branches/branch-1/src/test/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java
Modified: hadoop/common/branches/branch-1/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/CHANGES.txt?rev=1504356&r1=1504355&r2=1504356&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/CHANGES.txt (original)
+++ hadoop/common/branches/branch-1/CHANGES.txt Thu Jul 18 03:52:06 2013
@@ -83,6 +83,9 @@ Release 1.3.0 - unreleased
HDFS-4521. Invalid Network Topologies should not be cached.
(Backported by Junping Du, reviewed by Colin Patrick McCabe.)
+ HDFS-5003. TestNNThroughputBenchmark failed caused by existing directories.
+ (Xi Fang via cnauroth)
+
Release 1.2.1 - 2013.07.06
INCOMPATIBLE CHANGES
Modified:
hadoop/common/branches/branch-1/src/test/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/src/test/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java?rev=1504356&r1=1504355&r2=1504356&view=diff
==============================================================================
---
hadoop/common/branches/branch-1/src/test/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java
(original)
+++
hadoop/common/branches/branch-1/src/test/org/apache/hadoop/hdfs/server/namenode/NNThroughputBenchmark.java
Thu Jul 18 03:52:06 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();