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

Ted Yu commented on HBASE-17182:
--------------------------------

{code}
+  private final CleanScannerThread cleanScannerThread;
{code}
I think scannerCleanerThread would be better name (please change class name and 
variable name).
{code}
+    cleanScannerThread = new CleanScannerThread();
{code}
Please set as background thread.
{code}
+      final long maxIdleTime = 60000; // 1minutes
{code}
Please make the timeout same as hbase.client.scanner.timeout.period .
{code}
+        } catch (InterruptedException e) {
+          // LOG.error(e);
{code}
Restore interrupt status.
{code}
+              String str = String.format("Remove timeout scanner(%d).", 
scannerId);
{code}
"timeout" -> "timedout"
{code}
+              // scanner.close(); // Close will throw UnknownScannerException
{code}
I think the close() call should be made, in case the scanner is still active 
server side.
We need to catch UnknownScannerException.

> 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
>            Assignee: Jian Yi
>         Attachments: HBASE-17182-V1.patch, HBASE-17182-V2.patch
>
>
> 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