YARN-10726. Log the size of DelegationTokenRenewer event queue in case of too many pending events. Contributed by Qi Zhu.
This commit is contained in:
parent
9f1655baf2
commit
158758c5bf
@ -89,6 +89,8 @@ public class DelegationTokenRenewer extends AbstractService {
|
||||
new Text("HDFS_DELEGATION_TOKEN");
|
||||
public static final String SCHEME = "hdfs";
|
||||
|
||||
private volatile int lastEventQueueSizeLogged = 0;
|
||||
|
||||
// global single timer (daemon)
|
||||
private Timer renewalTimer;
|
||||
private RMContext rmContext;
|
||||
@ -228,6 +230,13 @@ private void processDelegationTokenRenewerEvent(
|
||||
futures.put(evt, future);
|
||||
} else {
|
||||
pendingEventQueue.add(evt);
|
||||
int qSize = pendingEventQueue.size();
|
||||
if (qSize != 0 && qSize % 1000 == 0
|
||||
&& lastEventQueueSizeLogged != qSize) {
|
||||
lastEventQueueSizeLogged = qSize;
|
||||
LOG.info("Size of pending " +
|
||||
"DelegationTokenRenewerEvent queue is " + qSize);
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
serviceStateLock.readLock().unlock();
|
||||
|
Loading…
Reference in New Issue
Block a user