hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsz Wo (Nicholas), SZE (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HADOOP-2219) du like command to count number of files under a given directory
Date Fri, 29 Feb 2008 19:18:51 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-2219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Tsz Wo (Nicholas), SZE updated HADOOP-2219:

    Attachment: 2219_20080227.patch


1. Deprecated getContentLength() in ClientProtocol, NameNode, FileSystem, DistributedFileSystem
and DFSClient.  The ones in FSNamesystem and INode are removed directly since they are not
public APIs.

2. The reason of use array of longs is efficiency.  computeContentSummary(...) recursively
goes through the INode tree.  If a ContentSummary object is used, the values have to be updated
by two method calls (get, set) for each recursive call.  If we use long, we only have to do
a +=.
3. Reverted DistributedFileSystem.getContentLength() to keep the optimization.

> du like command to count number of files under a given directory
> ----------------------------------------------------------------
>                 Key: HADOOP-2219
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2219
>             Project: Hadoop Core
>          Issue Type: New Feature
>          Components: dfs
>            Reporter: Koji Noguchi
>            Assignee: Tsz Wo (Nicholas), SZE
>         Attachments: 2219_20080226.patch, 2219_20080227.patch
> To keep the total number of files on dfs low, we like the users to be able to easily
find out how many files each of their directory contain.   
> Currently, we only have fsck or dfs -lsr which takes time.
> Can I ask for an option for du to show the total number of files (as well as the total
size) of a given directory?

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message