Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 67 additions & 2 deletions .github/workflows/docker-GA-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,63 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build Hive Image locally
uses: docker/build-push-action@v4
with:
context: ./packaging/src/docker/
file: ./packaging/src/docker/Dockerfile
push: false
load: true
tags: hive:test
build-args:
|
HIVE_VERSION=${{ env.HIVE_VERSION }}
HADOOP_VERSION=${{ env.HADOOP_VERSION }}
TEZ_VERSION=${{ env.TEZ_VERSION }}
BUILD_ENV=${{ env.BUILD_ENV }}

- name: Build Standalone Metastore Image locally
uses: docker/build-push-action@v4
with:
context: ./standalone-metastore/packaging/src/docker/
file: ./standalone-metastore/packaging/src/docker/Dockerfile
push: false
load: true
tags: hive:standalone-metastore-test
build-args:
|
HIVE_VERSION=${{ env.HIVE_VERSION }}
HADOOP_VERSION=${{ env.HADOOP_VERSION }}
BUILD_ENV=${{ env.BUILD_ENV }}

- name: Create k8s cluster
uses: helm/kind-action@v1

- name: Set up Helm
uses: azure/setup-helm@v4

- name: Load images
run: kind load docker-image hive:test hive:standalone-metastore-test --name chart-testing

- name: Deploy Hive
run: |
./itests/test-docker/scripts/setup.sh
- name: Run JUnit
# On workflow_dispatch, the checked-out source code and libraries could be inconsistent with the specified Hive release
if: github.event_name != 'workflow_dispatch'
run: |
mvn --batch-mode test -Pitests -Pdocker-integration-tests -pl itests/test-docker
- name: Test HiveServer2
run: |
./itests/test-docker/scripts/test_hive_server2.sh
- name: Clean up k8s
run: |
./itests/test-docker/scripts/teardown.sh
kind delete cluster --name chart-testing
- name: Build and push Hive Image to docker hub
uses: docker/build-push-action@v4
with:
Expand Down Expand Up @@ -141,8 +198,16 @@ jobs:
HADOOP_VERSION=${{ env.HADOOP_VERSION }}
BUILD_ENV=${{ env.BUILD_ENV }}

- name: Dump disk usage on failure
if: failure()
- name: Dump resource space at the end
run: |
df -h
free -h
- name: Dump resource usage on failure
if: failure() || cancelled()
run: |
df -h
du -xh / --max-depth=3 2>/dev/null | sort -h | tail -50
free -h
ps aux --sort -rss | head -n 30
kubectl get pods
1 change: 0 additions & 1 deletion itests/hive-iceberg/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<hive.path.to.root>../..</hive.path.to.root>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<log4j2.debug>false</log4j2.debug>
<iceberg.version>1.10.0</iceberg.version>
</properties>
<dependencies>
<dependency>
Expand Down
14 changes: 14 additions & 0 deletions itests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
<properties>
<hive.path.to.root>..</hive.path.to.root>
<wiremock-jre8.version>2.32.0</wiremock-jre8.version>
<iceberg.version>1.10.0</iceberg.version>
<assertj.version>3.27.3</assertj.version>
</properties>
<modules>
<module>custom-serde</module>
Expand All @@ -44,6 +46,7 @@
<module>qtest-druid</module>
<module>qtest-kudu</module>
<module>qtest-iceberg</module>
<module>test-docker</module>
<module>hive-iceberg</module>
</modules>
<dependencyManagement>
Expand All @@ -69,6 +72,11 @@
<artifactId>hive-metastore</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-standalone-metastore-client</artifactId>
<version>${standalone-metastore.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-standalone-metastore-common</artifactId>
Expand Down Expand Up @@ -497,6 +505,12 @@
<artifactId>hive-iceberg-handler</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
Expand Down
30 changes: 30 additions & 0 deletions itests/test-docker/helm/ozone/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 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.

datanode:
replicas: 1
env:
# GitHub Actions provide tiny spaces
- name: OZONE-SITE.XML_hdds.datanode.volume.min.free.space
value: "256MB"
- name: OZONE-SITE.XML_hdds.scm.safemode.enabled
value: "false"
- name: OZONE-SITE.XML_ozone.scm.container.size
value: 128MB
- name: OZONE-SITE.XML_ozone.scm.block.size
value: 32MB
- name: OZONE-SITE.XML_ozone.server.default.replication
value: "1"
44 changes: 44 additions & 0 deletions itests/test-docker/k8s/beeline/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 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.

apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: beeline
name: beeline
spec:
replicas: 1
selector:
matchLabels:
app: beeline
template:
metadata:
labels:
app: beeline
spec:
containers:
- name: loop
image: hive:test
command:
- timeout
args:
- infinity
- sleep
- infinity
env:
- name: TERM
value: dumb
48 changes: 48 additions & 0 deletions itests/test-docker/k8s/hadoop/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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.

apiVersion: v1
kind: ConfigMap
metadata:
name: hadoop-config
data:
core-site.xml: |
<configuration>
<property>
<name>fs.s3a.endpoint</name>
<value>http://ozone-s3g-rest:9878</value>
</property>
<property>
<name>fs.s3a.path.style.access</name>
<value>true</value>
</property>
<property>
<name>fs.s3a.change.detection.version.required</name>
<value>false</value>
</property>
<property>
<name>fs.s3a.change.detection.mode</name>
<value>none</value>
</property>
<property>
<name>fs.s3a.access.key</name>
<value>hadoop</value>
</property>
<property>
<name>fs.s3a.secret.key</name>
<value>dummy</value>
</property>
</configuration>
44 changes: 44 additions & 0 deletions itests/test-docker/k8s/hive-metastore/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 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.

apiVersion: v1
kind: ConfigMap
metadata:
name: hive-metastore-config
data:
metastore-site.xml: |
<configuration>
<property>
<name>metastore.warehouse.dir</name>
<value>s3a://test/test-warehouse</value>
</property>
<property>
<name>hive.metastore.warehouse.external.dir</name>
<value>s3a://test/test-warehouse</value>
</property>
<property>
<name>metastore.event.db.notification.api.auth</name>
<value>false</value>
</property>
<property>
<name>metastore.catalog.servlet.port</name>
<value>9001</value>
</property>
<property>
<name>metastore.catalog.servlet.auth</name>
<value>none</value>
</property>
</configuration>
75 changes: 75 additions & 0 deletions itests/test-docker/k8s/hive-metastore/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# 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.

apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: hive-metastore
name: hive-metastore
spec:
replicas: 1
selector:
matchLabels:
app: hive-metastore
template:
metadata:
labels:
app: hive-metastore
spec:
initContainers:
- name: download-aws-sdk
image: ubuntu:26.04
command:
- /bin/bash
args:
- -c
- |
apt-get update
apt-get install -y --no-install-recommends ca-certificates wget
wget https://repo1.maven.org/maven2/software/amazon/awssdk/bundle/2.26.19/bundle-2.26.19.jar -P /tmp/ext-jars
volumeMounts:
- name: ext-jars
mountPath: /tmp/ext-jars
containers:
- name: hive-metastore
image: hive:standalone-metastore-test
env:
- name: HADOOP_OPTIONAL_TOOLS
value: hadoop-aws
- name: HIVE_CUSTOM_CONF_DIR
value: /etc/hive/conf
readinessProbe:
tcpSocket:
port: 9083
volumeMounts:
- name: ext-jars
mountPath: /tmp/ext-jars
- name: hadoop-config
mountPath: /etc/hive/conf/core-site.xml
subPath: core-site.xml
- name: hive-metastore-config
mountPath: /etc/hive/conf/metastore-site.xml
subPath: metastore-site.xml
volumes:
- name: ext-jars
emptyDir: {}
- name: hadoop-config
configMap:
name: hadoop-config
- name: hive-metastore-config
configMap:
name: hive-metastore-config
Loading