HDFs set up quota management _hadoop

Source: Internet
Author: User
Tags hdfs dfs hadoop fs
1. Directory Quota
[xiaoqiu@s150/home/xiaoqiu/hadoop_tmp]$ Hadoop FS-LSR/
lsr:DEPRECATED:Please use ' ls-r ' instead.
Drwxr-xr-x   -Xiaoqiu supergroup          0 2017-12-29 15:50/user
drwxr-xr-x   -Xiaoqiu supergroup          0 2017-12-29 15:50/user/xiaoqiu
drwxr-xr-x   -xiaoqiu supergroup          0 2017-12-29 15:50/user/xiaoqiu/data
drwxr-xr-x   -xiaoqiu supergroup          0 2017-12-29 15:44/usr
drwxr-xr-x   -Xiaoqiu supergroup          0 2017-12-29 15:44/usr/xiaoqiu
drwxr-xr-x   -xiaoqiu supergroup          0 2017-12-29 15:44/usr/xiaoqiu/ Hadoop

[xiaoqiu@s150/home/xiaoqiu/hadoop_tmp]$ HDFs Dfsadmin-setquota 1 Data
[xiaoqiu@s150/home/xiaoqiu/hadoop_tmp]$ HDFs dfs-mkdir-p data/a
mkdir:the NameSpace Quota (directories and files) of Directory/user/xiaoqiu/data is Excee Ded:quota=1 file count=2

[xiaoqiu@s150/home/xiaoqiu/hadoop_tmp]$ HDFs Dfsadmin-setquota 3 Data
[xiaoqiu@s150/home/xiaoqiu/hadoop_tmp]$ HDFs dfs-mkdir-p data/a
[xiaoqiu@s150/home/xiaoqiu/hadoop_tmp]$ hdfs dfs-mkdir-p data/a/b
[Xiaoqiu@s150/hom e/xiaoqiu/hadoop_tmp]$ HDFs dfs-mkdir-p data/a/b/c
mkdir:the NameSpace (quota and files) of directory/ User/xiaoqiu/data is exceeded:quota=3 file count=4

2. Set Space quota
[xiaoqiu@s150/home/xiaoqiu/hadoop_tmp]$ HDFs dfs-mkdir-p data2
[xiaoqiu@s150/home/xiaoqiu/hadoop_tmp]$ HDFs Dfsadmin-setspacequota 5 data2
[xiaoqiu@s150/home/xiaoqiu/hadoop_tmp]$ echo how > A.txt
[xiaoqiu@s150/ home/xiaoqiu/hadoop_tmp]$ HDFs dfs-put a.txt data2


3. Elimination of quotas
[xiaoqiu@s150/home/xiaoqiu/hadoop_tmp]$ hdfs Dfsadmin-clrquota data
[xiaoqiu@s150/home/xiaoqiu/hadoop_tmp]$ HDFs Dfsadmin-clrquota data2






























Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.