aboutsummaryrefslogtreecommitdiff
path: root/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl
diff options
context:
space:
mode:
authorMehant Baid <mehantr@gmail.com>2015-01-26 15:50:26 -0800
committerMehant Baid <mehantr@gmail.com>2015-01-26 22:00:31 -0800
commit4976fb9e860651895adbe413ca26870932c6ab34 (patch)
tree260b94ee0ad5d5e24162139312f564325a5d03d9 /exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl
parent47dd6a689178c52035199db572bd93e7d5db9659 (diff)
DRILL-2078: Remove deprecated VectorAllocator and modify its users
Diffstat (limited to 'exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl')
-rw-r--r--exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/HashAggTemplate.java2
-rw-r--r--exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/MergeJoinBatch.java1
-rw-r--r--exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/ExternalSortBatch.java6
-rw-r--r--exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/PriorityQueueCopier.java4
-rw-r--r--exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/PriorityQueueCopierTemplate.java10
5 files changed, 3 insertions, 20 deletions
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/HashAggTemplate.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/HashAggTemplate.java
index 4b8e357e8..73cadb2b1 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/HashAggTemplate.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/HashAggTemplate.java
@@ -57,7 +57,6 @@ import org.apache.drill.exec.vector.ObjectVector;
import org.apache.drill.exec.vector.AllocationHelper;
import org.apache.drill.exec.vector.ValueVector;
import org.apache.drill.exec.vector.VariableWidthVector;
-import org.apache.drill.exec.vector.allocator.VectorAllocator;
import com.google.common.collect.Lists;
@@ -95,7 +94,6 @@ public abstract class HashAggTemplate implements HashAggregator {
private IndexPointer outNumRecordsHolder;
private int numGroupByOutFields = 0; // Note: this should be <= number of group-by fields
- List<VectorAllocator> wsAllocators = Lists.newArrayList(); // allocators for the workspace vectors
ErrorCollector collector = new ErrorCollectorImpl();
private MaterializedField[] materializedValueFields;
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/MergeJoinBatch.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/MergeJoinBatch.java
index 8a6e1f196..14bc09469 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/MergeJoinBatch.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/MergeJoinBatch.java
@@ -53,7 +53,6 @@ import org.apache.drill.exec.record.VectorContainer;
import org.apache.drill.exec.record.VectorWrapper;
import org.apache.drill.exec.vector.AllocationHelper;
import org.apache.drill.exec.vector.ValueVector;
-import org.apache.drill.exec.vector.allocator.VectorAllocator;
import org.apache.drill.exec.vector.complex.AbstractContainerVector;
import org.eigenbase.rel.JoinRelType;
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/ExternalSortBatch.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/ExternalSortBatch.java
index a22ac98fe..902666141 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/ExternalSortBatch.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/ExternalSortBatch.java
@@ -52,7 +52,6 @@ import org.apache.drill.exec.record.BatchSchema;
import org.apache.drill.exec.record.BatchSchema.SelectionVectorMode;
import org.apache.drill.exec.record.MaterializedField;
import org.apache.drill.exec.record.RecordBatch;
-import org.apache.drill.exec.record.TransferPair;
import org.apache.drill.exec.record.VectorAccessible;
import org.apache.drill.exec.record.VectorContainer;
import org.apache.drill.exec.record.VectorWrapper;
@@ -62,7 +61,6 @@ import org.apache.drill.exec.record.selection.SelectionVector4;
import org.apache.drill.exec.util.Utilities;
import org.apache.drill.exec.vector.CopyUtil;
import org.apache.drill.exec.vector.ValueVector;
-import org.apache.drill.exec.vector.allocator.VectorAllocator;
import org.apache.drill.exec.vector.complex.AbstractContainerVector;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
@@ -646,13 +644,11 @@ public class ExternalSortBatch extends AbstractRecordBatch<ExternalSort> {
copier.cleanup();
}
- List<VectorAllocator> allocators = Lists.newArrayList();
for (VectorWrapper<?> i : batch) {
ValueVector v = TypeHelper.getNewVector(i.getField(), copierAllocator);
outputContainer.add(v);
- allocators.add(VectorAllocator.getAllocator(v, 110));
}
- copier.setup(context, copierAllocator, batch, batchGroupList, outputContainer, allocators);
+ copier.setup(context, copierAllocator, batch, batchGroupList, outputContainer);
} catch (ClassTransformationException e) {
throw new RuntimeException(e);
} catch (IOException e) {
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/PriorityQueueCopier.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/PriorityQueueCopier.java
index 4da3c3604..d4277442d 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/PriorityQueueCopier.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/PriorityQueueCopier.java
@@ -24,13 +24,11 @@ import org.apache.drill.exec.exception.SchemaChangeException;
import org.apache.drill.exec.memory.BufferAllocator;
import org.apache.drill.exec.ops.FragmentContext;
import org.apache.drill.exec.record.VectorAccessible;
-import org.apache.drill.exec.vector.allocator.VectorAllocator;
public interface PriorityQueueCopier {
public void setup(FragmentContext context, BufferAllocator allocator, VectorAccessible hyperBatch, List<BatchGroup> batchGroups,
- VectorAccessible outgoing, List<VectorAllocator> allocators) throws SchemaChangeException;
+ VectorAccessible outgoing) throws SchemaChangeException;
public int next(int targetRecordCount);
- public List<VectorAllocator> getAllocators();
public void cleanup();
public static TemplateClassDefinition<PriorityQueueCopier> TEMPLATE_DEFINITION = new TemplateClassDefinition<PriorityQueueCopier>(PriorityQueueCopier.class, PriorityQueueCopierTemplate.class);
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/PriorityQueueCopierTemplate.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/PriorityQueueCopierTemplate.java
index dd3d4b589..17565ed83 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/PriorityQueueCopierTemplate.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/PriorityQueueCopierTemplate.java
@@ -27,7 +27,6 @@ import org.apache.drill.exec.ops.FragmentContext;
import org.apache.drill.exec.record.VectorAccessible;
import org.apache.drill.exec.record.VectorWrapper;
import org.apache.drill.exec.record.selection.SelectionVector4;
-import org.apache.drill.exec.vector.allocator.VectorAllocator;
public abstract class PriorityQueueCopierTemplate implements PriorityQueueCopier {
static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(PriorityQueueCopierTemplate.class);
@@ -38,20 +37,18 @@ public abstract class PriorityQueueCopierTemplate implements PriorityQueueCopier
private FragmentContext context;
private BufferAllocator allocator;
private VectorAccessible outgoing;
- private List<VectorAllocator> allocators;
private int size;
private int queueSize = 0;
private int targetRecordCount = ExternalSortBatch.SPILL_TARGET_RECORD_COUNT;
@Override
public void setup(FragmentContext context, BufferAllocator allocator, VectorAccessible hyperBatch, List<BatchGroup> batchGroups,
- VectorAccessible outgoing, List<VectorAllocator> allocators) throws SchemaChangeException {
+ VectorAccessible outgoing) throws SchemaChangeException {
this.context = context;
this.allocator = allocator;
this.hyperBatch = hyperBatch;
this.batchGroups = batchGroups;
this.outgoing = outgoing;
- this.allocators = allocators;
this.size = batchGroups.size();
BufferAllocator.PreAllocator preAlloc = allocator.getNewPreAllocator();
@@ -112,11 +109,6 @@ public abstract class PriorityQueueCopierTemplate implements PriorityQueueCopier
}
}
- @Override
- public List<VectorAllocator> getAllocators() {
- return allocators;
- }
-
private void siftUp() {
int p = queueSize;
while (p > 0) {