aboutsummaryrefslogtreecommitdiff
path: root/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/filter
diff options
context:
space:
mode:
authorJacques Nadeau <jacques@apache.org>2014-01-02 21:47:51 -0800
committerJacques Nadeau <jacques@apache.org>2014-01-30 10:15:24 -0800
commita0eabf630c520e76c9dafc766bf6163c5477796d (patch)
tree8eb1ec4182d2e30706e9b444eb36712bf7f14780 /exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/filter
parentdb0203696c41e742a90bb7925c6e35f2407e80e8 (diff)
DRILL-334: Subdivide Drillbit control and data messages. Add support for socket backpressure. Add TopLevel and Child memory allocator with debug mode to capture memory leaks. Various memory leak fixes to get build to complete.
Also includes fixes from reviews by Tim.
Diffstat (limited to 'exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/filter')
-rw-r--r--exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/filter/FilterRecordBatch.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/filter/FilterRecordBatch.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/filter/FilterRecordBatch.java
index d1f2e6841..73cf0c8a0 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/filter/FilterRecordBatch.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/filter/FilterRecordBatch.java
@@ -82,6 +82,13 @@ public class FilterRecordBatch extends AbstractSingleRecordBatch<Filter>{
}
}
+
+ @Override
+ public void cleanup() {
+ super.cleanup();
+ if(sv2 != null) sv2.clear();
+ }
+
@Override
protected void setupNewSchema() throws SchemaChangeException {
container.clear();
@@ -97,7 +104,7 @@ public class FilterRecordBatch extends AbstractSingleRecordBatch<Filter>{
break;
case FOUR_BYTE:
// set up the multi-batch selection vector
- this.svAllocator = context.getAllocator().getPreAllocator();
+ this.svAllocator = context.getAllocator().getNewPreAllocator();
if (!svAllocator.preAllocate(incoming.getRecordCount()*4))
throw new SchemaChangeException("Attempted to filter an SV4 which exceeds allowed memory (" +
incoming.getRecordCount() * 4 + " bytes)");