ihuzenko commented on a change in pull request #1929: DRILL-6832: Remove the
old "unmanaged" external sort
URL: https://github.com/apache/drill/pull/1929#discussion_r360511648
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/MSortTemplate.java
##########
@@ -17,48 +17,59 @@
*/
package org.apache.drill.exec.physical.impl.xsort;
-import com.typesafe.config.ConfigException;
-import io.netty.buffer.DrillBuf;
-
import java.util.Queue;
import javax.inject.Named;
-import org.apache.drill.exec.ExecConstants;
import org.apache.drill.exec.exception.SchemaChangeException;
import org.apache.drill.exec.memory.BaseAllocator;
import org.apache.drill.exec.memory.BufferAllocator;
import org.apache.drill.exec.ops.FragmentContext;
import org.apache.drill.exec.record.RecordBatch;
import org.apache.drill.exec.record.VectorContainer;
import org.apache.drill.exec.record.selection.SelectionVector4;
-import org.apache.drill.exec.vector.ValueVector;
import org.apache.hadoop.util.IndexedSortable;
import org.apache.drill.shaded.guava.com.google.common.base.Preconditions;
import org.apache.drill.shaded.guava.com.google.common.collect.Queues;
+import io.netty.buffer.DrillBuf;
+
public abstract class MSortTemplate implements MSorter, IndexedSortable {
// private static final org.slf4j.Logger logger =
org.slf4j.LoggerFactory.getLogger(MSortTemplate.class);
private SelectionVector4 vector4;
private SelectionVector4 aux;
+ @SuppressWarnings("unused")
+ private long compares;
+
+ /**
+ * Holds offsets into the SV4 of the start of each batch
+ * (sorted run.)
+ */
+
private Queue<Integer> runStarts = Queues.newLinkedBlockingQueue();
private FragmentContext context;
/**
- * This is only useful for debugging and/or unit testing. Controls the
maximum size of batches exposed to downstream
+ * Controls the maximum size of batches exposed to downstream
*/
private int desiredRecordBatchCount;
@Override
- public void setup(final FragmentContext context, final BufferAllocator
allocator, final SelectionVector4 vector4, final VectorContainer hyperBatch)
throws SchemaChangeException{
+ public void setup(final FragmentContext context, final BufferAllocator
allocator, final SelectionVector4 vector4,
+ final VectorContainer hyperBatch, int outputBatchSize, int
desiredBatchSize) throws SchemaChangeException{
Review comment:
```suggestion
VectorContainer hyperBatch, int outputBatchSize, int
desiredBatchSize) throws SchemaChangeException {
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services