hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-17064) Add TaskMonitor#getTasks() variant which accepts type selection
Date Thu, 10 Nov 2016 17:32:59 GMT
Ted Yu created HBASE-17064:
------------------------------

             Summary: Add TaskMonitor#getTasks() variant which accepts type selection
                 Key: HBASE-17064
                 URL: https://issues.apache.org/jira/browse/HBASE-17064
             Project: HBase
          Issue Type: Improvement
            Reporter: Ted Yu
            Priority: Minor


In TaskMonitorTmpl.jamon :
{code}
List<? extends MonitoredTask> tasks = taskMonitor.getTasks();
Iterator<? extends MonitoredTask> iter = tasks.iterator();
// apply requested filter
while (iter.hasNext()) {
  MonitoredTask t = iter.next();
  if (filter.equals("general")) {
    if (t instanceof MonitoredRPCHandler)
      iter.remove();
{code}
This means when user refreshes rs-status page, regardless of the type of filter, we always
traverse and clone MonitoredTask's.

getTasks() is synchronized :
{code}
  public synchronized List<MonitoredTask> getTasks() {
{code}
A variant of getTasks() can be added which takes the type of filter so that unnecessary cloning
is avoided.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message