HDFS-13551. TestMiniDFSCluster#testClusterSetStorageCapacity does not shut down cluster. Contributed by Anbang Hu.
This commit is contained in:
parent
07d8505f75
commit
92ebd466c7
|
@ -108,29 +108,35 @@ public class TestMiniDFSCluster {
|
|||
capacities,
|
||||
defaultBlockSize,
|
||||
fileLen);
|
||||
verifyStorageCapacity(cluster, capacities);
|
||||
try {
|
||||
verifyStorageCapacity(cluster, capacities);
|
||||
|
||||
/* restart all data nodes */
|
||||
cluster.restartDataNodes();
|
||||
cluster.waitActive();
|
||||
verifyStorageCapacity(cluster, capacities);
|
||||
/* restart all data nodes */
|
||||
cluster.restartDataNodes();
|
||||
cluster.waitActive();
|
||||
verifyStorageCapacity(cluster, capacities);
|
||||
|
||||
/* restart all name nodes */
|
||||
cluster.restartNameNodes();
|
||||
cluster.waitActive();
|
||||
verifyStorageCapacity(cluster, capacities);
|
||||
/* restart all name nodes */
|
||||
cluster.restartNameNodes();
|
||||
cluster.waitActive();
|
||||
verifyStorageCapacity(cluster, capacities);
|
||||
|
||||
/* restart all name nodes firstly and data nodes then */
|
||||
cluster.restartNameNodes();
|
||||
cluster.restartDataNodes();
|
||||
cluster.waitActive();
|
||||
verifyStorageCapacity(cluster, capacities);
|
||||
/* restart all name nodes firstly and data nodes then */
|
||||
cluster.restartNameNodes();
|
||||
cluster.restartDataNodes();
|
||||
cluster.waitActive();
|
||||
verifyStorageCapacity(cluster, capacities);
|
||||
|
||||
/* restart all data nodes firstly and name nodes then */
|
||||
cluster.restartDataNodes();
|
||||
cluster.restartNameNodes();
|
||||
cluster.waitActive();
|
||||
verifyStorageCapacity(cluster, capacities);
|
||||
/* restart all data nodes firstly and name nodes then */
|
||||
cluster.restartDataNodes();
|
||||
cluster.restartNameNodes();
|
||||
cluster.waitActive();
|
||||
verifyStorageCapacity(cluster, capacities);
|
||||
} finally {
|
||||
if (cluster != null) {
|
||||
cluster.shutdown();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void verifyStorageCapacity(
|
||||
|
|
Loading…
Reference in New Issue