You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Denny Ye (JIRA)" <ji...@apache.org> on 2011/07/21 09:35:58 UTC

[jira] [Resolved] (HDFS-2176) Avoid ConcurrentModificationException when FSImage initialization

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

Denny Ye resolved HDFS-2176.
----------------------------

    Resolution: Not A Problem

Break when removing can avoid the ConcurrentModicationException. It's my fault, Sorry!

> Avoid ConcurrentModificationException when FSImage initialization
> -----------------------------------------------------------------
>
>                 Key: HDFS-2176
>                 URL: https://issues.apache.org/jira/browse/HDFS-2176
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>    Affects Versions: 0.21.0
>            Reporter: Denny Ye
>            Priority: Minor
>              Labels: FSImage
>
> Below code may cause ConcurrentModificationException when some of fsimage directory equals editlog directory :
> Method: FSImage.setStorageDirectories(Collection<URI> fsNameDirs, Collection<URI> fsEditsDirs)
> Code:
>  for (URI dirName : fsNameDirs) {
>       ...     
>       boolean isAlsoEdits = false;
>       for (URI editsDirName : fsEditsDirs) {
>         if (editsDirName.compareTo(dirName) == 0) {
>           isAlsoEdits = true;
>           fsEditsDirs.remove(editsDirName);
>           break;
>         }
>       }
>    }

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