[ https://issues.apache.org/jira/browse/HBASE-17064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16126915#comment-16126915 ]
Reid Chan edited comment on HBASE-17064 at 8/15/17 8:08 AM: ------------------------------------------------------------ Would you mind giving a review, if you have time [~tedyu], though it is minor and set aside quite a long time... was (Author: reidchan): Would you mind giving a review, if you have time. [~tedyu], though it is minor and set aside quite a long time... > 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 > Assignee: Reid Chan > Priority: Minor > Labels: ui > Attachments: HBASE-17064.master.001.patch > > > 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.4.14#64029)