How to get a directory quota for HDFS

I see that there is a command to set a quota, but I can not find a command to get a quota.

Can anyone help with this? Thanks

+4
source share
2 answers
hadoop fs -count -q /path/to/directory QUOTA REMAINING_QUOTA SPACE_QUOTA REMAINING_SPACE_QUOTA DIR_COUNT FILE_COUNT CONTENT_SIZE FILE_NAME none inf 54975581388800 5277747062870 3922 418464 16565944775310 hdfs://master:54310/path/to/directory 

The third column will give you a space quota.

NOTE. The column headings were just added there for readability, if you want to know more about the different ways to download hdfs files, there is a complete blog here:

Overview of HDFS quotas and Hadoop Fs and Fsck Tools

+10
source
 hadoop fs -count -q -h -v /path/to/directory 

I would add the -h and -v options for easy reading of the output. With the -q option, also provide the name quota value set for each directory, the remaining available name quota, the set space quota value, and the remaining free quota. If there is no quota set in the directory, the reported values ​​are none and inf. The -h option shows the size in human readable format. The -v option displays the title bar.

+3
source

All Articles