Skip to content

Commit 94d6def

Browse files
committed
Reduce resource utilization in TestHiveIntegrationSmokeTest
1. use tiny schema instead of SF1 except where necessary 2. Increase JVM size to 5g Goal is to reduce test flakiness and speed up runtime. This cut the average runtime by about 2-3 minutes on my M1 mac
1 parent b15ab22 commit 94d6def

File tree

2 files changed

+23
-25
lines changed

2 files changed

+23
-25
lines changed

presto-hive/pom.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
<properties>
1616
<air.main.basedir>${project.parent.basedir}</air.main.basedir>
17+
<air.test.jvmsize>5g</air.test.jvmsize>
1718
</properties>
1819

1920
<dependencies>
@@ -636,9 +637,6 @@
636637
</profile>
637638
<profile>
638639
<id>test-hive-pushdown-filter-queries-basic</id>
639-
<properties>
640-
<air.test.jvmsize>5g</air.test.jvmsize>
641-
</properties>
642640
<build>
643641
<plugins>
644642
<plugin>

presto-hive/src/test/java/com/facebook/presto/hive/TestHiveIntegrationSmokeTest.java

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2382,23 +2382,23 @@ private void testWriteSortedTable(Session session)
23822382
session,
23832383
"CREATE TABLE create_partitioned_sorted_table (orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus)\n" +
23842384
"WITH (partitioned_by = ARRAY['orderstatus'], bucketed_by = ARRAY['custkey'], bucket_count = 11, sorted_by = ARRAY['orderkey']) AS\n" +
2385-
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.sf1.orders",
2386-
(long) computeActual("SELECT count(*) FROM tpch.sf1.orders").getOnlyValue());
2385+
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.tiny.orders",
2386+
(long) computeActual("SELECT count(*) FROM tpch.tiny.orders").getOnlyValue());
23872387
assertQuery(
23882388
session,
23892389
"SELECT count(*) FROM create_partitioned_sorted_table",
2390-
"SELECT count(*) * 100 FROM orders");
2390+
"SELECT count(*) FROM orders");
23912391

23922392
assertUpdate(
23932393
session,
23942394
"CREATE TABLE create_unpartitioned_sorted_table (orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus)\n" +
23952395
"WITH (bucketed_by = ARRAY['custkey'], bucket_count = 11, sorted_by = ARRAY['orderkey']) AS\n" +
2396-
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.sf1.orders",
2397-
(long) computeActual("SELECT count(*) FROM tpch.sf1.orders").getOnlyValue());
2396+
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.tiny.orders",
2397+
(long) computeActual("SELECT count(*) FROM tpch.tiny.orders").getOnlyValue());
23982398
assertQuery(
23992399
session,
24002400
"SELECT count(*) FROM create_unpartitioned_sorted_table",
2401-
"SELECT count(*) * 100 FROM orders");
2401+
"SELECT count(*) FROM orders");
24022402

24032403
// insert
24042404
assertUpdate(
@@ -2409,12 +2409,12 @@ private void testWriteSortedTable(Session session)
24092409
assertUpdate(
24102410
session,
24112411
"INSERT INTO insert_partitioned_sorted_table\n" +
2412-
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.sf1.orders",
2413-
(long) computeActual("SELECT count(*) FROM tpch.sf1.orders").getOnlyValue());
2412+
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.tiny.orders",
2413+
(long) computeActual("SELECT count(*) FROM tpch.tiny.orders").getOnlyValue());
24142414
assertQuery(
24152415
session,
24162416
"SELECT count(*) FROM insert_partitioned_sorted_table",
2417-
"SELECT count(*) * 100 FROM orders");
2417+
"SELECT count(*) FROM orders");
24182418
}
24192419
finally {
24202420
assertUpdate(session, "DROP TABLE IF EXISTS create_partitioned_sorted_table");
@@ -2441,23 +2441,23 @@ public void testWritePreferredOrderingTable(Session session)
24412441
session,
24422442
"CREATE TABLE create_partitioned_ordering_table (orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus)\n" +
24432443
"WITH (partitioned_by = ARRAY['orderstatus'], preferred_ordering_columns = ARRAY['orderkey']) AS\n" +
2444-
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.sf1.orders",
2445-
(long) computeActual("SELECT count(*) FROM tpch.sf1.orders").getOnlyValue());
2444+
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.tiny.orders",
2445+
(long) computeActual("SELECT count(*) FROM tpch.tiny.orders").getOnlyValue());
24462446
assertQuery(
24472447
session,
24482448
"SELECT count(*) FROM create_partitioned_ordering_table",
2449-
"SELECT count(*) * 100 FROM orders");
2449+
"SELECT count(*) FROM orders");
24502450

24512451
assertUpdate(
24522452
session,
24532453
"CREATE TABLE create_unpartitioned_ordering_table (orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus)\n" +
24542454
"WITH (preferred_ordering_columns = ARRAY['orderkey']) AS\n" +
2455-
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.sf1.orders",
2456-
(long) computeActual("SELECT count(*) FROM tpch.sf1.orders").getOnlyValue());
2455+
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.tiny.orders",
2456+
(long) computeActual("SELECT count(*) FROM tpch.tiny.orders").getOnlyValue());
24572457
assertQuery(
24582458
session,
24592459
"SELECT count(*) FROM create_unpartitioned_ordering_table",
2460-
"SELECT count(*) * 100 FROM orders");
2460+
"SELECT count(*) FROM orders");
24612461

24622462
// insert
24632463
assertUpdate(
@@ -2468,12 +2468,12 @@ public void testWritePreferredOrderingTable(Session session)
24682468
assertUpdate(
24692469
session,
24702470
"INSERT INTO insert_partitioned_ordering_table\n" +
2471-
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.sf1.orders",
2472-
(long) computeActual("SELECT count(*) FROM tpch.sf1.orders").getOnlyValue());
2471+
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.tiny.orders",
2472+
(long) computeActual("SELECT count(*) FROM tpch.tiny.orders").getOnlyValue());
24732473
assertQuery(
24742474
session,
24752475
"SELECT count(*) FROM insert_partitioned_ordering_table",
2476-
"SELECT count(*) * 100 FROM orders");
2476+
"SELECT count(*) FROM orders");
24772477

24782478
// invalid
24792479
assertQueryFails(
@@ -2644,8 +2644,8 @@ public void testFileRenamingForPartitionedTable()
26442644
.build(),
26452645
"CREATE TABLE partitioned_ordering_table (orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus)\n" +
26462646
"WITH (partitioned_by = ARRAY['orderstatus'], preferred_ordering_columns = ARRAY['orderkey']) AS\n" +
2647-
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.sf1.orders",
2648-
(long) computeActual("SELECT count(*) FROM tpch.sf1.orders").getOnlyValue());
2647+
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.tiny.orders",
2648+
(long) computeActual("SELECT count(*) FROM tpch.tiny.orders").getOnlyValue());
26492649

26502650
// Collect all file names
26512651
Map<String, List<Integer>> partitionFileNamesMap = new HashMap<>();
@@ -2683,8 +2683,8 @@ public void testFileRenamingForUnpartitionedTable()
26832683
.setSystemProperty("writer_min_size", "1MB")
26842684
.setSystemProperty("task_writer_count", "1")
26852685
.build(),
2686-
"CREATE TABLE unpartitioned_ordering_table AS SELECT * FROM tpch.sf1.orders",
2687-
(long) computeActual("SELECT count(*) FROM tpch.sf1.orders").getOnlyValue());
2686+
"CREATE TABLE unpartitioned_ordering_table AS SELECT * FROM tpch.tiny.orders",
2687+
(long) computeActual("SELECT count(*) FROM tpch.tiny.orders").getOnlyValue());
26882688

26892689
// Collect file names of the table
26902690
List<Integer> fileNames = new ArrayList<>();

0 commit comments

Comments
 (0)