|
@@ -347,6 +347,43 @@ else:
|
|
if os.path.exists(mysql_jdbc_driver_jar):
|
|
if os.path.exists(mysql_jdbc_driver_jar):
|
|
hive_exclude_packages.append('mysql-connector-java')
|
|
hive_exclude_packages.append('mysql-connector-java')
|
|
|
|
|
|
|
|
+
|
|
|
|
+hive_site_config = dict(config['configurations']['hive-site'])
|
|
|
|
+########################################################
|
|
|
|
+############# Atlas related params #####################
|
|
|
|
+########################################################
|
|
|
|
+
|
|
|
|
+atlas_hosts = default('/clusterHostInfo/atlas_server_hosts', [])
|
|
|
|
+classpath_addition = ""
|
|
|
|
+if not atlas_hosts:
|
|
|
|
+ hive_exclude_packages.append('atlas-metadata*-hive-plugin')
|
|
|
|
+else:
|
|
|
|
+ # hive-site
|
|
|
|
+ hive_site_config['hive.cluster.name'] = config['clusterName']
|
|
|
|
+ atlas_config = config['configurations']['application-properties']
|
|
|
|
+ metadata_port = config['configurations']['metadata-env']['metadata_port']
|
|
|
|
+ metadata_host = atlas_hosts[0]
|
|
|
|
+ tls_enabled = config['configurations']['application-properties']['enableTLS']
|
|
|
|
+ if tls_enabled:
|
|
|
|
+ scheme = "https"
|
|
|
|
+ else:
|
|
|
|
+ scheme = "http"
|
|
|
|
+ hive_site_config['hive.hook.dgi.url'] = format('{scheme}://{metadata_host}:{metadata_port}')
|
|
|
|
+
|
|
|
|
+ if not 'hive.exec.post.hooks' in hive_site_config:
|
|
|
|
+ hive_site_config['hive.exec.post.hooks'] = 'org.apache.hadoop.metadata.hive.hook.HiveHook'
|
|
|
|
+ else:
|
|
|
|
+ current_hook = hive_site_config['hive.exec.post.hooks']
|
|
|
|
+ hive_site_config['hive.exec.post.hooks'] = format('{current_hook}, org.apache.hadoop.metadata.hive.hook.HiveHook')
|
|
|
|
+
|
|
|
|
+ # client.properties
|
|
|
|
+ atlas_client_props = {}
|
|
|
|
+ auth_enabled = config['configurations']['application-properties'].get(
|
|
|
|
+ 'metadata.http.authentication.enabled', False)
|
|
|
|
+ atlas_client_props['metadata.http.authentication.enabled'] = auth_enabled
|
|
|
|
+ if auth_enabled:
|
|
|
|
+ atlas_client_props['metadata.http.authentication.type'] = config['configurations']['application-properties'].get('metadata.http.authentication.type', 'simple')
|
|
|
|
+
|
|
########################################################
|
|
########################################################
|
|
########### WebHCat related params #####################
|
|
########### WebHCat related params #####################
|
|
########################################################
|
|
########################################################
|