Skip to content
Draft
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
224 changes: 112 additions & 112 deletions Cargo.lock

Large diffs are not rendered by default.

306 changes: 151 additions & 155 deletions Cargo.nix

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9"
snafu = "0.8"
strum = { version = "0.27", features = ["derive"] }
strum = { version = "0.28", features = ["derive"] }
tokio = { version = "1.40", features = ["full"] }
tracing = "0.1"

# [patch."https://github.com/stackabletech/operator-rs.git"]
[patch."https://github.com/stackabletech/operator-rs.git"]
# stackable-operator = { path = "../operator-rs/crates/stackable-operator" }
# stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "main" }
stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "spike/generic-databases" }
18 changes: 9 additions & 9 deletions crate-hashes.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 0 additions & 56 deletions deploy/config-spec/properties.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,62 +58,6 @@ properties:
comment: "TTL for domain names that cannot be resolved."
description: "TTL for domain names that cannot be resolved."

- property:
propertyNames:
- name: "javax.jdo.option.ConnectionURL"
kind:
type: "file"
file: "hive-site.xml"
datatype:
type: "string"
# unit: *unitUri
roles:
- name: "metastore"
required: true
asOfVersion: "0.0.0"
description: "JDBC connect string for a JDBC metastore.
To use SSL to encrypt/authenticate the connection, provide database-specific SSL flag in the connection URL.
For example, jdbc:postgresql://myhost/db?ssl=true for postgres database."
- property:
propertyNames:
- name: "javax.jdo.option.ConnectionDriverName"
kind:
type: "file"
file: "hive-site.xml"
datatype:
type: "string"
unit: *unitClassName
roles:
- name: "metastore"
# This property *is* required even though it is set to `false` here.
# The required value changed in Derby in version 4.2.0.
# We now set this value depending on the Hive version (and its corresponding Derby version) and add it to the ConfigMap programatically.
required: false
asOfVersion: "0.0.0"
- property:
propertyNames:
- name: "javax.jdo.option.ConnectionUserName"
kind:
type: "file"
file: "hive-site.xml"
datatype:
type: "string"
roles:
- name: "metastore"
required: true
asOfVersion: "0.0.0"
- property:
propertyNames:
- name: "javax.jdo.option.ConnectionPassword"
kind:
type: "file"
file: "hive-site.xml"
datatype:
type: "string"
roles:
- name: "metastore"
required: true
asOfVersion: "0.0.0"
- property:
propertyNames:
- name: "hive.metastore.port"
Expand Down
56 changes: 0 additions & 56 deletions deploy/helm/hive-operator/configs/properties.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,62 +58,6 @@ properties:
comment: "TTL for domain names that cannot be resolved."
description: "TTL for domain names that cannot be resolved."

- property:
propertyNames:
- name: "javax.jdo.option.ConnectionURL"
kind:
type: "file"
file: "hive-site.xml"
datatype:
type: "string"
# unit: *unitUri
roles:
- name: "metastore"
required: true
asOfVersion: "0.0.0"
description: "JDBC connect string for a JDBC metastore.
To use SSL to encrypt/authenticate the connection, provide database-specific SSL flag in the connection URL.
For example, jdbc:postgresql://myhost/db?ssl=true for postgres database."
- property:
propertyNames:
- name: "javax.jdo.option.ConnectionDriverName"
kind:
type: "file"
file: "hive-site.xml"
datatype:
type: "string"
unit: *unitClassName
roles:
- name: "metastore"
# This property *is* required even though it is set to `false` here.
# The required value changed in Derby in version 4.2.0.
# We now set this value depending on the Hive version (and its corresponding Derby version) and add it to the ConfigMap programatically.
required: false
asOfVersion: "0.0.0"
- property:
propertyNames:
- name: "javax.jdo.option.ConnectionUserName"
kind:
type: "file"
file: "hive-site.xml"
datatype:
type: "string"
roles:
- name: "metastore"
required: true
asOfVersion: "0.0.0"
- property:
propertyNames:
- name: "javax.jdo.option.ConnectionPassword"
kind:
type: "file"
file: "hive-site.xml"
datatype:
type: "string"
roles:
- name: "metastore"
required: true
asOfVersion: "0.0.0"
- property:
propertyNames:
- name: "hive.metastore.port"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ spec:
image:
productVersion: 4.2.0
clusterConfig:
database:
connString: jdbc:postgresql://postgresql:5432/hive
credentialsSecret: hive-credentials
dbType: postgres
metadataDatabase:
postgresql:
host: postgresql
database: hive
credentialsSecret: hive-credentials
s3:
reference: minio
metastore:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ spec:
image:
productVersion: 4.2.0
clusterConfig:
database:
connString: jdbc:postgresql://postgresql:5432/hive
credentialsSecret: hive-credentials
dbType: postgres
metadataDatabase:
postgresql:
host: postgresql
database: hive
credentialsSecret: hive-credentials
s3:
reference: minio
metastore:
Expand Down
9 changes: 5 additions & 4 deletions docs/modules/hive/pages/reference/discovery.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ metadata:
namespace: {namespace} # <2>
spec:
clusterConfig:
database:
connString: jdbc:postgresql://postgresql:5432/hive
credentialsSecret: hive-credentials
dbType: postgres
metadataDatabase:
postgresql:
host: postgresql
database: hive
credentialsSecret: hive-credentials
metastore:
roleGroups:
default: # <3>
Expand Down
11 changes: 6 additions & 5 deletions docs/modules/hive/pages/usage-guide/database-driver.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,11 @@ spec:
image:
productVersion: 4.2.0
clusterConfig:
database:
connString: jdbc:mysql://mysql:3306/hive # <1>
credentialsSecret: hive-credentials # <2>
dbType: mysql
metadataDatabase:
mysql:
host: mysql
database: hive
credentialsSecret: hive-credentials
s3:
reference: minio # <3>
metastore:
Expand Down Expand Up @@ -224,7 +225,7 @@ spec:
custom: oci.stackable.tech/sdp/hive:4.2.0-stackable0.0.0-dev-mysql # <1>
productVersion: 4.2.0
clusterConfig:
database:
metadataDatabase:
...
s3:
...
Expand Down
41 changes: 9 additions & 32 deletions docs/modules/hive/pages/usage-guide/derby-example.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ It should generally be safe to simply use the latest image version that is avail
.Create a single node Apache Hive Metastore cluster using Derby:
[source,yaml]
----
---
apiVersion: hive.stackable.tech/v1alpha1
kind: HiveCluster
metadata:
Expand All @@ -18,23 +17,12 @@ spec:
image:
productVersion: 4.2.0
clusterConfig:
database:
connString: jdbc:derby:;databaseName=/tmp/metastore_db;create=true
credentialsSecret: hive-credentials
dbType: derby
metadataDatabase:
derby: {}
metastore:
roleGroups:
default:
replicas: 1
---
apiVersion: v1
kind: Secret
metadata:
name: hive-credentials
type: Opaque
stringData:
username: APP
password: mine
----

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.
Expand Down Expand Up @@ -63,7 +51,6 @@ Then, connect to localhost:9001 and login with the user `minio-access-key` and p
Deploy the hive cluster:
[source,yaml]
----
---
apiVersion: hive.stackable.tech/v1alpha1
kind: HiveCluster
metadata:
Expand All @@ -72,10 +59,8 @@ spec:
image:
productVersion: 4.2.0
clusterConfig:
database:
connString: jdbc:derby:;databaseName=/stackable/metastore_db;create=true
credentialsSecret: hive-credentials
dbType: derby
metadataDatabase:
derby: {}
s3:
inline:
host: minio
Expand Down Expand Up @@ -107,15 +92,6 @@ metadata:
stringData:
accessKey: minio-access-key
secretKey: minio-secret-key
---
apiVersion: v1
kind: Secret
metadata:
name: hive-credentials
type: Opaque
stringData:
username: APP
password: mine
----


Expand Down Expand Up @@ -153,10 +129,11 @@ spec:
image:
productVersion: 4.2.0
clusterConfig:
database:
connString: jdbc:postgresql://hive-postgresql.default.svc.cluster.local:5432/hive
credentialsSecret: hive-credentials
dbType: postgres
metadataDatabase:
postgresql:
host: hive-postgresql.default.svc.cluster.local
database: hive
credentialsSecret: hive-credentials
metastore:
roleGroups:
default:
Expand Down
9 changes: 5 additions & 4 deletions examples/hive-opa-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ spec:
opa:
configMapName: opa
package: hms
database:
connString: jdbc:postgresql://postgresql:5432/hive
credentialsSecret: hive-postgresql-credentials
dbType: postgres
metadataDatabase:
postgresql:
host: postgresql
database: hive
credentialsSecret: hive-postgresql-credentials
metastore:
roleGroups:
default:
Expand Down
9 changes: 5 additions & 4 deletions examples/simple-hive-cluster-postgres-s3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ spec:
image:
productVersion: 4.2.0
clusterConfig:
database:
connString: jdbc:postgresql://hive-postgresql.default.svc.cluster.local:5432/hive
credentialsSecret: hive-credentials
dbType: postgres
metadataDatabase:
postgresql:
host: hive-postgresql.default.svc.cluster.local
database: hive
credentialsSecret: hive-credentials
s3:
inline:
host: test-minio
Expand Down
6 changes: 2 additions & 4 deletions examples/simple-hive-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ spec:
image:
productVersion: 4.2.0
clusterConfig:
database:
connString: jdbc:derby:;databaseName=/tmp/hive;create=true
credentialsSecret: hive-credentials
dbType: derby
metadataDatabase:
derby: {}
metastore:
roleGroups:
default:
Expand Down
Loading