[ 
https://issues.apache.org/jira/browse/HBASE-17182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15724088#comment-15724088
 ] 

Jian Yi commented on HBASE-17182:
---------------------------------

class ScannerInfo {
    final ResultScanner resultScanner;
    private long lastAccessTime;

    ScannerInfo(ResultScanner scanner) {
      lastAccessTime = EnvironmentEdgeManager.currentTime();
      resultScanner = scanner;
    }

    synchronized boolean updateAccessTime() {
      lastAccessTime = EnvironmentEdgeManager.currentTime();
      return true;
    }

    synchronized boolean timedOut(int maxIdleTime) {
      long timeoutTime = lastAccessTime + maxIdleTime;
      if (EnvironmentEdgeManager.currentTime() > timeoutTime) {
        return true;
      }
      return false;
    }
}

> Memory leak from openScanner of HBase thrift2
> ---------------------------------------------
>
>                 Key: HBASE-17182
>                 URL: https://issues.apache.org/jira/browse/HBASE-17182
>             Project: HBase
>          Issue Type: Bug
>          Components: Thrift
>            Reporter: Jian Yi
>
> Client call openScanner, but client (coredump or others) not closeScanner, 
> the scanner will not be removed from scannerMap.



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

Reply via email to