Jagadesh Kiran N created HDFS-8159: -------------------------------------- Summary: [HDFS-Quota] Verification is not done while setting dir namequota and size Key: HDFS-8159 URL: https://issues.apache.org/jira/browse/HDFS-8159 Project: Hadoop HDFS Issue Type: Improvement Components: HDFS Affects Versions: 2.6.0 Environment: Suse 11 SP3 Reporter: Jagadesh Kiran N Priority: Minor
Name Quota and space quota is not verifying when setting a new value to a directory which already has subdirectories or contents. Below are the steps to re-produce the cases: *+Case-1+* Step-1) Create a New folder hdfs dfs -mkdir /test Step-2) Create sub folders hdfs dfs -mkdir /test/one hdfs dfs -mkdir /test/two hdfs dfs -mkdir /test/three Step-3) Set Name Quota as two hdfs dfsadmin -setQuota 2 /test Step-3) Quota will be set with out the validating the dirs +Output:+ Eventhough name quota value is lower than the existing number of dirs, its not validating and allowing to set the new value. +Suggestion:+ Validate the name quota against the number of contents before setting the new value. *+Case-2+* Step-1) Add any new folder or file , it will give error message mkdir: The NameSpace quota (directories and files) of directory /test is exceeded: quota=2 file count=5 Step-2) Clear the Quota hdfs dfsadmin -clrQuota /test Step-3) Now Set the Size less than the folder size hdfs dfsadmin -setSpaceQuota 10 /test +Output:+ Eventhough space quota value is less than the size of the existing dir contents, its not validating and allowing to set the new value. +Suggestion:+ Validate the quota against the used space before setting the new value. -- This message was sent by Atlassian JIRA (v6.3.4#6332)