You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "eBugs in Cloud Systems (JIRA)" <ji...@apache.org> on 2019/05/06 14:37:00 UTC

[jira] [Updated] (HADOOP-16295) FileUtil.replaceFile() throws an IOException when it is interrupted

     [ https://issues.apache.org/jira/browse/HADOOP-16295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

eBugs in Cloud Systems updated HADOOP-16295:
--------------------------------------------
    Description: 
Dear Hadoop 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. Since we are not very familiar with Hadoop's internal work flow, could you please help us verify if this is a bug, i.e., will the callers have trouble handling the exception, and will the users/admins have trouble diagnosing the failure?

 

Version: Hadoop-3.1.2

File: HADOOP-ROOT/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java

Line: 1387
{code:java}
throw new IOException("replaceFile interrupted.");{code}
Reason: An {{IOException}} can mean many different errors, while the error message indicates that {{replaceFile()}} is interrupted. Will this mismatch be a problem? For example, will the callers trying to handle other {{IOException}} accidentally (and incorrectly) handle the interrupt? Is an {{InterruptedIOException}} a better exception here?

  was:
Dear Hadoop 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. Since we are not very familiar with Hadoop's internal work flow, could you please help us verify if this is a bug, i.e., will the callers have trouble handling the exception, and will the users/admins have trouble diagnosing the failure?

 

Version: Hadoop-3.1.2

File: HADOOP-ROOT/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java

Line: 1387
{code:java}
throw new IOException("replaceFile interrupted.");{code}
Reason: An {{IOException}} can mean many different errors, while the error message indicates that {{replaceFile()}} is interrupted. Will this mismatch be a problem? For example, will the callers try to handle other {{IOException}} accidentally (and incorrectly) handle the interrupt? Is an {{InterruptedIOException}} a better exception here?


> FileUtil.replaceFile() throws an IOException when it is interrupted
> -------------------------------------------------------------------
>
>                 Key: HADOOP-16295
>                 URL: https://issues.apache.org/jira/browse/HADOOP-16295
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: eBugs in Cloud Systems
>            Priority: Minor
>
> Dear Hadoop 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. Since we are not very familiar with Hadoop's internal work flow, could you please help us verify if this is a bug, i.e., will the callers have trouble handling the exception, and will the users/admins have trouble diagnosing the failure?
>  
> Version: Hadoop-3.1.2
> File: HADOOP-ROOT/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
> Line: 1387
> {code:java}
> throw new IOException("replaceFile interrupted.");{code}
> Reason: An {{IOException}} can mean many different errors, while the error message indicates that {{replaceFile()}} is interrupted. Will this mismatch be a problem? For example, will the callers trying to handle other {{IOException}} accidentally (and incorrectly) handle the interrupt? Is an {{InterruptedIOException}} a better exception here?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org