Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Duplicate
-
3.1.1
-
None
-
None
-
None
Description
DirectoryWithQuotaFeature.verifyQuotaByStorageType() does the job of verifying quota. It's redundant to call isQuotaByStorageTypeSet() because the for each iterator nextline has done the same job.
private void verifyQuotaByStorageType(EnumCounters<StorageType> typeDelta) throws QuotaByStorageTypeExceededException { if (!isQuotaByStorageTypeSet()) { // REDUNDANT. return; } for (StorageType t: StorageType.getTypesSupportingQuota()) { if (!isQuotaByStorageTypeSet(t)) { // CHECK FOR EACH STORAGETYPE. continue; } if (Quota.isViolated(quota.getTypeSpace(t), usage.getTypeSpace(t), typeDelta.get(t))) { throw new QuotaByStorageTypeExceededException( quota.getTypeSpace(t), usage.getTypeSpace(t) + typeDelta.get(t), t); } } }
Attachments
Attachments
Issue Links
- is a child of
-
HDFS-14566 Quota improvement in HDFS
- Open