[ https://issues.apache.org/jira/browse/HDFS-11634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15965029#comment-15965029 ]
Rushabh S Shah edited comment on HDFS-11634 at 4/11/17 10:08 PM: ----------------------------------------------------------------- One Minor nit: Couple of typos for 'oterator' One question: I don't understand why {{sumBlocks}} was introduced in {{DatanodeDescriptor#BlockIterator}} constructor in latest patch. What corner case were you trying to fix ? was (Author: shahrs87): Minor nit: Couple of typos for 'oterator' I don't understand why {{sumBlocks}} was introduced in {{DatanodeDescriptor#BlockIterator}} constructor in latest patch. What corner case were you trying to fix ? > Optimize BlockIterator when interating starts in the middle. > ------------------------------------------------------------ > > Key: HDFS-11634 > URL: https://issues.apache.org/jira/browse/HDFS-11634 > Project: Hadoop HDFS > Issue Type: Improvement > Affects Versions: 2.6.5 > Reporter: Konstantin Shvachko > Assignee: Konstantin Shvachko > Attachments: HDFS-11634.001.patch, HDFS-11634.002.patch > > > {{BlockManager.getBlocksWithLocations()}} needs to iterate blocks from a > randomly selected {{startBlock}} index. It creates an iterator which points > to the first block and then skips all blocks until {{startBlock}}. It is > inefficient when DN has multiple storages. Instead of skipping blocks one by > one we can skip entire storages. Should be more efficient on average. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org