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] [Created] (HDFS-2176) Avoid ConcurrentModificationException when FSImage initialization
Date Wed, 20 Jul 2011 09:58:58 GMT
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


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