From 11daa010d218d340939d9ab05a946939f3292f5e Mon Sep 17 00:00:00 2001 From: Anu Engineer Date: Mon, 13 Aug 2018 10:08:58 -0700 Subject: [PATCH] HDDS-346. ozoneShell show the new volume info after updateVolume command like updateBucket command. Contributed by chencan. --- .../hadoop/ozone/web/ozShell/volume/UpdateVolumeHandler.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/web/ozShell/volume/UpdateVolumeHandler.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/web/ozShell/volume/UpdateVolumeHandler.java index 1e3fbb5a7b..3738cb4a4e 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/web/ozShell/volume/UpdateVolumeHandler.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/web/ozShell/volume/UpdateVolumeHandler.java @@ -21,10 +21,12 @@ import org.apache.commons.cli.CommandLine; import org.apache.hadoop.hdds.client.OzoneQuota; import org.apache.hadoop.ozone.client.OzoneVolume; +import org.apache.hadoop.ozone.client.OzoneClientUtils; import org.apache.hadoop.ozone.client.OzoneClientException; import org.apache.hadoop.ozone.client.rest.OzoneException; import org.apache.hadoop.ozone.web.ozShell.Handler; import org.apache.hadoop.ozone.web.ozShell.Shell; +import org.apache.hadoop.ozone.web.utils.JsonUtils; import java.io.IOException; import java.net.URI; @@ -80,5 +82,8 @@ protected void execute(CommandLine cmd) if (ownerName != null && !ownerName.isEmpty()) { volume.setOwner(ownerName); } + + System.out.printf("%s%n", JsonUtils.toJsonStringWithDefaultPrettyPrinter( + JsonUtils.toJsonString(OzoneClientUtils.asVolumeInfo(volume)))); } }