From c7ae55675ed56cb18266425c02674a5a87561e0c Mon Sep 17 00:00:00 2001 From: Xiaoyu Yao Date: Fri, 20 Jul 2018 13:12:07 -0700 Subject: [PATCH] HDDS-275. Add message output for succeeded -deleteVolume CLI. Contributed by Nilotpal Nandi. --- .../java/org/apache/hadoop/ozone/ozShell/TestOzoneShell.java | 2 ++ .../hadoop/ozone/web/ozShell/volume/DeleteVolumeHandler.java | 1 + 2 files changed, 3 insertions(+) diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/ozShell/TestOzoneShell.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/ozShell/TestOzoneShell.java index 8f530491fc9..573f097e34b 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/ozShell/TestOzoneShell.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/ozShell/TestOzoneShell.java @@ -249,6 +249,8 @@ public class TestOzoneShell { String[] args = new String[] {"-deleteVolume", url + "/" + volumeName, "-root"}; assertEquals(0, ToolRunner.run(shell, args)); + String output = out.toString(); + assertTrue(output.contains("Volume " + volumeName + " is deleted")); // verify if volume has been deleted try { diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/web/ozShell/volume/DeleteVolumeHandler.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/web/ozShell/volume/DeleteVolumeHandler.java index d6facf63a22..2df788a9371 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/web/ozShell/volume/DeleteVolumeHandler.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/web/ozShell/volume/DeleteVolumeHandler.java @@ -67,5 +67,6 @@ public class DeleteVolumeHandler extends Handler { } client.getObjectStore().deleteVolume(volumeName); + System.out.printf("Volume %s is deleted%n", volumeName); } }