HADOOP-16708. HadoopExecutors cleanup to only log at debug.

Contributed by David Mollitor.

Change-Id: Ib501a3ed6ed299ccd3c773c4dc086441a5728e73
This commit is contained in:
Steve Loughran 2019-11-14 17:51:24 +00:00
parent 73a386ab76
commit a139a87610
No known key found for this signature in database
GPG Key ID: D22CF846DBB162A0
1 changed files with 3 additions and 3 deletions

View File

@ -115,18 +115,18 @@ public final class HadoopExecutors {
try {
executorService.shutdown();
logger.info(
logger.debug(
"Gracefully shutting down executor service. Waiting max {} {}",
timeout, unit);
if (!executorService.awaitTermination(timeout, unit)) {
logger.info(
logger.debug(
"Executor service has not shutdown yet. Forcing. "
+ "Will wait up to an additional {} {} for shutdown",
timeout, unit);
executorService.shutdownNow();
}
if (executorService.awaitTermination(timeout, unit)) {
logger.info("Succesfully shutdown executor service");
logger.debug("Succesfully shutdown executor service");
} else {
logger.error("Unable to shutdown executor service after timeout {} {}",
(2 * timeout), unit);