Skip to content

feat: Add support for Hive 4.0.0 #508

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 3, 2024
Merged
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

### Added

- Add support for Hive `4.0.0` ([#508]).

### Changed

- Reduce CRD size from `487KB` to `60KB` by accepting arbitrary YAML input instead of the underlying schema for the following fields ([#505]):
- `podOverrides`
- `affinity`

[#505]: https://github.com/stackabletech/hive-operator/pull/505
[#508]: https://github.com/stackabletech/hive-operator/pull/508

## [24.7.0] - 2024-07-24

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: hive-postgres-s3
spec:
image:
productVersion: 3.1.3
productVersion: 4.0.0
clusterConfig:
database:
connString: jdbc:postgresql://postgresql:5432/hive
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: hive-postgres-s3
spec:
image:
productVersion: 3.1.3
productVersion: 4.0.0
clusterConfig:
database:
connString: jdbc:postgresql://postgresql:5432/hive
Expand Down
10 changes: 5 additions & 5 deletions docs/modules/hive/pages/usage-guide/database-driver.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ metadata:
name: hive-with-drivers
spec:
image:
productVersion: 3.1.3
productVersion: 4.0.0
clusterConfig:
database:
connString: jdbc:mysql://mysql:3306/hive # <1>
Expand Down Expand Up @@ -194,15 +194,15 @@ If you have access to a registry to store custom images, another approach is to
.Copy the driver
[source]
----
FROM docker.stackable.tech/stackable/hive:3.1.3-stackable0.0.0-dev
FROM docker.stackable.tech/stackable/hive:4.0.0-stackable0.0.0-dev

RUN curl --fail -L https://repo1.maven.org/maven2/com/mysql/mysql-connector-j/8.0.31/mysql-connector-j-8.0.31.jar -o /stackable/mysql-connector-j-8.0.31.jar
----

.Build and tag the image
[source]
----
docker build -f ./Dockerfile -t docker.stackable.tech/stackable/hive:3.1.3-stackable0.0.0-dev-mysql .
docker build -f ./Dockerfile -t docker.stackable.tech/stackable/hive:4.0.0-stackable0.0.0-dev-mysql .
----

.Reference the new path to the driver without the need for using a volume mounted from a PVC
Expand All @@ -215,8 +215,8 @@ metadata:
name: hive
spec:
image:
custom: docker.stackable.tech/stackable/hive:3.1.3-stackable0.0.0-dev-mysql # <1>
productVersion: 3.1.3
custom: docker.stackable.tech/stackable/hive:4.0.0-stackable0.0.0-dev-mysql # <1>
productVersion: 4.0.0
clusterConfig:
database:
...
Expand Down
8 changes: 4 additions & 4 deletions docs/modules/hive/pages/usage-guide/derby-example.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ metadata:
name: simple-hive-derby
spec:
image:
productVersion: 3.1.3
productVersion: 4.0.0
clusterConfig:
database:
connString: jdbc:derby:;databaseName=/tmp/metastore_db;create=true
Expand All @@ -39,7 +39,7 @@ stringData:

WARNING: You should not use the `Derby` database in production. Derby stores data locally which does not work in high availability setups (multiple replicas) and all data is lost after Pod restarts.

To create a single node Apache Hive Metastore (v3.1.3) cluster with derby and S3 access, deploy a minio (or use any available S3 bucket):
To create a single node Apache Hive Metastore (v4.0.0) cluster with derby and S3 access, deploy a minio (or use any available S3 bucket):
[source,bash]
----
helm install minio \
Expand All @@ -66,7 +66,7 @@ metadata:
name: simple-hive-derby
spec:
image:
productVersion: 3.1.3
productVersion: 4.0.0
clusterConfig:
database:
connString: jdbc:derby:;databaseName=/stackable/metastore_db;create=true
Expand Down Expand Up @@ -143,7 +143,7 @@ metadata:
name: simple-hive-postgres
spec:
image:
productVersion: 3.1.3
productVersion: 4.0.0
clusterConfig:
database:
connString: jdbc:postgresql://hive-postgresql.default.svc.cluster.local:5432/hive
Expand Down
3 changes: 2 additions & 1 deletion docs/modules/hive/partials/supported-versions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
// This is a separate file, since it is used by both the direct Hive-Operator documentation, and the overarching
// Stackable Platform documentation.

- 3.1.3
- 3.1.3 (LTS)
- 4.0.0 (experimental)
2 changes: 1 addition & 1 deletion examples/simple-hive-cluster-postgres-s3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ metadata:
name: simple-hive-postgres
spec:
image:
productVersion: 3.1.3
productVersion: 4.0.0
stackableVersion: 0.0.0-dev
clusterConfig:
database:
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-hive-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: simple-hive-derby
spec:
image:
productVersion: 3.1.3
productVersion: 4.0.0
stackableVersion: 0.0.0-dev
clusterConfig:
database:
Expand Down
2 changes: 1 addition & 1 deletion rust/crd/src/affinity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ mod tests {
name: simple-hive
spec:
image:
productVersion: 3.1.3
productVersion: 4.0.0
clusterConfig:
database:
connString: jdbc:derby:;databaseName=/tmp/hive;create=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ data:

# S3 access
try:
hive_client.create_table(table(database_name, s3_test_table_name, "s3a://hive/"))
hive_client.create_table(table(database_name, s3_test_table_name, "s3a://hive/s3_one_column_table/"))
except AlreadyExistsException:
print(f"[INFO]: Table {s3_test_table_name} already existed")
print("[DEBUG]: Fetching schema")
Expand Down
2 changes: 1 addition & 1 deletion tests/templates/kuttl/smoke/test_metastore.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def table(db_name, table_name, location):
# S3 access
try:
hive_client.create_table(
table(database_name, s3_test_table_name, "s3a://hive/")
table(database_name, s3_test_table_name, "s3a://hive/s3_one_column_table/")
)
except AlreadyExistsException:
print(f"[INFO]: Table {s3_test_table_name} already existed")
Expand Down
7 changes: 4 additions & 3 deletions tests/test-definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@ dimensions:
- name: hive
values:
- 3.1.3
- 4.0.0
# Alternatively, if you want to use a custom image, append a comma and the full image name to the product version
# as in the example below.
# - 3.1.3,docker.stackable.tech/sandbox/hive:3.1.3-stackable0.0.0-dev
# - 4.0.0,docker.stackable.tech/sandbox/hive:4.0.0-stackable0.0.0-dev
- name: hive-latest
values:
- 3.1.3
- 4.0.0
# Alternatively, if you want to use a custom image, append a comma and the full image name to the product version
# as in the example below.
# - 3.1.3,docker.stackable.tech/sandbox/hive:3.1.3-stackable0.0.0-dev
# - 4.0.0,docker.stackable.tech/sandbox/hive:4.0.0-stackable0.0.0-dev
- name: hdfs-latest
values:
- 3.3.6
Expand Down
Loading