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 12:14:20 -08:00
parent 600fa8de77
commit c2801a2ea8

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;
}