[ https://issues.apache.org/jira/browse/MAPREDUCE-6296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yang Hao updated MAPREDUCE-6296: -------------------------------- Description: Some code in method waitForCompletion of Job class is {quote} while (!isComplete()) { try { Thread.sleep(completionPollIntervalMillis); } catch (InterruptedException ie) { } } {quote} but a better way to deal with InterruptException is {quote} try{ while (!isComplete()) { Thread.sleep(completionPollIntervalMillis); } }catch (InterruptedException ie) { Thread.currentThread().interrupt(); } {quote} was: Some code in method waitForCompletion of Job class is {quote} while (!isComplete()) { try { Thread.sleep(completionPollIntervalMillis); } catch (InterruptedException ie) { } } {quote} but a better way to deal with InterruptException is {quote} try{ while (!isComplete()) { Thread.sleep(completionPollIntervalMillis); } }catch (InterruptedException ie) { Thread.currentThread().interrupt(); } {auote} > A better way to deal with InterruptedException on waitForCompletion > ------------------------------------------------------------------- > > Key: MAPREDUCE-6296 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-6296 > Project: Hadoop Map/Reduce > Issue Type: Improvement > Reporter: Yang Hao > Assignee: Yang Hao > > Some code in method waitForCompletion of Job class is > {quote} > while (!isComplete()) { > try { > Thread.sleep(completionPollIntervalMillis); > } catch (InterruptedException ie) { > } > } > {quote} > but a better way to deal with InterruptException is > {quote} > try{ > while (!isComplete()) { > Thread.sleep(completionPollIntervalMillis); > } > }catch (InterruptedException ie) { > Thread.currentThread().interrupt(); > } > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)