HADOOP-17613. Log not flushed fully when daemon shutdown. Contributed by Renukaprasad C.

This commit is contained in:
He Xiaoqiao 2021-04-07 12:18:23 +08:00
parent 72355c7b6e
commit a3cff8776a
No known key found for this signature in database
GPG Key ID: A80CC124E9A0FA63
1 changed files with 2 additions and 0 deletions

View File

@ -41,6 +41,7 @@ import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.net.NetUtils;
import org.apache.log4j.LogManager;
import org.apache.hadoop.thirdparty.com.google.common.base.Preconditions;
import org.apache.hadoop.thirdparty.com.google.common.net.InetAddresses;
@ -752,6 +753,7 @@ public class StringUtils {
public void run() {
LOG.info(toStartupShutdownString("SHUTDOWN_MSG: ", new String[]{
"Shutting down " + classname + " at " + hostname}));
LogManager.shutdown();
}
}, SHUTDOWN_HOOK_PRIORITY);