[ https://issues.apache.org/jira/browse/HADOOP-9041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13531882#comment-13531882 ]
Andy Isaacson commented on HADOOP-9041: --------------------------------------- {code} + FileSystem.getFileSystemClass("file",conf); {code} missing a space after the ",". {code} +public class TestFileSystemInitialization { + + /** {code} Indentation is wonky, we do not use tabs and we use 2 space indents. {code} + * Check if FileSystem can be properly initialized if URLStreamHandlerFactory + * is registered. + */ {code} Since this is such an obscure failure condition, please mention the JIRA in the comment so that someone who is curious does not have to dig in the VCS history to figure out what's going on. {code} + try { + FileSystem.getFileSystemClass("file:", conf); + } + catch (IOException ok) {} + } {code} Please add asserts as appropriate to ensure that we follow the expected code path. For example, if we expect {{IOException}}, add {{assertFalse(true);}} after calling {{getFileSystemClass}}, with comments explaining the expected behavior. See {{TestLocalDirAllocator.java}} for an example. > FileSystem initialization can go into infinite loop > --------------------------------------------------- > > Key: HADOOP-9041 > URL: https://issues.apache.org/jira/browse/HADOOP-9041 > Project: Hadoop Common > Issue Type: Bug > Components: fs > Affects Versions: 2.0.2-alpha > Reporter: Radim Kolar > Assignee: Radim Kolar > Priority: Critical > Attachments: fsinit2.txt, fsinit-unit.txt, fstest.groovy, > HADOOP-9041.patch, HADOOP-9041.patch, TestFileSystem.java > > > More information is there: https://jira.springsource.org/browse/SHDP-111 > Referenced source code from example is: > https://github.com/SpringSource/spring-hadoop/blob/master/src/main/java/org/springframework/data/hadoop/configuration/ConfigurationFactoryBean.java > from isolating that cause it looks like if you register: > org.apache.hadoop.fs.FsUrlStreamHandlerFactory before calling > FileSystem.loadFileSystems() then it goes into infinite loop. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira