You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by ja...@apache.org on 2015/11/13 03:38:12 UTC
[42/45] drill git commit: DRILL-3987: (CLEANUP) Final cleanups to get
complete working build/distribution
DRILL-3987: (CLEANUP) Final cleanups to get complete working build/distribution
- small cleanups
- move Hook to drill-adbc
- update distribution assembly to include new modules
This closes #250
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/494492f1
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/494492f1
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/494492f1
Branch: refs/heads/master
Commit: 494492f189ff68480e12c6b40194e7a073d544e4
Parents: 44dea43
Author: Jacques Nadeau <ja...@apache.org>
Authored: Sun Nov 8 10:37:05 2015 -0800
Committer: Jacques Nadeau <ja...@apache.org>
Committed: Thu Nov 12 18:32:54 2015 -0800
----------------------------------------------------------------------
common/pom.xml | 22 --------
.../drill/common/scanner/BuildTimeScan.java | 9 +++
.../apache/drill/exec/metrics/DrillMetrics.java | 6 +-
common/src/main/resources/drill-module.conf | 14 ++++-
.../common/exceptions/TestUserException.java | 3 +-
.../exec/store/hive/HiveFieldConverter.java | 4 +-
.../drill/exec/store/hive/HiveUtilities.java | 4 +-
distribution/pom.xml | 25 +++++++++
distribution/src/assemble/bin.xml | 5 ++
.../expr/fn/DrillComplexWriterFuncHolder.java | 4 +-
.../record/VectorAccessibleComplexWriter.java | 48 ++++++++++++++++
.../src/main/resources/drill-module.conf | 12 ----
.../apache/drill/TestAllocationException.java | 9 ++-
.../apache/drill/TestOutOfMemoryOutcome.java | 3 +-
.../exec/compile/TestEvaluationVisitor.java | 2 +-
...ll2130JavaExecHamcrestConfigurationTest.java | 12 ++--
.../fragment/TestFragmentExecutorCancel.java | 6 +-
.../src/test/resources/drill-oom-xsort.conf | 2 -
exec/jdbc/pom.xml | 5 ++
.../drill/jdbc/impl/DrillConnectionImpl.java | 2 +-
.../drill/jdbc/impl/DrillResultSetImpl.java | 10 +---
.../apache/drill/jdbc/DrillResultSetTest.java | 13 ++---
.../java/org/apache/drill/jdbc/test/Hook.java | 59 ++++++++++++++++++++
.../org/apache/drill/jdbc/test/JdbcAssert.java | 2 -
.../drill/exec/memory/BoundsChecking.java | 17 ++++++
.../drill/exec/memory/TopLevelAllocator.java | 8 ++-
.../impl/src/main/resources/drill-module.conf | 25 +++++++++
logical/pom.xml | 22 ++++++--
.../common/logical/FormatPluginConfigBase.java | 13 ++++-
logical/src/main/resources/drill-module.conf | 19 +++++++
.../common/expression/parser/TreeTest.java | 5 +-
pom.xml | 1 +
32 files changed, 305 insertions(+), 86 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/common/pom.xml
----------------------------------------------------------------------
diff --git a/common/pom.xml b/common/pom.xml
index db9c9a8..337d848 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -129,28 +129,6 @@
</arguments>
</configuration>
</plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.15</version>
- <configuration>
- <useSystemClassLoader>false</useSystemClassLoader>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.antlr</groupId>
- <artifactId>antlr3-maven-plugin</artifactId>
- <version>3.4</version>
- <configuration>
-
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>antlr</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/common/src/main/java/org/apache/drill/common/scanner/BuildTimeScan.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/drill/common/scanner/BuildTimeScan.java b/common/src/main/java/org/apache/drill/common/scanner/BuildTimeScan.java
index 1de819e..28f3704 100644
--- a/common/src/main/java/org/apache/drill/common/scanner/BuildTimeScan.java
+++ b/common/src/main/java/org/apache/drill/common/scanner/BuildTimeScan.java
@@ -87,6 +87,15 @@ public class BuildTimeScan {
}
}
if (result != null) {
+ if (logger.isInfoEnabled()) {
+ StringBuilder sb = new StringBuilder();
+ sb.append(format("Loaded prescanned packages %s from locations:\n", result.getScannedPackages()));
+ for (URL u : preScanned) {
+ sb.append('\t');
+ sb.append(u.toExternalForm());
+ sb.append('\n');
+ }
+ }
logger.info(format("Loaded prescanned packages %s from locations %s", result.getScannedPackages(), preScanned));
return result;
} else {
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/common/src/main/java/org/apache/drill/exec/metrics/DrillMetrics.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/drill/exec/metrics/DrillMetrics.java b/common/src/main/java/org/apache/drill/exec/metrics/DrillMetrics.java
index 6fd3dd4..781c9d6 100644
--- a/common/src/main/java/org/apache/drill/exec/metrics/DrillMetrics.java
+++ b/common/src/main/java/org/apache/drill/exec/metrics/DrillMetrics.java
@@ -37,9 +37,9 @@ import com.codahale.metrics.jvm.ThreadStatesGaugeSet;
public class DrillMetrics {
static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(DrillMetrics.class);
- public static final String METRICS_JMX_OUTPUT_ENABLED = "drill.exec.metrics.jmx.enabled";
- public static final String METRICS_LOG_OUTPUT_ENABLED = "drill.exec.metrics.log.enabled";
- public static final String METRICS_LOG_OUTPUT_INTERVAL = "drill.exec.metrics.log.interval";
+ public static final String METRICS_JMX_OUTPUT_ENABLED = "drill.metrics.jmx.enabled";
+ public static final String METRICS_LOG_OUTPUT_ENABLED = "drill.metrics.log.enabled";
+ public static final String METRICS_LOG_OUTPUT_INTERVAL = "drill.metrics.log.interval";
static final DrillConfig config = DrillConfig.create();
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/common/src/main/resources/drill-module.conf
----------------------------------------------------------------------
diff --git a/common/src/main/resources/drill-module.conf b/common/src/main/resources/drill-module.conf
index f8226f8..0f0e4f7 100644
--- a/common/src/main/resources/drill-module.conf
+++ b/common/src/main/resources/drill-module.conf
@@ -29,5 +29,17 @@ drill {
org.apache.drill.exec.store.mock,
org.apache.drill.common.logical
]
- }
+ },
+
+ metrics : {
+ context: "drillbit",
+ jmx: {
+ enabled : true
+ },
+ log: {
+ enabled : false,
+ interval : 60
+ }
+ },
+
}
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/common/src/test/java/org/apache/drill/common/exceptions/TestUserException.java
----------------------------------------------------------------------
diff --git a/common/src/test/java/org/apache/drill/common/exceptions/TestUserException.java b/common/src/test/java/org/apache/drill/common/exceptions/TestUserException.java
index 8531b4f..46dfcfd 100644
--- a/common/src/test/java/org/apache/drill/common/exceptions/TestUserException.java
+++ b/common/src/test/java/org/apache/drill/common/exceptions/TestUserException.java
@@ -26,7 +26,8 @@ import org.junit.Test;
* Test various use cases when creating user exceptions
*/
public class TestUserException {
- private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TestUserException.class);
+ private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory
+ .getLogger("--ignore.as.this.is.for.testing.exceptions--");
private Exception wrap(UserException uex, int numWraps) {
Exception ex = uex;
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/HiveFieldConverter.java
----------------------------------------------------------------------
diff --git a/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/HiveFieldConverter.java b/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/HiveFieldConverter.java
index 09c38a2..aff9e22 100644
--- a/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/HiveFieldConverter.java
+++ b/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/HiveFieldConverter.java
@@ -191,7 +191,7 @@ public abstract class HiveFieldConverter {
public Decimal28(int precision, int scale, FragmentContext context) {
holder.scale = scale;
holder.precision = precision;
- holder.buffer = context.getManagedBuffer(Decimal28SparseHolder.nDecimalDigits * DecimalUtility.integerSize);
+ holder.buffer = context.getManagedBuffer(Decimal28SparseHolder.nDecimalDigits * DecimalUtility.INTEGER_SIZE);
holder.start = 0;
}
@@ -210,7 +210,7 @@ public abstract class HiveFieldConverter {
public Decimal38(int precision, int scale, FragmentContext context) {
holder.scale = scale;
holder.precision = precision;
- holder.buffer = context.getManagedBuffer(Decimal38SparseHolder.nDecimalDigits * DecimalUtility.integerSize);
+ holder.buffer = context.getManagedBuffer(Decimal38SparseHolder.nDecimalDigits * DecimalUtility.INTEGER_SIZE);
holder.start = 0;
}
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/HiveUtilities.java
----------------------------------------------------------------------
diff --git a/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/HiveUtilities.java b/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/HiveUtilities.java
index ce38261..05e51e3 100644
--- a/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/HiveUtilities.java
+++ b/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/HiveUtilities.java
@@ -231,7 +231,7 @@ public class HiveUtilities {
}
case DECIMAL28SPARSE: {
- final int needSpace = Decimal28SparseHolder.nDecimalDigits * DecimalUtility.integerSize;
+ final int needSpace = Decimal28SparseHolder.nDecimalDigits * DecimalUtility.INTEGER_SIZE;
Preconditions.checkArgument(managedBuffer.capacity() > needSpace,
String.format("Not sufficient space in given managed buffer. Need %d bytes, buffer has %d bytes",
needSpace, managedBuffer.capacity()));
@@ -252,7 +252,7 @@ public class HiveUtilities {
}
case DECIMAL38SPARSE: {
- final int needSpace = Decimal38SparseHolder.nDecimalDigits * DecimalUtility.integerSize;
+ final int needSpace = Decimal38SparseHolder.nDecimalDigits * DecimalUtility.INTEGER_SIZE;
Preconditions.checkArgument(managedBuffer.capacity() > needSpace,
String.format("Not sufficient space in given managed buffer. Need %d bytes, buffer has %d bytes",
needSpace, managedBuffer.capacity()));
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/pom.xml b/distribution/pom.xml
index 896a6fc..3a4db67 100644
--- a/distribution/pom.xml
+++ b/distribution/pom.xml
@@ -30,6 +30,31 @@
<version>${project.version}</version>
</dependency>
<dependency>
+ <groupId>org.apache.drill</groupId>
+ <artifactId>drill-logical</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.drill.exec</groupId>
+ <artifactId>vector</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.drill.memory</groupId>
+ <artifactId>drill-memory-base</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.drill.memory</groupId>
+ <artifactId>drill-memory-impl</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.drill.exec</groupId>
+ <artifactId>drill-rpc</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.drill.exec</groupId>
<artifactId>drill-java-exec</artifactId>
<version>${project.version}</version>
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/distribution/src/assemble/bin.xml
----------------------------------------------------------------------
diff --git a/distribution/src/assemble/bin.xml b/distribution/src/assemble/bin.xml
index acdeefd..69af353 100644
--- a/distribution/src/assemble/bin.xml
+++ b/distribution/src/assemble/bin.xml
@@ -86,6 +86,11 @@
<include>org.apache.drill.exec:drill-jdbc:jar</include>
<include>org.apache.drill:drill-protocol:jar</include>
<include>org.apache.drill:drill-common:jar</include>
+ <include>org.apache.drill:drill-logical:jar</include>
+ <include>org.apache.drill.exec:vector:jar</include>
+ <include>org.apache.drill.memory:drill-memory-base:jar</include>
+ <include>org.apache.drill.memory:drill-memory-impl:jar</include>
+ <include>org.apache.drill.exec:drill-rpc:jar</include>
<include>org.apache.drill.exec:drill-java-exec:jar</include>
<include>org.apache.drill.contrib.storage-hive:drill-storage-hive-core</include>
<include>org.apache.drill.contrib.storage-hive:drill-hive-exec-shaded</include>
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/DrillComplexWriterFuncHolder.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/DrillComplexWriterFuncHolder.java b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/DrillComplexWriterFuncHolder.java
index f7ad1b3..747a08b 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/DrillComplexWriterFuncHolder.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/DrillComplexWriterFuncHolder.java
@@ -22,7 +22,7 @@ import org.apache.drill.common.expression.FieldReference;
import org.apache.drill.exec.expr.ClassGenerator;
import org.apache.drill.exec.expr.ClassGenerator.HoldingContainer;
import org.apache.drill.exec.physical.impl.project.ProjectRecordBatch;
-import org.apache.drill.exec.vector.complex.impl.ComplexWriterImpl;
+import org.apache.drill.exec.record.VectorAccessibleComplexWriter;
import org.apache.drill.exec.vector.complex.writer.BaseWriter.ComplexWriter;
import com.sun.codemodel.JBlock;
@@ -54,13 +54,13 @@ public class DrillComplexWriterFuncHolder extends DrillSimpleFuncHolder{
JVar complexWriter = g.declareClassField("complexWriter", g.getModel()._ref(ComplexWriter.class));
- JClass cwClass = g.getModel().ref(ComplexWriterImpl.class);
JInvocation container = g.getMappingSet().getOutgoing().invoke("getOutgoingContainer");
//Default name is "col", if not passed in a reference name for the output vector.
String refName = ref == null? "col" : ref.getRootSegment().getPath();
+ JClass cwClass = g.getModel().ref(VectorAccessibleComplexWriter.class);
g.getSetupBlock().assign(complexWriter, cwClass.staticInvoke("getWriter").arg(refName).arg(container));
JClass projBatchClass = g.getModel().ref(ProjectRecordBatch.class);
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/exec/java-exec/src/main/java/org/apache/drill/exec/record/VectorAccessibleComplexWriter.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/record/VectorAccessibleComplexWriter.java b/exec/java-exec/src/main/java/org/apache/drill/exec/record/VectorAccessibleComplexWriter.java
new file mode 100644
index 0000000..08ba9a1
--- /dev/null
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/record/VectorAccessibleComplexWriter.java
@@ -0,0 +1,48 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.drill.exec.record;
+
+import org.apache.drill.common.types.TypeProtos.MajorType;
+import org.apache.drill.exec.vector.ValueVector;
+import org.apache.drill.exec.vector.complex.MapVector;
+import org.apache.drill.exec.vector.complex.impl.ComplexWriterImpl;
+import org.apache.drill.exec.vector.complex.writer.BaseWriter.ComplexWriter;
+
+public class VectorAccessibleComplexWriter extends MapVector {
+ private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(VectorAccessibleComplexWriter.class);
+
+ private final VectorContainer vc;
+
+ public VectorAccessibleComplexWriter(VectorContainer vc) {
+ super("", null, null);
+ this.vc = vc;
+ }
+
+ @Override
+ public <T extends ValueVector> T addOrGet(String name, MajorType type, Class<T> clazz) {
+ final ValueVector v = vc.addOrGet(name, type, clazz);
+ putChild(name, v);
+ return this.typeify(v, clazz);
+
+ }
+
+ public static ComplexWriter getWriter(String name, VectorContainer container) {
+ VectorAccessibleComplexWriter vc = new VectorAccessibleComplexWriter(container);
+ return new ComplexWriterImpl(name, vc);
+ }
+}
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/exec/java-exec/src/main/resources/drill-module.conf
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/resources/drill-module.conf b/exec/java-exec/src/main/resources/drill-module.conf
index 9bde6e0..6b5d9fe 100644
--- a/exec/java-exec/src/main/resources/drill-module.conf
+++ b/exec/java-exec/src/main/resources/drill-module.conf
@@ -82,16 +82,6 @@ drill.exec: {
}
}
},
- metrics : {
- context: "drillbit",
- jmx: {
- enabled : true
- },
- log: {
- enabled : false,
- interval : 60
- }
- },
zk: {
connect: "localhost:2181",
root: "drill",
@@ -164,7 +154,6 @@ drill.exec: {
}
},
memory: {
- top.max: 1000000000000,
operator: {
max: 20000000000,
initial: 10000000
@@ -175,7 +164,6 @@ drill.exec: {
}
},
debug: {
- error_on_leak: true,
return_error_for_failure_in_cancelled_fragments: false
}
}
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/exec/java-exec/src/test/java/org/apache/drill/TestAllocationException.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestAllocationException.java b/exec/java-exec/src/test/java/org/apache/drill/TestAllocationException.java
index 67cabff..19613fe 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/TestAllocationException.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestAllocationException.java
@@ -17,21 +17,24 @@
*/
package org.apache.drill;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import org.apache.drill.common.exceptions.UserException;
import org.apache.drill.exec.exception.OutOfMemoryException;
import org.apache.drill.exec.memory.TopLevelAllocator;
import org.apache.drill.exec.proto.UserBitShared.DrillPBError;
import org.apache.drill.exec.testing.Controls;
import org.apache.drill.exec.testing.ControlsInjectionUtil;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import org.junit.Ignore;
import org.junit.Test;
/**
* Run several tpch queries and inject an OutOfMemoryException in ScanBatch that will cause an OUT_OF_MEMORY outcome to
* be propagated downstream. Make sure the proper "memory error" message is sent to the client.
*/
+@Ignore("Need to add exception site in memory layer that doesn't depend on other Drill code.")
public class TestAllocationException extends BaseTestQuery {
private static final String SINGLE_MODE = "ALTER SESSION SET `planner.disable_exchanges` = true";
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/exec/java-exec/src/test/java/org/apache/drill/TestOutOfMemoryOutcome.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestOutOfMemoryOutcome.java b/exec/java-exec/src/test/java/org/apache/drill/TestOutOfMemoryOutcome.java
index b270a8b..9d78024 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/TestOutOfMemoryOutcome.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestOutOfMemoryOutcome.java
@@ -18,6 +18,7 @@
package org.apache.drill;
import org.apache.drill.common.exceptions.UserException;
+import org.apache.drill.exec.exception.OutOfMemoryException;
import org.apache.drill.exec.proto.CoordinationProtos;
import org.apache.drill.exec.proto.UserBitShared.DrillPBError;
import org.apache.drill.exec.testing.ControlsInjectionUtil;
@@ -44,7 +45,7 @@ public class TestOutOfMemoryOutcome extends BaseTestQuery{
+ "\"desc\":\"" + "next-allocate" + "\","
+ "\"nSkip\":0,"
+ "\"nFire\":1,"
- + "\"exceptionClass\":\"" + "org.apache.drill.exec.memory.OutOfMemoryException" + "\""
+ + "\"exceptionClass\":\"" + OutOfMemoryException.class.getName() + "\""
+ "}]}";
ControlsInjectionUtil.setControls(client, controlsString);
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/exec/java-exec/src/test/java/org/apache/drill/exec/compile/TestEvaluationVisitor.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/compile/TestEvaluationVisitor.java b/exec/java-exec/src/test/java/org/apache/drill/exec/compile/TestEvaluationVisitor.java
index 2265347..2311a42 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/compile/TestEvaluationVisitor.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/compile/TestEvaluationVisitor.java
@@ -69,7 +69,7 @@ public class TestEvaluationVisitor {
ValueVectorWriteExpression e2 = new ValueVectorWriteExpression(outId, e, true);
v.addExpr(e2, g.getRoot());
- System.out.println(g.generateAndGet());
+ logger.debug(g.generateAndGet());
}
private LogicalExpression getExpr(String expr) throws Exception{
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/exec/java-exec/src/test/java/org/apache/drill/exec/test/Drill2130JavaExecHamcrestConfigurationTest.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/test/Drill2130JavaExecHamcrestConfigurationTest.java b/exec/java-exec/src/test/java/org/apache/drill/exec/test/Drill2130JavaExecHamcrestConfigurationTest.java
index 03d858c..9f1b7dc 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/test/Drill2130JavaExecHamcrestConfigurationTest.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/test/Drill2130JavaExecHamcrestConfigurationTest.java
@@ -17,14 +17,17 @@
*/
package org.apache.drill.exec.test;
-import org.junit.Test;
+import static org.hamcrest.CoreMatchers.equalTo;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
-import static org.hamcrest.CoreMatchers.equalTo;
+
+import org.junit.Test;
public class Drill2130JavaExecHamcrestConfigurationTest {
+ private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory
+ .getLogger(Drill2130JavaExecHamcrestConfigurationTest.class);
@SuppressWarnings("unused")
private org.hamcrest.MatcherAssert forCompileTimeCheckForNewEnoughHamcrest;
@@ -36,9 +39,8 @@ public class Drill2130JavaExecHamcrestConfigurationTest {
catch ( NoSuchMethodError e ) {
fail( "Class search path seems broken re new JUnit and old Hamcrest."
+ " Got NoSuchMethodError; e: " + e );
- }
- catch ( AssertionError e ) {
- System.out.println( "Class path seems fine re new JUnit vs. old Hamcrest."
+ } catch (AssertionError e) {
+ logger.debug("Class path seems fine re new JUnit vs. old Hamcrest."
+ " (Got AssertionError, not NoSuchMethodError.)" );
}
}
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/exec/java-exec/src/test/java/org/apache/drill/exec/work/fragment/TestFragmentExecutorCancel.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/work/fragment/TestFragmentExecutorCancel.java b/exec/java-exec/src/test/java/org/apache/drill/exec/work/fragment/TestFragmentExecutorCancel.java
index eb5cc49..cdb703f 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/work/fragment/TestFragmentExecutorCancel.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/work/fragment/TestFragmentExecutorCancel.java
@@ -17,11 +17,13 @@
*/
package org.apache.drill.exec.work.fragment;
+import static org.junit.Assert.fail;
+
import org.apache.drill.BaseTestQuery;
import org.apache.drill.common.exceptions.UserException;
+import org.apache.drill.exec.exception.OutOfMemoryException;
import org.apache.drill.exec.proto.CoordinationProtos;
import org.apache.drill.exec.testing.ControlsInjectionUtil;
-import static org.junit.Assert.fail;
import org.junit.Test;
/**
@@ -44,7 +46,7 @@ public class TestFragmentExecutorCancel extends BaseTestQuery {
+ "\"desc\":\"" + "next-allocate" + "\","
+ "\"nSkip\":0,"
+ "\"nFire\":1,"
- + "\"exceptionClass\":\"" + "org.apache.drill.exec.memory.OutOfMemoryException" + "\""
+ + "\"exceptionClass\":\"" + OutOfMemoryException.class.getName() + "\""
+ "}]}";
ControlsInjectionUtil.setControls(client, controlsString);
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/exec/java-exec/src/test/resources/drill-oom-xsort.conf
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/drill-oom-xsort.conf b/exec/java-exec/src/test/resources/drill-oom-xsort.conf
index 2b5ba80..d91bdbb 100644
--- a/exec/java-exec/src/test/resources/drill-oom-xsort.conf
+++ b/exec/java-exec/src/test/resources/drill-oom-xsort.conf
@@ -6,7 +6,6 @@ drill: {
classpath.scanning: {
packages += "org.apache.drill.exec.expr.fn.impl"
},
- exec: {
memory: {
fragment: {
max: 50000000,
@@ -17,5 +16,4 @@ drill: {
initial: 2000000
}
}
- }
}
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/exec/jdbc/pom.xml
----------------------------------------------------------------------
diff --git a/exec/jdbc/pom.xml b/exec/jdbc/pom.xml
index 0b94c03..cae5538 100644
--- a/exec/jdbc/pom.xml
+++ b/exec/jdbc/pom.xml
@@ -32,6 +32,11 @@
<version>${project.version}</version>
</dependency>
<dependency>
+ <groupId>org.apache.drill</groupId>
+ <artifactId>drill-logical</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.drill.exec</groupId>
<artifactId>drill-java-exec</artifactId>
<version>${project.version}</version>
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillConnectionImpl.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillConnectionImpl.java b/exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillConnectionImpl.java
index fc7b667..ab73a14 100644
--- a/exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillConnectionImpl.java
+++ b/exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillConnectionImpl.java
@@ -51,8 +51,8 @@ import org.apache.drill.common.config.DrillConfig;
import org.apache.drill.common.exceptions.DrillRuntimeException;
import org.apache.drill.common.exceptions.UserException;
import org.apache.drill.exec.client.DrillClient;
+import org.apache.drill.exec.exception.OutOfMemoryException;
import org.apache.drill.exec.memory.BufferAllocator;
-import org.apache.drill.exec.memory.OutOfMemoryException;
import org.apache.drill.exec.memory.RootAllocatorFactory;
import org.apache.drill.exec.rpc.RpcException;
import org.apache.drill.exec.server.Drillbit;
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillResultSetImpl.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillResultSetImpl.java b/exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillResultSetImpl.java
index 4878251..a2083d3 100644
--- a/exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillResultSetImpl.java
+++ b/exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillResultSetImpl.java
@@ -56,19 +56,14 @@ import org.apache.drill.exec.proto.UserBitShared.QueryResult.QueryState;
import org.apache.drill.exec.proto.UserBitShared.QueryType;
import org.apache.drill.exec.proto.helper.QueryIdHelper;
import org.apache.drill.exec.record.RecordBatchLoader;
-import org.apache.drill.exec.rpc.user.ConnectionThrottle;
+import org.apache.drill.exec.rpc.ConnectionThrottle;
import org.apache.drill.exec.rpc.user.QueryDataBatch;
import org.apache.drill.exec.rpc.user.UserResultsListener;
import org.apache.drill.jdbc.AlreadyClosedSqlException;
-import org.apache.drill.jdbc.DrillConnection;
import org.apache.drill.jdbc.DrillResultSet;
import org.apache.drill.jdbc.ExecutionCanceledSqlException;
import org.apache.drill.jdbc.SchemaChangeListener;
-import static org.slf4j.LoggerFactory.getLogger;
-
-import org.slf4j.Logger;
-
import com.google.common.collect.Queues;
@@ -1935,7 +1930,8 @@ class DrillResultSetImpl extends AvaticaResultSet implements DrillResultSet {
// ResultsListener:
static class ResultsListener implements UserResultsListener {
- private static final Logger logger = getLogger( ResultsListener.class );
+ private static final org.slf4j.Logger logger =
+ org.slf4j.LoggerFactory.getLogger(ResultsListener.class);
private static volatile int nextInstanceId = 1;
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/exec/jdbc/src/test/java/org/apache/drill/jdbc/DrillResultSetTest.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/test/java/org/apache/drill/jdbc/DrillResultSetTest.java b/exec/jdbc/src/test/java/org/apache/drill/jdbc/DrillResultSetTest.java
index 8574d28..a417140 100644
--- a/exec/jdbc/src/test/java/org/apache/drill/jdbc/DrillResultSetTest.java
+++ b/exec/jdbc/src/test/java/org/apache/drill/jdbc/DrillResultSetTest.java
@@ -17,7 +17,12 @@
*/
package org.apache.drill.jdbc;
-import static org.junit.Assert.*;
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.core.StringContains.containsString;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
import java.sql.Connection;
import java.sql.ResultSet;
@@ -31,12 +36,6 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.instanceOf;
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.core.StringContains.containsString;
-
-
public class DrillResultSetTest extends DrillTest {
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/Hook.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/Hook.java b/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/Hook.java
new file mode 100644
index 0000000..99c75cf
--- /dev/null
+++ b/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/Hook.java
@@ -0,0 +1,59 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.drill.jdbc.test;
+
+import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import com.google.common.base.Function;
+
+public enum Hook {
+ /** Called with the logical plan. */
+ LOGICAL_PLAN;
+
+ private final List<Function<Object, Object>> handlers =
+ new CopyOnWriteArrayList<>();
+
+ public Closeable add(final Function handler) {
+ handlers.add(handler);
+ return new Closeable() {
+ public void close() {
+ remove(handler);
+ }
+ };
+ }
+
+ /** Removes a handler from this Hook. */
+ private boolean remove(Function handler) {
+ return handlers.remove(handler);
+ }
+
+ /** Runs all handlers registered for this Hook, with the given argument. */
+ public void run(Object arg) {
+ for (Function<Object, Object> handler : handlers) {
+ handler.apply(arg);
+ }
+ }
+
+ /** Removes a Hook after use. */
+ public interface Closeable extends AutoCloseable {
+ void close(); // override, removing "throws"
+ }
+}
+
+// End Hook.java
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/JdbcAssert.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/JdbcAssert.java b/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/JdbcAssert.java
index b161e20..3f8514e 100644
--- a/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/JdbcAssert.java
+++ b/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/JdbcAssert.java
@@ -31,11 +31,9 @@ import java.util.SortedSet;
import java.util.TreeSet;
import org.apache.calcite.linq4j.Ord;
-
import org.apache.drill.common.config.DrillConfig;
import org.apache.drill.common.logical.LogicalPlan;
import org.apache.drill.common.logical.data.LogicalOperator;
-import org.apache.drill.common.util.Hook;
import org.apache.drill.exec.ExecConstants;
import org.apache.drill.exec.planner.PhysicalPlanReaderTestFactory;
import org.apache.drill.jdbc.ConnectionFactory;
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/exec/memory/base/src/main/java/org/apache/drill/exec/memory/BoundsChecking.java
----------------------------------------------------------------------
diff --git a/exec/memory/base/src/main/java/org/apache/drill/exec/memory/BoundsChecking.java b/exec/memory/base/src/main/java/org/apache/drill/exec/memory/BoundsChecking.java
index 7588b2c..a15e348 100644
--- a/exec/memory/base/src/main/java/org/apache/drill/exec/memory/BoundsChecking.java
+++ b/exec/memory/base/src/main/java/org/apache/drill/exec/memory/BoundsChecking.java
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.drill.exec.memory;
public class BoundsChecking {
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/exec/memory/impl/src/main/java/org/apache/drill/exec/memory/TopLevelAllocator.java
----------------------------------------------------------------------
diff --git a/exec/memory/impl/src/main/java/org/apache/drill/exec/memory/TopLevelAllocator.java b/exec/memory/impl/src/main/java/org/apache/drill/exec/memory/TopLevelAllocator.java
index 1684970..1e96238 100644
--- a/exec/memory/impl/src/main/java/org/apache/drill/exec/memory/TopLevelAllocator.java
+++ b/exec/memory/impl/src/main/java/org/apache/drill/exec/memory/TopLevelAllocator.java
@@ -37,8 +37,10 @@ public class TopLevelAllocator implements BufferAllocator {
private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TopLevelAllocator.class);
public static final String CHILD_BUFFER_INJECTION_SITE = "child.buffer";
- public static final String TOP_LEVEL_MAX_ALLOC = "drill.exec.memory.top.max";
- public static final String ERROR_ON_MEMORY_LEAK = "drill.exec.debug.error_on_leak";
+ private static final PooledByteBufAllocatorL ALLOCATOR = new PooledByteBufAllocatorL(DrillMetrics.getInstance());
+
+ public static final String TOP_LEVEL_MAX_ALLOC = "drill.memory.top.max";
+ public static final String ERROR_ON_MEMORY_LEAK = "drill.memory.debug.error_on_leak";
public static long MAXIMUM_DIRECT_MEMORY;
@@ -52,7 +54,7 @@ public class TopLevelAllocator implements BufferAllocator {
private TopLevelAllocator(DrillConfig config, long maximumAllocation, boolean errorOnLeak){
MAXIMUM_DIRECT_MEMORY = maximumAllocation;
- innerAllocator = new PooledByteBufAllocatorL(DrillMetrics.getInstance());
+ innerAllocator = ALLOCATOR;
this.config=(config!=null) ? config : DrillConfig.create();
this.errorOnLeak = errorOnLeak;
this.acct = new AccountorImpl(config, errorOnLeak, null, null, maximumAllocation, 0, true);
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/exec/memory/impl/src/main/resources/drill-module.conf
----------------------------------------------------------------------
diff --git a/exec/memory/impl/src/main/resources/drill-module.conf b/exec/memory/impl/src/main/resources/drill-module.conf
new file mode 100644
index 0000000..593ef8e
--- /dev/null
+++ b/exec/memory/impl/src/main/resources/drill-module.conf
@@ -0,0 +1,25 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// This file tells Drill to consider this module when class path scanning.
+// This file can also include any supplementary configuration information.
+// This file is in HOCON format, see https://github.com/typesafehub/config/blob/master/HOCON.md for more information.
+drill: {
+ memory: {
+ debug.error_on_leak: true,
+ top.max: 1000000000000
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/logical/pom.xml
----------------------------------------------------------------------
diff --git a/logical/pom.xml b/logical/pom.xml
index f592657..fbae5bc 100644
--- a/logical/pom.xml
+++ b/logical/pom.xml
@@ -40,6 +40,13 @@
<artifactId>drill-common</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.drill</groupId>
+ <artifactId>drill-common</artifactId>
+ <version>${project.version}</version>
+ <classifier>tests</classifier>
+ <scope>test</scope>
+ </dependency>
<dependency>
<!-- add as provided scope so that we can compile TestTools. Should only be ever used in a test scenario where someone else is bringing JUnit in. -->
@@ -116,20 +123,27 @@
<build>
<plugins>
- <plugin>
+ <plugin> <!-- classpath scanning -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.drill</groupId>
+ <artifactId>drill-common</artifactId>
+ <version>${project.version}</version>
+ <classifier>tests</classifier>
+ </dependency>
+ </dependencies>
<executions>
<execution>
<phase>process-classes</phase>
- <goals>
- <goal>java</goal>
- </goals>
+ <goals><goal>java</goal></goals>
</execution>
</executions>
<configuration>
<mainClass>org.apache.drill.common.scanner.BuildTimeScan</mainClass>
+ <includePluginDependencies>true</includePluginDependencies>
<arguments>
<argument>${project.build.outputDirectory}</argument>
</arguments>
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/logical/src/main/java/org/apache/drill/common/logical/FormatPluginConfigBase.java
----------------------------------------------------------------------
diff --git a/logical/src/main/java/org/apache/drill/common/logical/FormatPluginConfigBase.java b/logical/src/main/java/org/apache/drill/common/logical/FormatPluginConfigBase.java
index 50de963..d65520f 100644
--- a/logical/src/main/java/org/apache/drill/common/logical/FormatPluginConfigBase.java
+++ b/logical/src/main/java/org/apache/drill/common/logical/FormatPluginConfigBase.java
@@ -34,7 +34,18 @@ public abstract class FormatPluginConfigBase implements FormatPluginConfig{
*/
public static Set<Class<? extends FormatPluginConfig>> getSubTypes(final ScanResult classpathScan) {
final Set<Class<? extends FormatPluginConfig>> pluginClasses = classpathScan.getImplementations(FormatPluginConfig.class);
- logger.debug("Found {} format plugin configuration classes: {}.", pluginClasses.size(), pluginClasses);
+ if (logger.isDebugEnabled()) {
+ StringBuilder sb = new StringBuilder();
+ sb.append("Found ");
+ sb.append(pluginClasses.size());
+ sb.append("format plugin configuration classes:\n");
+ for (Class<?> c : pluginClasses) {
+ sb.append('\t');
+ sb.append(c.getName());
+ sb.append('\n');
+ }
+ logger.debug(sb.toString());
+ }
return pluginClasses;
}
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/logical/src/main/resources/drill-module.conf
----------------------------------------------------------------------
diff --git a/logical/src/main/resources/drill-module.conf b/logical/src/main/resources/drill-module.conf
new file mode 100644
index 0000000..b6cb266
--- /dev/null
+++ b/logical/src/main/resources/drill-module.conf
@@ -0,0 +1,19 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http:// www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// This file tells Drill to consider this module when class path scanning.
+// This file can also include any supplementary configuration information.
+// This file is in HOCON format, see https://github.com/typesafehub/config/blob/master/HOCON.md for more information.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/logical/src/test/java/org/apache/drill/common/expression/parser/TreeTest.java
----------------------------------------------------------------------
diff --git a/logical/src/test/java/org/apache/drill/common/expression/parser/TreeTest.java b/logical/src/test/java/org/apache/drill/common/expression/parser/TreeTest.java
index 7cf1477..c8f6219 100644
--- a/logical/src/test/java/org/apache/drill/common/expression/parser/TreeTest.java
+++ b/logical/src/test/java/org/apache/drill/common/expression/parser/TreeTest.java
@@ -29,6 +29,7 @@ import org.apache.drill.test.DrillTest;
import org.junit.Test;
public class TreeTest extends DrillTest {
+ private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TreeTest.class);
@Test
public void testIfWithCase() throws Exception{
@@ -103,11 +104,11 @@ public class TreeTest extends DrillTest {
* @throws IOException
*/
private void testExpressionParsing(String expr) throws RecognitionException, IOException{
- System.out.println("-----" + expr + "-----");
+ logger.debug("-----" + expr + "-----");
LogicalExpression e = parseExpression(expr);
String newStringExpr = serializeExpression(e);
- System.out.println(newStringExpr);
+ logger.debug(newStringExpr);
LogicalExpression e2 = parseExpression(newStringExpr);
//Assert.assertEquals(e, e2);
http://git-wip-us.apache.org/repos/asf/drill/blob/494492f1/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 1dde3ad..ae6f402 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1914,6 +1914,7 @@
<module>tools</module>
<module>protocol</module>
<module>common</module>
+ <module>logical</module>
<module>exec</module>
<module>distribution</module>
</modules>