You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by in...@apache.org on 2018/05/15 17:24:18 UTC
[4/5] hadoop git commit: HDFS-13551.
TestMiniDFSCluster#testClusterSetStorageCapacity does not shut down cluster.
Contributed by Anbang Hu.
HDFS-13551. TestMiniDFSCluster#testClusterSetStorageCapacity does not shut down cluster. Contributed by Anbang Hu.
(cherry picked from commit 92ebd466c75275118107e6ec665cf50e337a29e7)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/4ae1ed5b
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/4ae1ed5b
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/4ae1ed5b
Branch: refs/heads/branch-2
Commit: 4ae1ed5b17686b6c2e25eaa16719013f5949c0d8
Parents: e28af8b
Author: Inigo Goiri <in...@apache.org>
Authored: Tue May 15 10:21:42 2018 -0700
Committer: Inigo Goiri <in...@apache.org>
Committed: Tue May 15 10:23:28 2018 -0700
----------------------------------------------------------------------
.../apache/hadoop/hdfs/TestMiniDFSCluster.java | 44 +++++++++++---------
1 file changed, 25 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/4ae1ed5b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestMiniDFSCluster.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestMiniDFSCluster.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestMiniDFSCluster.java
index 296ede3..42582ea 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestMiniDFSCluster.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestMiniDFSCluster.java
@@ -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(
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org