[ https://issues.apache.org/jira/browse/HADOOP-1463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hairong Kuang updated HADOOP-1463: ---------------------------------- Attachment: usedSpace.patch This patch made the following changes: 1. dfs_used_space is set by running "du" every block report interval (default 1 hour) and then gets adjusted when a block is written or deleted. 2. dfs_remaing_space is caculated by the following formula: MIN( Total_Capacity - dfs_used_space - dfs.datanode.du.reserved, cur_disk_available) * dfs.datanode.du.pct where Total_Capacity and cur_disk_available is set by running "df" every df interval (default 1 min) 3. Every heartbeat sends 3 disk metrics, total_capacity, dfs_used_space, and dfs_reamaining_space, to the namenode 4. Namenode keeps track of all 3 metrics and reports to dfsadmin shell & Web UI all 3 metrics. 5. Fix some minor number formatting bugs in FSShell. > dfs should report total size of all the space that dfs is using > --------------------------------------------------------------- > > Key: HADOOP-1463 > URL: https://issues.apache.org/jira/browse/HADOOP-1463 > Project: Hadoop > Issue Type: Improvement > Components: dfs > Affects Versions: 0.12.3 > Reporter: Hairong Kuang > Assignee: Hairong Kuang > Attachments: usedSpace.patch > > > Currently namenode reports two statistics back to the client: > 1. The total capacity of dfs. This is a sum of all datanode's capacities, > each of which is calculated by datanode summing all data directories disk > space. > 2. The total remaining space of dfs. This is a sum of all datanodes's > remaining space. Each datanode's remaining space is calculated by using the > following formula: remaining space = unused space - > capacity*unusableDiskPercentage - reserved space. So the remaining space > shows how much space that the dfs can still use, but it does not show the > size of unused space. > Each dfs client caculates the total dfs used space by substracting remaining > space from the total capacity. So the used space does not accurately shows > the space that dfs is using. However it is a very important number that dfs > should provide. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.