You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by dk...@apache.org on 2023/05/08 10:25:02 UTC
[hive] branch master updated: HIVE-23394: Fix Flaky TestJdbcGenericUDTFGetSplits{2}#testGenericUDTFOrderBySplitCount1 (Simhadri Govindappa, reviewed by Attila Turoczy, Ayush Saxena, Denys Kuzmenko)
This is an automated email from the ASF dual-hosted git repository.
dkuzmenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new c0c2031d67a HIVE-23394: Fix Flaky TestJdbcGenericUDTFGetSplits{2}#testGenericUDTFOrderBySplitCount1 (Simhadri Govindappa, reviewed by Attila Turoczy, Ayush Saxena, Denys Kuzmenko)
c0c2031d67a is described below
commit c0c2031d67a00b4678ec72ef3d7b906d546d28a9
Author: Simhadri Govindappa <si...@gmail.com>
AuthorDate: Mon May 8 15:54:53 2023 +0530
HIVE-23394: Fix Flaky TestJdbcGenericUDTFGetSplits{2}#testGenericUDTFOrderBySplitCount1 (Simhadri Govindappa, reviewed by Attila Turoczy, Ayush Saxena, Denys Kuzmenko)
Closes #4249
---
.../jdbc/AbstractTestJdbcGenericUDTFGetSplits.java | 17 +++-------
.../hive/jdbc/TestJdbcGenericUDTFGetSplits.java | 20 +++++++++---
.../hive/jdbc/TestJdbcGenericUDTFGetSplits2.java | 38 ----------------------
3 files changed, 19 insertions(+), 56 deletions(-)
diff --git a/itests/hive-unit/src/test/java/org/apache/hive/jdbc/AbstractTestJdbcGenericUDTFGetSplits.java b/itests/hive-unit/src/test/java/org/apache/hive/jdbc/AbstractTestJdbcGenericUDTFGetSplits.java
index 799d8ffc1da..def5698d513 100644
--- a/itests/hive-unit/src/test/java/org/apache/hive/jdbc/AbstractTestJdbcGenericUDTFGetSplits.java
+++ b/itests/hive-unit/src/test/java/org/apache/hive/jdbc/AbstractTestJdbcGenericUDTFGetSplits.java
@@ -76,9 +76,7 @@ public abstract class AbstractTestJdbcGenericUDTFGetSplits {
conf.setVar(HiveConf.ConfVars.LLAP_IO_MEMORY_MODE, "none");
conf.setVar(HiveConf.ConfVars.LLAP_EXTERNAL_SPLITS_TEMP_TABLE_STORAGE_FORMAT, "text");
-
- conf.addResource(new URL("file://" + new File(confDir).toURI().getPath()
- + "/tez-site.xml"));
+ conf.addResource(new URL("file://" + new File(confDir).toURI().getPath() + "/tez-site.xml"));
miniHS2 = new MiniHS2(conf, MiniHS2.MiniClusterType.LLAP);
dataFileDir = conf.get("test.data.files").replace('\\', '/').replace("c:", "");
@@ -107,8 +105,7 @@ public abstract class AbstractTestJdbcGenericUDTFGetSplits {
hs2Conn.close();
}
- protected void runQuery(final String query, final List<String> setCmds,
- final int numRows) throws Exception {
+ protected void runQuery(final String query, final List<String> setCmds, final int numRows) throws Exception {
Connection con = hs2Conn;
BaseJdbcWithMiniLlap.createTestTable(con, null, tableName, kvDataFilePath.toString());
@@ -179,15 +176,9 @@ public abstract class AbstractTestJdbcGenericUDTFGetSplits {
query = "select " + udtfName + "(" + "'select value from " + tableName + " where value is not null limit 2', 5)";
runQuery(query, getConfigs(), expectedCounts[5]);
- query = "select " + udtfName + "(" +
- "'select `value` from (select value from " + tableName + " where value is not null order by value) as t', 5)";
+ query = "select " + udtfName + "(" + "'select `value` from (select value from " + tableName +
+ " where value is not null order by value) as t', 5)";
runQuery(query, getConfigs(), expectedCounts[6]);
-
- List<String> setCmds = getConfigs();
- setCmds.add("set hive.llap.external.splits.order.by.force.single.split=false");
- query = "select " + udtfName + "(" +
- "'select `value` from (select value from " + tableName + " where value is not null order by value) as t', 10)";
- runQuery(query, setCmds, expectedCounts[7]);
}
protected void testGenericUDTFOrderBySplitCount1OnPartitionedTable(String udtfName, int[] expectedCounts)
diff --git a/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcGenericUDTFGetSplits.java b/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcGenericUDTFGetSplits.java
index ce330d8bf9b..44fa8040842 100644
--- a/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcGenericUDTFGetSplits.java
+++ b/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcGenericUDTFGetSplits.java
@@ -38,16 +38,26 @@ import static org.junit.Assert.assertTrue;
public class TestJdbcGenericUDTFGetSplits extends AbstractTestJdbcGenericUDTFGetSplits {
@Test(timeout = 200000)
- @Ignore("HIVE-23394")
- public void testGenericUDTFOrderBySplitCount1() throws Exception {
- super.testGenericUDTFOrderBySplitCount1("get_splits", new int[]{10, 1, 0, 2, 2, 2, 1, 10});
+ public void testGetSplitsOrderBySplitCount1() throws Exception {
+ testGenericUDTFOrderBySplitCount1("get_splits", new int[] { 10, 5, 0, 2, 2, 2, 5 });
}
@Test(timeout = 200000)
- public void testGenericUDTFOrderBySplitCount1OnPartitionedTable() throws Exception {
- super.testGenericUDTFOrderBySplitCount1OnPartitionedTable("get_splits", new int[]{5, 5, 1, 1, 1});
+ public void testGetLlapSplitsOrderBySplitCount1() throws Exception {
+ testGenericUDTFOrderBySplitCount1("get_llap_splits", new int[] { 12, 7, 1, 4, 4, 4, 7 });
}
+ @Test(timeout = 200000)
+ public void testGetSplitsOrderBySplitCount1OnPartitionedTable() throws Exception {
+ testGenericUDTFOrderBySplitCount1OnPartitionedTable("get_splits", new int[]{5, 5, 1, 1, 1});
+ }
+
+ @Test(timeout = 200000)
+ public void testGetLlapSplitsOrderBySplitCount1OnPartitionedTable() throws Exception {
+ testGenericUDTFOrderBySplitCount1OnPartitionedTable("get_llap_splits", new int[]{7, 7, 3, 3, 3});
+ }
+
+
@Test
public void testDecimalPrecisionAndScale() throws Exception {
diff --git a/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcGenericUDTFGetSplits2.java b/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcGenericUDTFGetSplits2.java
deleted file mode 100644
index 19f5c2aaa31..00000000000
--- a/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcGenericUDTFGetSplits2.java
+++ /dev/null
@@ -1,38 +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.hive.jdbc;
-
-import org.junit.Ignore;
-import org.junit.Test;
-
-/**
- * TestJdbcGenericUDTFGetSplits2.
- */
-public class TestJdbcGenericUDTFGetSplits2 extends AbstractTestJdbcGenericUDTFGetSplits {
-
- @Test(timeout = 200000)
- @Ignore("HIVE-23394")
- public void testGenericUDTFOrderBySplitCount1() throws Exception {
- super.testGenericUDTFOrderBySplitCount1("get_llap_splits", new int[]{12, 3, 1, 4, 4, 4, 3, 12});
- }
-
- @Test(timeout = 200000)
- public void testGenericUDTFOrderBySplitCount1OnPartitionedTable() throws Exception {
- super.testGenericUDTFOrderBySplitCount1OnPartitionedTable("get_llap_splits", new int[]{7, 7, 3, 3, 3});
- }
-
-}