linyiqun edited a comment on pull request #1746: URL: https://github.com/apache/ozone/pull/1746#issuecomment-754693002
>I am even not sure about converting to string type. If the user hasn't specified, Can't we send specific constant like QUOTA_DONT_SET(Something like this is there in HdfsConstants) to distinguish. Suppose current logic already implement this logic(see below assert [TestOzoneRpcClientAbstract.java#L292](https://github.com/apache/ozone/blob/master/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneRpcClientAbstract.java#L292)), if user hasn't specified quota. 0 means it comes from the long type default value as user. ```java store.getVolume(volumeName).setQuota(OzoneQuota.parseQuota( "0GB", 0L)); volume = store.getVolume(volumeName); Assert.assertEquals(OzoneConsts.QUOTA_RESET, volume.getQuotaInBytes()); Assert.assertEquals(OzoneConsts.QUOTA_RESET, volume.getQuotaInNamespace()); ``` >Let's look at another example,this also has the same problem: ozone sh volume setquota vol1 --space-quota 10TB (This should be success) ozone sh volume setquota vol1 --space-quota 10TB --namespace-quota 0 (This should be unsuccessful) @captainzmc , this will be not a problem. For first case that don't specified namespace quota, now the real meaning is the quota unset not means namepsace quota was 0. So I prefer only to make the adjustment that don't allow 0 can be set in this PR change. ---------------------------------------------------------------- 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]
