From 6ad9a11494c3aea146d7741bf0ad52ce16ad08e6 Mon Sep 17 00:00:00 2001 From: Wei-Chiu Chuang Date: Thu, 8 Aug 2019 13:50:30 -0700 Subject: [PATCH] HDFS-14693. NameNode should log a warning when EditLog IPC logger's pending size exceeds limit. Contributed by Xudong Cao. --- .../apache/hadoop/hdfs/qjournal/client/IPCLoggerChannel.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/IPCLoggerChannel.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/IPCLoggerChannel.java index 324747618a..3a882e5e61 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/IPCLoggerChannel.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/IPCLoggerChannel.java @@ -492,6 +492,10 @@ private synchronized void reserveQueueSpace(int size) Preconditions.checkArgument(size >= 0); if (queuedEditsSizeBytes + size > queueSizeLimitBytes && queuedEditsSizeBytes > 0) { + QuorumJournalManager.LOG.warn("Pending edits to " + IPCLoggerChannel.this + + " is going to exceed limit size: " + queueSizeLimitBytes + + ", current queued edits size: " + queuedEditsSizeBytes + + ", will silently drop " + size + " bytes of edits!"); throw new LoggerTooFarBehindException(); } queuedEditsSizeBytes += size;