You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-commits@hadoop.apache.org by cn...@apache.org on 2014/04/11 17:34:34 UTC
svn commit: r1586686 - in
/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs:
CHANGES.txt src/test/java/org/apache/hadoop/hdfs/TestDatanodeConfig.java
Author: cnauroth
Date: Fri Apr 11 15:34:34 2014
New Revision: 1586686
URL: http://svn.apache.org/r1586686
Log:
HDFS-6234. Merging change r1586682 from trunk to branch-2.
Modified:
hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeConfig.java
Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1586686&r1=1586685&r2=1586686&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Fri Apr 11 15:34:34 2014
@@ -125,6 +125,9 @@ Release 2.4.1 - UNRELEASED
HDFS-6231. DFSClient hangs infinitely if using hedged reads and all eligible
datanodes die. (cnauroth)
+ HDFS-6234. TestDatanodeConfig#testMemlockLimit fails on Windows due to
+ invalid file path. (cnauroth)
+
Release 2.4.0 - 2014-04-07
INCOMPATIBLE CHANGES
Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeConfig.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeConfig.java?rev=1586686&r1=1586685&r2=1586686&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeConfig.java (original)
+++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeConfig.java Fri Apr 11 15:34:34 2014
@@ -86,9 +86,11 @@ public class TestDatanodeConfig {
fail();
} catch(Exception e) {
// expecting exception here
+ } finally {
+ if (dn != null) {
+ dn.shutdown();
+ }
}
- if(dn != null)
- dn.shutdown();
assertNull("Data-node startup should have failed.", dn);
// 2. Test "file:" schema and no schema (path-only). Both should work.
@@ -121,17 +123,21 @@ public class TestDatanodeConfig {
// Can't increase the memlock limit past the maximum.
assumeTrue(memlockLimit != Long.MAX_VALUE);
+ File dataDir = new File(BASE_DIR, "data").getCanonicalFile();
Configuration conf = cluster.getConfiguration(0);
+ conf.set(DFSConfigKeys.DFS_DATANODE_DATA_DIR_KEY,
+ makeURI("file", null, fileAsURI(dataDir).getPath()));
long prevLimit = conf.
getLong(DFSConfigKeys.DFS_DATANODE_MAX_LOCKED_MEMORY_KEY,
DFSConfigKeys.DFS_DATANODE_MAX_LOCKED_MEMORY_DEFAULT);
+ DataNode dn = null;
try {
// Try starting the DN with limit configured to the ulimit
conf.setLong(DFSConfigKeys.DFS_DATANODE_MAX_LOCKED_MEMORY_KEY,
memlockLimit);
- DataNode dn = null;
dn = DataNode.createDataNode(new String[]{}, conf);
dn.shutdown();
+ dn = null;
// Try starting the DN with a limit > ulimit
conf.setLong(DFSConfigKeys.DFS_DATANODE_MAX_LOCKED_MEMORY_KEY,
memlockLimit+1);
@@ -142,6 +148,9 @@ public class TestDatanodeConfig {
"more than the datanode's available RLIMIT_MEMLOCK", e);
}
} finally {
+ if (dn != null) {
+ dn.shutdown();
+ }
conf.setLong(DFSConfigKeys.DFS_DATANODE_MAX_LOCKED_MEMORY_KEY,
prevLimit);
}