Repository: ambari Updated Branches: refs/heads/branch-2.5 d8ab5f55e -> 3099b2ed9
AMBARI-19700. When hiveserver2 LDAP authentication is enabled hive.server2.authentication.ldap.url property gets exported with hardcoded hostname. (Amruta Borkar via rnettleton) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3099b2ed Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3099b2ed Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3099b2ed Branch: refs/heads/branch-2.5 Commit: 3099b2ed92eb066b1c311e4937ea477ab416aafd Parents: d8ab5f5 Author: Bob Nettleton <rnettle...@hortonworks.com> Authored: Fri Jan 27 11:30:56 2017 -0500 Committer: Bob Nettleton <rnettle...@hortonworks.com> Committed: Fri Jan 27 11:30:56 2017 -0500 ---------------------------------------------------------------------- .../controller/internal/BlueprintConfigurationProcessor.java | 1 + .../controller/internal/BlueprintConfigurationProcessorTest.java | 3 +++ 2 files changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/3099b2ed/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java index ad27b0d..e604598 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java @@ -2491,6 +2491,7 @@ public class BlueprintConfigurationProcessor { yarnSiteMap.put("yarn.timeline-service.webapp.https.address", new SingleHostTopologyUpdater("APP_TIMELINE_SERVER")); // HIVE_SERVER + hiveSiteMap.put("hive.server2.authentication.ldap.url", new SingleHostTopologyUpdater("HIVE_SERVER2")); multiHiveSiteMap.put("hive.metastore.uris", new MultipleHostTopologyUpdater("HIVE_METASTORE", ',', true, true, true)); dbHiveSiteMap.put("javax.jdo.option.ConnectionURL", new DBTopologyUpdater("MYSQL_SERVER", "hive-env", "hive_database")); http://git-wip-us.apache.org/repos/asf/ambari/blob/3099b2ed/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java index 02a2851..2840a31 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java @@ -1571,6 +1571,7 @@ public class BlueprintConfigurationProcessorTest { // setup properties that include host information hiveSiteProperties.put("hive.metastore.uris", "thrift://" + expectedHostName + ":" + expectedPortNum + "," + "thrift://" + expectedHostNameTwo + ":" + expectedPortNum); + hiveSiteProperties.put("hive.server2.authentication.ldap.url", "ldap://myexternalhost.com:1389"); hiveSiteProperties.put("javax.jdo.option.ConnectionURL", expectedHostName + ":" + expectedPortNum); hiveSiteProperties.put("hive.zookeeper.quorum", expectedHostName + ":" + expectedPortNum + "," + expectedHostNameTwo + ":" + expectedPortNum); hiveSiteProperties.put("hive.cluster.delegation.token.store.zookeeper.connectString", expectedHostName + ":" + expectedPortNum + "," + expectedHostNameTwo + ":" + expectedPortNum); @@ -1624,6 +1625,8 @@ public class BlueprintConfigurationProcessorTest { assertEquals("hive property not properly exported", createExportedHostName(expectedHostGroupName) + "," + createExportedHostName(expectedHostGroupNameTwo), coreSiteProperties.get("hadoop.proxyuser.hive.hosts")); + assertFalse("hive.server2.authentication.ldap.url should not have been present in the exported configuration", + hiveSiteProperties.containsKey("hive.server2.authentication.ldap.url")); assertEquals("hive property not properly exported", createExportedHostName(expectedHostGroupName) + "," + createExportedHostName(expectedHostGroupNameTwo), coreSiteProperties.get("hadoop.proxyuser.HTTP.hosts"));