HADOOP-18065. ExecutorHelper.logThrowableFromAfterExecute() is too noisy. (#3860)

Downgrading warn logs to debug in case of InterruptedException

Contributed By: Mukund Thakur
This commit is contained in:
Mukund Thakur 2022-01-06 10:54:27 +05:30 committed by GitHub
parent 46b02788bd
commit da0a6ba1ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,12 +47,12 @@ static void logThrowableFromAfterExecute(Runnable r, Throwable t) {
try {
((Future<?>) r).get();
} catch (ExecutionException ee) {
LOG.warn(
"Execution exception when running task in " + Thread.currentThread()
LOG.debug(
"Execution exception when running task in {}", Thread.currentThread()
.getName());
t = ee.getCause();
} catch (InterruptedException ie) {
LOG.warn("Thread (" + Thread.currentThread() + ") interrupted: ", ie);
LOG.debug("Thread ( {} ) interrupted: ", Thread.currentThread(), ie);
Thread.currentThread().interrupt();
} catch (Throwable throwable) {
t = throwable;
@ -60,8 +60,8 @@ static void logThrowableFromAfterExecute(Runnable r, Throwable t) {
}
if (t != null) {
LOG.warn("Caught exception in thread " + Thread
.currentThread().getName() + ": ", t);
LOG.warn("Caught exception in thread {} + : ", Thread
.currentThread().getName(), t);
}
}