From hdfs-commits-return-1049-apmail-hadoop-hdfs-commits-archive=hadoop.apache.org@hadoop.apache.org Wed Jan 19 23:59:42 2011 Return-Path: Delivered-To: apmail-hadoop-hdfs-commits-archive@minotaur.apache.org Received: (qmail 28572 invoked from network); 19 Jan 2011 23:59:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Jan 2011 23:59:42 -0000 Received: (qmail 16249 invoked by uid 500); 19 Jan 2011 23:59:42 -0000 Delivered-To: apmail-hadoop-hdfs-commits-archive@hadoop.apache.org Received: (qmail 16198 invoked by uid 500); 19 Jan 2011 23:59:41 -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 16190 invoked by uid 99); 19 Jan 2011 23:59:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Jan 2011 23:59:41 +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, 19 Jan 2011 23:59:40 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id AE6082388900; Wed, 19 Jan 2011 23:59:20 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1061067 - in /hadoop/hdfs/trunk: CHANGES.txt src/test/hdfs/org/apache/hadoop/hdfs/MiniDFSCluster.java Date: Wed, 19 Jan 2011 23:59:20 -0000 To: hdfs-commits@hadoop.apache.org From: todd@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110119235920.AE6082388900@eris.apache.org> Author: todd Date: Wed Jan 19 23:59:20 2011 New Revision: 1061067 URL: http://svn.apache.org/viewvc?rev=1061067&view=rev Log: HDFS-1585. Fix build after HDFS-1547. Contributed by Todd Lipcon Modified: hadoop/hdfs/trunk/CHANGES.txt hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/hdfs/MiniDFSCluster.java Modified: hadoop/hdfs/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/CHANGES.txt?rev=1061067&r1=1061066&r2=1061067&view=diff ============================================================================== --- hadoop/hdfs/trunk/CHANGES.txt (original) +++ hadoop/hdfs/trunk/CHANGES.txt Wed Jan 19 23:59:20 2011 @@ -63,6 +63,8 @@ Trunk (unreleased changes) HDFS-1463. Accesstime of a file is not updated in safeMode. (dhruba) + HDFS-1585. Fix build after HDFS-1547 (todd) + Release 0.22.0 - Unreleased NEW FEATURES Modified: hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/hdfs/MiniDFSCluster.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/hdfs/MiniDFSCluster.java?rev=1061067&r1=1061066&r2=1061067&view=diff ============================================================================== --- hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/hdfs/MiniDFSCluster.java (original) +++ hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/hdfs/MiniDFSCluster.java Wed Jan 19 23:59:20 2011 @@ -546,6 +546,38 @@ public class MiniDFSCluster { public synchronized void startDataNodes(Configuration conf, int numDataNodes, boolean manageDfsDirs, StartupOption operation, String[] racks, String[] hosts, + long[] simulatedCapacities) throws IOException { + startDataNodes(conf, numDataNodes, manageDfsDirs, operation, racks, + hosts, simulatedCapacities, false); + } + + /** + * Modify the config and start up additional DataNodes. The info port for + * DataNodes is guaranteed to use a free port. + * + * Data nodes can run with the name node in the mini cluster or + * a real name node. For example, running with a real name node is useful + * when running simulated data nodes with a real name node. + * If minicluster's name node is null assume that the conf has been + * set with the right address:port of the name node. + * + * @param conf the base configuration to use in starting the DataNodes. This + * will be modified as necessary. + * @param numDataNodes Number of DataNodes to start; may be zero + * @param manageDfsDirs if true, the data directories for DataNodes will be + * created and dfs.data.dir will be set in the conf + * @param operation the operation with which to start the DataNodes. If null + * or StartupOption.FORMAT, then StartupOption.REGULAR will be used. + * @param racks array of strings indicating the rack that each DataNode is on + * @param hosts array of strings indicating the hostnames for each DataNode + * @param simulatedCapacities array of capacities of the simulated data nodes + * @param setupHostsFile add new nodes to dfs hosts files + * + * @throws IllegalStateException if NameNode has been shutdown + */ + public synchronized void startDataNodes(Configuration conf, int numDataNodes, + boolean manageDfsDirs, StartupOption operation, + String[] racks, String[] hosts, long[] simulatedCapacities, boolean setupHostsFile) throws IOException {