HDFS-13652. Randomize baseDir for MiniDFSCluster in TestBlockScanner. Contributed by Anbang Hu.

(cherry picked from commit a28848104f)
This commit is contained in:
Inigo Goiri 2018-06-04 18:12:43 -07:00
parent f97bd6bb7f
commit 65d6943b4f
1 changed files with 2 additions and 1 deletions

View File

@ -92,7 +92,8 @@ public class TestBlockScanner {
TestContext(Configuration conf, int numNameServices) throws Exception {
this.numNameServices = numNameServices;
MiniDFSCluster.Builder bld = new MiniDFSCluster.Builder(conf).
File basedir = new File(GenericTestUtils.getRandomizedTempPath());
MiniDFSCluster.Builder bld = new MiniDFSCluster.Builder(conf, basedir).
numDataNodes(1).
storagesPerDatanode(1);
if (numNameServices > 1) {