[ 
https://issues.apache.org/jira/browse/HADOOP-9041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13533119#comment-13533119
 ] 

Luke Lu commented on HADOOP-9041:
---------------------------------

You missed MY point. I don't agree that "throwing an exception because "file" 
failed to load increase complexity of initializer exception handling in 
caller". On the contrary, things might fail mysteriously much later in 
unrelated code path. i.e. "hdfs" could load just fine because you swallowed the 
exception. I prefer it to fail early when things go wrong. When you say "you 
will catch that exception later", you're assuming the exception is 
deterministic. It could be that the first exception make the system get into a 
wrong/undefined state and you may never catch that exception later.

I suggest that you simply convert the exception into a run time exception.
                
> 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, fsinit3.txt, fsinit4.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

Reply via email to