HDFS-13649. Randomize baseDir for MiniDFSCluster in TestReconstructStripedFile and TestReconstructStripedFileWithRandomECPolicy. Contributed by Anbang Hu.

(cherry picked from commit 16316b6011)
This commit is contained in:
Inigo Goiri 2018-06-04 18:21:38 -07:00
parent 76546d23e2
commit 19b37e7080
1 changed files with 3 additions and 1 deletions

View File

@ -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();