[ https://issues.apache.org/jira/browse/HDFS-2176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068305#comment-13068305 ]
Uma Maheswara Rao G commented on HDFS-2176: ------------------------------------------- Hi Denny, Did you get this issue in your cluster? This peice of Code moved to NNStorage.java in latest trunk. By seeing the peice of code, i did not find the issue. Because after removing the element he is breaking from the loop. So it will not try to pick the next element right. Correct me if i understood your issue wrongly. -Thanks. > 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