Skip to content

Commit

Permalink
feat(hive): add parent node in zookeeper for hiveserver2 when using d…
Browse files Browse the repository at this point in the history
…ynamic discovery mode
  • Loading branch information
nschung authored and rpignolet committed Aug 9, 2024
1 parent 0c33c0a commit e091665
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion roles/hive/ranger/tasks/init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
username: hive
password: hive
jdbc.driverClassName: "org.apache.hive.jdbc.HiveDriver"
jdbc.url: jdbc:hive2://{{ ranger_hive_install_properties.zookeeper_quorum }}/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2;sslTrustStore={{ hive_truststore_location }};trustStorePassword={{ hive_truststore_password }} # yamllint disable-line rule:line-length
jdbc.url: jdbc:hive2://{{ ranger_hive_install_properties.zookeeper_quorum }}/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace={{ hiveserver2_site["hive.server2.zookeeper.namespace"] }};sslTrustStore={{ hive_truststore_location }};trustStorePassword={{ hive_truststore_password }} # yamllint disable-line rule:line-length
policy.download.auth.users: hive
type: hive
body_format: json
Expand Down
5 changes: 3 additions & 2 deletions tdp_vars_defaults/hive/hive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

---
# Hive version
hive_release: apache-hive-3.1.3-1.0-bin
hive_release: apache-hive-3.1.3-2.0-bin
hive_dist_file: "{{ hive_release }}.tar.gz"

# Hive users and group
Expand Down Expand Up @@ -133,9 +133,10 @@ hiveserver2_site:
hive.server2.webui.keystore.password: "{{ hive_keystore_password }}"
hive.server2.metrics.enabled: "true"
hive.server2.thrift.http.cookie.auth.enabled: "true"
hive.server2.zookeeper.namespace: "{{ hive_s2_zookeeper_namespace }}"

beeline_site:
beeline.hs2.jdbc.url.zk_cluster: jdbc:hive2://{{ hive_site["hive.zookeeper.quorum"] }}/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2;principal={{ hiveserver2_site["hive.server2.authentication.kerberos.principal"] }};sslTrustStore={{ hive_truststore_location }};trustStorePassword={{ hive_truststore_password }}
beeline.hs2.jdbc.url.zk_cluster: jdbc:hive2://{{ hive_site["hive.zookeeper.quorum"] }}/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace={{ hiveserver2_site["hive.server2.zookeeper.namespace"] }};principal={{ hiveserver2_site["hive.server2.authentication.kerberos.principal"] }};sslTrustStore={{ hive_truststore_location }};trustStorePassword={{ hive_truststore_password }}
beeline.hs2.jdbc.url.default: zk_cluster

# Ranger Hive properties
Expand Down
2 changes: 1 addition & 1 deletion tdp_vars_defaults/knox/knox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ tdpldap_identity:
tdpldap_ha:
name: HaProvider
parameters:
HIVE: "{{ topology_common_ha_configuration }};zookeeperEnsemble={{ zookeeper_quorum | trim }};zookeeperNamespace=hiveserver2"
HIVE: "{{ topology_common_ha_configuration }};zookeeperEnsemble={{ zookeeper_quorum | trim }};zookeeperNamespace={{ hive_s2_zookeeper_namespace }}"
RESOURCEMANAGER: "{{ topology_common_ha_configuration }}"
WEBHBASE: "{{ topology_common_ha_configuration }}"
WEBHDFS: "{{ topology_common_ha_configuration }}"
Expand Down
1 change: 1 addition & 0 deletions tdp_vars_defaults/tdp-cluster/tdp-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ hive_log_dir: /var/log/hive
hive_s2_log_file: "hive-hiveserver2_{{ ansible_fqdn }}.log"
hive_ms_log_file: "hive-metastore_{{ ansible_fqdn }}.log"
hive_ranger_audit_file: "hive-rangeraudit_{{ ansible_fqdn }}.log"
hive_s2_zookeeper_namespace: "hiveserver2"

knox_log_dir: /var/log/knox
knox_gateway_log_file: "knox-gateway_{{ ansible_fqdn }}.log"
Expand Down

0 comments on commit e091665

Please sign in to comment.