You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Ayush Saxena (JIRA)" <ji...@apache.org> on 2019/05/12 08:38:00 UTC
[jira] [Comment Edited] (HDFS-14486) The exception classes in some
throw statements do not accurately describe why they are thrown
[ https://issues.apache.org/jira/browse/HDFS-14486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16838024#comment-16838024 ]
Ayush Saxena edited comment on HDFS-14486 at 5/12/19 8:37 AM:
--------------------------------------------------------------
Thanx [~ebugs-in-cloud-systems] for the reports!!!
Tried to have a quick analyze, I fell couple of them are quite genuine!!!
* HDFS-14467 --> we can change DiskErrorException. As the Javadoc says "Class that provides utility functions for checking disk problem". We shouldn't throw it for configurations IMO.
* HDFS-14468 --> Similar we should change DiskErrorException.
* HDFS-14469 --> This seems fair enough, For invalid value we need not to retry, and land up failing again, This we should rectify and change for sure.
* HDFS-14470 --> This too seems genuine, The same class doesn't throw DiskErrorException for misconfiguration. This can be changed.
* HDFS-14471 --> Doesn't add much value, Parser would throw error when invalid is provided, I guess the present Exception shall convey the message.
* HDFS-14472 --> Not Sure, should be OK
* HDFS-14473 --> Can be changed for sake of clarity to InterruptedIOException.
* HDFS-14474 --> Not sure it will bring any such value, Need to check more if it has any impact.
Well mostly there are changes in DiskErrorException, which is thrown for misconfiguration.
Will see couple of days, If no one objects or doesn't have any different opinions, Couple of these can be fixed!!
was (Author: ayushtkn):
Thanx [~ebugs-in-cloud-systems] for the reports!!!
Tried to have a quick analyze, I fell couple of them are quite genuine!!!
* HDFS-14467 --> Correct we should change DiskErrorException. As the Javadoc says "Class that provides utility functions for checking disk problem". We shouldn't throw it for misconfigurations.
* HDFS-14468 --> Similar we should change DiskErrorException.
* HDFS-14469 --> This seems fair enough, For invalid value we need not to retry, This we should rectify and change for sure.
* HDFS-14470 --> This too seems genuine, The same class doesn't throw DiskErrorException for misconfiguration. This needs to be fixed for sure.
* HDFS-14471 --> Doesn't add much value, Parser would throw error when invalid is provided, I guess the present Exception shall convey the message.
* HDFS-14472 --> Not Sure, should be OK
* HDFS-14473 --> Can be changed for sake of clarity to InterruptedIOException. It won't bring up any such value, I guess.
* HDFS-14474 --> Not sure it will bring any such value, Need to check more if it has any impact.
Will see couple of days, If no one objects or doesn't have any different opinions, These can be fixed!!
> The exception classes in some throw statements do not accurately describe why they are thrown
> ---------------------------------------------------------------------------------------------
>
> Key: HDFS-14486
> URL: https://issues.apache.org/jira/browse/HDFS-14486
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: eBugs
> Priority: Minor
>
> Dear HDFS developers, we are developing a tool to detect exception-related bugs in Java. Our prototype has spotted a few {{throw}} statements whose exception class does not accurately describe why they are thrown. This can be dangerous since it makes correctly handling them challenging. For example, in an old bug, HDFS-8224, throwing a general {{IOException}} makes it difficult to perform data recovery specifically when a metadata file is corrupted.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org