HDFS-13649. Randomize baseDir for MiniDFSCluster in TestReconstructStripedFile and TestReconstructStripedFileWithRandomECPolicy. Contributed by Anbang Hu.
(cherry picked from commit 16316b60112842cf8a328b79c89297f6a8b30e7b) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/19b37e70 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/19b37e70 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/19b37e70 Branch: refs/heads/branch-3.1 Commit: 19b37e70801f3b9a5f909425aac953ce1806a666 Parents: 76546d2 Author: Inigo Goiri <[email protected]> Authored: Mon Jun 4 18:21:38 2018 -0700 Committer: Inigo Goiri <[email protected]> Committed: Mon Jun 4 18:22:09 2018 -0700 ---------------------------------------------------------------------- .../java/org/apache/hadoop/hdfs/TestReconstructStripedFile.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/19b37e70/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestReconstructStripedFile.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestReconstructStripedFile.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestReconstructStripedFile.java index 1e93a2d..2adddb6 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestReconstructStripedFile.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestReconstructStripedFile.java @@ -122,7 +122,9 @@ public class TestReconstructStripedFile { CodecUtil.IO_ERASURECODE_CODEC_RS_RAWCODERS_KEY, NativeRSRawErasureCoderFactory.CODER_NAME); } - cluster = new MiniDFSCluster.Builder(conf).numDataNodes(dnNum).build(); + File basedir = new File(GenericTestUtils.getRandomizedTempPath()); + cluster = new MiniDFSCluster.Builder(conf, basedir).numDataNodes(dnNum) + .build(); cluster.waitActive(); fs = cluster.getFileSystem(); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
