ChenSammi commented on a change in pull request #1746:
URL: https://github.com/apache/ozone/pull/1746#discussion_r557392904
##########
File path:
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/shell/volume/CreateVolumeHandler.java
##########
@@ -59,13 +61,19 @@ protected void execute(OzoneClient client, OzoneAddress
address)
VolumeArgs.Builder volumeArgsBuilder = VolumeArgs.newBuilder()
.setAdmin(adminName)
.setOwner(ownerName);
- if (quotaOptions.getQuotaInBytes() != null) {
- volumeArgsBuilder.setQuotaInBytes(OzoneQuota.parseQuota(
- quotaOptions.getQuotaInBytes(),
- quotaOptions.getQuotaInNamespace()).getQuotaInBytes());
+ if (!Strings.isNullOrEmpty(quotaOptions.getQuotaInBytes())) {
+ volumeArgsBuilder.setQuotaInBytes(OzoneQuota.parseSpaceQuota(
+ quotaOptions.getQuotaInBytes()).getQuotaInBytes());
+ } else {
+ volumeArgsBuilder.setQuotaInBytes(OzoneConsts.QUOTA_RESET);
Review comment:
With default quotaInBytes and quotaInNamespace value, do we still need
this and below else statement?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]