Repository: ambari
Updated Branches:
  refs/heads/trunk 9590cfbd1 -> 45658d2aa


AMBARI-8218.  Replace hostnames with host_group tokens for property
"oozie.service.ProxyUserService.proxyuser.knox.hosts" when doing
blueprint export


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

Branch: refs/heads/trunk
Commit: 45658d2aa2935e05f4ae42ad9187d2482029e1bf
Parents: 9590cfb
Author: John Speidel <jspei...@hortonworks.com>
Authored: Fri Nov 7 18:09:04 2014 -0500
Committer: John Speidel <jspei...@hortonworks.com>
Committed: Fri Nov 7 19:34:21 2014 -0500

----------------------------------------------------------------------
 .../internal/BlueprintConfigurationProcessor.java      | 13 ++-----------
 .../internal/BlueprintConfigurationProcessorTest.java  |  4 ++++
 2 files changed, 6 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/45658d2a/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 9237bc9..5af81be 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
@@ -883,17 +883,12 @@ public class BlueprintConfigurationProcessor {
     Map<String, PropertyUpdater> stormSiteMap = new HashMap<String, 
PropertyUpdater>();
     Map<String, PropertyUpdater> falconStartupPropertiesMap = new 
HashMap<String, PropertyUpdater>();
     Map<String, PropertyUpdater> kafkaBrokerMap = new HashMap<String, 
PropertyUpdater>();
-
-
-
     Map<String, PropertyUpdater> mapredEnvMap = new HashMap<String, 
PropertyUpdater>();
     Map<String, PropertyUpdater> hadoopEnvMap = new HashMap<String, 
PropertyUpdater>();
     Map<String, PropertyUpdater> hbaseEnvMap = new HashMap<String, 
PropertyUpdater>();
     Map<String, PropertyUpdater> hiveEnvMap = new HashMap<String, 
PropertyUpdater>();
     Map<String, PropertyUpdater> oozieEnvMap = new HashMap<String, 
PropertyUpdater>();
     Map<String, PropertyUpdater> oozieEnvOriginalValueMap = new 
HashMap<String, PropertyUpdater>();
-
-
     Map<String, PropertyUpdater> multiWebhcatSiteMap = new HashMap<String, 
PropertyUpdater>();
     Map<String, PropertyUpdater> multiHbaseSiteMap = new HashMap<String, 
PropertyUpdater>();
     Map<String, PropertyUpdater> multiStormSiteMap = new HashMap<String, 
PropertyUpdater>();
@@ -904,13 +899,7 @@ public class BlueprintConfigurationProcessor {
     Map<String, PropertyUpdater> multiSliderClientMap = new HashMap<String, 
PropertyUpdater>();
     Map<String, PropertyUpdater> multiYarnSiteMap = new HashMap<String, 
PropertyUpdater>();
     Map<String, PropertyUpdater> multiOozieSiteMap = new HashMap<String, 
PropertyUpdater>();
-
-
-
-
-
     Map<String, PropertyUpdater> dbHiveSiteMap = new HashMap<String, 
PropertyUpdater>();
-
     Map<String, PropertyUpdater> nagiosEnvMap = new HashMap<String 
,PropertyUpdater>();
 
 
@@ -1006,6 +995,7 @@ public class BlueprintConfigurationProcessor {
     oozieSiteMap.put("oozie.service.HadoopAccessorService.kerberos.principal", 
new SingleHostTopologyUpdater("OOZIE_SERVER"));
     oozieEnvMap.put("oozie_hostname", new 
SingleHostTopologyUpdater("OOZIE_SERVER"));
     multiCoreSiteMap.put("hadoop.proxyuser.oozie.hosts", new 
MultipleHostTopologyUpdater("OOZIE_SERVER"));
+
     // register updaters for Oozie properties that may point to an external DB
     oozieEnvOriginalValueMap.put("oozie_existing_mysql_host", new 
OriginalValuePropertyUpdater());
     oozieSiteOriginalValueMap.put("oozie.service.JPAService.jdbc.url", new 
OriginalValuePropertyUpdater());
@@ -1042,6 +1032,7 @@ public class BlueprintConfigurationProcessor {
     multiCoreSiteMap.put("hadoop.proxyuser.knox.hosts", new 
MultipleHostTopologyUpdater("KNOX_GATEWAY"));
     multiWebhcatSiteMap.put("webhcat.proxyuser.knox.hosts", new 
MultipleHostTopologyUpdater("KNOX_GATEWAY"));
     multiOozieSiteMap.put("hadoop.proxyuser.knox.hosts", new 
MultipleHostTopologyUpdater("KNOX_GATEWAY"));
+    
multiOozieSiteMap.put("oozie.service.ProxyUserService.proxyuser.knox.hosts", 
new MultipleHostTopologyUpdater("KNOX_GATEWAY"));
 
 
     // Required due to AMBARI-4933.  These no longer seem to be required as 
the default values in the stack

http://git-wip-us.apache.org/repos/asf/ambari/blob/45658d2a/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 6aeb2ab..6c00927 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
@@ -2124,6 +2124,7 @@ public class BlueprintConfigurationProcessorTest {
     coreSiteProperties.put("hadoop.proxyuser.knox.hosts", expectedHostName + 
"," + expectedHostNameTwo);
     webHCatSiteProperties.put("webhcat.proxyuser.knox.hosts", expectedHostName 
+ "," + expectedHostNameTwo);
     oozieSiteProperties.put("hadoop.proxyuser.knox.hosts", expectedHostName + 
"," + expectedHostNameTwo);
+    
oozieSiteProperties.put("oozie.service.ProxyUserService.proxyuser.knox.hosts", 
expectedHostName + "," + expectedHostNameTwo);
 
 //    multiCoreSiteMap.put("hadoop.proxyuser.knox.hosts", new 
MultipleHostTopologyUpdater("KNOX_GATEWAY"));
 //    multiWebhcatSiteMap.put("webhcat.proxyuser.knox.hosts", new 
MultipleHostTopologyUpdater("KNOX_GATEWAY"));
@@ -2144,6 +2145,9 @@ public class BlueprintConfigurationProcessorTest {
     assertEquals("Knox config for Oozie not properly exported",
       createExportedHostName(expectedHostGroupName) + "," + 
createExportedHostName(expectedHostGroupNameTwo),
       oozieSiteProperties.get("hadoop.proxyuser.knox.hosts"));
+    assertEquals("Knox config for Oozie not properly exported",
+        createExportedHostName(expectedHostGroupName) + "," + 
createExportedHostName(expectedHostGroupNameTwo),
+        
oozieSiteProperties.get("oozie.service.ProxyUserService.proxyuser.knox.hosts"));
 
     mockSupport.verifyAll();
 

Reply via email to