[jira] [Updated] (MAPREDUCE-6296) A better way to deal with InterruptedException on waitForCompletion

2015-05-05 Thread Allen Wittenauer (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-6296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Allen Wittenauer updated MAPREDUCE-6296:

Labels: BB2015-05-TBR  (was: )

 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
  Labels: BB2015-05-TBR
 Attachments: MAPREDUCE-6296.patch


 Some code in method waitForCompletion of Job class is 
 {code:title=Job.java|borderStyle=solid}
   public boolean waitForCompletion(boolean verbose
) throws IOException, InterruptedException,
 ClassNotFoundException {
 if (state == JobState.DEFINE) {
   submit();
 }
 if (verbose) {
   monitorAndPrintJob();
 } else {
   // get the completion poll interval from the client.
   int completionPollIntervalMillis = 
 Job.getCompletionPollInterval(cluster.getConf());
   while (!isComplete()) {
 try {
   Thread.sleep(completionPollIntervalMillis);
 } catch (InterruptedException ie) {
 }
   }
 }
 return isSuccessful();
   }
 {code}
 but a better way to deal with InterruptException is
 {code:title=Job.java|borderStyle=solid}
   public boolean waitForCompletion(boolean verbose
) throws IOException, InterruptedException,
 ClassNotFoundException {
 if (state == JobState.DEFINE) {
   submit();
 }
 if (verbose) {
   monitorAndPrintJob();
 } else {
   // get the completion poll interval from the client.
   int completionPollIntervalMillis = 
 Job.getCompletionPollInterval(cluster.getConf());
   while (!isComplete()) {
 try {
   Thread.sleep(completionPollIntervalMillis);
 } catch (InterruptedException ie) {
   Thread.currentThread().interrupt();
 }
   }
 }
 return isSuccessful();
   }
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (MAPREDUCE-6296) A better way to deal with InterruptedException on waitForCompletion

2015-03-30 Thread Yang Hao (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-6296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yang Hao updated MAPREDUCE-6296:

Attachment: MAPREDUCE-6296.patch

 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
 Attachments: MAPREDUCE-6296.patch


 Some code in method waitForCompletion of Job class is 
 {code:title=Job.java|borderStyle=solid}
   public boolean waitForCompletion(boolean verbose
) throws IOException, InterruptedException,
 ClassNotFoundException {
 if (state == JobState.DEFINE) {
   submit();
 }
 if (verbose) {
   monitorAndPrintJob();
 } else {
   // get the completion poll interval from the client.
   int completionPollIntervalMillis = 
 Job.getCompletionPollInterval(cluster.getConf());
   while (!isComplete()) {
 try {
   Thread.sleep(completionPollIntervalMillis);
 } catch (InterruptedException ie) {
 }
   }
 }
 return isSuccessful();
   }
 {code}
 but a better way to deal with InterruptException is
 {code:title=Job.java|borderStyle=solid}
   public boolean waitForCompletion(boolean verbose
) throws IOException, InterruptedException,
 ClassNotFoundException {
 if (state == JobState.DEFINE) {
   submit();
 }
 if (verbose) {
   monitorAndPrintJob();
 } else {
   // get the completion poll interval from the client.
   int completionPollIntervalMillis = 
 Job.getCompletionPollInterval(cluster.getConf());
   while (!isComplete()) {
 try {
   Thread.sleep(completionPollIntervalMillis);
 } catch (InterruptedException ie) {
   Thread.currentThread().interrupt();
 }
   }
 }
 return isSuccessful();
   }
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (MAPREDUCE-6296) A better way to deal with InterruptedException on waitForCompletion

2015-03-30 Thread Yang Hao (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-6296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yang Hao updated MAPREDUCE-6296:

Status: Patch Available  (was: Open)

 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
 Attachments: MAPREDUCE-6296.patch


 Some code in method waitForCompletion of Job class is 
 {code:title=Job.java|borderStyle=solid}
   public boolean waitForCompletion(boolean verbose
) throws IOException, InterruptedException,
 ClassNotFoundException {
 if (state == JobState.DEFINE) {
   submit();
 }
 if (verbose) {
   monitorAndPrintJob();
 } else {
   // get the completion poll interval from the client.
   int completionPollIntervalMillis = 
 Job.getCompletionPollInterval(cluster.getConf());
   while (!isComplete()) {
 try {
   Thread.sleep(completionPollIntervalMillis);
 } catch (InterruptedException ie) {
 }
   }
 }
 return isSuccessful();
   }
 {code}
 but a better way to deal with InterruptException is
 {code:title=Job.java|borderStyle=solid}
   public boolean waitForCompletion(boolean verbose
) throws IOException, InterruptedException,
 ClassNotFoundException {
 if (state == JobState.DEFINE) {
   submit();
 }
 if (verbose) {
   monitorAndPrintJob();
 } else {
   // get the completion poll interval from the client.
   int completionPollIntervalMillis = 
 Job.getCompletionPollInterval(cluster.getConf());
   while (!isComplete()) {
 try {
   Thread.sleep(completionPollIntervalMillis);
 } catch (InterruptedException ie) {
   Thread.currentThread().interrupt();
 }
   }
 }
 return isSuccessful();
   }
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (MAPREDUCE-6296) A better way to deal with InterruptedException on waitForCompletion

2015-03-29 Thread Yang Hao (JIRA)

 [ 
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 
{code:title=Job.java|borderStyle=solid}
  public boolean waitForCompletion(boolean verbose
   ) throws IOException, InterruptedException,
ClassNotFoundException {
if (state == JobState.DEFINE) {
  submit();
}
if (verbose) {
  monitorAndPrintJob();
} else {
  // get the completion poll interval from the client.
  int completionPollIntervalMillis = 
Job.getCompletionPollInterval(cluster.getConf());
  while (!isComplete()) {
try {
  Thread.sleep(completionPollIntervalMillis);
} catch (InterruptedException ie) {
}
  }
}
return isSuccessful();
  }
{code}
but a better way to deal with InterruptException is
{code:title=Job.java|borderStyle=solid}
  public boolean waitForCompletion(boolean verbose
   ) throws IOException, InterruptedException,
ClassNotFoundException {
if (state == JobState.DEFINE) {
  submit();
}
if (verbose) {
  monitorAndPrintJob();
} else {
  // get the completion poll interval from the client.
  int completionPollIntervalMillis = 
Job.getCompletionPollInterval(cluster.getConf());
  while (!isComplete()) {
try {
  Thread.sleep(completionPollIntervalMillis);
} catch (InterruptedException ie) {
  Thread.currentThread().interrupt();
}
  }
}
return isSuccessful();
  }
{code}

  was:
Some code in method waitForCompletion of Job class is 
{code:title=Job.java|borderStyle=solid}
  public boolean waitForCompletion(boolean verbose
   ) throws IOException, InterruptedException,
ClassNotFoundException {
if (state == JobState.DEFINE) {
  submit();
}
if (verbose) {
  monitorAndPrintJob();
} else {
  // get the completion poll interval from the client.
  int completionPollIntervalMillis = 
Job.getCompletionPollInterval(cluster.getConf());
  while (!isComplete()) {
try {
  Thread.sleep(completionPollIntervalMillis);
} catch (InterruptedException ie) {
}
  }
}
return isSuccessful();
  }
{code}
but a better way to deal with InterruptException is
{code:title=Job.java|borderStyle=solid}
  public boolean waitForCompletion(boolean verbose
   ) throws IOException, InterruptedException,
ClassNotFoundException {
if (state == JobState.DEFINE) {
  submit();
}
if (verbose) {
  monitorAndPrintJob();
} else {
  // get the completion poll interval from the client.
  int completionPollIntervalMillis = 
Job.getCompletionPollInterval(cluster.getConf());
  try{
while (!isComplete()) {
  Thread.sleep(completionPollIntervalMillis);
}
  }catch (InterruptedException ie) {
Thread.currentThread().interrupt();
  }
}
return isSuccessful();
  }
{code}


 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 
 {code:title=Job.java|borderStyle=solid}
   public boolean waitForCompletion(boolean verbose
) throws IOException, InterruptedException,
 ClassNotFoundException {
 if (state == JobState.DEFINE) {
   submit();
 }
 if (verbose) {
   monitorAndPrintJob();
 } else {
   // get the completion poll interval from the client.
   int completionPollIntervalMillis = 
 Job.getCompletionPollInterval(cluster.getConf());
   while (!isComplete()) {
 try {
   Thread.sleep(completionPollIntervalMillis);
 } catch (InterruptedException ie) {
 }
   }
 }
 return isSuccessful();
   }
 {code}
 but a better way to deal with InterruptException is
 {code:title=Job.java|borderStyle=solid}
   public boolean waitForCompletion(boolean verbose
) throws IOException, InterruptedException,
 ClassNotFoundException {
 if (state == JobState.DEFINE) {
   submit();
 }
 if (verbose) {
   monitorAndPrintJob();

[jira] [Updated] (MAPREDUCE-6296) A better way to deal with InterruptedException on waitForCompletion

2015-03-29 Thread Yang Hao (JIRA)

 [ 
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 
{code:title=Job.java|borderStyle=solid}
  public boolean waitForCompletion(boolean verbose
   ) throws IOException, InterruptedException,
ClassNotFoundException {
if (state == JobState.DEFINE) {
  submit();
}
if (verbose) {
  monitorAndPrintJob();
} else {
  // get the completion poll interval from the client.
  int completionPollIntervalMillis = 
Job.getCompletionPollInterval(cluster.getConf());
  while (!isComplete()) {
try {
  Thread.sleep(completionPollIntervalMillis);
} catch (InterruptedException ie) {
}
  }
}
return isSuccessful();
  }
{code}
but a better way to deal with InterruptException is
{code:title=Job.java|borderStyle=solid}
  public boolean waitForCompletion(boolean verbose
   ) throws IOException, InterruptedException,
ClassNotFoundException {
if (state == JobState.DEFINE) {
  submit();
}
if (verbose) {
  monitorAndPrintJob();
} else {
  // get the completion poll interval from the client.
  int completionPollIntervalMillis = 
Job.getCompletionPollInterval(cluster.getConf());
  try{
while (!isComplete()) {
  Thread.sleep(completionPollIntervalMillis);
}
  }catch (InterruptedException ie) {
Thread.currentThread().interrupt();
  }
}
return isSuccessful();
  }
{code}

  was:
Some code in method waitForCompletion of Job class is 
{quote}



{code:title=Job.java|borderStyle=solid}
  public boolean waitForCompletion(boolean verbose
   ) throws IOException, InterruptedException,
ClassNotFoundException {
if (state == JobState.DEFINE) {
  submit();
}
if (verbose) {
  monitorAndPrintJob();
} else {
  // get the completion poll interval from the client.
  int completionPollIntervalMillis = 
Job.getCompletionPollInterval(cluster.getConf());
  while (!isComplete()) {
try {
  Thread.sleep(completionPollIntervalMillis);
} catch (InterruptedException ie) {
}
  }
}
return isSuccessful();
  }
{code}
but a better way to deal with InterruptException is
{code:title=Job.java|borderStyle=solid}
  public boolean waitForCompletion(boolean verbose
   ) throws IOException, InterruptedException,
ClassNotFoundException {
if (state == JobState.DEFINE) {
  submit();
}
if (verbose) {
  monitorAndPrintJob();
} else {
  // get the completion poll interval from the client.
  int completionPollIntervalMillis = 
Job.getCompletionPollInterval(cluster.getConf());
  try{
while (!isComplete()) {
  Thread.sleep(completionPollIntervalMillis);
}
  }catch (InterruptedException ie) {
Thread.currentThread().interrupt();
  }
}
return isSuccessful();
  }
{code}


 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 
 {code:title=Job.java|borderStyle=solid}
   public boolean waitForCompletion(boolean verbose
) throws IOException, InterruptedException,
 ClassNotFoundException {
 if (state == JobState.DEFINE) {
   submit();
 }
 if (verbose) {
   monitorAndPrintJob();
 } else {
   // get the completion poll interval from the client.
   int completionPollIntervalMillis = 
 Job.getCompletionPollInterval(cluster.getConf());
   while (!isComplete()) {
 try {
   Thread.sleep(completionPollIntervalMillis);
 } catch (InterruptedException ie) {
 }
   }
 }
 return isSuccessful();
   }
 {code}
 but a better way to deal with InterruptException is
 {code:title=Job.java|borderStyle=solid}
   public boolean waitForCompletion(boolean verbose
) throws IOException, InterruptedException,
 ClassNotFoundException {
 if (state == JobState.DEFINE) {
   submit();
 }
 if (verbose) {
   

[jira] [Updated] (MAPREDUCE-6296) A better way to deal with InterruptedException on waitForCompletion

2015-03-29 Thread Yang Hao (JIRA)

 [ 
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}



{code:title=Job.java|borderStyle=solid}
  public boolean waitForCompletion(boolean verbose
   ) throws IOException, InterruptedException,
ClassNotFoundException {
if (state == JobState.DEFINE) {
  submit();
}
if (verbose) {
  monitorAndPrintJob();
} else {
  // get the completion poll interval from the client.
  int completionPollIntervalMillis = 
Job.getCompletionPollInterval(cluster.getConf());
  while (!isComplete()) {
try {
  Thread.sleep(completionPollIntervalMillis);
} catch (InterruptedException ie) {
}
  }
}
return isSuccessful();
  }
{code}
but a better way to deal with InterruptException is
{code:title=Job.java|borderStyle=solid}
  public boolean waitForCompletion(boolean verbose
   ) throws IOException, InterruptedException,
ClassNotFoundException {
if (state == JobState.DEFINE) {
  submit();
}
if (verbose) {
  monitorAndPrintJob();
} else {
  // get the completion poll interval from the client.
  int completionPollIntervalMillis = 
Job.getCompletionPollInterval(cluster.getConf());
  try{
while (!isComplete()) {
  Thread.sleep(completionPollIntervalMillis);
}
  }catch (InterruptedException ie) {
Thread.currentThread().interrupt();
  }
}
return isSuccessful();
  }
{code}

  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();
  }
{quote}


 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}
 {code:title=Job.java|borderStyle=solid}
   public boolean waitForCompletion(boolean verbose
) throws IOException, InterruptedException,
 ClassNotFoundException {
 if (state == JobState.DEFINE) {
   submit();
 }
 if (verbose) {
   monitorAndPrintJob();
 } else {
   // get the completion poll interval from the client.
   int completionPollIntervalMillis = 
 Job.getCompletionPollInterval(cluster.getConf());
   while (!isComplete()) {
 try {
   Thread.sleep(completionPollIntervalMillis);
 } catch (InterruptedException ie) {
 }
   }
 }
 return isSuccessful();
   }
 {code}
 but a better way to deal with InterruptException is
 {code:title=Job.java|borderStyle=solid}
   public boolean waitForCompletion(boolean verbose
) throws IOException, InterruptedException,
 ClassNotFoundException {
 if (state == JobState.DEFINE) {
   submit();
 }
 if (verbose) {
   monitorAndPrintJob();
 } else {
   // get the completion poll interval from the client.
   int completionPollIntervalMillis = 
 Job.getCompletionPollInterval(cluster.getConf());
   try{
 while (!isComplete()) {
   Thread.sleep(completionPollIntervalMillis);
 }
   }catch (InterruptedException ie) {
 Thread.currentThread().interrupt();
   }
 }
 return isSuccessful();
   }
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (MAPREDUCE-6296) A better way to deal with InterruptedException on waitForCompletion

2015-03-29 Thread Yang Hao (JIRA)

 [ 
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)