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

Jacques Nadeau commented on DRILL-3940:
---------------------------------------

I spent some more time looking at your allocator branch. It seems like there 
are a number of places where you've added AutoCloseable. My feedback above was 
to the title of this JIRA which only focused on the RecordBatch interface. 

I think the autocloseable additions you made to other classes, such as those to 
SortRecordBatchBuilder and WritableBatch are very useful and whole-heartedly 
support those additions.

On the RecordBatch situation specifically, I don't think we need to add a new 
interface. All the implementations are AutoCloseable and this functionality is 
exposed in the place where their state should be managed (BaseRootExec, 
specifically [1]),. Exposing the close method to other operators breaks 
operator lifecycle encapsulation.

[1] 
https://github.com/apache/drill/blob/master/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/BaseRootExec.java#L140

> Make RecordBatch AutoCloseable
> ------------------------------
>
>                 Key: DRILL-3940
>                 URL: https://issues.apache.org/jira/browse/DRILL-3940
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Flow
>    Affects Versions: 1.2.0
>            Reporter: Chris Westin
>            Assignee: Chris Westin
>
> This made it easier to find RecordBatches that were not cleaned up (because 
> the compiler complains about AutoCloseable resources that haven't been 
> closed).



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

Reply via email to