You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2017/07/31 14:01:29 UTC

[05/16] ambari git commit: AMBARI-21563. Copy Hadoop core-site.xml to Atlas conf when hadoop is configured for LDAP/AD (Vishal Suvagia via smohanty)

AMBARI-21563. Copy Hadoop core-site.xml to Atlas conf when hadoop is configured for LDAP/AD (Vishal Suvagia via smohanty)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d4fad25e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d4fad25e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d4fad25e

Branch: refs/heads/branch-2.6
Commit: d4fad25e0c1d768fd2073a75259246d1be2c4bf9
Parents: 0f426c1
Author: Sumit Mohanty <sm...@hortonworks.com>
Authored: Thu Jul 27 13:14:41 2017 -0700
Committer: Sumit Mohanty <sm...@hortonworks.com>
Committed: Thu Jul 27 13:15:20 2017 -0700

----------------------------------------------------------------------
 .../libraries/functions/constants.py                |  1 +
 .../ATLAS/0.1.0.2.3/package/scripts/metadata.py     | 16 ++++++++++++++++
 .../ATLAS/0.1.0.2.3/package/scripts/params.py       |  1 +
 .../stacks/HDP/2.0.6/properties/stack_features.json |  5 +++++
 .../stacks/HDP/2.6/services/ATLAS/metainfo.xml      |  1 +
 5 files changed, 24 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d4fad25e/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/constants.py b/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
index c74e029..3b941ec 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
@@ -119,3 +119,4 @@ class StackFeature:
   SECURE_RANGER_SSL_PASSWORD = "secure_ranger_ssl_password"
   RANGER_KMS_SSL = "ranger_kms_ssl"
   KAFKA_ACL_MIGRATION_SUPPORT = "kafka_acl_migration_support"
+  ATLAS_CORE_SITE_SUPPORT="atlas_core_site_support"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4fad25e/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
index 36c4598..6b5f562 100644
--- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
+++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
@@ -197,6 +197,22 @@ def metadata(type='server'):
     else:
       File(format('{conf_dir}/hdfs-site.xml'), action="delete")
 
+    '''
+    Atlas requires hadoop core-site.xml to resolve users/groups synced in HadoopUGI for
+    authentication and authorization process. Earlier the core-site.xml was available in
+    Hbase conf directory which is a part of Atlas class-path, from stack 2.6 onwards,
+    core-site.xml is no more available in Hbase conf directory. Hence need to create
+    core-site.xml in Atlas conf directory.
+    '''
+    if params.stack_supports_atlas_core_site and params.has_namenode:
+      XmlConfig("core-site.xml",
+        conf_dir=params.conf_dir,
+        configurations=params.config['configurations']['core-site'],
+        configuration_attributes=params.config['configuration_attributes']['core-site'],
+        owner=params.metadata_user,
+        group=params.user_group,
+        mode=0644
+      )
 
 def upload_conf_set(config_set, jaasFile):
   import params

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4fad25e/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
index b83a79f..41be001 100644
--- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
@@ -237,6 +237,7 @@ for host in zookeeper_hosts:
     zookeeper_quorum += ","
 
 stack_supports_atlas_hdfs_site_on_namenode_ha = check_stack_feature(StackFeature.ATLAS_HDFS_SITE_ON_NAMENODE_HA, version_for_stack_feature_checks)
+stack_supports_atlas_core_site = check_stack_feature(StackFeature.ATLAS_CORE_SITE_SUPPORT,version_for_stack_feature_checks)
 
 atlas_server_xmx = default("configurations/atlas-env/atlas_server_xmx", 2048)
 atlas_server_max_new_size = default("configurations/atlas-env/atlas_server_max_new_size", 614)

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4fad25e/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
index 31cf0c8..f2c9afc 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
@@ -423,6 +423,11 @@
         "name": "nifi_jaas_conf_create",
         "description": "Create NIFI jaas configuration when kerberos is enabled",
         "min_version": "2.6.0.0"
+      },
+      {
+        "name": "atlas_core_site_support",
+        "description": "Need to create core-site under Atlas conf directory.",
+        "min_version": "2.6.0.0"
       }
     ]
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4fad25e/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/metainfo.xml
index 6e1a52e..3a57a47 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/metainfo.xml
@@ -30,6 +30,7 @@
       </themes>
       <configuration-dependencies>
         <config-type>hdfs-site</config-type>
+        <config-type>core-site</config-type>
       </configuration-dependencies>
     </service>
   </services>