Recently, we have to add an alarm to the space usage and file node usage of HDFS. When the quota is exceeded, we need to send an alarm notification to prepare in advance.
[Sunwg] $ hadoop FS-count/sunwg 2 1 108 HDFS: // sunwg: 9000/sunwg
The first value 2 indicates the number of folders under/sunwg,
The second value, table 1, is the number of files in the current folder,
The third value 108 indicates the space occupied by the files in the folder. This size does not count the number of copies.
[Sunwg] $ hadoop FS-count-Q/sunwg 1024 1021 10240 10132 2 1 108 HDFS: // sunwg: 9000/sunwg
Add the-Q option after count to view the quota usage of the current folder,
The first value is 1024, indicating the total number of files including folders
The second value of 1021 indicates the remaining file quota, that is, you can create so many files or folders.
The third value 10240 indicates the current folder space limit.
The fourth value 10132 indicates the size of the available space of the current folder. This limit is calculated as multiple copies.
The remaining three values are the same as those of-count.
From http://www.oratea.net/