You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by tg...@apache.org on 2012/08/17 17:20:04 UTC
svn commit: r1374314 - in
/hadoop/common/branches/branch-2.1.0-alpha/hadoop-common-project/hadoop-common:
CHANGES.txt src/test/java/org/apache/hadoop/fs/TestLocalDirAllocator.java
Author: tgraves
Date: Fri Aug 17 15:20:03 2012
New Revision: 1374314
URL: http://svn.apache.org/viewvc?rev=1374314&view=rev
Log:
merge -r 1374311:1374312 from trunk. FIXES: HADOOP-8692
Modified:
hadoop/common/branches/branch-2.1.0-alpha/hadoop-common-project/hadoop-common/CHANGES.txt
hadoop/common/branches/branch-2.1.0-alpha/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalDirAllocator.java
Modified: hadoop/common/branches/branch-2.1.0-alpha/hadoop-common-project/hadoop-common/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.1.0-alpha/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1374314&r1=1374313&r2=1374314&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.1.0-alpha/hadoop-common-project/hadoop-common/CHANGES.txt (original)
+++ hadoop/common/branches/branch-2.1.0-alpha/hadoop-common-project/hadoop-common/CHANGES.txt Fri Aug 17 15:20:03 2012
@@ -654,6 +654,9 @@ Release 0.23.3 - UNRELEASED
HADOOP-8390. TestFileSystemCanonicalization fails with JDK7 (Trevor
Robinson via tgraves)
+ HADOOP-8692. TestLocalDirAllocator fails intermittently with JDK7
+ (Trevor Robinson via tgraves)
+
Release 0.23.2 - UNRELEASED
NEW FEATURES
Modified: hadoop/common/branches/branch-2.1.0-alpha/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalDirAllocator.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.1.0-alpha/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalDirAllocator.java?rev=1374314&r1=1374313&r2=1374314&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.1.0-alpha/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalDirAllocator.java (original)
+++ hadoop/common/branches/branch-2.1.0-alpha/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalDirAllocator.java Fri Aug 17 15:20:03 2012
@@ -343,14 +343,18 @@ public class TestLocalDirAllocator {
@Test
public void testRemoveContext() throws IOException {
String dir = buildBufferDir(ROOT, 0);
- String contextCfgItemName = "application_1340842292563_0004.app.cache.dirs";
- conf.set(contextCfgItemName, dir);
- LocalDirAllocator localDirAllocator = new LocalDirAllocator(
- contextCfgItemName);
- localDirAllocator.getLocalPathForWrite("p1/x", SMALL_FILE_SIZE, conf);
- assertTrue(LocalDirAllocator.isContextValid(contextCfgItemName));
- LocalDirAllocator.removeContext(contextCfgItemName);
- assertFalse(LocalDirAllocator.isContextValid(contextCfgItemName));
+ try {
+ String contextCfgItemName = "application_1340842292563_0004.app.cache.dirs";
+ conf.set(contextCfgItemName, dir);
+ LocalDirAllocator localDirAllocator = new LocalDirAllocator(
+ contextCfgItemName);
+ localDirAllocator.getLocalPathForWrite("p1/x", SMALL_FILE_SIZE, conf);
+ assertTrue(LocalDirAllocator.isContextValid(contextCfgItemName));
+ LocalDirAllocator.removeContext(contextCfgItemName);
+ assertFalse(LocalDirAllocator.isContextValid(contextCfgItemName));
+ } finally {
+ rmBufferDirs();
+ }
}
}