Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-9533

TimelineV2ClientImpl.checkRetryWithSleep() throws a YarnException when interrupted

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    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: 274

      try {
        Thread.sleep(this.serviceRetryInterval);
      } catch (InterruptedException ex) {
        Thread.currentThread().interrupt();
        throw new YarnException("Interrupted while retrying to connect to ATS");
      }

       

      The exception is triggered when checkRetryWithSleep() 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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ebugs-in-cloud-systems Haicheng Chen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: