AMBARI-22174. Remove unnecessary Kerberos related properties from BlueprintConfigurationProcessor (magyari_sandor)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/aeb1865c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/aeb1865c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/aeb1865c Branch: refs/heads/branch-feature-AMBARI-22008 Commit: aeb1865c95b86980ac31bc9362203f4bd84a027d Parents: 33d67f3 Author: Sandor Magyari <smagy...@hortonworks.com> Authored: Mon Jan 16 14:30:28 2017 +0100 Committer: Sandor Magyari <smagy...@hortonworks.com> Committed: Wed Oct 11 12:59:55 2017 +0200 ---------------------------------------------------------------------- .../BlueprintConfigurationProcessor.java | 6 ----- .../BlueprintConfigurationProcessorTest.java | 28 -------------------- 2 files changed, 34 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/aeb1865c/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 03f84a5..5a7cda0 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 @@ -2556,7 +2556,6 @@ public class BlueprintConfigurationProcessor { multiCoreSiteMap.put("hadoop.proxyuser.yarn.hosts", new MultipleHostTopologyUpdater("RESOURCEMANAGER")); multiCoreSiteMap.put("hadoop.security.key.provider.path", new MultipleHostTopologyUpdater("RANGER_KMS_SERVER", ';', false, false, true)); multiWebhcatSiteMap.put("templeton.hive.properties", new TempletonHivePropertyUpdater()); - multiWebhcatSiteMap.put("templeton.kerberos.principal", new MultipleHostTopologyUpdater("WEBHCAT_SERVER")); multiHiveSiteMap.put("hive.zookeeper.quorum", new MultipleHostTopologyUpdater("ZOOKEEPER_SERVER")); multiHiveSiteMap.put("hive.cluster.delegation.token.store.zookeeper.connectString", new MultipleHostTopologyUpdater("ZOOKEEPER_SERVER")); @@ -2674,9 +2673,6 @@ public class BlueprintConfigurationProcessor { oozieStringPropertyUpdaterMap = new HashMap<>(); } oozieStringPropertyUpdaterMap.put("oozie.base.url", new SingleHostTopologyUpdater("OOZIE_SERVER")); - oozieStringPropertyUpdaterMap.put("oozie.authentication.kerberos.principal", new SingleHostTopologyUpdater("OOZIE_SERVER")); - oozieStringPropertyUpdaterMap.put("oozie.ha.authentication.kerberos.principal", new SingleHostTopologyUpdater("OOZIE_SERVER")); - oozieStringPropertyUpdaterMap.put("oozie.service.HadoopAccessorService.kerberos.principal", new SingleHostTopologyUpdater("OOZIE_SERVER")); singleHostTopologyUpdaters.put("oozie-site", oozieStringPropertyUpdaterMap); multiCoreSiteMap.put("hadoop.proxyuser.oozie.hosts", new MultipleHostTopologyUpdater("OOZIE_SERVER")); @@ -2728,8 +2724,6 @@ public class BlueprintConfigurationProcessor { // FALCON falconStartupPropertiesMap.put("*.broker.url", new SingleHostTopologyUpdater("FALCON_SERVER")); - falconStartupPropertiesMap.put("*.falcon.service.authentication.kerberos.principal", new SingleHostTopologyUpdater("FALCON_SERVER")); - falconStartupPropertiesMap.put("*.falcon.http.authentication.kerberos.principal", new SingleHostTopologyUpdater("FALCON_SERVER")); // KAFKA kafkaBrokerMap.put("kafka.ganglia.metrics.host", new OptionalSingleHostTopologyUpdater("GANGLIA_SERVER")); http://git-wip-us.apache.org/repos/asf/ambari/blob/aeb1865c/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 d137f2c..22b0e6b 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 @@ -897,11 +897,6 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport { assertEquals("Falcon Broker URL property not properly exported", createExportedAddress(expectedPortNum, expectedHostGroupName), falconStartupProperties.get("*.broker.url")); - assertEquals("Falcon Kerberos Principal property not properly exported", - "falcon/" + "%HOSTGROUP::" + expectedHostGroupName + "%" + "@EXAMPLE.COM", falconStartupProperties.get("*.falcon.service.authentication.kerberos.principal")); - - assertEquals("Falcon Kerberos HTTP Principal property not properly exported", - "HTTP/" + "%HOSTGROUP::" + expectedHostGroupName + "%" + "@EXAMPLE.COM", falconStartupProperties.get("*.falcon.http.authentication.kerberos.principal")); } @Test @@ -1598,8 +1593,6 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport { assertEquals("hive property not properly exported", createExportedHostName(expectedHostGroupName) + "," + createExportedHostName(expectedHostGroupNameTwo), webHCatSiteProperties.get("templeton.hive.properties")); - assertEquals("hive property not properly exported", - createExportedHostName(expectedHostGroupName), webHCatSiteProperties.get("templeton.kerberos.principal")); assertEquals("hive property not properly exported", createExportedHostName(expectedHostGroupName) + "," + createExportedHostName(expectedHostGroupNameTwo), coreSiteProperties.get("hadoop.proxyuser.hive.hosts")); @@ -1695,8 +1688,6 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport { assertEquals("hive property not properly exported", createExportedHostName(expectedHostGroupName) + "," + createExportedHostName(expectedHostGroupNameTwo), webHCatSiteProperties.get("templeton.hive.properties")); - assertEquals("hive property not properly exported", - createExportedHostName(expectedHostGroupName), webHCatSiteProperties.get("templeton.kerberos.principal")); assertEquals("hive property not properly exported", createExportedHostName(expectedHostGroupName) + "," + createExportedHostName(expectedHostGroupNameTwo), coreSiteProperties.get("hadoop.proxyuser.hive.hosts")); @@ -1791,10 +1782,6 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport { assertEquals("oozie property not exported correctly", createExportedHostName(expectedHostGroupName), oozieSiteProperties.get("oozie.base.url")); assertEquals("oozie property not exported correctly", - createExportedHostName(expectedHostGroupName), oozieSiteProperties.get("oozie.authentication.kerberos.principal")); - assertEquals("oozie property not exported correctly", - createExportedHostName(expectedHostGroupName), oozieSiteProperties.get("oozie.service.HadoopAccessorService.kerberos.principal")); - assertEquals("oozie property not exported correctly", createExportedHostName(expectedHostGroupName) + "," + createExportedHostName(expectedHostGroupNameTwo), coreSiteProperties.get("hadoop.proxyuser.oozie.hosts")); // verify that the oozie properties that can refer to an external DB are not included in the export @@ -3302,10 +3289,6 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport { assertEquals("oozie property not updated correctly", createExportedHostName(expectedHostGroupName, expectedPortNum), oozieSiteProperties.get("oozie.base.url")); assertEquals("oozie property not updated correctly", - createExportedHostName(expectedHostGroupName), oozieSiteProperties.get("oozie.authentication.kerberos.principal")); - assertEquals("oozie property not updated correctly", - createExportedHostName(expectedHostGroupName), oozieSiteProperties.get("oozie.service.HadoopAccessorService.kerberos.principal")); - assertEquals("oozie property not updated correctly", createExportedHostName(expectedHostGroupName) + "," + createExportedHostName(expectedHostGroupNameTwo), coreSiteProperties.get("hadoop.proxyuser.oozie.hosts")); assertEquals("oozie property not updated correctly", createExportedAddress("2181", expectedHostGroupName) + "," + createExportedAddress("2181", expectedHostGroupNameTwo), oozieSiteProperties.get("oozie.zookeeper.connection.string")); @@ -4477,11 +4460,6 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport { assertEquals("Falcon Broker URL property not properly exported", expectedHostName + ":" + expectedPortNum, falconStartupProperties.get("*.broker.url")); - assertEquals("Falcon Kerberos Principal property not properly exported", - "falcon/" + expectedHostName + "@EXAMPLE.COM", falconStartupProperties.get("*.falcon.service.authentication.kerberos.principal")); - - assertEquals("Falcon Kerberos HTTP Principal property not properly exported", - "HTTP/" + expectedHostName + "@EXAMPLE.COM", falconStartupProperties.get("*.falcon.http.authentication.kerberos.principal")); } @Test @@ -4523,12 +4501,6 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport { assertEquals("Falcon Broker URL property not properly exported", expectedHostName + ":" + expectedPortNum, falconStartupProperties.get("*.broker.url")); - - assertEquals("Falcon Kerberos Principal property not properly exported", - "falcon/" + expectedHostName + "@EXAMPLE.COM", falconStartupProperties.get("*.falcon.service.authentication.kerberos.principal")); - - assertEquals("Falcon Kerberos HTTP Principal property not properly exported", - "HTTP/" + expectedHostName + "@EXAMPLE.COM", falconStartupProperties.get("*.falcon.http.authentication.kerberos.principal")); } @Test