Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-alpha
    • Fix Version/s: 3.0.0-alpha1
    • Component/s: namenode
    • Labels:
    • Hadoop Flags:
      Reviewed

      Description

      [root@c1204 hadoop]# sudo -u hdfs hadoop fs -mkdir testQuotaFolder
      [root@c1204 hadoop]# sudo -u hdfs hadoop fs -count -q testQuotaFolder
      none inf none inf 1 0 0 testQuotaFolder
      [root@c1204 hadoop]# sudo -u hdfs hdfs dfsadmin -setQuota 1000 testQuotaFolder
      [root@c1204 hadoop]# sudo -u hdfs hdfs dfsadmin -setSpaceQuota 1000 testQuotaFolder
      [root@c1204 hadoop]# sudo -u hdfs hadoop fs -count -q testQuotaFolder
      1000 999 1000 1000 1 0 0 testQuotaFolder
      [root@c1204 hadoop]# sudo -u hdfs hdfs dfsadmin -setSpaceQuota 9223372036854775807 testQuotaFolder
      [root@c1204 hadoop]# sudo -u hdfs hdfs dfsadmin -setQuota 9223372036854775807 testQuotaFolder
      [root@c1204 hadoop]# sudo -u hdfs hadoop fs -count -q testQuotaFolder
      1000 999 1000 1000 1 0 0 testQuotaFolder
      [root@c1204 hadoop]# sudo -u hdfs hdfs dfsadmin -setQuota 9223372036854775806 testQuotaFolder
      [root@c1204 hadoop]# sudo -u hdfs hdfs dfsadmin -setSpaceQuota 9223372036854775806 testQuotaFolder
      [root@c1204 hadoop]# sudo -u hdfs hadoop fs -count -q testQuotaFolder
      9223372036854775806 9223372036854775805 9223372036854775806 9223372036854775806 1 0 0 testQuotaFolder

      The documentation at http://hadoop.apache.org/common/docs/r0.20.0/hdfs_quota_admin_guide.html says that the max quota size is Long.Max_Value which is = 9223372036854775807, but as you can see above, setting the quota to this value returns no error but doesn't actually change the quota value. Long.Max_Value - 1 works though.. so the documentation should be changed to reflect this behavior. Long.Max_Value + 1 returns an actual error (though it isn't the same as the negative number error):

      [root@c1204 hadoop]# sudo -u hdfs hdfs dfsadmin -setSpaceQuota 9223372036854775808 testQuotaFolder
      setSpaceQuota: For input string: "9223372036854775808"
      Usage: java DFSAdmin [-setSpaceQuota <quota> <dirname>...<dirname>]
      [root@c1204 hadoop]# sudo -u hdfs hdfs dfsadmin -setSpaceQuota -1 testQuotaFolder
      setSpaceQuota: Illegal option -1

        Attachments

          Activity

            People

            • Assignee:
              sujay.rau Sujay Rau
              Reporter:
              sujay.rau Sujay Rau
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: