@@ -110,6 +110,9 @@ Trunk (unreleased changes)
HADOOP-2845. Fix dfsadmin disk utilization report on Solaris.
(Martin Traverso via tomwhite)
+ HADOOP-2912. MiniDFSCluster restart should wait for namenode to exit
+ safemode. This was causing TestFsck to fail. (Mahadev Konar via dhruba)
+
Release 0.16.1 - Unreleased
IMPROVEMENTS
@@ -265,7 +265,14 @@ public class MiniDFSCluster {
// Start the DataNodes
startDataNodes(conf, numDataNodes, manageDfsDirs, operation, racks, hosts, simulatedCapacities);
-
+ waitClusterUp();
+ }
+ /**
+ * wait for the cluster to get out of
+ * safemode.
+ */
+ public void waitClusterUp() {
if (numDataNodes > 0) {
while (!isClusterUp()) {
try {
@@ -276,7 +283,7 @@ public class MiniDFSCluster {
}
/**
* Modify the config and start up additional DataNodes. The info port for
* DataNodes is guaranteed to use a free port.
@@ -71,6 +71,7 @@ public class TestFsck extends TestCase {
// bring up data nodes & cleanup cluster
cluster.startDataNodes(conf, 4, true, null, null);
cluster.waitActive();
+ cluster.waitClusterUp();
fs = cluster.getFileSystem();
util.cleanup(fs, "/srcdat");
} finally {