hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uma Maheswara Rao G (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HDFS-1774) Optimization in org.apache.hadoop.hdfs.server.datanode.FSDataset class.
Date Tue, 22 Mar 2011 15:59:05 GMT
Optimization in org.apache.hadoop.hdfs.server.datanode.FSDataset class.
-----------------------------------------------------------------------

                 Key: HDFS-1774
                 URL: https://issues.apache.org/jira/browse/HDFS-1774
             Project: Hadoop HDFS
          Issue Type: Improvement
          Components: data-node
            Reporter: Uma Maheswara Rao G
            Assignee: Uma Maheswara Rao G


 Inner class FSDir constructor is doing duplicate iterations over the listed files in the
passed directory. We can optimize this to single loop and also we can avoid isDirectory check
which will perform some native invocations. 

  Consider a case: one directory has only one child directory and 10000 files. 

1) First loop will get the number of children directories.

2) if (numChildren > 0) , This condition will satisfy and again it will iterate 10001 times
and also will check isDirectory.


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message