diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index bb0e8d231e7..b583b963b6e 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -2087,6 +2087,9 @@ Release 2.8.0 - UNRELEASED HDFS-9208. Disabling atime may fail clients like distCp. (Kihwal Lee via yliu) + HDFS-9270. TestShortCircuitLocalRead should not leave socket after unit + test (Masatake Iwasaki via Colin P. McCabe) + Release 2.7.2 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/shortcircuit/TestShortCircuitLocalRead.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/shortcircuit/TestShortCircuitLocalRead.java index b6b8a490bfb..e6ee7f3cb57 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/shortcircuit/TestShortCircuitLocalRead.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/shortcircuit/TestShortCircuitLocalRead.java @@ -389,7 +389,8 @@ public class TestShortCircuitLocalRead { conf.setBoolean(HdfsClientConfigKeys.Read.ShortCircuit.KEY, true); conf.setBoolean(HdfsClientConfigKeys.Read.ShortCircuit.SKIP_CHECKSUM_KEY, false); conf.set(DFSConfigKeys.DFS_DOMAIN_SOCKET_PATH_KEY, - "/tmp/testSkipWithVerifyChecksum._PORT"); + new File(sockDir.getDir(), + "testSkipWithVerifyChecksum._PORT.sock").getAbsolutePath()); DomainSocket.disableBindPathValidation(); if (simulatedStorage) { SimulatedFSDataset.setFactory(conf); @@ -435,7 +436,8 @@ public class TestShortCircuitLocalRead { conf.setBoolean(HdfsClientConfigKeys.Read.ShortCircuit.KEY, true); conf.setBoolean(HdfsClientConfigKeys.Read.ShortCircuit.SKIP_CHECKSUM_KEY, false); conf.set(DFSConfigKeys.DFS_DOMAIN_SOCKET_PATH_KEY, - "/tmp/testHandleTruncatedBlockFile._PORT"); + new File(sockDir.getDir(), + "testHandleTruncatedBlockFile._PORT.sock").getAbsolutePath()); conf.set(DFSConfigKeys.DFS_CHECKSUM_TYPE_KEY, "CRC32C"); final Path TEST_PATH = new Path("/a"); final Path TEST_PATH2 = new Path("/b"); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tracing/TestTracingShortCircuitLocalRead.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tracing/TestTracingShortCircuitLocalRead.java index 292c68d38eb..37c09d1890e 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tracing/TestTracingShortCircuitLocalRead.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/tracing/TestTracingShortCircuitLocalRead.java @@ -19,6 +19,7 @@ package org.apache.hadoop.tracing; import static org.junit.Assume.assumeTrue; +import java.io.File; import java.io.IOException; import org.apache.hadoop.conf.Configuration; @@ -74,7 +75,8 @@ public class TestTracingShortCircuitLocalRead { conf.setBoolean(HdfsClientConfigKeys.Read.ShortCircuit.KEY, true); conf.setBoolean(HdfsClientConfigKeys.Read.ShortCircuit.SKIP_CHECKSUM_KEY, false); conf.set(DFSConfigKeys.DFS_DOMAIN_SOCKET_PATH_KEY, - "testShortCircuitTraceHooks._PORT"); + new File(sockDir.getDir(), + "testShortCircuitTraceHooks._PORT.sock").getAbsolutePath()); conf.set(DFSConfigKeys.DFS_CHECKSUM_TYPE_KEY, "CRC32C"); cluster = new MiniDFSCluster.Builder(conf) .numDataNodes(1)