Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-2323

JobTracker.close() prints stack traces for exceptions that are not errors

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.16.0
    • Fix Version/s: 0.16.0
    • Component/s: None
    • Labels:
      None

      Description

      JobTracker.close() prints a stack trace for an interrupted exception even though it was the method that interrupted the thread that threw the exception. For example:

            this.expireTrackers.stopTracker();
            try {
              this.expireTrackersThread.interrupt();
              this.expireTrackersThread.join();
            } catch (InterruptedException ex) {
              ex.printStackTrace();
            }
      

      Well of course it is going to catch an InterruptedException after it just interrupted the thread!

      This is not an error and should not be dumped to the logs!

      In other circumstances, catching InterruptedException is entirely appropriate. Just not in close where you've told the thread to shutdown and then interrupted it to ensure it does!

        Attachments

        1. patch.txt
          7 kB
          Jim Kellerman
        2. patch.txt
          7 kB
          Jim Kellerman
        3. patch.txt
          6 kB
          Jim Kellerman
        4. patch.txt
          6 kB
          Jim Kellerman
        5. patch.txt
          4 kB
          Jim Kellerman

          Activity

            People

            • Assignee:
              jimk Jim Kellerman
              Reporter:
              jimk Jim Kellerman
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: