The Hadoop Distributed File System (HDFS) allows administrators to set quotas for each directory. The newly created directory does not have quotas. The biggest quota is long.max_value. A quota of 1 can force the directory to remain empty.
A directory quota is a hard limit on the number of names under the directory tree. If the quota is exceeded when the file or directory is created, the operation fails. Renaming does not change the quota for that directory; If the rename operation results in a violation of the quota limit, the operation will fail. If you try to set a quota and the number of existing files exceeds the new quota, the setting fails.
Quotas and Fsimage remain in line. When started, if fsimage violates a quota limit (perhaps Fsimage is secretly changed), the startup fails and an error report is generated. setting or deleting a quota creates a corresponding log record.
The following new command or new option is used to support quotas. The first two are administrator commands.
Dfsadmin-setquota <N> <directory>...<directory>
Set each directory quota to N. This command is tried on each directory, and if n is not a positive long integer, the directory does not exist or the file name is exceeded, or the directory exceeds the quota, an error report is generated. Dfsadmin-clrquota <directory>...<director>
Remove quotas for each directory. This command is tried on each directory, and if the directory does not exist or is a file, an error report is generated. If the directory originally did not set the quota does not error. Fs-count-q <directory>...<directory>
Use the-Q option to report the quota set for each directory and the remaining quotas. If the directory does not have quotas set, the none and INF are reported.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.