diff --git itests/qtest/src/test/java/org/apache/hadoop/hive/cli/TestMiniDruidKafkaCliDriver.java itests/qtest/src/test/java/org/apache/hadoop/hive/cli/TestMiniDruidKafkaCliDriver.java deleted file mode 100644 index 4768975225..0000000000 --- itests/qtest/src/test/java/org/apache/hadoop/hive/cli/TestMiniDruidKafkaCliDriver.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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.hadoop.hive.cli; - -import org.apache.hadoop.hive.cli.control.CliAdapter; -import org.apache.hadoop.hive.cli.control.CliConfigs; - -import org.junit.ClassRule; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TestRule; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; -import org.junit.runners.Parameterized.Parameters; - -import java.io.File; -import java.util.List; - -@RunWith(Parameterized.class) -public class TestMiniDruidKafkaCliDriver { - - static CliAdapter adapter = new CliConfigs.MiniDruidKafkaCliConfig().getCliAdapter(); - - @Parameters(name = "{0}") - public static List getParameters() throws Exception { - return adapter.getParameters(); - } - - @ClassRule - public static TestRule cliClassRule = adapter.buildClassRule(); - - @Rule - public TestRule cliTestRule = adapter.buildTestRule(); - - private String name; - private File qfile; - - public TestMiniDruidKafkaCliDriver(String name, File qfile) { - this.name = name; - this.qfile = qfile; - } - - @Test - public void testCliDriver() throws Exception { - adapter.runTest(name, qfile); - } - -} diff --git itests/src/test/resources/testconfiguration.properties itests/src/test/resources/testconfiguration.properties index 3a5aec7d6b..65ae6bb01e 100644 --- itests/src/test/resources/testconfiguration.properties +++ itests/src/test/resources/testconfiguration.properties @@ -1724,13 +1724,12 @@ druid.query.files=druidmini_test1.q,\ druidmini_extractTime.q,\ druidmini_test_alter.q,\ druidmini_floorTime.q, \ - druidmini_masking.q + druidmini_masking.q, \ + druidkafkamini_basic.q, \ + kafka_storage_handler.q druid.llap.local.query.files=druidmini_noop.q -druid.kafka.query.files=druidkafkamini_basic.q \ - kafka_storage_handler.q - # tests to be run by TestErasureCodingHDFSCliDriver and TestCliDriver erasurecoding.shared.query.files=erasure_commands.q diff --git itests/util/src/main/java/org/apache/hadoop/hive/cli/control/CliConfigs.java itests/util/src/main/java/org/apache/hadoop/hive/cli/control/CliConfigs.java index a3dcf9865d..0e4fb97fb9 100644 --- itests/util/src/main/java/org/apache/hadoop/hive/cli/control/CliConfigs.java +++ itests/util/src/main/java/org/apache/hadoop/hive/cli/control/CliConfigs.java @@ -56,7 +56,6 @@ public CliConfig() { excludesFrom(testConfigProps, "disabled.query.files"); excludesFrom(testConfigProps, "localSpark.only.query.files"); excludesFrom(testConfigProps, "druid.query.files"); - excludesFrom(testConfigProps, "druid.kafka.query.files"); excludesFrom(testConfigProps, "erasurecoding.only.query.files"); excludeQuery("fouter_join_ppr.q"); // Disabled in HIVE-19509 @@ -183,29 +182,6 @@ public MiniDruidCliConfig() { setResultsDir("ql/src/test/results/clientpositive/druid"); setLogDir("itests/qtest/target/tmp/log"); - setInitScript("q_test_druid_init.sql"); - setCleanupScript("q_test_cleanup_druid.sql"); - setHiveConfDir("data/conf/llap"); - setClusterType(MiniClusterType.druid); - setMetastoreType(MetastoreType.sql); - setFsType(QTestUtil.FsType.hdfs); - } catch (Exception e) { - throw new RuntimeException("can't construct cliconfig", e); - } - } - } - - public static class MiniDruidKafkaCliConfig extends AbstractCliConfig { - public MiniDruidKafkaCliConfig() { - super(CoreCliDriver.class); - try { - setQueryDir("ql/src/test/queries/clientpositive"); - - includesFrom(testConfigProps, "druid.kafka.query.files"); - - setResultsDir("ql/src/test/results/clientpositive/druid"); - setLogDir("itests/qtest/target/tmp/log"); - setInitScript("q_test_druid_init.sql"); setCleanupScript("q_test_cleanup_druid.sql"); setHiveConfDir("data/conf/llap"); diff --git itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java index bfa3d5d7d2..0e8b82930e 100644 --- itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java +++ itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java @@ -434,7 +434,6 @@ private void createRemoteDirs() { llap(CoreClusterType.TEZ, FsType.hdfs), llap_local(CoreClusterType.TEZ, FsType.local), none(CoreClusterType.MR, FsType.local), - druid(CoreClusterType.TEZ, FsType.hdfs), druidLocal(CoreClusterType.TEZ, FsType.local), druidKafka(CoreClusterType.TEZ, FsType.hdfs), kafka(CoreClusterType.TEZ, FsType.hdfs); @@ -472,8 +471,6 @@ public static MiniClusterType valueForString(String type) { return llap; } else if (type.equals("llap_local")) { return llap_local; - } else if (type.equals("druid")) { - return druid; } else if (type.equals("druidLocal")) { return druidLocal; } else if (type.equals("druid-kafka")) { @@ -636,8 +633,7 @@ private void setupMiniCluster(HadoopShims shims, String confDir) throws String uriString = fs.getUri().toString(); - if (clusterType == MiniClusterType.druid - || clusterType == MiniClusterType.druidKafka + if (clusterType == MiniClusterType.druidKafka || clusterType == MiniClusterType.druidLocal) { final String tempDir = System.getProperty("test.tmp.dir"); druidCluster = new MiniDruidCluster("mini-druid", @@ -683,7 +679,7 @@ private void setupMiniCluster(HadoopShims shims, String confDir) throws MiniClusterType.llap, MiniClusterType.llap_local, MiniClusterType.druidLocal, - MiniClusterType.druid + MiniClusterType.druidKafka ).contains(clusterType)) { llapCluster = LlapItUtils.startAndGetMiniLlapCluster(conf, setup.zooKeeperCluster, confDir); } else { @@ -699,7 +695,7 @@ private void setupMiniCluster(HadoopShims shims, String confDir) throws conf, numTrackers, uriString, - EnumSet.of(MiniClusterType.llap, MiniClusterType.llap_local, MiniClusterType.druid).contains(clusterType) + EnumSet.of(MiniClusterType.llap, MiniClusterType.llap_local, MiniClusterType.druidKafka).contains(clusterType) ); } } else if (clusterType == MiniClusterType.miniSparkOnYarn) { diff --git ql/src/test/results/clientpositive/druid/druidkafkamini_basic.q.out ql/src/test/results/clientpositive/druid/druidkafkamini_basic.q.out index 619b95e23a..2d96d73ad0 100644 --- ql/src/test/results/clientpositive/druid/druidkafkamini_basic.q.out +++ ql/src/test/results/clientpositive/druid/druidkafkamini_basic.q.out @@ -253,6 +253,8 @@ STAGE PLANS: tag: 0 value expressions: _col0 (type: string) auto parallelism: true + Execution mode: llap + LLAP IO: no inputs Path -> Alias: hdfs://### HDFS PATH ### [languages] Path -> Partition: @@ -328,6 +330,8 @@ STAGE PLANS: tag: 1 value expressions: user (type: string) auto parallelism: true + Execution mode: llap + LLAP IO: no inputs Path -> Alias: hdfs://### HDFS PATH ### [druid_kafka_test] Path -> Partition: @@ -420,6 +424,7 @@ STAGE PLANS: Truncated Path -> Alias: /druid_kafka_test [druid_kafka_test] Reducer 2 + Execution mode: llap Needs Tagging: false Reduce Operator Tree: Merge Join Operator diff --git testutils/ptest2/conf/deployed/master-mr2.properties testutils/ptest2/conf/deployed/master-mr2.properties index 333c3def03..23ad0f687f 100644 --- testutils/ptest2/conf/deployed/master-mr2.properties +++ testutils/ptest2/conf/deployed/master-mr2.properties @@ -182,7 +182,7 @@ qFileTest.erasurecodingCli.groups.normal = mainProperties.${erasurecoding.only.q qFileTest.miniDruid.driver = TestMiniDruidCliDriver qFileTest.miniDruid.directory = ql/src/test/queries/clientpositive -qFileTest.miniDruid.batchSize = 50 +qFileTest.miniDruid.batchSize = 55 qFileTest.miniDruid.queryFilesProperty = qfile qFileTest.miniDruid.include = normal qFileTest.miniDruid.groups.normal = mainProperties.${druid.query.files}