Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-8159

[HDFS-Quota] Verification is not done while setting dir namequota and size

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Not A Problem
    • Affects Version/s: 2.6.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Suse 11 SP3

    • Target Version/s:

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jagadesh.kiran Jagadesh Kiran N
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: