hdfs配额管理

肖钟城
  • 大数据技术栈
  • Hadoop
小于 1 分钟

hdfs配额管理

  1. 创建测试目录
hdfs dfs -mkdir /data/user_test
  1. 设置创建的目录的名称配额
hdfs dfsadmin setQuota 2 /data/user_test
  1. 查看目录配额信息
hdfs dfs -count -q /data/user_test

得到结果:

       2               1            none             inf            1            0                  0 /data/user_test

在上述结果中,各个结果的含义如下:

(1) 表示文件数限额

(2) 表示可用文件数

(3) 表示空间限额大小(字节)

(4) 表示可用空间大小(字节)

(5) 表示目录数

(6) 表示文件数

(7) 表示总大小

(8) 表示文件、目录名

  1. 设置创建的目录的空间配额
hdfs dfsadmin -setSpaceQuota 1t /data/user_test
  1. 查看空间配额信息
hdfs dfs -count -q /data/user_test
       2               1   1099511627776   1099511627776            1            0                  0 /data/user_test
评论
  • 按正序
  • 按倒序
  • 按热度
Powered by Waline v2.14.1