[
https://issues.apache.org/jira/browse/YARN-9534?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
eBugs updated YARN-9534:
------------------------
Description:
Dear YARN 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 indicate different error conditions.
Version: Hadoop-3.1.2
File:
HADOOP-ROOT/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineV2ClientImpl.java
Line: 354
{code:java}
try {
Thread.sleep(this.serviceRetryInterval);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new YarnException("Interrupted while trying to connect ATS");
}{code}
The exception is triggered when {{pollTimelineServiceAddress()}} is
interrupted. However, throwing a {{YarnException}} is too general and makes
accurate exception handling more difficult. If throwing the
{{InterruptedException}} is not preferred, throwing an
{{InterruptedIOException}} or wrapping the {{InterruptedException}} could be
more accurate here.
was:
Dear YARN 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 indicate different error conditions.
Version: Hadoop-3.1.2
File:
HADOOP-ROOT/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineV2ClientImpl.java
Line: 354
{code:java}
try {
Thread.sleep(this.serviceRetryInterval);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new YarnException("Interrupted while trying to connect ATS");
}{code}
The exception is triggered when {{pollTimelineServiceAddress()}} is
interrupted. However, throwing a {{YarnException}} is too general and makes
accurate exception handling more difficult. Throwing an
{{InterruptedIOException}} or wrapping the {{InterruptedException}} could be
more accurate here.
> TimelineV2ClientImpl.pollTimelineServiceAddress() throws a YarnException when
> it is interrupted
> -----------------------------------------------------------------------------------------------
>
> Key: YARN-9534
> URL: https://issues.apache.org/jira/browse/YARN-9534
> Project: Hadoop YARN
> Issue Type: Bug
> Reporter: eBugs
> Priority: Minor
>
> Dear YARN 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 indicate different error conditions.
>
> Version: Hadoop-3.1.2
> File:
> HADOOP-ROOT/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineV2ClientImpl.java
> Line: 354
> {code:java}
> try {
> Thread.sleep(this.serviceRetryInterval);
> } catch (InterruptedException e) {
> Thread.currentThread().interrupt();
> throw new YarnException("Interrupted while trying to connect ATS");
> }{code}
>
> The exception is triggered when {{pollTimelineServiceAddress()}} is
> interrupted. However, throwing a {{YarnException}} is too general and makes
> accurate exception handling more difficult. If throwing the
> {{InterruptedException}} is not preferred, throwing an
> {{InterruptedIOException}} or wrapping the {{InterruptedException}} could be
> more accurate 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]