ChenSammi commented on a change in pull request #1746:
URL: https://github.com/apache/ozone/pull/1746#discussion_r557379762
##########
File path:
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/client/OzoneQuota.java
##########
@@ -145,21 +163,14 @@ public static String formatQuota(OzoneQuota quota) {
}
/**
- * Parses a user provided string and returns the
+ * Parses a user provided string space quota and returns the
* Quota Object.
*
* @param quotaInBytes Volume quota in bytes
- * @param quotaInNamespace Volume quota in counts
*
* @return OzoneQuota object
*/
- public static OzoneQuota parseQuota(String quotaInBytes,
- long quotaInNamespace) {
-
- if (Strings.isNullOrEmpty(quotaInBytes)) {
- throw new IllegalArgumentException(
- "Quota string cannot be null or empty.");
- }
Review comment:
Shall we keep this null check or add new Precondition check that
quotaInBytes cannot be null or empty.
This suggestion also applies to parseNameSpaceQuota.
Because these two functions are public static, we need to do some kind of
parameter check.
----------------------------------------------------------------
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]