Skip to content

Commit 9653f8c

Browse files
committed
Update tests and docs
1 parent b2f5e8b commit 9653f8c

19 files changed

Lines changed: 55 additions & 200 deletions

docs/modules/hive/pages/usage-guide/derby-example.adoc

Lines changed: 9 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,12 @@ spec:
1818
image:
1919
productVersion: 4.2.0
2020
clusterConfig:
21-
database:
22-
connString: jdbc:derby:;databaseName=/tmp/metastore_db;create=true
23-
credentialsSecret: hive-credentials
24-
dbType: derby
21+
metadataDatabase:
22+
derby: {}
2523
metastore:
2624
roleGroups:
2725
default:
2826
replicas: 1
29-
---
30-
apiVersion: v1
31-
kind: Secret
32-
metadata:
33-
name: hive-credentials
34-
type: Opaque
35-
stringData:
36-
username: APP
37-
password: mine
3827
----
3928
4029
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.
@@ -72,10 +61,8 @@ spec:
7261
image:
7362
productVersion: 4.2.0
7463
clusterConfig:
75-
database:
76-
connString: jdbc:derby:;databaseName=/stackable/metastore_db;create=true
77-
credentialsSecret: hive-credentials
78-
dbType: derby
64+
metadataDatabase:
65+
derby: {}
7966
s3:
8067
inline:
8168
host: minio
@@ -107,15 +94,6 @@ metadata:
10794
stringData:
10895
accessKey: minio-access-key
10996
secretKey: minio-secret-key
110-
---
111-
apiVersion: v1
112-
kind: Secret
113-
metadata:
114-
name: hive-credentials
115-
type: Opaque
116-
stringData:
117-
username: APP
118-
password: mine
11997
----
12098
12199
@@ -153,10 +131,11 @@ spec:
153131
image:
154132
productVersion: 4.2.0
155133
clusterConfig:
156-
database:
157-
connString: jdbc:postgresql://hive-postgresql.default.svc.cluster.local:5432/hive
158-
credentialsSecret: hive-credentials
159-
dbType: postgres
134+
metadataDatabase:
135+
postgresql:
136+
host: hive-postgresql.default.svc.cluster.local
137+
database: hive
138+
credentialsSecret: hive-credentials
160139
metastore:
161140
roleGroups:
162141
default:

examples/hive-opa-cluster.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ spec:
3030
opa:
3131
configMapName: opa
3232
package: hms
33-
database:
34-
connString: jdbc:postgresql://postgresql:5432/hive
35-
credentialsSecret: hive-postgresql-credentials
36-
dbType: postgres
33+
metadataDatabase:
34+
postgresql:
35+
host: postgresql
36+
database: hive
37+
credentialsSecret: hive-postgresql-credentials
3738
metastore:
3839
roleGroups:
3940
default:

examples/simple-hive-cluster-postgres-s3.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ spec:
3030
image:
3131
productVersion: 4.2.0
3232
clusterConfig:
33-
database:
34-
connString: jdbc:postgresql://hive-postgresql.default.svc.cluster.local:5432/hive
35-
credentialsSecret: hive-credentials
36-
dbType: postgres
33+
metadataDatabase:
34+
postgresql:
35+
host: hive-postgresql.default.svc.cluster.local
36+
database: hive
37+
credentialsSecret: hive-credentials
3738
s3:
3839
inline:
3940
host: test-minio

examples/simple-hive-cluster.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ spec:
1111
image:
1212
productVersion: 4.2.0
1313
clusterConfig:
14-
database:
15-
connString: jdbc:derby:;databaseName=/tmp/hive;create=true
16-
credentialsSecret: hive-credentials
17-
dbType: derby
14+
metadataDatabase:
15+
derby: {}
1816
metastore:
1917
roleGroups:
2018
default:

rust/operator-binary/src/config/jvm.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,8 @@ mod tests {
109109
image:
110110
productVersion: 4.2.0
111111
clusterConfig:
112-
database:
113-
connString: jdbc:derby:;databaseName=/tmp/hive;create=true
114-
dbType: derby
115-
credentialsSecret: mySecret
112+
metadataDatabase:
113+
derby: {}
116114
metastore:
117115
roleGroups:
118116
default:
@@ -144,10 +142,8 @@ mod tests {
144142
image:
145143
productVersion: 4.2.0
146144
clusterConfig:
147-
database:
148-
connString: jdbc:derby:;databaseName=/tmp/hive;create=true
149-
dbType: derby
150-
credentialsSecret: mySecret
145+
metadataDatabase:
146+
derby: {}
151147
metastore:
152148
config:
153149
resources:

rust/operator-binary/src/crd/affinity.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,8 @@ mod tests {
4747
image:
4848
productVersion: 4.2.0
4949
clusterConfig:
50-
database:
51-
connString: jdbc:derby:;databaseName=/tmp/hive;create=true
52-
dbType: derby
53-
credentialsSecret: mySecret
50+
metadataDatabase:
51+
derby: {}
5452
metastore:
5553
roleGroups:
5654
default:

tests/templates/kuttl/cluster-operation/10-install-hive.yaml.j2

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@ spec:
1313
{% endif %}
1414
pullPolicy: IfNotPresent
1515
clusterConfig:
16-
database:
17-
connString: jdbc:derby:;databaseName=/tmp/hive;create=true
18-
credentialsSecret: hive-credentials
19-
dbType: derby
16+
metadataDatabase:
17+
derby: {}
2018
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
2119
vectorAggregatorConfigMapName: vector-aggregator-discovery
2220
{% endif %}
@@ -27,12 +25,3 @@ spec:
2725
roleGroups:
2826
default:
2927
replicas: 1
30-
---
31-
apiVersion: v1
32-
kind: Secret
33-
metadata:
34-
name: hive-credentials
35-
type: Opaque
36-
stringData:
37-
username: APP
38-
password: mine

tests/templates/kuttl/cluster-operation/20-stop-hive.yaml.j2

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,6 @@ kind: HiveCluster
44
metadata:
55
name: test-hive
66
spec:
7-
image:
8-
{% if test_scenario['values']['hive-latest'].find(",") > 0 %}
9-
custom: "{{ test_scenario['values']['hive-latest'].split(',')[1] }}"
10-
productVersion: "{{ test_scenario['values']['hive-latest'].split(',')[0] }}"
11-
{% else %}
12-
productVersion: "{{ test_scenario['values']['hive-latest'] }}"
13-
{% endif %}
14-
pullPolicy: IfNotPresent
15-
clusterConfig:
16-
database:
17-
connString: jdbc:derby:;databaseName=/tmp/hive;create=true
18-
credentialsSecret: hive-credentials
19-
dbType: derby
20-
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
21-
vectorAggregatorConfigMapName: vector-aggregator-discovery
22-
{% endif %}
237
clusterOperation:
248
stopped: true
259
reconciliationPaused: false
26-
metastore:
27-
config:
28-
logging:
29-
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
30-
roleGroups:
31-
default:
32-
replicas: 1

tests/templates/kuttl/cluster-operation/30-pause-hive.yaml.j2

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,6 @@ kind: HiveCluster
44
metadata:
55
name: test-hive
66
spec:
7-
image:
8-
{% if test_scenario['values']['hive-latest'].find(",") > 0 %}
9-
custom: "{{ test_scenario['values']['hive-latest'].split(',')[1] }}"
10-
productVersion: "{{ test_scenario['values']['hive-latest'].split(',')[0] }}"
11-
{% else %}
12-
productVersion: "{{ test_scenario['values']['hive-latest'] }}"
13-
{% endif %}
14-
pullPolicy: IfNotPresent
15-
clusterConfig:
16-
database:
17-
connString: jdbc:derby:;databaseName=/tmp/hive;create=true
18-
credentialsSecret: hive-credentials
19-
dbType: derby
20-
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
21-
vectorAggregatorConfigMapName: vector-aggregator-discovery
22-
{% endif %}
237
clusterOperation:
248
stopped: false
259
reconciliationPaused: true
26-
metastore:
27-
config:
28-
logging:
29-
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
30-
roleGroups:
31-
default:
32-
replicas: 1

tests/templates/kuttl/cluster-operation/40-restart-hive.yaml.j2

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,6 @@ kind: HiveCluster
44
metadata:
55
name: test-hive
66
spec:
7-
image:
8-
{% if test_scenario['values']['hive-latest'].find(",") > 0 %}
9-
custom: "{{ test_scenario['values']['hive-latest'].split(',')[1] }}"
10-
productVersion: "{{ test_scenario['values']['hive-latest'].split(',')[0] }}"
11-
{% else %}
12-
productVersion: "{{ test_scenario['values']['hive-latest'] }}"
13-
{% endif %}
14-
pullPolicy: IfNotPresent
15-
clusterConfig:
16-
database:
17-
connString: jdbc:derby:;databaseName=/tmp/hive;create=true
18-
credentialsSecret: hive-credentials
19-
dbType: derby
20-
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
21-
vectorAggregatorConfigMapName: vector-aggregator-discovery
22-
{% endif %}
237
clusterOperation:
248
stopped: false
259
reconciliationPaused: false
26-
metastore:
27-
config:
28-
logging:
29-
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
30-
roleGroups:
31-
default:
32-
replicas: 1

0 commit comments

Comments
 (0)