From 296c4064fcb4ec6a07b461ad3393ebb5bbe9e9e5 Mon Sep 17 00:00:00 2001 From: Colin Patrick Mccabe Date: Mon, 27 Oct 2014 17:44:07 -0700 Subject: [PATCH] HDFS-7282. Fix intermittent TestShortCircuitCache and TestBlockReaderFactory failures resulting from TemporarySocketDirectory GC (Jinghui Wang via Colin P. McCabe) (cherry picked from commit 518a7f4af3d8deeecabfa0629b16521ce09de459) --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 4 ++++ .../java/org/apache/hadoop/hdfs/TestBlockReaderFactory.java | 3 +++ .../hadoop/hdfs/shortcircuit/TestShortCircuitCache.java | 1 + 3 files changed, 8 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 32415f9bd9f..d84f2578066 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -93,6 +93,10 @@ Release 2.7.0 - UNRELEASED HDFS-7258. CacheReplicationMonitor rescan schedule log should use DEBUG level instead of INFO level. (Xiaoyu Yao via wheat9) + HDFS-7282. Fix intermittent TestShortCircuitCache and + TestBlockReaderFactory failures resulting from TemporarySocketDirectory GC. + (Jinghui Wang via Colin Patrick McCabe) + Release 2.6.0 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestBlockReaderFactory.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestBlockReaderFactory.java index a7dcbc1168c..5c330cd1ce2 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestBlockReaderFactory.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestBlockReaderFactory.java @@ -343,6 +343,7 @@ public class TestBlockReaderFactory { } }); cluster.shutdown(); + sockDir.close(); } /** @@ -378,6 +379,7 @@ public class TestBlockReaderFactory { fs.dfs.getClientContext().getShortCircuitCache(); Assert.assertEquals(null, cache.getDfsClientShmManager()); cluster.shutdown(); + sockDir.close(); } /** @@ -411,6 +413,7 @@ public class TestBlockReaderFactory { Assert.assertTrue(cache.getDfsClientShmManager(). getDomainSocketWatcher().isClosed()); cluster.shutdown(); + sockDir.close(); } /** diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/shortcircuit/TestShortCircuitCache.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/shortcircuit/TestShortCircuitCache.java index ca30e029942..bfa871c40f2 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/shortcircuit/TestShortCircuitCache.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/shortcircuit/TestShortCircuitCache.java @@ -519,6 +519,7 @@ public class TestShortCircuitCache { } }); cluster.shutdown(); + sockDir.close(); } /**