Skip to content

Commit 21c80f6

Browse files
committed
Use Hive 4 and Hadoop 3 images
1 parent 8d8ed92 commit 21c80f6

File tree

7 files changed

+41
-10
lines changed

7 files changed

+41
-10
lines changed

presto-hive-hadoop2/bin/common.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ function termination_handler(){
6767
exit 130
6868
}
6969

70-
export HADOOP_BASE_IMAGE="${HADOOP_BASE_IMAGE:-prestodb/hdp2.6-hive}"
71-
export DOCKER_IMAGES_VERSION=${DOCKER_IMAGES_VERSION:-5}
70+
export HADOOP_BASE_IMAGE="${HADOOP_BASE_IMAGE:-imjalpreet/hdp3.1-hive}"
71+
export DOCKER_IMAGES_VERSION=${DOCKER_IMAGES_VERSION:-latest}
7272

7373
SCRIPT_DIR="${BASH_SOURCE%/*}"
7474
INTEGRATION_TESTS_ROOT="${SCRIPT_DIR}/.."

presto-hive/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,7 @@
554554
<exclude>**/TestParquetDistributedQueries.java</exclude>
555555
<exclude>**/TestHive2InsertOverwrite.java</exclude>
556556
<exclude>**/TestHive3InsertOverwrite.java</exclude>
557+
<exclude>**/TestHive4InsertOverwrite.java</exclude>
557558
</excludes>
558559
</configuration>
559560
</plugin>
@@ -700,6 +701,7 @@
700701
<includes>
701702
<include>**/TestHive2InsertOverwrite.java</include>
702703
<include>**/TestHive3InsertOverwrite.java</include>
704+
<include>**/TestHive4InsertOverwrite.java</include>
703705
</includes>
704706
</configuration>
705707
</plugin>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import java.util.Map;
2626

2727
import static com.facebook.airlift.testing.Closeables.closeAllRuntimeException;
28-
import static com.facebook.presto.hive.containers.HiveHadoopContainer.HIVE3_IMAGE;
28+
import static com.facebook.presto.hive.containers.HiveHadoopContainer.HIVE4_IMAGE;
2929
import static com.facebook.presto.tests.sql.TestTable.randomTableSuffix;
3030
import static java.lang.String.format;
3131

@@ -46,7 +46,7 @@ public abstract class AbstractHiveSslTest
4646
protected QueryRunner createQueryRunner() throws Exception
4747
{
4848
this.bucketName = "test-hive-ssl-enable-" + randomTableSuffix();
49-
this.dockerizedS3DataLake = new HiveMinIODataLake(bucketName, ImmutableMap.of(), HIVE3_IMAGE, true);
49+
this.dockerizedS3DataLake = new HiveMinIODataLake(bucketName, ImmutableMap.of(), HIVE4_IMAGE, true);
5050
this.dockerizedS3DataLake.start();
5151
return S3HiveQueryRunner.create(
5252
this.dockerizedS3DataLake.getHiveHadoop().getHiveMetastoreEndpoint(),
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License");
3+
* you may not use this file except in compliance with the License.
4+
* You may obtain a copy of the License at
5+
*
6+
* http://www.apache.org/licenses/LICENSE-2.0
7+
*
8+
* Unless required by applicable law or agreed to in writing, software
9+
* distributed under the License is distributed on an "AS IS" BASIS,
10+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
* See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*/
14+
package com.facebook.presto.hive;
15+
16+
import static com.facebook.presto.hive.containers.HiveHadoopContainer.HIVE4_IMAGE;
17+
18+
public class TestHive4InsertOverwrite
19+
extends BaseTestHiveInsertOverwrite
20+
{
21+
public TestHive4InsertOverwrite()
22+
{
23+
super(HIVE4_IMAGE);
24+
}
25+
}

presto-hive/src/test/java/com/facebook/presto/hive/containers/HiveHadoopContainer.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ public class HiveHadoopContainer
3030
{
3131
private static final Logger log = Logger.get(HiveHadoopContainer.class);
3232

33-
private static final String IMAGE_VERSION = "10";
34-
public static final String DEFAULT_IMAGE = "prestodb/hdp2.6-hive:" + IMAGE_VERSION;
35-
public static final String HIVE3_IMAGE = "prestodb/hive3.1-hive:" + IMAGE_VERSION;
33+
private static final String IMAGE_VERSION = "latest";
34+
public static final String DEFAULT_IMAGE = "imjalpreet/hdp3.1-hive:" + IMAGE_VERSION;
35+
public static final String HIVE3_IMAGE = "prestodb/hive3.1-hive:10";
36+
public static final String HIVE4_IMAGE = "imjalpreet/hive4.0-hive:" + IMAGE_VERSION;
3637

3738
public static final String HOST_NAME = "hadoop-master";
3839

presto-hive/src/test/java/com/facebook/presto/hive/containers/HiveMinIODataLake.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@
2626
import java.io.Closeable;
2727
import java.io.IOException;
2828
import java.util.Map;
29+
import java.util.Objects;
2930
import java.util.concurrent.atomic.AtomicBoolean;
3031

3132
import static com.facebook.presto.hive.containers.HiveHadoopContainer.HIVE3_IMAGE;
33+
import static com.facebook.presto.hive.containers.HiveHadoopContainer.HIVE4_IMAGE;
3234
import static java.util.Objects.requireNonNull;
3335
import static org.testcontainers.containers.Network.newNetwork;
3436

@@ -67,7 +69,8 @@ public HiveMinIODataLake(String bucketName, Map<String, String> hiveHadoopFilesT
6769
.putAll(hiveHadoopFilesToMount);
6870

6971
String hadoopCoreSitePath = "/etc/hadoop/conf/core-site.xml";
70-
if (hiveHadoopImage == HIVE3_IMAGE) {
72+
73+
if (Objects.equals(hiveHadoopImage, HIVE3_IMAGE) || Objects.equals(hiveHadoopImage, HIVE4_IMAGE)) {
7174
hadoopCoreSitePath = "/opt/hadoop/etc/hadoop/core-site.xml";
7275
filesToMount.put("hive_s3_insert_overwrite/hive-site.xml", "/opt/hive/conf/hive-site.xml");
7376
}

presto-product-tests/conf/docker/common/compose-commons.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ function export_canonical_path() {
2626

2727
source "${BASH_SOURCE%/*}/../../../bin/locations.sh"
2828

29-
export DOCKER_IMAGES_VERSION=${DOCKER_IMAGES_VERSION:-10}
30-
export HADOOP_BASE_IMAGE=${HADOOP_BASE_IMAGE:-"prestodb/hdp2.6-hive"}
29+
export DOCKER_IMAGES_VERSION=${DOCKER_IMAGES_VERSION:-latest}
30+
export HADOOP_BASE_IMAGE=${HADOOP_BASE_IMAGE:-"imjalpreet/hdp3.1-hive"}
3131
# This is the directory for the overriden JDK to use for starting Presto
3232
export OVERRIDE_JDK_DIR=${OVERRIDE_JDK_DIR:-"/dev/null"}
3333

0 commit comments

Comments
 (0)