hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Douglas (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-11681) DatanodeStorageInfo#getBlockIterator() should return an iterator to an unmodifiable set.
Date Tue, 09 May 2017 17:53:04 GMT

    [ https://issues.apache.org/jira/browse/HDFS-11681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16003163#comment-16003163
] 

Chris Douglas commented on HDFS-11681:
--------------------------------------

Thanks for the detailed explanation, [~virajith].

v001 uses a TreeSet as a temporary collection. Unless the ordering is significant, this can
just use an ArrayList. Otherwise, lgtm

> DatanodeStorageInfo#getBlockIterator() should return an iterator to an unmodifiable set.
> ----------------------------------------------------------------------------------------
>
>                 Key: HDFS-11681
>                 URL: https://issues.apache.org/jira/browse/HDFS-11681
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Virajith Jalaparti
>         Attachments: HDFS-11681.001.patch
>
>
> The iterator from {{DatanodeStorageInfo#getBlockIterator()}} should not be modifiable.
Otherwise, calling {{remove}} on the iterator will remove blocks from {{DatanodeStorageInfo.blocks}},
a function that has to be performed by calling {{DatanodeStorageInfo#removeBlock}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message