hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suresh Srinivas (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HDFS-1124) Replace IOException thrown in HDFS implementation to more specific exceptions
Date Fri, 30 Apr 2010 17:32:54 GMT

    [ https://issues.apache.org/jira/browse/HDFS-1124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12862759#action_12862759

Suresh Srinivas commented on HDFS-1124:

Throwing IOException has the following issues:
# Exception message is needed for understanding the exception. More specific exceptions describe
the failure better.
# IOException is the super class of all the exceptions thrown in HDFS. Since quite a few methods
end up throwing IOException, the specific exceptions thrown by the underlying implementation
need not be handled in the calling methods. Throwing a super class masks all its subclass.
The specific exceptions are not documented and not tested. 
# When catch-or-throw error is flagged and the suggested action by tools such as eclipse to
auto correct is chosen, specific exceptions are removed and replaced by a single IOException.
This propagates the bad practice of just throwing the IOException.

There are several place in the code IOException needs to be replace by more specific exceptions.
To name a few:

> Replace IOException thrown in HDFS implementation to more specific exceptions
> -----------------------------------------------------------------------------
>                 Key: HDFS-1124
>                 URL: https://issues.apache.org/jira/browse/HDFS-1124
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.22.0
> In HDFS, at several place IOException is thrown. This should be replaced by more specific

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message