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

This commit is contained in:
Inigo Goiri 2018-06-04 18:21:38 -07:00
parent a28848104f
commit 16316b6011

View File

@ -122,7 +122,9 @@ public void setup() throws IOException {
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();