Return-Path: Delivered-To: apmail-hadoop-hdfs-commits-archive@minotaur.apache.org Received: (qmail 7559 invoked from network); 20 Oct 2010 22:59:58 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 Oct 2010 22:59:58 -0000 Received: (qmail 54889 invoked by uid 500); 20 Oct 2010 22:59:58 -0000 Delivered-To: apmail-hadoop-hdfs-commits-archive@hadoop.apache.org Received: (qmail 54745 invoked by uid 500); 20 Oct 2010 22:59:58 -0000 Mailing-List: contact hdfs-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-dev@hadoop.apache.org Delivered-To: mailing list hdfs-commits@hadoop.apache.org Received: (qmail 54727 invoked by uid 99); 20 Oct 2010 22:59:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Oct 2010 22:59:57 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Oct 2010 22:59:54 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 98CA1238899C; Wed, 20 Oct 2010 22:58:58 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1025788 [2/3] - in /hadoop/hdfs/branches/HDFS-1052: ./ src/contrib/fuse-dfs/src/test/ src/contrib/hdfsproxy/src/test/org/apache/hadoop/hdfsproxy/ src/test/aop/org/apache/hadoop/fs/ src/test/aop/org/apache/hadoop/hdfs/ src/test/aop/org/apac... Date: Wed, 20 Oct 2010 22:58:56 -0000 To: hdfs-commits@hadoop.apache.org From: jghoman@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101020225858.98CA1238899C@eris.apache.org> Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestDatanodeDeath.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestDatanodeDeath.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestDatanodeDeath.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestDatanodeDeath.java Wed Oct 20 22:58:52 2010 @@ -288,7 +288,8 @@ public class TestDatanodeDeath extends T conf.setInt("dfs.heartbeat.interval", 2); conf.setInt(DFSConfigKeys.DFS_NAMENODE_REPLICATION_PENDING_TIMEOUT_SEC_KEY, 2); conf.setInt(DFSConfigKeys.DFS_CLIENT_SOCKET_TIMEOUT_KEY, 5000); - MiniDFSCluster cluster = new MiniDFSCluster(conf, numDatanodes, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf) + .numDataNodes(numDatanodes).build(); cluster.waitActive(); FileSystem fs = cluster.getFileSystem(); Modify modThread = null; @@ -346,7 +347,7 @@ public class TestDatanodeDeath extends T int myMaxNodes = 5; System.out.println("SimpleTest starting with DataNode to Kill " + datanodeToKill); - MiniDFSCluster cluster = new MiniDFSCluster(conf, myMaxNodes, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(myMaxNodes).build(); cluster.waitActive(); FileSystem fs = cluster.getFileSystem(); short repl = 3; Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestDatanodeRegistration.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestDatanodeRegistration.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestDatanodeRegistration.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestDatanodeRegistration.java Wed Oct 20 22:58:52 2010 @@ -43,7 +43,7 @@ public class TestDatanodeRegistration ex MiniDFSCluster cluster = null; FileSystem fs = null; try { - cluster = new MiniDFSCluster(conf, 1, true, null); + cluster = new MiniDFSCluster.Builder(conf).build(); fs = cluster.getFileSystem(); InetSocketAddress addr = new InetSocketAddress( Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestDatanodeReport.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestDatanodeReport.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestDatanodeReport.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestDatanodeReport.java Wed Oct 20 22:58:52 2010 @@ -43,7 +43,7 @@ public class TestDatanodeReport extends DFSConfigKeys.DFS_NAMENODE_HEARTBEAT_RECHECK_INTERVAL_KEY, 500); // 0.5s conf.setLong("dfs.heartbeat.interval", 1L); MiniDFSCluster cluster = - new MiniDFSCluster(conf, NUM_OF_DATANODES, true, null); + new MiniDFSCluster.Builder(conf).numDataNodes(NUM_OF_DATANODES).build(); try { //wait until the cluster is up cluster.waitActive(); Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestDecommission.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestDecommission.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestDecommission.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestDecommission.java Wed Oct 20 22:58:52 2010 @@ -256,7 +256,8 @@ public class TestDecommission extends Te conf.setInt(DFSConfigKeys.DFS_NAMENODE_REPLICATION_PENDING_TIMEOUT_SEC_KEY, 4); writeConfigFile(localFileSys, excludeFile, null); - MiniDFSCluster cluster = new MiniDFSCluster(conf, numDatanodes, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf) + .numDataNodes(numDatanodes).build(); cluster.waitActive(); InetSocketAddress addr = new InetSocketAddress("localhost", cluster.getNameNodePort()); Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestDistributedFileSystem.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestDistributedFileSystem.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestDistributedFileSystem.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestDistributedFileSystem.java Wed Oct 20 22:58:52 2010 @@ -58,7 +58,7 @@ public class TestDistributedFileSystem { @Test public void testFileSystemCloseAll() throws Exception { Configuration conf = getTestConfiguration(); - MiniDFSCluster cluster = new MiniDFSCluster(conf, 0, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(0).build(); URI address = FileSystem.getDefaultUri(conf); try { @@ -82,7 +82,7 @@ public class TestDistributedFileSystem { @Test public void testDFSClose() throws Exception { Configuration conf = getTestConfiguration(); - MiniDFSCluster cluster = new MiniDFSCluster(conf, 2, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(2).build(); FileSystem fileSys = cluster.getFileSystem(); try { @@ -103,7 +103,7 @@ public class TestDistributedFileSystem { MiniDFSCluster cluster = null; try { - cluster = new MiniDFSCluster(conf, 2, true, null); + cluster = new MiniDFSCluster.Builder(conf).numDataNodes(2).build(); final Path filepath = new Path("/test/LeaseChecker/foo"); final long millis = System.currentTimeMillis(); @@ -186,7 +186,7 @@ public class TestDistributedFileSystem { int lsLimit = 2; final Configuration conf = getTestConfiguration(); conf.setInt(DFSConfigKeys.DFS_LIST_LIMIT, lsLimit); - final MiniDFSCluster cluster = new MiniDFSCluster(conf, 1, true, null); + final MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build(); try { final FileSystem fs = cluster.getFileSystem(); Path dir = new Path("/test"); @@ -290,7 +290,7 @@ public class TestDistributedFileSystem { final Configuration conf = getTestConfiguration(); conf.set(DFSConfigKeys.DFS_DATANODE_HOST_NAME_KEY, "localhost"); - final MiniDFSCluster cluster = new MiniDFSCluster(conf, 2, true, null); + final MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(2).build(); final FileSystem hdfs = cluster.getFileSystem(); final String hftpuri = "hftp://" + conf.get(DFSConfigKeys.DFS_NAMENODE_HTTP_ADDRESS_KEY); System.out.println("hftpuri=" + hftpuri); Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFSInputChecker.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFSInputChecker.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFSInputChecker.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFSInputChecker.java Wed Oct 20 22:58:52 2010 @@ -299,7 +299,7 @@ public class TestFSInputChecker extends rand.nextBytes(expected); // test DFS - MiniDFSCluster cluster = new MiniDFSCluster(conf, 1, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build(); FileSystem fileSys = cluster.getFileSystem(); try { testChecker(fileSys, true); Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFSOutputSummer.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFSOutputSummer.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFSOutputSummer.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFSOutputSummer.java Wed Oct 20 22:58:52 2010 @@ -113,8 +113,9 @@ public class TestFSOutputSummer extends Configuration conf = new HdfsConfiguration(); conf.setLong(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, BLOCK_SIZE); conf.setInt(DFSConfigKeys.DFS_BYTES_PER_CHECKSUM_KEY, BYTES_PER_CHECKSUM); - MiniDFSCluster cluster = new MiniDFSCluster( - conf, NUM_OF_DATANODES, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf) + .numDataNodes(NUM_OF_DATANODES) + .build(); fileSys = cluster.getFileSystem(); try { Path file = new Path("try.dat"); Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileAppend.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileAppend.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileAppend.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileAppend.java Wed Oct 20 22:58:52 2010 @@ -106,7 +106,7 @@ public class TestFileAppend extends Test if (simulatedStorage) { conf.setBoolean(SimulatedFSDataset.CONFIG_PROPERTY_SIMULATED, true); } - MiniDFSCluster cluster = new MiniDFSCluster(conf, 1, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build(); FileSystem fs = cluster.getFileSystem(); InetSocketAddress addr = new InetSocketAddress("localhost", cluster.getNameNodePort()); @@ -177,7 +177,7 @@ public class TestFileAppend extends Test conf.setBoolean(SimulatedFSDataset.CONFIG_PROPERTY_SIMULATED, true); } fileContents = AppendTestUtil.initBuffer(AppendTestUtil.FILE_SIZE); - MiniDFSCluster cluster = new MiniDFSCluster(conf, 1, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build(); FileSystem fs = cluster.getFileSystem(); try { @@ -232,7 +232,7 @@ public class TestFileAppend extends Test conf.setBoolean(SimulatedFSDataset.CONFIG_PROPERTY_SIMULATED, true); } fileContents = AppendTestUtil.initBuffer(AppendTestUtil.FILE_SIZE); - MiniDFSCluster cluster = new MiniDFSCluster(conf, 1, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build(); FileSystem fs = cluster.getFileSystem(); try { Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileAppend2.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileAppend2.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileAppend2.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileAppend2.java Wed Oct 20 22:58:52 2010 @@ -86,7 +86,7 @@ public class TestFileAppend2 extends Tes conf.setInt("dfs.datanode.handler.count", 50); conf.setBoolean("dfs.support.append", true); fileContents = AppendTestUtil.initBuffer(AppendTestUtil.FILE_SIZE); - MiniDFSCluster cluster = new MiniDFSCluster(conf, 1, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build(); FileSystem fs = cluster.getFileSystem(); try { { // test appending to a file. @@ -339,8 +339,9 @@ public class TestFileAppend2 extends Tes conf.setInt("dfs.datanode.handler.count", 50); conf.setBoolean("dfs.support.append", true); - MiniDFSCluster cluster = new MiniDFSCluster(conf, numDatanodes, - true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf) + .numDataNodes(numDatanodes) + .build(); cluster.waitActive(); FileSystem fs = cluster.getFileSystem(); Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileAppend3.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileAppend3.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileAppend3.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileAppend3.java Wed Oct 20 22:58:52 2010 @@ -69,7 +69,7 @@ public class TestFileAppend3 extends jun conf.setInt(DFSConfigKeys.DFS_BYTES_PER_CHECKSUM_KEY, 512); conf.setBoolean("dfs.support.append", true); buffersize = conf.getInt("io.file.buffer.size", 4096); - cluster = new MiniDFSCluster(conf, DATANODE_NUM, true, null); + cluster = new MiniDFSCluster.Builder(conf).numDataNodes(DATANODE_NUM).build(); fs = (DistributedFileSystem)cluster.getFileSystem(); } Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileAppend4.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileAppend4.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileAppend4.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileAppend4.java Wed Oct 20 22:58:52 2010 @@ -149,7 +149,7 @@ public class TestFileAppend4 { */ @Test(timeout=60000) public void testRecoverFinalizedBlock() throws Throwable { - cluster = new MiniDFSCluster(conf, 3, true, null); + cluster = new MiniDFSCluster.Builder(conf).numDataNodes(3).build(); try { cluster.waitActive(); @@ -220,7 +220,7 @@ public class TestFileAppend4 { */ @Test(timeout=60000) public void testCompleteOtherLeaseHoldersFile() throws Throwable { - cluster = new MiniDFSCluster(conf, 3, true, null); + cluster = new MiniDFSCluster.Builder(conf).numDataNodes(3).build(); try { cluster.waitActive(); Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileConcurrentReader.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileConcurrentReader.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileConcurrentReader.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileConcurrentReader.java Wed Oct 20 22:58:52 2010 @@ -85,7 +85,7 @@ public class TestFileConcurrentReader ex if (cluster != null) { cluster.shutdown(); } - cluster = new MiniDFSCluster(conf, 1, true, null); + cluster = new MiniDFSCluster.Builder(conf).build(); cluster.waitClusterUp(); fileSystem = cluster.getFileSystem(); } Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileCorruption.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileCorruption.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileCorruption.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileCorruption.java Wed Oct 20 22:58:52 2010 @@ -58,7 +58,7 @@ public class TestFileCorruption extends DFSTestUtil util = new DFSTestUtil("TestFileCorruption", 20, 3, 8*1024); try { Configuration conf = new HdfsConfiguration(); - cluster = new MiniDFSCluster(conf, 3, true, null); + cluster = new MiniDFSCluster.Builder(conf).numDataNodes(3).build(); FileSystem fs = cluster.getFileSystem(); util.createFiles(fs, "/srcdat"); // Now deliberately remove the blocks @@ -113,7 +113,7 @@ public class TestFileCorruption extends MiniDFSCluster cluster = null; try { Configuration conf = new HdfsConfiguration(); - cluster = new MiniDFSCluster(conf, 2, true, null); + cluster = new MiniDFSCluster.Builder(conf).numDataNodes(2).build(); cluster.waitActive(); FileSystem fs = cluster.getFileSystem(); Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileCreation.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileCreation.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileCreation.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileCreation.java Wed Oct 20 22:58:52 2010 @@ -106,8 +106,9 @@ public class TestFileCreation extends ju conf.setInt(DFSConfigKeys.DFS_CLIENT_WRITE_PACKET_SIZE_KEY, FSConstants.DEFAULT_WRITE_PACKET_SIZE); conf.setInt("dfs.replication", FSConstants.DEFAULT_REPLICATION_FACTOR + 1); conf.setInt("io.file.buffer.size", FSConstants.DEFAULT_FILE_BUFFER_SIZE); - MiniDFSCluster cluster = new MiniDFSCluster(conf, - FSConstants.DEFAULT_REPLICATION_FACTOR + 1, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf) + .numDataNodes(FSConstants.DEFAULT_REPLICATION_FACTOR + 1) + .build(); cluster.waitActive(); FileSystem fs = cluster.getFileSystem(); try { @@ -131,7 +132,7 @@ public class TestFileCreation extends ju if (simulatedStorage) { conf.setBoolean(SimulatedFSDataset.CONFIG_PROPERTY_SIMULATED, true); } - MiniDFSCluster cluster = new MiniDFSCluster(conf, 1, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build(); FileSystem fs = cluster.getFileSystem(); try { @@ -210,7 +211,7 @@ public class TestFileCreation extends ju if (simulatedStorage) { conf.setBoolean(SimulatedFSDataset.CONFIG_PROPERTY_SIMULATED, true); } - MiniDFSCluster cluster = new MiniDFSCluster(conf, 1, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build(); FileSystem fs = cluster.getFileSystem(); FileSystem localfs = FileSystem.getLocal(conf); @@ -275,7 +276,7 @@ public class TestFileCreation extends ju conf.setBoolean(SimulatedFSDataset.CONFIG_PROPERTY_SIMULATED, true); } // create cluster - MiniDFSCluster cluster = new MiniDFSCluster(conf, 1, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build(); FileSystem fs = cluster.getFileSystem(); cluster.waitActive(); InetSocketAddress addr = new InetSocketAddress("localhost", @@ -349,7 +350,7 @@ public class TestFileCreation extends ju conf.setBoolean(SimulatedFSDataset.CONFIG_PROPERTY_SIMULATED, true); } // create cluster - MiniDFSCluster cluster = new MiniDFSCluster(conf, 1, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build(); DistributedFileSystem dfs = null; try { cluster.waitActive(); @@ -419,7 +420,7 @@ public class TestFileCreation extends ju } // create cluster - MiniDFSCluster cluster = new MiniDFSCluster(conf, 1, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build(); FileSystem fs = null; try { cluster.waitActive(); @@ -489,8 +490,9 @@ public class TestFileCreation extends ju Thread.sleep(2*MAX_IDLE_TIME); } catch (InterruptedException e) { } - cluster = new MiniDFSCluster(nnport, conf, 1, false, true, - null, null, null); + cluster = new MiniDFSCluster.Builder(conf).nameNodePort(nnport) + .format(false) + .build(); cluster.waitActive(); // restart cluster yet again. This triggers the code to read in @@ -500,8 +502,9 @@ public class TestFileCreation extends ju Thread.sleep(5000); } catch (InterruptedException e) { } - cluster = new MiniDFSCluster(nnport, conf, 1, false, true, - null, null, null); + cluster = new MiniDFSCluster.Builder(conf).nameNodePort(nnport) + .format(false) + .build(); cluster.waitActive(); fs = cluster.getFileSystem(); @@ -554,7 +557,7 @@ public class TestFileCreation extends ju if (simulatedStorage) { conf.setBoolean(SimulatedFSDataset.CONFIG_PROPERTY_SIMULATED, true); } - MiniDFSCluster cluster = new MiniDFSCluster(conf, 1, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build(); FileSystem fs = cluster.getFileSystem(); DistributedFileSystem dfs = (DistributedFileSystem) fs; DFSClient dfsclient = dfs.dfs; @@ -589,7 +592,7 @@ public class TestFileCreation extends ju if (simulatedStorage) { conf.setBoolean(SimulatedFSDataset.CONFIG_PROPERTY_SIMULATED, true); } - MiniDFSCluster cluster = new MiniDFSCluster(conf, 1, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build(); FileSystem fs = cluster.getFileSystem(); final Path path = new Path("/" + System.currentTimeMillis() + "-testFileCreationNonRecursive"); @@ -689,7 +692,7 @@ public class TestFileCreation extends ju */ public void testConcurrentFileCreation() throws IOException { Configuration conf = new HdfsConfiguration(); - MiniDFSCluster cluster = new MiniDFSCluster(conf, 1, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build(); try { FileSystem fs = cluster.getFileSystem(); @@ -731,7 +734,7 @@ public class TestFileCreation extends ju conf.setInt("dfs.heartbeat.interval", 1); // create cluster - MiniDFSCluster cluster = new MiniDFSCluster(conf, DATANODE_NUM, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(DATANODE_NUM).build(); DistributedFileSystem dfs = null; try { cluster.waitActive(); @@ -790,7 +793,7 @@ public class TestFileCreation extends ju Configuration conf = new HdfsConfiguration(); // create cluster - MiniDFSCluster cluster = new MiniDFSCluster(conf, DATANODE_NUM, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(DATANODE_NUM).build(); DistributedFileSystem dfs = null; try { cluster.waitActive(); @@ -821,7 +824,7 @@ public class TestFileCreation extends ju conf.setInt("ipc.ping.interval", 10000); // hdfs timeout is now 10 second // create cluster - MiniDFSCluster cluster = new MiniDFSCluster(conf, DATANODE_NUM, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(DATANODE_NUM).build(); DistributedFileSystem dfs = null; try { cluster.waitActive(); Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileCreationClient.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileCreationClient.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileCreationClient.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileCreationClient.java Wed Oct 20 22:58:52 2010 @@ -50,7 +50,7 @@ public class TestFileCreationClient exte Configuration conf = new HdfsConfiguration(); conf.setInt("dfs.datanode.handler.count", 1); conf.setInt("dfs.replication", REPLICATION); - MiniDFSCluster cluster = new MiniDFSCluster(conf, REPLICATION, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(REPLICATION).build(); try { final FileSystem fs = cluster.getFileSystem(); Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileCreationDelete.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileCreationDelete.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileCreationDelete.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileCreationDelete.java Wed Oct 20 22:58:52 2010 @@ -45,7 +45,7 @@ public class TestFileCreationDelete exte conf.setBoolean("dfs.support.append", true); // create cluster - MiniDFSCluster cluster = new MiniDFSCluster(conf, 1, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build(); FileSystem fs = null; try { cluster.waitActive(); @@ -76,16 +76,18 @@ public class TestFileCreationDelete exte // This ensures that leases are persisted in fsimage. cluster.shutdown(); try {Thread.sleep(2*MAX_IDLE_TIME);} catch (InterruptedException e) {} - cluster = new MiniDFSCluster(nnport, conf, 1, false, true, - null, null, null); + cluster = new MiniDFSCluster.Builder(conf).nameNodePort(nnport) + .format(false) + .build(); cluster.waitActive(); // restart cluster yet again. This triggers the code to read in // persistent leases from fsimage. cluster.shutdown(); try {Thread.sleep(5000);} catch (InterruptedException e) {} - cluster = new MiniDFSCluster(nnport, conf, 1, false, true, - null, null, null); + cluster = new MiniDFSCluster.Builder(conf).nameNodePort(nnport) + .format(false) + .build(); cluster.waitActive(); fs = cluster.getFileSystem(); Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileCreationEmpty.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileCreationEmpty.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileCreationEmpty.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileCreationEmpty.java Wed Oct 20 22:58:52 2010 @@ -55,7 +55,7 @@ public class TestFileCreationEmpty exten conf.setInt("dfs.heartbeat.interval", 1); // create cluster - MiniDFSCluster cluster = new MiniDFSCluster(conf, DATANODE_NUM, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(DATANODE_NUM).build(); try { cluster.waitActive(); DistributedFileSystem dfs = (DistributedFileSystem)cluster.getFileSystem(); Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileStatus.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileStatus.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileStatus.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestFileStatus.java Wed Oct 20 22:58:52 2010 @@ -71,7 +71,7 @@ public class TestFileStatus { public static void testSetUp() throws Exception { conf = new HdfsConfiguration(); conf.setInt(DFSConfigKeys.DFS_LIST_LIMIT, 2); - cluster = new MiniDFSCluster(conf, 1, true, null); + cluster = new MiniDFSCluster.Builder(conf).build(); fs = cluster.getFileSystem(); fc = FileContext.getFileContext(cluster.getURI(), conf); hftpfs = cluster.getHftpFileSystem(); Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestGetBlocks.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestGetBlocks.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestGetBlocks.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestGetBlocks.java Wed Oct 20 22:58:52 2010 @@ -51,8 +51,9 @@ public class TestGetBlocks extends TestC final Random r = new Random(); CONF.setLong(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, DEFAULT_BLOCK_SIZE); - MiniDFSCluster cluster = new MiniDFSCluster( - CONF, REPLICATION_FACTOR, true, null ); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(CONF) + .numDataNodes(REPLICATION_FACTOR) + .build(); try { cluster.waitActive(); Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestHDFSFileSystemContract.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestHDFSFileSystemContract.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestHDFSFileSystemContract.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestHDFSFileSystemContract.java Wed Oct 20 22:58:52 2010 @@ -30,7 +30,7 @@ public class TestHDFSFileSystemContract @Override protected void setUp() throws Exception { Configuration conf = new HdfsConfiguration(); - cluster = new MiniDFSCluster(conf, 2, true, null); + cluster = new MiniDFSCluster.Builder(conf).numDataNodes(2).build(); fs = cluster.getFileSystem(); defaultWorkingDirectory = "/user/" + UserGroupInformation.getCurrentUser().getShortUserName(); Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestHDFSTrash.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestHDFSTrash.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestHDFSTrash.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestHDFSTrash.java Wed Oct 20 22:58:52 2010 @@ -38,7 +38,7 @@ public class TestHDFSTrash extends TestT TestSetup setup = new TestSetup(new TestSuite(TestHDFSTrash.class)) { protected void setUp() throws Exception { Configuration conf = new HdfsConfiguration(); - cluster = new MiniDFSCluster(conf, 2, true, null); + cluster = new MiniDFSCluster.Builder(conf).numDataNodes(2).build(); } protected void tearDown() throws Exception { if (cluster != null) { cluster.shutdown(); } Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestHFlush.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestHFlush.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestHFlush.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestHFlush.java Wed Oct 20 22:58:52 2010 @@ -98,7 +98,8 @@ public class TestHFlush { final int SECTIONS = 10; fileContent = AppendTestUtil.initBuffer(AppendTestUtil.FILE_SIZE); - MiniDFSCluster cluster = new MiniDFSCluster(conf, replicas, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf) + .numDataNodes(replicas).build(); // Make sure we work with DFS in order to utilize all its functionality DistributedFileSystem fileSystem = (DistributedFileSystem)cluster.getFileSystem(); @@ -168,7 +169,7 @@ public class TestHFlush { final Path p = new Path("/pipelineHeartbeat/foo"); System.out.println("p=" + p); - MiniDFSCluster cluster = new MiniDFSCluster(conf, DATANODE_NUM, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(DATANODE_NUM).build(); DistributedFileSystem fs = (DistributedFileSystem)cluster.getFileSystem(); byte[] fileContents = AppendTestUtil.initBuffer(fileLen); Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestHftpFileSystem.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestHftpFileSystem.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestHftpFileSystem.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestHftpFileSystem.java Wed Oct 20 22:58:52 2010 @@ -68,7 +68,7 @@ public class TestHftpFileSystem extends config = new Configuration(); config.set(DFSConfigKeys.DFS_DATANODE_HOST_NAME_KEY, "localhost"); - cluster = new MiniDFSCluster(config, 2, true, null); + cluster = new MiniDFSCluster.Builder(config).numDataNodes(2).build(); hdfs = cluster.getFileSystem(); final String hftpuri = "hftp://" + config.get(DFSConfigKeys.DFS_NAMENODE_HTTP_ADDRESS_KEY); Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestInjectionForSimulatedStorage.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestInjectionForSimulatedStorage.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestInjectionForSimulatedStorage.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestInjectionForSimulatedStorage.java Wed Oct 20 22:58:52 2010 @@ -138,8 +138,7 @@ public class TestInjectionForSimulatedSt conf.setInt(DFSConfigKeys.DFS_BYTES_PER_CHECKSUM_KEY, checksumSize); conf.setBoolean(SimulatedFSDataset.CONFIG_PROPERTY_SIMULATED, true); //first time format - cluster = new MiniDFSCluster(0, conf, numDataNodes, true, - true, null, null); + cluster = new MiniDFSCluster.Builder(conf).numDataNodes(numDataNodes).build(); cluster.waitActive(); DFSClient dfsClient = new DFSClient(new InetSocketAddress("localhost", cluster.getNameNodePort()), @@ -169,8 +168,10 @@ public class TestInjectionForSimulatedSt conf.setBoolean(SimulatedFSDataset.CONFIG_PROPERTY_SIMULATED, true); conf.set(DFSConfigKeys.DFS_NAMENODE_SAFEMODE_THRESHOLD_PCT_KEY, "0.0f"); - cluster = new MiniDFSCluster(0, conf, numDataNodes*2, false, - true, null, null); + cluster = new MiniDFSCluster.Builder(conf) + .numDataNodes(numDataNodes * 2) + .format(false) + .build(); cluster.waitActive(); Set uniqueBlocks = new HashSet(); for (int i=0; i datanodes = cluster.getDataNodes(); Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestDataNodeMetrics.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestDataNodeMetrics.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestDataNodeMetrics.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestDataNodeMetrics.java Wed Oct 20 22:58:52 2010 @@ -33,7 +33,7 @@ public class TestDataNodeMetrics extends public void testDataNodeMetrics() throws Exception { Configuration conf = new HdfsConfiguration(); conf.setBoolean(SimulatedFSDataset.CONFIG_PROPERTY_SIMULATED, true); - MiniDFSCluster cluster = new MiniDFSCluster(conf, 1, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build(); try { FileSystem fs = cluster.getFileSystem(); final long LONG_FILE_LEN = Integer.MAX_VALUE+1L; Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailure.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailure.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailure.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailure.java Wed Oct 20 22:58:52 2010 @@ -73,7 +73,7 @@ public class TestDataNodeVolumeFailure e conf.setLong(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, block_size); // Allow a single volume failure (there are two volumes) conf.setInt(DFSConfigKeys.DFS_DATANODE_FAILED_VOLUMES_TOLERATED_KEY, 1); - cluster = new MiniDFSCluster(conf, dn_num, true, null); + cluster = new MiniDFSCluster.Builder(conf).numDataNodes(dn_num).build(); cluster.waitActive(); } Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestDatanodeRestart.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestDatanodeRestart.java?rev=1025788&r1=1025787&r2=1025788&view=diff ============================================================================== --- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestDatanodeRestart.java (original) +++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestDatanodeRestart.java Wed Oct 20 22:58:52 2010 @@ -50,7 +50,7 @@ public class TestDatanodeRestart { Configuration conf = new HdfsConfiguration(); conf.setLong(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, 1024L); conf.setInt(DFSConfigKeys.DFS_CLIENT_WRITE_PACKET_SIZE_KEY, 512); - MiniDFSCluster cluster = new MiniDFSCluster(conf, 3, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(3).build(); cluster.waitActive(); FileSystem fs = cluster.getFileSystem(); try { @@ -74,7 +74,7 @@ public class TestDatanodeRestart { conf.setLong(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, 1024L); conf.setInt(DFSConfigKeys.DFS_CLIENT_WRITE_PACKET_SIZE_KEY, 512); conf.setBoolean("dfs.support.append", true); - MiniDFSCluster cluster = new MiniDFSCluster(conf, 2, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(2).build(); cluster.waitActive(); try { testRbwReplicas(cluster, false); @@ -137,7 +137,7 @@ public class TestDatanodeRestart { conf.setLong(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, 1024L); conf.setInt(DFSConfigKeys.DFS_CLIENT_WRITE_PACKET_SIZE_KEY, 512); conf.setBoolean("dfs.support.append", true); - MiniDFSCluster cluster = new MiniDFSCluster(conf, 1, true, null); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build(); cluster.waitActive(); try { FileSystem fs = cluster.getFileSystem();