[ 
https://issues.apache.org/jira/browse/CASSANDRA-10837?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Benjamin Lerer updated CASSANDRA-10837:
---------------------------------------
    Attachment: 10837-3.0-v4.txt

I slightly modified the V3 patch to fix some nits that I found during the 
review:
In {{CqlRecordWriter}}:
* the patch inlines {{refreshEndPoint}}: the name was not making sense anymore 
and it removes the need to store the {{Configuration}} as an instance variable.
* The {{NativeRingCache}} constructor now takes {{Metadata}} as argument 
instead of the {{Cluster}}. 
* The patch makes sure that the {{metadata}} field is set. It was not, which 
would have caused a {{NPE}} if somebody had called the {{getRange}} method.
* The patch moves the call to {{closeInternal}} inside the finally block to 
make sure that the {{Cluster}} is closed even if an Exception is thrown.

In {{CqlInputFormat}}:
* The patch modify the {{getRangeMap}} method to avoid the unnecessary creation 
of a new {{Cluster}}.

[~alexliu68] could you review the changes and verify that everything is working 
fine in your environment?

> Cluster/session should be closed in Cassandra Hadoop Input/Output classes
> -------------------------------------------------------------------------
>
>                 Key: CASSANDRA-10837
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10837
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CQL
>            Reporter: Alex Liu
>            Assignee: Alex Liu
>             Fix For: 3.0.x
>
>         Attachments: 10837-3.0-branch.txt, 10837-3.0-v4.txt, 
> 10837-v2-3.0-branch.txt, 10837-v3-3.0-branch.txt
>
>
> See a lot of following warnings during Hadoop job running
> {code}
> ERROR 11:37:45 LEAK: You are creating too many HashedWheelTimer instances.  
> HashedWheelTimer is a shared resource that must be reused across the JVM,so 
> that only a few instances are created.
> {code}
> Each cluster/session needs be closed and a shared HashedWheelTimer may reduce 
> the resource leakage.



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

Reply via email to