http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/AbstractBaseReader.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/AbstractBaseReader.java b/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/AbstractBaseReader.java index 8f892e7..468ea0f 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/AbstractBaseReader.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/AbstractBaseReader.java @@ -18,7 +18,6 @@ package org.apache.drill.exec.vector.complex.impl; import java.util.Iterator; -import java.util.Map.Entry; import org.apache.drill.common.types.TypeProtos.MajorType; import org.apache.drill.exec.vector.complex.reader.FieldReader;
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/ComplexWriterImpl.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/ComplexWriterImpl.java b/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/ComplexWriterImpl.java index 165c5b5..9f934b7 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/ComplexWriterImpl.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/ComplexWriterImpl.java @@ -20,7 +20,6 @@ package org.apache.drill.exec.vector.complex.impl; import org.apache.drill.common.types.TypeProtos.MajorType; import org.apache.drill.common.types.TypeProtos.MinorType; import org.apache.drill.common.types.Types; -import org.apache.drill.exec.exception.SchemaChangeException; import org.apache.drill.exec.record.MaterializedField; import org.apache.drill.exec.record.VectorContainer; import org.apache.drill.exec.vector.ValueVector; @@ -87,6 +86,7 @@ public class ComplexWriterImpl extends AbstractFieldWriter implements ComplexWri } } + @Override public void setPosition(int index){ super.setPosition(index); switch(mode){ @@ -176,7 +176,7 @@ public class ComplexWriterImpl extends AbstractFieldWriter implements ComplexWri private static class VectorAccessibleFacade extends MapVector { private final VectorContainer vc; - + public VectorAccessibleFacade(VectorContainer vc) { super("", null); this.vc = vc; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/RepeatedListReaderImpl.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/RepeatedListReaderImpl.java b/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/RepeatedListReaderImpl.java index 66f658d..83e644e 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/RepeatedListReaderImpl.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/RepeatedListReaderImpl.java @@ -43,16 +43,19 @@ public class RepeatedListReaderImpl extends AbstractFieldReader{ this.container = container; } + @Override public MajorType getType(){ return TYPE; } + @Override public void copyAsValue(ListWriter writer){ if(currentOffset == NO_VALUES) return; RepeatedListWriter impl = (RepeatedListWriter) writer; impl.inform(impl.container.copyFromSafe(idx(), impl.idx(), container)); } + @Override public void copyAsField(String name, MapWriter writer){ if(currentOffset == NO_VALUES) return; RepeatedListWriter impl = (RepeatedListWriter) writer.list(name); @@ -62,10 +65,12 @@ public class RepeatedListReaderImpl extends AbstractFieldReader{ private int currentOffset; private int maxOffset; + @Override public int size(){ return maxOffset - currentOffset; } + @Override public void setPosition(int index){ super.setPosition(index); RepeatedListHolder h = new RepeatedListHolder(); @@ -79,6 +84,7 @@ public class RepeatedListReaderImpl extends AbstractFieldReader{ } } + @Override public boolean next(){ if(currentOffset +1 < maxOffset){ currentOffset++; @@ -95,6 +101,7 @@ public class RepeatedListReaderImpl extends AbstractFieldReader{ return container.getAccessor().getObject(idx()); } + @Override public FieldReader reader(){ if(reader == null){ reader = container.get(name, ValueVector.class).getAccessor().getReader(); http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/RepeatedMapReaderImpl.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/RepeatedMapReaderImpl.java b/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/RepeatedMapReaderImpl.java index b89d26d..faf3508 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/RepeatedMapReaderImpl.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/RepeatedMapReaderImpl.java @@ -49,6 +49,7 @@ public class RepeatedMapReaderImpl extends AbstractFieldReader{ } } + @Override public FieldReader reader(String name){ FieldReader reader = fields.get(name); if(reader == null){ @@ -64,10 +65,11 @@ public class RepeatedMapReaderImpl extends AbstractFieldReader{ return reader; } + @Override public FieldReader reader() { - if (currentOffset == NO_VALUES) + if (currentOffset == NO_VALUES) return NullReader.INSTANCE; - + setChildrenPosition(currentOffset); return new SingleLikeRepeatedMapReaderImpl(vector, this); } @@ -75,6 +77,7 @@ public class RepeatedMapReaderImpl extends AbstractFieldReader{ private int currentOffset; private int maxOffset; + @Override public int size(){ if (isNull()) { return 0; @@ -82,6 +85,7 @@ public class RepeatedMapReaderImpl extends AbstractFieldReader{ return maxOffset - (currentOffset < 0 ? 0 : currentOffset); } + @Override public void setPosition(int index){ super.setPosition(index); RepeatedMapHolder h = new RepeatedMapHolder(); @@ -110,6 +114,7 @@ public class RepeatedMapReaderImpl extends AbstractFieldReader{ } } + @Override public boolean next(){ if(currentOffset +1 < maxOffset){ setChildrenPosition(++currentOffset); @@ -129,10 +134,12 @@ public class RepeatedMapReaderImpl extends AbstractFieldReader{ return vector.getAccessor().getObject(idx()); } + @Override public MajorType getType(){ return vector.getField().getType(); } + @Override public java.util.Iterator<String> iterator(){ return vector.fieldNameIterator(); } @@ -142,6 +149,7 @@ public class RepeatedMapReaderImpl extends AbstractFieldReader{ return true; } + @Override public void copyAsValue(MapWriter writer){ if(currentOffset == NO_VALUES) return; RepeatedMapWriter impl = (RepeatedMapWriter) writer; @@ -154,6 +162,7 @@ public class RepeatedMapReaderImpl extends AbstractFieldReader{ impl.inform(impl.container.copyFromSafe(currentOffset, impl.idx(), vector)); } + @Override public void copyAsField(String name, MapWriter writer){ if(currentOffset == NO_VALUES) return; RepeatedMapWriter impl = (RepeatedMapWriter) writer.map(name); http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/SingleListReaderImpl.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/SingleListReaderImpl.java b/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/SingleListReaderImpl.java index 36e04a7..872c5e3 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/SingleListReaderImpl.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/SingleListReaderImpl.java @@ -50,11 +50,13 @@ public class SingleListReaderImpl extends AbstractFieldReader{ this.container = container; } + @Override public MajorType getType(){ return TYPE; } + @Override public void setPosition(int index){ super.setPosition(index); if(reader != null) reader.setPosition(index); @@ -65,6 +67,7 @@ public class SingleListReaderImpl extends AbstractFieldReader{ return reader.readObject(); } + @Override public FieldReader reader(){ if(reader == null){ reader = container.get(name, ValueVector.class).getAccessor().getReader(); @@ -78,10 +81,12 @@ public class SingleListReaderImpl extends AbstractFieldReader{ return false; } + @Override public void copyAsValue(ListWriter writer){ throw new UnsupportedOperationException("Generic list copying not yet supported. Please resolve to typed list."); } + @Override public void copyAsField(String name, MapWriter writer){ throw new UnsupportedOperationException("Generic list copying not yet supported. Please resolve to typed list."); } http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/SingleMapReaderImpl.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/SingleMapReaderImpl.java b/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/SingleMapReaderImpl.java index 41450ce..c2d96b1 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/SingleMapReaderImpl.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/SingleMapReaderImpl.java @@ -47,6 +47,7 @@ public class SingleMapReaderImpl extends AbstractFieldReader{ } } + @Override public FieldReader reader(String name){ FieldReader reader = fields.get(name); if(reader == null){ @@ -62,6 +63,7 @@ public class SingleMapReaderImpl extends AbstractFieldReader{ return reader; } + @Override public void setPosition(int index){ super.setPosition(index); for(FieldReader r : fields.values()){ @@ -79,19 +81,23 @@ public class SingleMapReaderImpl extends AbstractFieldReader{ return true; } + @Override public MajorType getType(){ return vector.getField().getType(); } + @Override public java.util.Iterator<String> iterator(){ return vector.fieldNameIterator(); } + @Override public void copyAsValue(MapWriter writer){ SingleMapWriter impl = (SingleMapWriter) writer; impl.inform(impl.container.copyFromSafe(idx(), impl.idx(), vector)); } + @Override public void copyAsField(String name, MapWriter writer){ SingleMapWriter impl = (SingleMapWriter) writer.map(name); impl.inform(impl.container.copyFromSafe(idx(), impl.idx(), vector)); http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/VectorContainerWriter.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/VectorContainerWriter.java b/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/VectorContainerWriter.java index 57980f8..e92626e 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/VectorContainerWriter.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/impl/VectorContainerWriter.java @@ -23,7 +23,6 @@ import org.apache.drill.exec.physical.impl.OutputMutator; import org.apache.drill.exec.record.MaterializedField; import org.apache.drill.exec.vector.ValueVector; import org.apache.drill.exec.vector.complex.MapVector; -import org.apache.drill.exec.vector.complex.writer.BaseWriter; import org.apache.drill.exec.vector.complex.writer.BaseWriter.ComplexWriter; public class VectorContainerWriter extends AbstractFieldWriter implements ComplexWriter { @@ -69,6 +68,7 @@ public class VectorContainerWriter extends AbstractFieldWriter implements Comple mapRoot.setValueCount(count); } + @Override public void setPosition(int index) { super.setPosition(index); mapRoot.setPosition(index); http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/work/EndpointListener.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/EndpointListener.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/EndpointListener.java index 6cec7b2..164f76e 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/EndpointListener.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/EndpointListener.java @@ -25,7 +25,7 @@ public abstract class EndpointListener<RET, V> extends BaseRpcOutcomeListener<RE protected final DrillbitEndpoint endpoint; protected final V value; - + public EndpointListener(DrillbitEndpoint endpoint, V value) { super(); this.endpoint = endpoint; @@ -40,5 +40,5 @@ public abstract class EndpointListener<RET, V> extends BaseRpcOutcomeListener<RE return value; } - + } http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/work/ErrorHelper.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/ErrorHelper.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/ErrorHelper.java index 7bb2919..5679a4f 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/ErrorHelper.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/ErrorHelper.java @@ -21,7 +21,6 @@ import java.io.PrintWriter; import java.io.StringWriter; import java.util.UUID; -import org.apache.drill.common.exceptions.DrillException; import org.apache.drill.exec.planner.sql.parser.impl.ParseException; import org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint; import org.apache.drill.exec.proto.UserBitShared.DrillPBError; @@ -73,7 +72,7 @@ public class ErrorHelper { String finalMsg = rootCause.getMessage() == null ? original.getMessage() : rootCause.getMessage(); builder.setMessage(String.format(sb.toString(), finalMsg)); builder.setErrorType(0); - + // record the error to the log for later reference. logger.error("Error {}: {}", id, message, t); http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/work/QueryWorkUnit.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/QueryWorkUnit.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/QueryWorkUnit.java index c3760d5..9743d6e 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/QueryWorkUnit.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/QueryWorkUnit.java @@ -26,17 +26,17 @@ import com.google.common.base.Preconditions; public class QueryWorkUnit { static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(QueryWorkUnit.class); - + private final PlanFragment rootFragment; // for local private final FragmentRoot rootOperator; // for local private final List<PlanFragment> fragments; - + public QueryWorkUnit(FragmentRoot rootOperator, PlanFragment rootFragment, List<PlanFragment> fragments) { super(); Preconditions.checkNotNull(rootFragment); Preconditions.checkNotNull(fragments); Preconditions.checkNotNull(rootOperator); - + this.rootFragment = rootFragment; this.fragments = fragments; this.rootOperator = rootOperator; @@ -53,11 +53,11 @@ public class QueryWorkUnit { public FragmentRoot getRootOperator() { return rootOperator; } - - - - - - - + + + + + + + } http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/work/ResourceRequest.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/ResourceRequest.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/ResourceRequest.java index 1e9ea5e..5b7b623 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/ResourceRequest.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/ResourceRequest.java @@ -19,10 +19,10 @@ package org.apache.drill.exec.work; public class ResourceRequest { static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ResourceRequest.class); - + public long memoryMin; public long memoryDesired; - + public static class ResourceAllocation { public long memory; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/work/RootNodeDriver.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/RootNodeDriver.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/RootNodeDriver.java index fee3d88..b56477b 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/RootNodeDriver.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/RootNodeDriver.java @@ -19,7 +19,7 @@ package org.apache.drill.exec.work; public interface RootNodeDriver { static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(RootNodeDriver.class); - + public boolean doNext(); - + } http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/AbstractDataCollector.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/AbstractDataCollector.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/AbstractDataCollector.java index 6eafe57..c83106c 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/AbstractDataCollector.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/AbstractDataCollector.java @@ -29,7 +29,6 @@ import org.apache.drill.exec.ops.FragmentContext; import org.apache.drill.exec.physical.base.Receiver; import org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint; import org.apache.drill.exec.record.RawFragmentBatch; -import org.apache.drill.exec.rpc.ResponseSender; import com.google.common.base.Preconditions; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/ControlHandlerImpl.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/ControlHandlerImpl.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/ControlHandlerImpl.java index 893aec8..a7f3666 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/ControlHandlerImpl.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/ControlHandlerImpl.java @@ -23,13 +23,8 @@ import io.netty.buffer.ByteBuf; import java.io.IOException; import org.apache.drill.common.exceptions.ExecutionSetupException; -import org.apache.drill.exec.exception.FragmentSetupException; -import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry; -import org.apache.drill.exec.memory.OutOfMemoryException; import org.apache.drill.exec.ops.FragmentContext; import org.apache.drill.exec.physical.base.FragmentRoot; -import org.apache.drill.exec.physical.impl.ImplCreator; -import org.apache.drill.exec.physical.impl.RootExec; import org.apache.drill.exec.proto.BitControl.FinishedReceiver; import org.apache.drill.exec.proto.BitControl.FragmentStatus; import org.apache.drill.exec.proto.BitControl.PlanFragment; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/DataCollector.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/DataCollector.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/DataCollector.java index 42d8eae..dc016be 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/DataCollector.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/DataCollector.java @@ -20,7 +20,6 @@ package org.apache.drill.exec.work.batch; import java.io.IOException; import org.apache.drill.exec.record.RawFragmentBatch; -import org.apache.drill.exec.rpc.ResponseSender; interface DataCollector extends AutoCloseable { static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(DataCollector.class); http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/IncomingBuffers.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/IncomingBuffers.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/IncomingBuffers.java index af5e9c7..1d6a709 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/IncomingBuffers.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/IncomingBuffers.java @@ -28,7 +28,6 @@ import org.apache.drill.exec.physical.base.AbstractPhysicalVisitor; import org.apache.drill.exec.physical.base.PhysicalOperator; import org.apache.drill.exec.physical.base.Receiver; import org.apache.drill.exec.record.RawFragmentBatch; -import org.apache.drill.exec.rpc.ResponseSender; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/MergingCollector.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/MergingCollector.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/MergingCollector.java index 5248bb1..ce14260 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/MergingCollector.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/MergingCollector.java @@ -25,7 +25,7 @@ import org.apache.drill.exec.physical.base.Receiver; public class MergingCollector extends AbstractDataCollector{ private AtomicInteger streamsRunning; - + public MergingCollector(AtomicInteger parentAccounter, Receiver receiver, FragmentContext context) { super(parentAccounter, receiver, 1, context); streamsRunning = new AtomicInteger(receiver.getProvidingEndpoints().size()); http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/RawBatchBuffer.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/RawBatchBuffer.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/RawBatchBuffer.java index bc8a1dc..8646a72 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/RawBatchBuffer.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/RawBatchBuffer.java @@ -21,7 +21,6 @@ import java.io.IOException; import org.apache.drill.exec.record.RawFragmentBatch; import org.apache.drill.exec.record.RawFragmentBatchProvider; -import org.apache.drill.exec.rpc.ResponseSender; /** * A batch buffer is responsible for queuing incoming batches until a consumer is ready to receive them. It will also http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/UnlimitedRawBatchBuffer.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/UnlimitedRawBatchBuffer.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/UnlimitedRawBatchBuffer.java index 912f956..a4ed4d6 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/UnlimitedRawBatchBuffer.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/batch/UnlimitedRawBatchBuffer.java @@ -19,14 +19,11 @@ package org.apache.drill.exec.work.batch; import java.util.concurrent.LinkedBlockingDeque; import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicInteger; import org.apache.drill.exec.ExecConstants; import org.apache.drill.exec.ops.FragmentContext; import org.apache.drill.exec.proto.BitData.FragmentRecordBatch; import org.apache.drill.exec.record.RawFragmentBatch; -import org.apache.drill.exec.rpc.ResponseSender; -import org.apache.drill.exec.rpc.data.DataRpcConfig; import com.google.common.collect.Queues; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java index 603aeab..05fc2b1 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java @@ -23,7 +23,6 @@ import java.io.Closeable; import java.io.IOException; import java.util.LinkedList; import java.util.List; -import java.util.Queue; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; @@ -34,7 +33,6 @@ import org.apache.drill.common.exceptions.ExecutionSetupException; import org.apache.drill.common.logical.LogicalPlan; import org.apache.drill.common.logical.PlanProperties.Generator.ResultMode; import org.apache.drill.exec.ExecConstants; -import org.apache.drill.exec.cache.CachedVectorContainer; import org.apache.drill.exec.cache.DistributedCache.CacheConfig; import org.apache.drill.exec.cache.DistributedCache.SerializationMode; import org.apache.drill.exec.coord.DistributedSemaphore; @@ -70,7 +68,6 @@ import org.apache.drill.exec.rpc.RpcException; import org.apache.drill.exec.rpc.RpcOutcomeListener; import org.apache.drill.exec.rpc.user.UserServer.UserClientConnection; import org.apache.drill.exec.server.DrillbitContext; -import org.apache.drill.exec.server.options.OptionManager; import org.apache.drill.exec.util.AtomicState; import org.apache.drill.exec.util.Pointer; import org.apache.drill.exec.work.ErrorHelper; @@ -130,6 +127,7 @@ public class Foreman implements Runnable, Closeable, Comparable<Object>{ this.bee = bee; this.state = new AtomicState<QueryState>(QueryState.PENDING) { + @Override protected QueryState getStateFromNumber(int i) { return QueryState.valueOf(i); } http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/FragmentStatusListener.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/FragmentStatusListener.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/FragmentStatusListener.java index afc8d79..6a719d2 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/FragmentStatusListener.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/FragmentStatusListener.java @@ -21,6 +21,6 @@ import org.apache.drill.exec.proto.BitControl.FragmentStatus; public interface FragmentStatusListener { static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(FragmentStatusListener.class); - + public void statusUpdate(FragmentStatus status); } http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java index 4e1ca22..083dd95 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java @@ -25,7 +25,6 @@ import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import org.apache.drill.common.exceptions.ExecutionSetupException; -import org.apache.drill.exec.cache.DistributedCache; import org.apache.drill.exec.ops.FragmentContext; import org.apache.drill.exec.physical.base.FragmentRoot; import org.apache.drill.exec.proto.BitControl.FragmentStatus; @@ -39,7 +38,6 @@ import org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState; import org.apache.drill.exec.proto.UserProtos.RunQuery; import org.apache.drill.exec.rpc.RpcException; import org.apache.drill.exec.rpc.RpcOutcomeListener; -import org.apache.drill.exec.rpc.control.ControlTunnel; import org.apache.drill.exec.rpc.control.Controller; import org.apache.drill.exec.rpc.control.WorkEventBus; import org.apache.drill.exec.rpc.user.UserServer.UserClientConnection; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryStatus.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryStatus.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryStatus.java index 62293fc..f89cec9 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryStatus.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryStatus.java @@ -17,12 +17,10 @@ */ package org.apache.drill.exec.work.foreman; -import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.List; + import org.apache.drill.common.exceptions.DrillRuntimeException; -import org.apache.drill.exec.cache.DistributedCache; -import org.apache.drill.exec.cache.DistributedCache.CacheConfig; -import org.apache.drill.exec.cache.DistributedCache.SerializationMode; -import org.apache.drill.exec.cache.DistributedMap; import org.apache.drill.exec.proto.BitControl.FragmentStatus; import org.apache.drill.exec.proto.SchemaUserBitShared; import org.apache.drill.exec.proto.UserBitShared.MajorFragmentProfile; @@ -31,17 +29,12 @@ import org.apache.drill.exec.proto.UserBitShared.QueryProfile; import org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState; import org.apache.drill.exec.proto.UserProtos.RunQuery; import org.apache.drill.exec.proto.helper.QueryIdHelper; - -import com.carrotsearch.hppc.IntObjectOpenHashMap; import org.apache.drill.exec.store.sys.PStore; import org.apache.drill.exec.store.sys.PStoreConfig; import org.apache.drill.exec.store.sys.PStoreProvider; -import org.apache.drill.exec.work.foreman.Foreman.ForemanManagerListener; -import java.io.IOException; -import java.util.HashSet; -import java.util.List; -import java.util.Set; +import com.carrotsearch.hppc.IntObjectOpenHashMap; +import com.google.common.collect.Lists; public class QueryStatus { static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(QueryStatus.class); @@ -133,6 +126,7 @@ public class QueryStatus { profileCache.put(queryId, getAsProfile(fullStatus)); } + @Override public String toString(){ return fragmentDataMap.toString(); } @@ -182,6 +176,7 @@ public class QueryStatus { return true; } + @Override public String toString(){ return major + ":" + minor; } http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/RootStatusReporter.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/RootStatusReporter.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/RootStatusReporter.java index 6c7694a..8c98296 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/RootStatusReporter.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/RootStatusReporter.java @@ -25,7 +25,7 @@ import org.apache.drill.exec.work.fragment.AbstractStatusReporter; public class RootStatusReporter extends AbstractStatusReporter{ QueryManager runningFragmentManager; - + private RootStatusReporter(FragmentContext context){ super(context); } @@ -35,5 +35,5 @@ public class RootStatusReporter extends AbstractStatusReporter{ runningFragmentManager.statusUpdate(status); } - + } http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/FragmentManager.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/FragmentManager.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/FragmentManager.java index 68849ff..2ff2ed4 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/FragmentManager.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/FragmentManager.java @@ -22,7 +22,6 @@ import org.apache.drill.exec.ops.FragmentContext; import org.apache.drill.exec.proto.ExecProtos.FragmentHandle; import org.apache.drill.exec.record.RawFragmentBatch; import org.apache.drill.exec.rpc.RemoteConnection; -import org.apache.drill.exec.rpc.ResponseSender; /** * The Fragment Manager is responsible managing incoming data and executing a fragment. Once enough data and resources http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/NonRootFragmentManager.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/NonRootFragmentManager.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/NonRootFragmentManager.java index 48d1466..02dec0a 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/NonRootFragmentManager.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/NonRootFragmentManager.java @@ -23,18 +23,12 @@ import java.util.concurrent.CopyOnWriteArrayList; import org.apache.drill.common.exceptions.ExecutionSetupException; import org.apache.drill.exec.exception.FragmentSetupException; -import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry; import org.apache.drill.exec.ops.FragmentContext; -import org.apache.drill.exec.physical.base.FragmentLeaf; import org.apache.drill.exec.physical.base.FragmentRoot; -import org.apache.drill.exec.physical.impl.ImplCreator; -import org.apache.drill.exec.physical.impl.RootExec; -import org.apache.drill.exec.planner.PhysicalPlanReader; import org.apache.drill.exec.proto.BitControl.PlanFragment; import org.apache.drill.exec.proto.ExecProtos.FragmentHandle; import org.apache.drill.exec.record.RawFragmentBatch; import org.apache.drill.exec.rpc.RemoteConnection; -import org.apache.drill.exec.rpc.ResponseSender; import org.apache.drill.exec.server.DrillbitContext; import org.apache.drill.exec.work.WorkManager.WorkerBee; import org.apache.drill.exec.work.batch.IncomingBuffers; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/NonRootStatusReporter.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/NonRootStatusReporter.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/NonRootStatusReporter.java index 3534500..71da12b 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/NonRootStatusReporter.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/NonRootStatusReporter.java @@ -23,22 +23,22 @@ import org.apache.drill.exec.proto.ExecProtos.FragmentHandle; import org.apache.drill.exec.rpc.control.ControlTunnel; /** - * For all non root fragments, status will be reported back to the foreman through a control tunnel. + * For all non root fragments, status will be reported back to the foreman through a control tunnel. */ public class NonRootStatusReporter extends AbstractStatusReporter{ static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(NonRootStatusReporter.class); - + private final ControlTunnel tunnel; public NonRootStatusReporter(FragmentContext context, ControlTunnel tunnel) { super(context); this.tunnel = tunnel; } - + @Override protected void statusChange(FragmentHandle handle, FragmentStatus status) { logger.debug("Sending status change message message to remote node: " + status); tunnel.sendFragmentStatus(status); } - + } http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/RootFragmentManager.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/RootFragmentManager.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/RootFragmentManager.java index 4b9ee52..75dd923 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/RootFragmentManager.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/RootFragmentManager.java @@ -25,7 +25,6 @@ import org.apache.drill.exec.ops.FragmentContext; import org.apache.drill.exec.proto.ExecProtos.FragmentHandle; import org.apache.drill.exec.record.RawFragmentBatch; import org.apache.drill.exec.rpc.RemoteConnection; -import org.apache.drill.exec.rpc.ResponseSender; import org.apache.drill.exec.work.batch.IncomingBuffers; public class RootFragmentManager implements FragmentManager{ http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/parquet/hadoop/CodecFactoryExposer.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/parquet/hadoop/CodecFactoryExposer.java b/exec/java-exec/src/main/java/parquet/hadoop/CodecFactoryExposer.java index 7868a53..d6584bb 100644 --- a/exec/java-exec/src/main/java/parquet/hadoop/CodecFactoryExposer.java +++ b/exec/java-exec/src/main/java/parquet/hadoop/CodecFactoryExposer.java @@ -17,6 +17,8 @@ */ package parquet.hadoop; +import io.netty.buffer.ByteBuf; + import java.io.IOException; import java.io.OutputStream; import java.nio.ByteBuffer; @@ -25,15 +27,13 @@ import java.nio.channels.WritableByteChannel; import java.util.HashMap; import java.util.Map; -import io.netty.buffer.ByteBuf; import org.apache.drill.common.exceptions.DrillRuntimeException; import org.apache.hadoop.conf.Configuration; - import org.apache.hadoop.io.compress.CompressionCodec; import org.apache.hadoop.io.compress.DirectDecompressionCodec; import org.apache.hadoop.util.ReflectionUtils; + import parquet.bytes.BytesInput; -import parquet.hadoop.CodecFactory.BytesDecompressor; import parquet.hadoop.metadata.CompressionCodecName; public class CodecFactoryExposer{ @@ -115,6 +115,7 @@ public class CodecFactoryExposer{ this.length = length; } + @Override public void writeAllTo(OutputStream out) throws IOException { final WritableByteChannel outputChannel = Channels.newChannel(out); byteBuf.position(offset); @@ -123,6 +124,7 @@ public class CodecFactoryExposer{ outputChannel.write(tempBuf); } + @Override public ByteBuffer toByteBuffer() throws IOException { byteBuf.position(offset); ByteBuffer buf = byteBuf.slice(); @@ -130,6 +132,7 @@ public class CodecFactoryExposer{ return buf; } + @Override public long size() { return length; } http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/parquet/hadoop/ColumnChunkIncReadStore.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/parquet/hadoop/ColumnChunkIncReadStore.java b/exec/java-exec/src/main/java/parquet/hadoop/ColumnChunkIncReadStore.java index 50107ac..2a3124c 100644 --- a/exec/java-exec/src/main/java/parquet/hadoop/ColumnChunkIncReadStore.java +++ b/exec/java-exec/src/main/java/parquet/hadoop/ColumnChunkIncReadStore.java @@ -18,12 +18,20 @@ package parquet.hadoop; import io.netty.buffer.ByteBuf; + +import java.io.IOException; +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import org.apache.drill.exec.memory.BufferAllocator; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; -import org.apache.hadoop.io.compress.Decompressor; + import parquet.bytes.BytesInput; import parquet.column.ColumnDescriptor; import parquet.column.page.DictionaryPage; @@ -31,21 +39,12 @@ import parquet.column.page.Page; import parquet.column.page.PageReadStore; import parquet.column.page.PageReader; import parquet.format.PageHeader; -import parquet.format.PageType; import parquet.format.Util; import parquet.format.converter.ParquetMetadataConverter; import parquet.hadoop.CodecFactory.BytesDecompressor; import parquet.hadoop.metadata.ColumnChunkMetaData; -import parquet.hadoop.metadata.FileMetaData; import parquet.hadoop.util.CompatibilityUtil; -import java.io.IOException; -import java.nio.ByteBuffer; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - public class ColumnChunkIncReadStore implements PageReadStore { http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/main/java/parquet/hadoop/ColumnChunkPageWriteStoreExposer.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/parquet/hadoop/ColumnChunkPageWriteStoreExposer.java b/exec/java-exec/src/main/java/parquet/hadoop/ColumnChunkPageWriteStoreExposer.java index 0ffc3ba..0e9dec0 100644 --- a/exec/java-exec/src/main/java/parquet/hadoop/ColumnChunkPageWriteStoreExposer.java +++ b/exec/java-exec/src/main/java/parquet/hadoop/ColumnChunkPageWriteStoreExposer.java @@ -17,16 +17,17 @@ */ package parquet.hadoop; +import java.io.IOException; + import org.apache.drill.exec.ops.OperatorContext; import org.apache.drill.exec.store.parquet.ParquetDirectByteBufferAllocator; import org.apache.hadoop.conf.Configuration; + import parquet.column.page.PageWriteStore; import parquet.hadoop.CodecFactory.BytesCompressor; import parquet.hadoop.metadata.CompressionCodecName; import parquet.schema.MessageType; -import java.io.IOException; - public class ColumnChunkPageWriteStoreExposer { public static ColumnChunkPageWriteStore newColumnChunkPageWriteStore(OperatorContext oContext, http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/ParquetSchemaMerge.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/ParquetSchemaMerge.java b/exec/java-exec/src/test/java/org/apache/drill/ParquetSchemaMerge.java index af38d08..f9cfdb5 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/ParquetSchemaMerge.java +++ b/exec/java-exec/src/test/java/org/apache/drill/ParquetSchemaMerge.java @@ -21,7 +21,6 @@ import parquet.schema.GroupType; import parquet.schema.MessageType; import parquet.schema.PrimitiveType; import parquet.schema.PrimitiveType.PrimitiveTypeName; -import parquet.schema.Type; import parquet.schema.Type.Repetition; public class ParquetSchemaMerge { http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/PlanningBase.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/PlanningBase.java b/exec/java-exec/src/test/java/org/apache/drill/PlanningBase.java index f01a706..aca7d06 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/PlanningBase.java +++ b/exec/java-exec/src/test/java/org/apache/drill/PlanningBase.java @@ -17,15 +17,14 @@ */ package org.apache.drill; -import com.codahale.metrics.MetricRegistry; -import com.google.common.base.Charsets; -import com.google.common.collect.ImmutableList; -import com.google.common.io.Resources; +import java.io.IOException; +import java.net.URL; + import mockit.Mocked; import mockit.NonStrictExpectations; import net.hydromatic.optiq.SchemaPlus; import net.hydromatic.optiq.jdbc.SimpleOptiqSchema; -import net.hydromatic.optiq.tools.Frameworks; + import org.apache.drill.common.config.DrillConfig; import org.apache.drill.common.util.TestTools; import org.apache.drill.exec.ExecTest; @@ -49,8 +48,10 @@ import org.apache.drill.exec.store.sys.local.LocalPStoreProvider; import org.junit.Rule; import org.junit.rules.TestRule; -import java.io.IOException; -import java.net.URL; +import com.codahale.metrics.MetricRegistry; +import com.google.common.base.Charsets; +import com.google.common.collect.ImmutableList; +import com.google.common.io.Resources; public class PlanningBase extends ExecTest{ static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(PlanningBase.class); http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/TestAltSortQueries.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestAltSortQueries.java b/exec/java-exec/src/test/java/org/apache/drill/TestAltSortQueries.java index de1b49a..5768908 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/TestAltSortQueries.java +++ b/exec/java-exec/src/test/java/org/apache/drill/TestAltSortQueries.java @@ -17,12 +17,7 @@ */ package org.apache.drill; -import org.apache.drill.common.util.TestTools; -import org.apache.drill.exec.client.QuerySubmitter; -import org.junit.Rule; import org.junit.Test; -import org.junit.rules.TestRule; -import org.junit.Ignore; public class TestAltSortQueries extends BaseTestQuery{ static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TestAltSortQueries.class); http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java b/exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java index 58a1813..c54772f 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java +++ b/exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java @@ -19,7 +19,6 @@ package org.apache.drill; import org.apache.drill.common.util.FileUtils; import org.apache.drill.exec.rpc.RpcException; -import org.junit.Ignore; import org.junit.Test; public class TestExampleQueries extends BaseTestQuery{ @@ -31,7 +30,7 @@ public class TestExampleQueries extends BaseTestQuery{ test("select * from cp.`parquet/complex.parquet`"); test("select recipe, c.inventor.name as name, c.inventor.age as age from cp.`parquet/complex.parquet` c"); } - + @Test // see DRILL-553 public void testQueryWithNullValues() throws Exception { test("select count(*) from cp.`customer.json` limit 1"); @@ -111,8 +110,8 @@ public class TestExampleQueries extends BaseTestQuery{ } @Test // DRILL-1293 - public void testStarView1() throws Exception { - test("use dfs.tmp"); + public void testStarView1() throws Exception { + test("use dfs.tmp"); test("create view vt1 as select * from cp.`tpch/region.parquet` r, cp.`tpch/nation.parquet` n where r.r_regionkey = n.n_regionkey"); test("select * from vt1"); test("drop view vt1"); @@ -313,7 +312,7 @@ public class TestExampleQueries extends BaseTestQuery{ test("select n.n_nationkey from cp.`tpch/nation.parquet` n, cp.`tpch/region.parquet` r where n.n_regionkey = r.r_regionkey limit 0"); test("select n_regionkey, count(*) from cp.`tpch/nation.parquet` group by n_regionkey limit 0"); } - + @Test public void testTextJoin() throws Exception { String root = FileUtils.getResourceAsFile("/store/text/data/nations.csv").toURI().toString(); http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/TestProjectPushDown.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestProjectPushDown.java b/exec/java-exec/src/test/java/org/apache/drill/TestProjectPushDown.java index 8520b9b..e45b248 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/TestProjectPushDown.java +++ b/exec/java-exec/src/test/java/org/apache/drill/TestProjectPushDown.java @@ -18,8 +18,6 @@ package org.apache.drill; -import java.util.List; - import org.junit.Ignore; import org.junit.Test; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/TestTpchDistributed.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestTpchDistributed.java b/exec/java-exec/src/test/java/org/apache/drill/TestTpchDistributed.java index adf5778..254d9be 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/TestTpchDistributed.java +++ b/exec/java-exec/src/test/java/org/apache/drill/TestTpchDistributed.java @@ -132,7 +132,7 @@ public class TestTpchDistributed extends BaseTestQuery{ public void tpch19_1() throws Exception{ testDistributed("queries/tpch/19_1.sql"); } - + @Test public void tpch20() throws Exception{ testDistributed("queries/tpch/20.sql"); http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/TestUnionAll.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestUnionAll.java b/exec/java-exec/src/test/java/org/apache/drill/TestUnionAll.java index c21298e..bf0eea0 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/TestUnionAll.java +++ b/exec/java-exec/src/test/java/org/apache/drill/TestUnionAll.java @@ -17,46 +17,45 @@ */ package org.apache.drill; -import org.junit.Ignore; import org.junit.Test; public class TestUnionAll extends BaseTestQuery{ static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TestUnionAll.class); - + @Test // Simple Union-All over two scans public void testUnionAll1() throws Exception { - test("select n_regionkey from cp.`tpch/nation.parquet` union all select r_regionkey from cp.`tpch/region.parquet`"); + test("select n_regionkey from cp.`tpch/nation.parquet` union all select r_regionkey from cp.`tpch/region.parquet`"); } @Test // Union-All over inner joins public void testUnionAll2() throws Exception { test("select n1.n_nationkey from cp.`tpch/nation.parquet` n1 inner join cp.`tpch/region.parquet` r1 on n1.n_regionkey = r1.r_regionkey where n1.n_nationkey in (1, 2) union all select n2.n_nationkey from cp.`tpch/nation.parquet` n2 inner join cp.`tpch/region.parquet` r2 on n2.n_regionkey = r2.r_regionkey where n2.n_nationkey in (3, 4)"); } - + @Test // Union-All over grouped aggregates public void testUnionAll3() throws Exception { test("select n1.n_nationkey from cp.`tpch/nation.parquet` n1 where n1.n_nationkey in (1, 2) group by n1.n_nationkey union all select r1.r_regionkey from cp.`tpch/region.parquet` r1 group by r1.r_regionkey"); } - + @Test // Chain of Union-Alls public void testUnionAll4() throws Exception { - test("select n_regionkey from cp.`tpch/nation.parquet` union all select r_regionkey from cp.`tpch/region.parquet` union all select n_nationkey from cp.`tpch/nation.parquet` union all select c_custkey from cp.`tpch/customer.parquet` where c_custkey < 5"); + test("select n_regionkey from cp.`tpch/nation.parquet` union all select r_regionkey from cp.`tpch/region.parquet` union all select n_nationkey from cp.`tpch/nation.parquet` union all select c_custkey from cp.`tpch/customer.parquet` where c_custkey < 5"); } - + @Test // Union-All of all columns in the table public void testUnionAll5() throws Exception { test("select * from cp.`tpch/region.parquet` r1 union all select * from cp.`tpch/region.parquet` r2"); } - + @Test // Union-All where same column is projected twice in right child public void testUnionAll6() throws Exception { test("select n_nationkey, n_regionkey from cp.`tpch/nation.parquet` where n_regionkey = 1 union all select r_regionkey, r_regionkey from cp.`tpch/region.parquet` where r_regionkey = 2"); - } - + } + @Test // Union-All where same column is projected twice in left and right child public void testUnionAll6_1() throws Exception { test("select n_nationkey, n_nationkey from cp.`tpch/nation.parquet` union all select r_regionkey, r_regionkey from cp.`tpch/region.parquet`"); - } + } @Test // Union-all of two string literals of different lengths public void testUnionAll7() throws Exception { @@ -65,8 +64,8 @@ public class TestUnionAll extends BaseTestQuery{ @Test // Union-all of two character columns of different lengths public void testUnionAll8() throws Exception { - test("select n_name from cp.`tpch/nation.parquet` union all select r_comment from cp.`tpch/region.parquet`"); + test("select n_name from cp.`tpch/nation.parquet` union all select r_comment from cp.`tpch/region.parquet`"); } - - + + } http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/exec/DrillSystemTestBase.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/DrillSystemTestBase.java b/exec/java-exec/src/test/java/org/apache/drill/exec/DrillSystemTestBase.java index dee865e..75ba3a9 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/DrillSystemTestBase.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/DrillSystemTestBase.java @@ -19,15 +19,11 @@ package org.apache.drill.exec; import static com.google.common.base.Throwables.propagate; -import java.io.File; -import java.io.IOException; import java.util.List; import org.apache.drill.common.config.DrillConfig; import org.apache.drill.exec.exception.DrillbitStartupException; import org.apache.drill.exec.server.Drillbit; -import org.apache.drill.exec.util.MiniZooKeeperCluster; -import org.junit.BeforeClass; import org.slf4j.Logger; import com.google.common.collect.ImmutableList; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/exec/SortTest.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/SortTest.java b/exec/java-exec/src/test/java/org/apache/drill/exec/SortTest.java index 7cdf969..0a3ad74 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/SortTest.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/SortTest.java @@ -27,10 +27,10 @@ public class SortTest { private static final int RECORD_COUNT = 10*1000*1000; private static final int KEY_SIZE = 10; private static final int DATA_SIZE = 90; - private static final int RECORD_SIZE = KEY_SIZE + DATA_SIZE; - + private static final int RECORD_SIZE = KEY_SIZE + DATA_SIZE; + private byte[] data; - + public static void main(String[] args) throws Exception{ for(int i =0; i < 100; i++){ SortTest st = new SortTest(); @@ -40,7 +40,7 @@ public class SortTest { System.out.println(" ns."); } } - + SortTest(){ System.out.print("Generating data... "); data = new byte[RECORD_SIZE*RECORD_COUNT]; @@ -48,7 +48,7 @@ public class SortTest { r.nextBytes(data); System.out.print("Data generated. "); } - + public long doSort(){ QuickSort qs = new QuickSort(); ByteSortable b = new ByteSortable(); @@ -56,11 +56,11 @@ public class SortTest { qs.sort(b, 0, RECORD_COUNT); return System.nanoTime() - nano; } - + private class ByteSortable implements IndexedSortable{ final byte[] space = new byte[RECORD_SIZE]; final BytesWritable.Comparator comparator = new BytesWritable.Comparator(); - + @Override public int compare(int index1, int index2) { return comparator.compare(data, index1*RECORD_SIZE, KEY_SIZE, data, index2*RECORD_SIZE, KEY_SIZE); http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/exec/TestQueriesOnLargeFile.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/TestQueriesOnLargeFile.java b/exec/java-exec/src/test/java/org/apache/drill/exec/TestQueriesOnLargeFile.java index ec6c251..67b102d 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/TestQueriesOnLargeFile.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/TestQueriesOnLargeFile.java @@ -18,10 +18,14 @@ package org.apache.drill.exec; -import com.google.common.base.Charsets; -import com.google.common.io.Files; -import org.apache.drill.common.util.FileUtils; +import static org.junit.Assert.assertTrue; + +import java.io.File; +import java.io.PrintWriter; +import java.util.List; + import org.apache.drill.BaseTestQuery; +import org.apache.drill.common.util.FileUtils; import org.apache.drill.exec.record.RecordBatchLoader; import org.apache.drill.exec.rpc.user.QueryResultBatch; import org.apache.drill.exec.vector.BigIntVector; @@ -29,11 +33,8 @@ import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; -import java.io.File; -import java.io.PrintWriter; -import java.util.List; - -import static org.junit.Assert.assertTrue; +import com.google.common.base.Charsets; +import com.google.common.io.Files; public class TestQueriesOnLargeFile extends BaseTestQuery { static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TestQueriesOnLargeFile.class); http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/exec/cache/TestCacheSerialization.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/cache/TestCacheSerialization.java b/exec/java-exec/src/test/java/org/apache/drill/exec/cache/TestCacheSerialization.java index d548f6a..d507913 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/cache/TestCacheSerialization.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/cache/TestCacheSerialization.java @@ -20,7 +20,6 @@ package org.apache.drill.exec.cache; import java.util.List; import org.apache.drill.common.config.DrillConfig; -import org.apache.drill.common.expression.ExpressionPosition; import org.apache.drill.common.expression.SchemaPath; import org.apache.drill.common.types.TypeProtos; import org.apache.drill.common.types.Types; @@ -38,7 +37,6 @@ import org.apache.drill.exec.record.VectorAccessible; import org.apache.drill.exec.record.VectorContainer; import org.apache.drill.exec.record.VectorWrapper; import org.apache.drill.exec.record.WritableBatch; -import org.apache.drill.exec.server.RemoteServiceSet; import org.apache.drill.exec.server.options.OptionValue; import org.apache.drill.exec.server.options.OptionValue.OptionType; import org.apache.drill.exec.vector.AllocationHelper; @@ -51,7 +49,6 @@ import org.junit.BeforeClass; import org.junit.Test; import com.google.common.collect.Lists; -import com.google.common.collect.Maps; public class TestCacheSerialization extends ExecTest { http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/exec/client/DumpCatTest.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/client/DumpCatTest.java b/exec/java-exec/src/test/java/org/apache/drill/exec/client/DumpCatTest.java index e678c29..f4f4966 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/client/DumpCatTest.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/client/DumpCatTest.java @@ -26,8 +26,8 @@ import mockit.NonStrictExpectations; import org.apache.drill.common.config.DrillConfig; import org.apache.drill.common.util.FileUtils; -import org.apache.drill.exec.ExecTest; import org.apache.drill.exec.ExecConstants; +import org.apache.drill.exec.ExecTest; import org.apache.drill.exec.compile.CodeCompiler; import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry; import org.apache.drill.exec.memory.TopLevelAllocator; @@ -47,7 +47,6 @@ import org.apache.drill.exec.server.DrillbitContext; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; -import org.junit.AfterClass; import org.junit.Test; import com.codahale.metrics.MetricRegistry; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/exec/compile/ExampleTemplate.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/compile/ExampleTemplate.java b/exec/java-exec/src/test/java/org/apache/drill/exec/compile/ExampleTemplate.java index 0011905..4fc5b3a 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/compile/ExampleTemplate.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/compile/ExampleTemplate.java @@ -24,7 +24,7 @@ public abstract class ExampleTemplate implements ExampleExternalInterface{ public final String getData() { return this.getInternalData(); } - + abstract String getInternalData(); - + } http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/exec/compile/ExampleTemplateWithInner.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/compile/ExampleTemplateWithInner.java b/exec/java-exec/src/test/java/org/apache/drill/exec/compile/ExampleTemplateWithInner.java index 418d714..f80ca36 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/compile/ExampleTemplateWithInner.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/compile/ExampleTemplateWithInner.java @@ -21,30 +21,30 @@ import org.apache.drill.exec.compile.sig.RuntimeOverridden; public abstract class ExampleTemplateWithInner implements ExampleInner{ static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ExampleTemplateWithInner.class); - + public abstract void doOutside(); public class TheInnerClass{ - + @RuntimeOverridden public void doInside(){}; - - + + public void doDouble(){ DoubleInner di = new DoubleInner(); di.doDouble(); } - + public class DoubleInner{ @RuntimeOverridden public void doDouble(){}; } - + } - + public void doInsideOutside(){ TheInnerClass inner = new TheInnerClass(); inner.doInside(); inner.doDouble(); } - + } http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/exec/expr/ExpressionTest.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/expr/ExpressionTest.java b/exec/java-exec/src/test/java/org/apache/drill/exec/expr/ExpressionTest.java index 392af18..2311cfd 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/expr/ExpressionTest.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/expr/ExpressionTest.java @@ -46,7 +46,6 @@ import org.apache.drill.exec.record.TypedFieldId; import org.apache.drill.exec.record.VectorWrapper; import org.apache.drill.exec.vector.IntVector; import org.apache.drill.exec.vector.ValueVector; -import org.junit.AfterClass; import org.junit.Test; public class ExpressionTest extends ExecTest { http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestByteComparisonFunctions.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestByteComparisonFunctions.java b/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestByteComparisonFunctions.java index 632f5a4..5ec162d 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestByteComparisonFunctions.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestByteComparisonFunctions.java @@ -17,7 +17,7 @@ */ package org.apache.drill.exec.fn.impl; -import static org.junit.Assert.*; +import static org.junit.Assert.assertTrue; import org.apache.drill.common.config.DrillConfig; import org.apache.drill.exec.ExecTest; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestMultiInputAdd.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestMultiInputAdd.java b/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestMultiInputAdd.java index 8e6813c..9b8070b 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestMultiInputAdd.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestMultiInputAdd.java @@ -18,18 +18,16 @@ package org.apache.drill.exec.fn.impl; -import com.codahale.metrics.MetricRegistry; -import com.google.common.base.Charsets; -import com.google.common.io.Files; +import static org.junit.Assert.assertTrue; + +import java.util.List; + import mockit.Injectable; -import mockit.NonStrictExpectations; + import org.apache.drill.common.config.DrillConfig; -import org.apache.drill.common.expression.ExpressionPosition; -import org.apache.drill.common.expression.SchemaPath; import org.apache.drill.common.util.FileUtils; import org.apache.drill.exec.client.DrillClient; import org.apache.drill.exec.pop.PopUnitTestBase; -import org.apache.drill.exec.proto.UserProtos; import org.apache.drill.exec.record.RecordBatchLoader; import org.apache.drill.exec.record.VectorWrapper; import org.apache.drill.exec.rpc.user.QueryResultBatch; @@ -37,14 +35,11 @@ import org.apache.drill.exec.rpc.user.UserServer; import org.apache.drill.exec.server.Drillbit; import org.apache.drill.exec.server.DrillbitContext; import org.apache.drill.exec.server.RemoteServiceSet; -import org.apache.drill.exec.vector.IntVector; -import org.apache.drill.exec.vector.Float8Vector; import org.apache.drill.exec.vector.ValueVector; import org.junit.Test; -import java.util.List; - -import static org.junit.Assert.assertTrue; +import com.google.common.base.Charsets; +import com.google.common.io.Files; public class TestMultiInputAdd extends PopUnitTestBase { http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestNewMathFunctions.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestNewMathFunctions.java b/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestNewMathFunctions.java index 3d41f0b..28e667e 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestNewMathFunctions.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestNewMathFunctions.java @@ -37,8 +37,8 @@ import org.apache.drill.exec.physical.impl.ImplCreator; import org.apache.drill.exec.physical.impl.OperatorCreatorRegistry; import org.apache.drill.exec.physical.impl.SimpleRootExec; import org.apache.drill.exec.planner.PhysicalPlanReader; -import org.apache.drill.exec.proto.CoordinationProtos; import org.apache.drill.exec.proto.BitControl.PlanFragment; +import org.apache.drill.exec.proto.CoordinationProtos; import org.apache.drill.exec.rpc.user.UserServer; import org.apache.drill.exec.server.DrillbitContext; import org.apache.drill.exec.vector.ValueVector; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestRepeatedFunction.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestRepeatedFunction.java b/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestRepeatedFunction.java index fd71dd9..73c7508 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestRepeatedFunction.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestRepeatedFunction.java @@ -43,7 +43,6 @@ import org.apache.drill.exec.rpc.user.UserServer.UserClientConnection; import org.apache.drill.exec.server.DrillbitContext; import org.apache.drill.exec.vector.BitVector; import org.apache.drill.exec.vector.IntVector; -import org.junit.AfterClass; import org.junit.Test; import com.codahale.metrics.MetricRegistry; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/exec/memory/TestEndianess.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/memory/TestEndianess.java b/exec/java-exec/src/test/java/org/apache/drill/exec/memory/TestEndianess.java index d94b53a..48ddada 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/memory/TestEndianess.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/memory/TestEndianess.java @@ -21,7 +21,6 @@ import static org.junit.Assert.assertEquals; import io.netty.buffer.ByteBuf; import org.apache.drill.exec.ExecTest; -import org.apache.drill.exec.memory.TopLevelAllocator; import org.junit.Test; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/SimpleRootExec.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/SimpleRootExec.java b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/SimpleRootExec.java index db8ff8e..a15b503 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/SimpleRootExec.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/SimpleRootExec.java @@ -25,7 +25,6 @@ import org.apache.drill.exec.ops.FragmentContext; import org.apache.drill.exec.physical.impl.ScreenCreator.ScreenRoot; import org.apache.drill.exec.proto.ExecProtos.FragmentHandle; import org.apache.drill.exec.record.RecordBatch; -import org.apache.drill.exec.record.RecordBatch.IterOutcome; import org.apache.drill.exec.record.TypedFieldId; import org.apache.drill.exec.record.VectorWrapper; import org.apache.drill.exec.record.selection.SelectionVector2; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastFunctions.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastFunctions.java b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastFunctions.java index 457e0b1..0d9f014 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastFunctions.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastFunctions.java @@ -48,7 +48,6 @@ import org.apache.drill.exec.planner.PhysicalPlanReader; import org.apache.drill.exec.pop.PopUnitTestBase; import org.apache.drill.exec.proto.BitControl.PlanFragment; import org.apache.drill.exec.proto.CoordinationProtos; -import org.apache.drill.exec.proto.UserProtos; import org.apache.drill.exec.record.RecordBatchLoader; import org.apache.drill.exec.record.VectorAccessible; import org.apache.drill.exec.record.VectorWrapper; @@ -63,7 +62,6 @@ import org.apache.drill.exec.vector.Float8Vector; import org.apache.drill.exec.vector.IntVector; import org.apache.drill.exec.vector.VarBinaryVector; import org.apache.drill.exec.vector.VarCharVector; -import org.junit.After; import org.junit.Test; import com.codahale.metrics.MetricRegistry; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastVarCharToBigInt.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastVarCharToBigInt.java b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastVarCharToBigInt.java index c0fd23a..dcc2fde 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastVarCharToBigInt.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestCastVarCharToBigInt.java @@ -25,13 +25,11 @@ import java.util.List; import org.apache.drill.common.util.FileUtils; import org.apache.drill.exec.client.DrillClient; import org.apache.drill.exec.pop.PopUnitTestBase; -import org.apache.drill.exec.proto.UserProtos; import org.apache.drill.exec.record.RecordBatchLoader; import org.apache.drill.exec.record.VectorWrapper; import org.apache.drill.exec.rpc.user.QueryResultBatch; import org.apache.drill.exec.server.Drillbit; import org.apache.drill.exec.server.RemoteServiceSet; -import org.apache.drill.exec.vector.NullableBigIntVector; import org.apache.drill.exec.vector.ValueVector; import org.junit.Test; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctions.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctions.java b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctions.java index da018c3..421c3f5 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctions.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestComparisonFunctions.java @@ -17,10 +17,8 @@ */ package org.apache.drill.exec.physical.impl; -import com.google.common.base.Charsets; -import com.google.common.io.Resources; -import com.codahale.metrics.MetricRegistry; - +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import mockit.Injectable; import mockit.NonStrictExpectations; @@ -28,23 +26,20 @@ import org.apache.drill.common.config.DrillConfig; import org.apache.drill.exec.ExecTest; import org.apache.drill.exec.compile.CodeCompiler; import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry; -import org.apache.drill.exec.memory.BufferAllocator; import org.apache.drill.exec.memory.TopLevelAllocator; import org.apache.drill.exec.ops.FragmentContext; import org.apache.drill.exec.physical.PhysicalPlan; import org.apache.drill.exec.physical.base.FragmentRoot; import org.apache.drill.exec.planner.PhysicalPlanReader; -import org.apache.drill.exec.proto.CoordinationProtos; -import org.apache.drill.exec.proto.ExecProtos; import org.apache.drill.exec.proto.BitControl.PlanFragment; +import org.apache.drill.exec.proto.CoordinationProtos; import org.apache.drill.exec.rpc.user.UserServer; import org.apache.drill.exec.server.DrillbitContext; -import org.apache.drill.exec.vector.ValueVector; -import org.junit.AfterClass; import org.junit.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import com.codahale.metrics.MetricRegistry; +import com.google.common.base.Charsets; +import com.google.common.io.Resources; public class TestComparisonFunctions extends ExecTest { static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TestComparisonFunctions.class); http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestDecimal.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestDecimal.java b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestDecimal.java index 489336a..780e20e 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestDecimal.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestDecimal.java @@ -27,14 +27,12 @@ import org.apache.drill.common.config.DrillConfig; import org.apache.drill.common.util.FileUtils; import org.apache.drill.exec.client.DrillClient; import org.apache.drill.exec.pop.PopUnitTestBase; -import org.apache.drill.exec.proto.UserProtos; import org.apache.drill.exec.record.RecordBatchLoader; import org.apache.drill.exec.record.VectorWrapper; import org.apache.drill.exec.rpc.user.QueryResultBatch; import org.apache.drill.exec.server.Drillbit; import org.apache.drill.exec.server.RemoteServiceSet; import org.apache.drill.exec.vector.ValueVector; -import org.junit.Ignore; import org.junit.Test; import com.google.common.base.Charsets; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestHashToRandomExchange.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestHashToRandomExchange.java b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestHashToRandomExchange.java index f769f1e..e3fca85 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestHashToRandomExchange.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestHashToRandomExchange.java @@ -24,11 +24,9 @@ import java.util.List; import org.apache.drill.common.util.FileUtils; import org.apache.drill.exec.client.DrillClient; import org.apache.drill.exec.pop.PopUnitTestBase; -import org.apache.drill.exec.proto.UserProtos; import org.apache.drill.exec.rpc.user.QueryResultBatch; import org.apache.drill.exec.server.Drillbit; import org.apache.drill.exec.server.RemoteServiceSet; -import org.junit.Ignore; import org.junit.Test; import com.google.common.base.Charsets; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestImplicitCastFunctions.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestImplicitCastFunctions.java b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestImplicitCastFunctions.java index 2ff99c8..13c9364 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestImplicitCastFunctions.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestImplicitCastFunctions.java @@ -36,7 +36,6 @@ import org.apache.drill.exec.proto.CoordinationProtos; import org.apache.drill.exec.rpc.user.UserServer; import org.apache.drill.exec.server.DrillbitContext; import org.apache.drill.exec.vector.ValueVector; -import org.junit.AfterClass; import org.junit.Test; import com.codahale.metrics.MetricRegistry; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestOptiqPlans.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestOptiqPlans.java b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestOptiqPlans.java index 93a387f..a62409b 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestOptiqPlans.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestOptiqPlans.java @@ -28,11 +28,9 @@ import org.apache.drill.common.util.FileUtils; import org.apache.drill.exec.ExecTest; import org.apache.drill.exec.cache.DistributedCache; import org.apache.drill.exec.client.DrillClient; -import org.apache.drill.exec.compile.CodeCompiler; import org.apache.drill.exec.coord.ClusterCoordinator; import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry; import org.apache.drill.exec.expr.holders.VarBinaryHolder; -import org.apache.drill.exec.memory.BufferAllocator; import org.apache.drill.exec.memory.TopLevelAllocator; import org.apache.drill.exec.ops.FragmentContext; import org.apache.drill.exec.ops.QueryContext; @@ -40,12 +38,10 @@ import org.apache.drill.exec.opt.BasicOptimizer; import org.apache.drill.exec.physical.PhysicalPlan; import org.apache.drill.exec.physical.base.FragmentRoot; import org.apache.drill.exec.planner.PhysicalPlanReader; -import org.apache.drill.exec.proto.CoordinationProtos; import org.apache.drill.exec.proto.BitControl.PlanFragment; +import org.apache.drill.exec.proto.CoordinationProtos; import org.apache.drill.exec.proto.CoordinationProtos.DrillbitEndpoint; -import org.apache.drill.exec.proto.ExecProtos.FragmentHandle; import org.apache.drill.exec.proto.UserBitShared.QueryId; -import org.apache.drill.exec.proto.UserProtos; import org.apache.drill.exec.record.RecordBatchLoader; import org.apache.drill.exec.record.VectorWrapper; import org.apache.drill.exec.rpc.control.Controller; @@ -62,7 +58,6 @@ import org.apache.drill.exec.store.StoragePluginRegistry; import org.apache.drill.exec.store.sys.local.LocalPStoreProvider; import org.apache.drill.exec.vector.ValueVector; import org.apache.drill.exec.vector.VarBinaryVector; -import org.junit.AfterClass; import org.junit.Ignore; import org.junit.Test; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestReverseImplicitCast.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestReverseImplicitCast.java b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestReverseImplicitCast.java index c8209ac..2880b18 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestReverseImplicitCast.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestReverseImplicitCast.java @@ -17,13 +17,17 @@ */ package org.apache.drill.exec.physical.impl; -import com.google.common.base.Charsets; -import com.google.common.io.Files; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.util.Iterator; +import java.util.List; + import mockit.Injectable; + import org.apache.drill.common.util.FileUtils; import org.apache.drill.exec.client.DrillClient; import org.apache.drill.exec.pop.PopUnitTestBase; -import org.apache.drill.exec.proto.UserProtos; import org.apache.drill.exec.record.RecordBatchLoader; import org.apache.drill.exec.record.VectorWrapper; import org.apache.drill.exec.rpc.user.QueryResultBatch; @@ -34,11 +38,8 @@ import org.apache.drill.exec.server.RemoteServiceSet; import org.apache.drill.exec.vector.ValueVector; import org.junit.Test; -import java.util.Iterator; -import java.util.List; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import com.google.common.base.Charsets; +import com.google.common.io.Files; public class TestReverseImplicitCast extends PopUnitTestBase { http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestStringFunctions.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestStringFunctions.java b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestStringFunctions.java index 2e60893..a48510f 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestStringFunctions.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestStringFunctions.java @@ -24,7 +24,6 @@ import mockit.NonStrictExpectations; import org.apache.drill.common.config.DrillConfig; import org.apache.drill.exec.ExecTest; -import org.apache.drill.exec.cache.local.LocalCache; import org.apache.drill.exec.compile.CodeCompiler; import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry; import org.apache.drill.exec.memory.TopLevelAllocator; @@ -36,8 +35,6 @@ import org.apache.drill.exec.proto.BitControl.PlanFragment; import org.apache.drill.exec.proto.CoordinationProtos; import org.apache.drill.exec.rpc.user.UserServer; import org.apache.drill.exec.server.DrillbitContext; -import org.apache.drill.exec.server.options.SystemOptionManager; -import org.apache.drill.exec.store.sys.local.LocalPStoreProvider; import org.apache.drill.exec.vector.ValueVector; import org.apache.drill.exec.vector.VarCharVector; import org.junit.Test; http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/39990292/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestUnionExchange.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestUnionExchange.java b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestUnionExchange.java index 6240e81..4ad215d 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestUnionExchange.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestUnionExchange.java @@ -17,20 +17,20 @@ */ package org.apache.drill.exec.physical.impl; -import com.google.common.base.Charsets; -import com.google.common.io.Files; +import static org.junit.Assert.assertEquals; + +import java.util.List; + import org.apache.drill.common.util.FileUtils; import org.apache.drill.exec.client.DrillClient; import org.apache.drill.exec.pop.PopUnitTestBase; -import org.apache.drill.exec.proto.UserProtos; import org.apache.drill.exec.rpc.user.QueryResultBatch; import org.apache.drill.exec.server.Drillbit; import org.apache.drill.exec.server.RemoteServiceSet; import org.junit.Test; -import java.util.List; - -import static org.junit.Assert.assertEquals; +import com.google.common.base.Charsets; +import com.google.common.io.Files; public class TestUnionExchange extends PopUnitTestBase {