HDFS-14693. NameNode should log a warning when EditLog IPC logger's pending size exceeds limit. Contributed by Xudong Cao.
(cherry picked from commit 6ad9a11494c3aea146d7741bf0ad52ce16ad08e6)
This commit is contained in:
parent
a00a327594
commit
2f2fa3dad6
@ -492,6 +492,10 @@ private synchronized void reserveQueueSpace(int size)
|
|||||||
Preconditions.checkArgument(size >= 0);
|
Preconditions.checkArgument(size >= 0);
|
||||||
if (queuedEditsSizeBytes + size > queueSizeLimitBytes &&
|
if (queuedEditsSizeBytes + size > queueSizeLimitBytes &&
|
||||||
queuedEditsSizeBytes > 0) {
|
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();
|
throw new LoggerTooFarBehindException();
|
||||||
}
|
}
|
||||||
queuedEditsSizeBytes += size;
|
queuedEditsSizeBytes += size;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user