hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1311556 - in /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs: CHANGES.txt src/test/java/org/apache/hadoop/test/MiniDFSClusterManager.java
Date Tue, 10 Apr 2012 02:25:41 GMT
Author: atm
Date: Tue Apr 10 02:25:40 2012
New Revision: 1311556

URL: http://svn.apache.org/viewvc?rev=1311556&view=rev
Log:
HDFS-3235. MiniDFSClusterManager doesn't correctly support -format option. Contributed by
Henry Robinson.

Modified:
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/test/MiniDFSClusterManager.java

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1311556&r1=1311555&r2=1311556&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Tue Apr 10 02:25:40 2012
@@ -121,6 +121,9 @@ Trunk (unreleased changes)
     HDFS-3119. Overreplicated block is not deleted even after the replication 
     factor is reduced after sync follwed by closing that file. (Ashish Singhi 
     via umamahesh)
+
+    HDFS-3235. MiniDFSClusterManager doesn't correctly support -format option.
+    (Henry Robinson via atm)
     
 Release 2.0.0 - UNRELEASED 
 

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/test/MiniDFSClusterManager.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/test/MiniDFSClusterManager.java?rev=1311556&r1=1311555&r2=1311556&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/test/MiniDFSClusterManager.java
(original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/test/MiniDFSClusterManager.java
Tue Apr 10 02:25:40 2012
@@ -68,6 +68,7 @@ public class MiniDFSClusterManager {
   private StartupOption dfsOpts;
   private String writeConfig;
   private Configuration conf;
+  private boolean format;
   
   private static final long SLEEP_INTERVAL_MS = 1000 * 60;
 
@@ -138,6 +139,7 @@ public class MiniDFSClusterManager {
     dfs = new MiniDFSCluster.Builder(conf).nameNodePort(nameNodePort)
                                           .numDataNodes(numDataNodes)
                                           .startupOption(dfsOpts)
+                                          .format(format)
                                           .build();
     dfs.waitActive();
     
@@ -196,8 +198,13 @@ public class MiniDFSClusterManager {
     // HDFS
     numDataNodes = intArgument(cli, "datanodes", 1);
     nameNodePort = intArgument(cli, "nnport", 0);
-    dfsOpts = cli.hasOption("format") ?
-        StartupOption.FORMAT : StartupOption.REGULAR;
+    if (cli.hasOption("format")) {
+      dfsOpts = StartupOption.FORMAT;
+      format = true;
+    } else {
+      dfsOpts = StartupOption.REGULAR;
+      format = false;
+    }
 
     // Runner
     writeDetails = cli.getOptionValue("writeDetails");



Mime
View raw message