hadoop-hdfs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denny Ye (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HDFS-2176) Avoid ConcurrentModificationException when FSImage initialization
Date Thu, 21 Jul 2011 07:35:58 GMT

     [ 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

        

Mime
View raw message