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