HDDS-346. ozoneShell show the new volume info after updateVolume command like updateBucket command.

Contributed by chencan.
This commit is contained in:
Anu Engineer 2018-08-13 10:08:58 -07:00
parent a13929ddcb
commit 11daa010d2

View File

@ -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))));
}
}