HBASE-17256 Rpc handler monitoring will be removed when the task queue is full (Guangxu Cheng)

This commit is contained in:
tedyu 2016-12-05 11:32:17 -08:00
parent 39653862a4
commit 3190605801
1 changed files with 3 additions and 0 deletions

View File

@ -73,6 +73,9 @@ public class TaskMonitor {
new Class<?>[] { MonitoredTask.class },
new PassthroughInvocationHandler<MonitoredTask>(stat));
TaskAndWeakRefPair pair = new TaskAndWeakRefPair(stat, proxy);
if (tasks.isFull()) {
purgeExpiredTasks();
}
tasks.add(pair);
return proxy;
}