From 19b37e70801f3b9a5f909425aac953ce1806a666 Mon Sep 17 00:00:00 2001 From: Inigo Goiri Date: Mon, 4 Jun 2018 18:21:38 -0700 Subject: [PATCH] HDFS-13649. Randomize baseDir for MiniDFSCluster in TestReconstructStripedFile and TestReconstructStripedFileWithRandomECPolicy. Contributed by Anbang Hu. (cherry picked from commit 16316b60112842cf8a328b79c89297f6a8b30e7b) --- .../org/apache/hadoop/hdfs/TestReconstructStripedFile.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 1e93a2df704..2adddb6156c 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();