[
https://issues.apache.org/jira/browse/HDFS-14473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
eBugs in Cloud Systems updated HDFS-14473:
------------------------------------------
Description:
Dear HDFS developers, we are developing a tool to detect exception-related bugs
in Java. Our prototype has spotted the following {{throw}} statement whose
exception class and error message seem to indicate different error conditions.
Version: Hadoop-3.1.2
File:
HADOOP-ROOT/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java
Line: 1070
{code:java}
throw new IOException("Interrupted receiveBlock");{code}
An {{IOException}} can mean many different errors, while the error message
indicates that {{receiveBlock()}} is interrupted. This mismatch could be a
problem. For example, the callers trying to handle other {{IOException}} may
accidentally (and incorrectly) handle the interrupt. An
{{InterruptedIOException}} may be better here.
was:
Dear HDFS developers, we are developing a tool to detect exception-related bugs
in Java. Our prototype has spotted the following {{throw}} statement whose
exception class and error message seem to indicate different error conditions.
Version: Hadoop-3.1.2
File:
HADOOP-ROOT/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java
Line: 1070
{code:java}
throw new IOException("Interrupted receiveBlock");{code}
An {{IOException}} can mean many different errors, while the error message
indicates that {{receiveBlock()}} is interrupted. Will this mismatch be a
problem? For example, the callers trying to handle other {{IOException}} may
accidentally (and incorrectly) handle the interrupt. An
{{InterruptedIOException}} may be better here.
> BlockReceiver.receiveBlock() throws an IOException when interrupted
> -------------------------------------------------------------------
>
> Key: HDFS-14473
> URL: https://issues.apache.org/jira/browse/HDFS-14473
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: eBugs in Cloud Systems
> Priority: Minor
>
> Dear HDFS developers, we are developing a tool to detect exception-related
> bugs in Java. Our prototype has spotted the following {{throw}} statement
> whose exception class and error message seem to indicate different error
> conditions.
>
> Version: Hadoop-3.1.2
> File:
> HADOOP-ROOT/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java
> Line: 1070
> {code:java}
> throw new IOException("Interrupted receiveBlock");{code}
>
> An {{IOException}} can mean many different errors, while the error message
> indicates that {{receiveBlock()}} is interrupted. This mismatch could be a
> problem. For example, the callers trying to handle other {{IOException}} may
> accidentally (and incorrectly) handle the interrupt. An
> {{InterruptedIOException}} may be better here.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]