You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by vi...@apache.org on 2018/12/10 14:04:31 UTC

[drill] branch master updated (75b9a78 -> e67ac2d)

This is an automated email from the ASF dual-hosted git repository.

vitalii pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git.


    from 75b9a78  DRILL-6791: Scan projection framework
     new 788eb7e  DRILL-6877: NPE when starting Drillbit
     new e67ac2d  DRILL-6889: Exclude Drill unit tests to avoid Travis timing out

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/drill/categories/UnlikelyTest.java  |  2 +-
 distribution/src/resources/drillbit.sh             |  2 +-
 drill-yarn/pom.xml                                 |  9 +++++++
 .../org/apache/drill/exec/server/Drillbit.java     | 28 +++++++++++++++++-----
 .../java/org/apache/drill/TestExampleQueries.java  |  2 +-
 .../java/org/apache/drill/TestStarQueries.java     |  3 +++
 .../test/java/org/apache/drill/TestUnionAll.java   |  2 ++
 .../org/apache/drill/exec/TestWindowFunctions.java |  3 +++
 .../physical/impl/join/TestMergeJoinAdvanced.java  |  5 ++++
 .../impl/mergereceiver/TestMergingReceiver.java    |  3 ++-
 .../exec/physical/impl/window/TestWindowFrame.java |  1 +
 .../store/parquet/TestParquetMetadataCache.java    |  3 +++
 exec/jdbc-all/pom.xml                              |  6 +++++
 exec/jdbc/pom.xml                                  |  6 +++++
 14 files changed, 65 insertions(+), 10 deletions(-)


[drill] 02/02: DRILL-6889: Exclude Drill unit tests to avoid Travis timing out

Posted by vi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

vitalii pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git

commit e67ac2d1f7111a8e3932e2ff69a531b64882e162
Author: Vitalii Diravka <vi...@gmail.com>
AuthorDate: Fri Dec 7 19:44:47 2018 +0200

    DRILL-6889: Exclude Drill unit tests to avoid Travis timing out
    
    closes #1567
---
 .../src/test/java/org/apache/drill/categories/UnlikelyTest.java  | 2 +-
 drill-yarn/pom.xml                                               | 9 +++++++++
 .../src/test/java/org/apache/drill/TestExampleQueries.java       | 2 +-
 .../src/test/java/org/apache/drill/TestStarQueries.java          | 3 +++
 exec/java-exec/src/test/java/org/apache/drill/TestUnionAll.java  | 2 ++
 .../src/test/java/org/apache/drill/exec/TestWindowFunctions.java | 3 +++
 .../drill/exec/physical/impl/join/TestMergeJoinAdvanced.java     | 5 +++++
 .../exec/physical/impl/mergereceiver/TestMergingReceiver.java    | 3 ++-
 .../apache/drill/exec/physical/impl/window/TestWindowFrame.java  | 1 +
 .../drill/exec/store/parquet/TestParquetMetadataCache.java       | 3 +++
 exec/jdbc-all/pom.xml                                            | 6 ++++++
 exec/jdbc/pom.xml                                                | 6 ++++++
 12 files changed, 42 insertions(+), 3 deletions(-)

diff --git a/common/src/test/java/org/apache/drill/categories/UnlikelyTest.java b/common/src/test/java/org/apache/drill/categories/UnlikelyTest.java
index b141936..b04fadf 100644
--- a/common/src/test/java/org/apache/drill/categories/UnlikelyTest.java
+++ b/common/src/test/java/org/apache/drill/categories/UnlikelyTest.java
@@ -18,7 +18,7 @@
 package org.apache.drill.categories;
 
 /**
- * This is a category for tests which target very specific bugs or that excercise corner cases that your unlikely to break.
+ * This is a category for tests which target very specific bugs or that exercise  corner cases that your unlikely to break.
  */
 public interface UnlikelyTest {
 }
diff --git a/drill-yarn/pom.xml b/drill-yarn/pom.xml
index 87fc5ea..21759fd 100644
--- a/drill-yarn/pom.xml
+++ b/drill-yarn/pom.xml
@@ -136,4 +136,13 @@
       <scope>test</scope>
     </dependency>
   </dependencies>
+
+  <profiles>
+    <profile>
+      <id>travis</id>
+      <properties>
+        <skipTests>true</skipTests>
+      </properties>
+    </profile>
+  </profiles>
 </project>
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 adc8e35..00b5e61 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
@@ -35,7 +35,7 @@ import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-@Category({SqlFunctionTest.class, OperatorTest.class, PlannerTest.class})
+@Category({SqlFunctionTest.class, OperatorTest.class, PlannerTest.class, UnlikelyTest.class})
 public class TestExampleQueries extends BaseTestQuery {
   @BeforeClass
   public static void setupTestFiles() {
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestStarQueries.java b/exec/java-exec/src/test/java/org/apache/drill/TestStarQueries.java
index 683248e..fc41420 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/TestStarQueries.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestStarQueries.java
@@ -150,6 +150,7 @@ public class TestStarQueries extends BaseTestQuery {
   }
 
   @Test
+  @Category(UnlikelyTest.class)
   public void testSelStarOrderByLimit() throws Exception{
     testBuilder()
         .ordered()
@@ -186,6 +187,7 @@ public class TestStarQueries extends BaseTestQuery {
   }
 
   @Test
+  @Category(UnlikelyTest.class)
   public void testSelStarJoin() throws Exception {
     testBuilder()
         .ordered()
@@ -325,6 +327,7 @@ public class TestStarQueries extends BaseTestQuery {
   }
 
   @Test  // join two SubQuery, each having select * : regular columns appear in the select , where and on clause, group by, order by.
+  @Category(UnlikelyTest.class)
   public void testSelStarSubQJoin() throws Exception {
     // select clause, where.
     test(" select n.n_nationkey, n.n_name, n.n_regionkey, r.r_name \n" +
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 9185939..c86a3c9 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
@@ -213,6 +213,7 @@ public class TestUnionAll extends BaseTestQuery {
   }
 
   @Test
+  @Category(UnlikelyTest.class)
   public void testUnionAllViewExpandableStar() throws Exception {
     try {
       test("use dfs.tmp");
@@ -661,6 +662,7 @@ public class TestUnionAll extends BaseTestQuery {
   }
 
   @Test // see DRILL-2746
+  @Category(UnlikelyTest.class)
   public void testInListOnUnionAll() throws Exception {
     String query = "select n_nationkey \n" +
         "from (select n1.n_nationkey from cp.`tpch/nation.parquet` n1 inner join cp.`tpch/region.parquet` r1 on n1.n_regionkey = r1.r_regionkey \n" +
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/TestWindowFunctions.java b/exec/java-exec/src/test/java/org/apache/drill/exec/TestWindowFunctions.java
index fc2f639..1acb8fb 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/TestWindowFunctions.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/TestWindowFunctions.java
@@ -543,6 +543,7 @@ public class TestWindowFunctions extends BaseTestQuery {
   }
 
   @Test
+  @Category(UnlikelyTest.class)
   public void testRankWithGroupBy() throws Exception {
     final String query = "select dense_rank() over (order by l_suppkey) as rank1 " +
         " from cp.`tpch/lineitem.parquet` group by l_partkey, l_suppkey order by 1 desc limit 1";
@@ -792,6 +793,7 @@ public class TestWindowFunctions extends BaseTestQuery {
   }
 
   @Test // DRILL-3679, DRILL-3680
+  @Category(UnlikelyTest.class)
   public void testWindowFunInNestSubQ() throws Exception {
     final String query =
         " select n_nationkey , n_regionkey , " +
@@ -855,6 +857,7 @@ public class TestWindowFunctions extends BaseTestQuery {
   }
 
   @Test // DRILL-2330
+  @Category(UnlikelyTest.class)
   public void testNestedAggregates() throws Exception {
 
     final String query = "select sum(min(l_extendedprice))"
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestMergeJoinAdvanced.java b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestMergeJoinAdvanced.java
index d8bdea9..2ae0aa6 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestMergeJoinAdvanced.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestMergeJoinAdvanced.java
@@ -17,6 +17,7 @@
  */
 package org.apache.drill.exec.physical.impl.join;
 
+import org.apache.drill.categories.UnlikelyTest;
 import org.apache.drill.common.exceptions.UserRemoteException;
 import org.apache.drill.test.TestTools;
 import org.apache.drill.categories.OperatorTest;
@@ -75,6 +76,7 @@ public class TestMergeJoinAdvanced extends JoinTestBase {
   }
 
   @Test
+  @Category({UnlikelyTest.class})
   public void testJoinWithDifferentTypesInCondition() throws Exception {
     String query = "select count(*) col1 from " +
         "(select t1.date_opt from cp.`parquet/date_dictionary.parquet` t1, cp.`parquet/timestamp_table.parquet` t2 " +
@@ -180,6 +182,7 @@ public class TestMergeJoinAdvanced extends JoinTestBase {
   }
 
   @Test
+  @Category({UnlikelyTest.class})
   public void testMergeLeftJoinLargeLeft() throws Exception {
     testMultipleBatchJoin(5000L, 1000L, "left", 5000L * 1000L + 2L);
   }
@@ -218,6 +221,7 @@ public class TestMergeJoinAdvanced extends JoinTestBase {
   }
 
   @Test
+  @Category({UnlikelyTest.class})
   public void testDrill4165() throws Exception {
     final String query = "select count(*) cnt from cp.`tpch/lineitem.parquet` l1, cp.`tpch/lineitem.parquet` l2 " +
         "where l1.l_partkey = l2.l_partkey and l1.l_suppkey < 30 and l2.l_suppkey < 30";
@@ -292,6 +296,7 @@ public class TestMergeJoinAdvanced extends JoinTestBase {
   }
 
   @Test // DRILL-6491
+  @Category({UnlikelyTest.class})
   public void testFullJoinIsNotSupported() throws Exception {
     thrown.expect(UserRemoteException.class);
     thrown.expectMessage(CoreMatchers.containsString("SYSTEM ERROR: CannotPlanException"));
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/mergereceiver/TestMergingReceiver.java b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/mergereceiver/TestMergingReceiver.java
index 4c6811f..3de912d 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/mergereceiver/TestMergingReceiver.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/mergereceiver/TestMergingReceiver.java
@@ -23,6 +23,7 @@ import static org.junit.Assert.assertTrue;
 import java.util.List;
 
 import org.apache.drill.categories.OperatorTest;
+import org.apache.drill.categories.SlowTest;
 import org.apache.drill.common.util.DrillFileUtils;
 import org.apache.drill.exec.client.DrillClient;
 import org.apache.drill.exec.pop.PopUnitTestBase;
@@ -40,7 +41,7 @@ import org.apache.drill.shaded.guava.com.google.common.base.Charsets;
 import org.apache.drill.shaded.guava.com.google.common.io.Files;
 import org.junit.experimental.categories.Category;
 
-@Category(OperatorTest.class)
+@Category({OperatorTest.class, SlowTest.class})
 public class TestMergingReceiver extends PopUnitTestBase {
   // private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TestMergingReceiver.class);
 
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/window/TestWindowFrame.java b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/window/TestWindowFrame.java
index a9c147b..a015ff7 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/window/TestWindowFrame.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/window/TestWindowFrame.java
@@ -283,6 +283,7 @@ public class TestWindowFrame extends BaseTestQuery {
   }
 
   @Test
+  @Category(UnlikelyTest.class)
   public void testLeadWithPby() throws Exception {
     testBuilder()
       .sqlQuery(getFile("window/lead.pby.oby.sql"))
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/store/parquet/TestParquetMetadataCache.java b/exec/java-exec/src/test/java/org/apache/drill/exec/store/parquet/TestParquetMetadataCache.java
index e80497a..bf075d8 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/store/parquet/TestParquetMetadataCache.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/store/parquet/TestParquetMetadataCache.java
@@ -176,6 +176,7 @@ public class TestParquetMetadataCache extends PlanTestBase {
   }
 
   @Test
+  @Category(UnlikelyTest.class)
   public void testFix4449() throws Exception {
     runSQL("CREATE TABLE dfs.tmp.`4449` PARTITION BY(l_discount) AS SELECT l_orderkey, l_discount FROM cp.`tpch/lineitem.parquet`");
     runSQL("REFRESH TABLE METADATA dfs.tmp.`4449`");
@@ -642,6 +643,7 @@ public class TestParquetMetadataCache extends PlanTestBase {
   }
 
   @Test
+  @Category(UnlikelyTest.class)
   public void testInnerMetadataFilesAreAbsent() throws Exception {
     final String innerMetaCorruptedTable = "inner_meta_corrupted_table";
     File dataDir = dirTestWatcher.copyResourceToRoot(
@@ -814,6 +816,7 @@ public class TestParquetMetadataCache extends PlanTestBase {
   }
 
   @Test // DRILL-4139
+  @Category(UnlikelyTest.class)
   public void testPartitionPruningWithIsNull() throws Exception {
     try {
       test("create table dfs.tmp.`t6/a` as\n" +
diff --git a/exec/jdbc-all/pom.xml b/exec/jdbc-all/pom.xml
index e0ae482..62b1b43 100644
--- a/exec/jdbc-all/pom.xml
+++ b/exec/jdbc-all/pom.xml
@@ -857,6 +857,12 @@
         </plugins>
       </build>
     </profile>
+    <profile>
+      <id>travis</id>
+      <properties>
+        <skipTests>true</skipTests>
+      </properties>
+    </profile>
   </profiles>
 
 </project>
diff --git a/exec/jdbc/pom.xml b/exec/jdbc/pom.xml
index e69d78f..5b7bc4a 100644
--- a/exec/jdbc/pom.xml
+++ b/exec/jdbc/pom.xml
@@ -186,5 +186,11 @@
         </dependency>
       </dependencies>
     </profile>
+    <profile>
+      <id>travis</id>
+      <properties>
+        <skipTests>true</skipTests>
+      </properties>
+    </profile>
   </profiles>
 </project>


[drill] 01/02: DRILL-6877: NPE when starting Drillbit

Posted by vi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

vitalii pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git

commit 788eb7effe72d838427d42fabbf167fa424bf88c
Author: Venkata Jyothsna Donapati <jy...@gmail.com>
AuthorDate: Mon Dec 3 10:19:06 2018 -0800

    DRILL-6877: NPE when starting Drillbit
    
    closes #1560
---
 distribution/src/resources/drillbit.sh             |  2 +-
 .../org/apache/drill/exec/server/Drillbit.java     | 28 +++++++++++++++++-----
 2 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/distribution/src/resources/drillbit.sh b/distribution/src/resources/drillbit.sh
index 5ad87b1..404c6f8 100755
--- a/distribution/src/resources/drillbit.sh
+++ b/distribution/src/resources/drillbit.sh
@@ -87,7 +87,7 @@ export args
 
 # Set default scheduling priority
 DRILL_NICENESS=${DRILL_NICENESS:-0}
-GRACEFUL_FILE=$DRILL_PID_DIR/$GRACEFUL_SIGFILE
+GRACEFUL_FILE=$DRILL_HOME/$GRACEFUL_SIGFILE
 
 waitForProcessEnd()
 {
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java b/exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java
index 3e78f03..4c595a2 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java
@@ -18,8 +18,9 @@
 package org.apache.drill.exec.server;
 
 import java.io.IOException;
-import java.nio.file.FileSystems;
+import java.nio.file.InvalidPathException;
 import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.nio.file.StandardWatchEventKinds;
 import java.nio.file.WatchEvent;
 import java.nio.file.WatchKey;
@@ -373,18 +374,33 @@ public class Drillbit implements AutoCloseable {
       }
     }
 
+    /*
+     * Poll for the graceful file, if the file is found cloase the drillbit. In case if the DRILL_HOME path is not
+     * set, graceful shutdown will not be supported from the command line.
+     */
     private void pollShutdown(Drillbit drillbit) throws IOException, InterruptedException {
-      final Path drillPidDirPath = FileSystems.getDefault().getPath(System.getenv("DRILL_PID_DIR"));
-      final String gracefulFileName = System.getenv("GRACEFUL_SIGFILE");
+      final String drillHome = System.getenv("DRILL_HOME");
+      final String gracefulFile = System.getenv("GRACEFUL_SIGFILE");
+      final Path drillHomePath;
+      if (drillHome == null || gracefulFile == null) {
+        logger.warn("Cannot access graceful file. Graceful shutdown from command line will not be supported.");
+        return;
+      }
+      try {
+        drillHomePath = Paths.get(drillHome);
+      } catch (InvalidPathException e) {
+        logger.warn("Cannot access graceful file. Graceful shutdown from command line will not be supported.");
+        return;
+      }
       boolean triggered_shutdown = false;
       WatchKey wk = null;
-      try (final WatchService watchService = FileSystems.getDefault().newWatchService()) {
-        drillPidDirPath.register(watchService, StandardWatchEventKinds.ENTRY_MODIFY, StandardWatchEventKinds.ENTRY_CREATE);
+      try (final WatchService watchService = drillHomePath.getFileSystem().newWatchService()) {
+        drillHomePath.register(watchService, StandardWatchEventKinds.ENTRY_MODIFY, StandardWatchEventKinds.ENTRY_CREATE);
         while (!triggered_shutdown) {
           wk = watchService.take();
           for (WatchEvent<?> event : wk.pollEvents()) {
             final Path changed = (Path) event.context();
-            if (changed != null && changed.endsWith(gracefulFileName)) {
+            if (changed != null && changed.endsWith(gracefulFile)) {
               drillbit.interruptPollShutdown = false;
               triggered_shutdown = true;
               drillbit.close();