[ https://issues.apache.org/jira/browse/HADOOP-2323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12547546 ]
Jim Kellerman commented on HADOOP-2323: --------------------------------------- Without this patch, the following messages appear in test output when there is no error and the JobTracker is just shutting down normally: {code} [junit] 2007-12-01 12:04:03,105 ERROR [expireTrackers] org.apache.hadoop.mapred.JobTracker$ExpireTrackers.run(JobTracker.java:308): Tracker Expiry Thread got exception: java.lang.InterruptedException: sleep interrupted [junit] at java.lang.Thread.sleep(Native Method) [junit] at org.apache.hadoop.mapred.JobTracker$ExpireTrackers.run(JobTracker.java:263) [junit] at java.lang.Thread.run(Thread.java:595) [junit] 2007-12-01 12:04:03,106 WARN [Task Commit Thread] org.apache.hadoop.mapred.JobTracker$TaskCommitQueue.run(JobTracker.java:2017): Task Commit Thread exiting, got interrupted: java.lang.InterruptedException [junit] at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:1815) [junit] at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1850) [junit] at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:359) [junit] at org.apache.hadoop.mapred.JobTracker$TaskCommitQueue.run(JobTracker.java:1919) {code} with this patch, these error messages do not appear > JobTracker.close() prints stack traces for exceptions that are not errors > ------------------------------------------------------------------------- > > Key: HADOOP-2323 > URL: https://issues.apache.org/jira/browse/HADOOP-2323 > Project: Hadoop > Issue Type: Bug > Components: mapred > Affects Versions: 0.16.0 > Reporter: Jim Kellerman > Assignee: Jim Kellerman > Fix For: 0.16.0 > > Attachments: patch.txt > > > 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: > {code} > this.expireTrackers.stopTracker(); > try { > this.expireTrackersThread.interrupt(); > this.expireTrackersThread.join(); > } catch (InterruptedException ex) { > ex.printStackTrace(); > } > {code} > 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! -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.