You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vb...@apache.org on 2017/11/23 10:22:50 UTC

[1/7] ambari git commit: AMBARI-22493. Fix build for test classes in feature branch.(vbrodetskyi)

Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-14714 35d704cb3 -> 1f176845e


http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterInstallWithoutStartTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterInstallWithoutStartTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterInstallWithoutStartTest.java
index d89c8ca..8d58107 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterInstallWithoutStartTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterInstallWithoutStartTest.java
@@ -286,7 +286,7 @@ public class ClusterInstallWithoutStartTest extends EasyMockSupport {
     expect(stack.getExcludedConfigurationTypes("service1")).andReturn(Collections.emptySet()).anyTimes();
     expect(stack.getExcludedConfigurationTypes("service2")).andReturn(Collections.emptySet()).anyTimes();
 
-    expect(request.getBlueprint()).andReturn(blueprint).anyTimes();
+    expect(request.getBlueprint()).andReturn(null).anyTimes();
     expect(request.getClusterId()).andReturn(CLUSTER_ID).anyTimes();
     expect(request.getClusterName()).andReturn(CLUSTER_NAME).anyTimes();
     expect(request.getDescription()).andReturn("Provision Cluster Test").anyTimes();
@@ -340,7 +340,7 @@ public class ClusterInstallWithoutStartTest extends EasyMockSupport {
 
     expect(ambariContext.getPersistedTopologyState()).andReturn(persistedState).anyTimes();
     //todo: don't ignore param
-    ambariContext.createAmbariResources(isA(ClusterTopology.class), eq(CLUSTER_NAME), (SecurityType) isNull(), eq("1"), anyLong());
+    ambariContext.createAmbariResources(isA(ClusterTopology.class), eq(CLUSTER_NAME), (SecurityType) isNull());
     expectLastCall().once();
     expect(ambariContext.getNextRequestId()).andReturn(1L).once();
     expect(ambariContext.isClusterKerberosEnabled(CLUSTER_ID)).andReturn(false).anyTimes();

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterTopologyImplTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterTopologyImplTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterTopologyImplTest.java
index a8674b3..d8c266d 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterTopologyImplTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterTopologyImplTest.java
@@ -104,21 +104,21 @@ public class ClusterTopologyImplTest {
     hostGroupMap.put("group4", group4);
 
     Set<ComponentV2> group1Components = new HashSet<>();
-    group1Components.add(new ComponentV2("component1", new Service("service1", stack)));
-    group1Components.add(new ComponentV2("component2", new Service("service1", stack)));
+    group1Components.add(null);
+    group1Components.add(null);
 
     Set<String> group1ComponentNames = new HashSet<>();
     group1ComponentNames.add("component1");
     group1ComponentNames.add("component2");
 
     Set<ComponentV2> group2Components = new HashSet<>();
-    group2Components.add(new ComponentV2("component3", new Service("service1", stack)));
+    group2Components.add(null);
     Set<ComponentV2> group3Components = new HashSet<>();
-    group3Components.add(new ComponentV2("component4", new Service("service2", stack)));
+    group3Components.add(null);
     Set<ComponentV2> group4Components = new HashSet<>();
-    group4Components.add(new ComponentV2("component5", new Service("service2", stack)));
+    group4Components.add(null);
 
-    expect(blueprint.getHostGroups()).andReturn(hostGroupMap).anyTimes();
+    expect(blueprint.getHostGroups()).andReturn(null).anyTimes();
     expect(blueprint.getHostGroup("group1")).andReturn(group1).anyTimes();
     expect(blueprint.getHostGroup("group2")).andReturn(group2).anyTimes();
     expect(blueprint.getHostGroup("group3")).andReturn(group3).anyTimes();

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/topology/LogicalRequestTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/LogicalRequestTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/LogicalRequestTest.java
index a5265f6..02e4e75 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/LogicalRequestTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/LogicalRequestTest.java
@@ -112,7 +112,7 @@ public class LogicalRequestTest extends EasyMockSupport {
     expect(clusterTopology.getAmbariContext()).andReturn(ambariContext).anyTimes();
     expect(clusterTopology.getClusterId()).andReturn(clusterId).anyTimes();
     expect(clusterTopology.getProvisionAction()).andReturn(ProvisionAction.INSTALL_ONLY).anyTimes();
-    expect(clusterTopology.getBlueprint()).andReturn(blueprint).anyTimes();
+    expect(clusterTopology.getBlueprint()).andReturn(null).anyTimes();
     expect(blueprint.getName()).andReturn("blueprintDef").anyTimes();
     expect(blueprint.shouldSkipFailure()).andReturn(true).anyTimes();
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/topology/RequiredPasswordValidatorTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/RequiredPasswordValidatorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/RequiredPasswordValidatorTest.java
index c474493..e2b3346 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/RequiredPasswordValidatorTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/RequiredPasswordValidatorTest.java
@@ -139,7 +139,7 @@ public class RequiredPasswordValidatorTest extends EasyMockSupport {
     hostGroupInfo.put("group2", hostGroup2Info);
 
     expect(topology.getConfiguration()).andReturn(topoClusterConfig).anyTimes();
-    expect(topology.getBlueprint()).andReturn(blueprint).anyTimes();
+    expect(topology.getBlueprint()).andReturn(null).anyTimes();
     expect(topology.getHostGroupInfo()).andReturn(hostGroupInfo).anyTimes();
 
     expect(blueprint.getHostGroups()).andReturn(hostGroups).anyTimes();

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/topology/TopologyManagerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/TopologyManagerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/TopologyManagerTest.java
index 5f61c85..4eb29b7 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/TopologyManagerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/TopologyManagerTest.java
@@ -18,7 +18,6 @@
 
 package org.apache.ambari.server.topology;
 
-import static org.easymock.EasyMock.anyLong;
 import static org.easymock.EasyMock.anyObject;
 import static org.easymock.EasyMock.capture;
 import static org.easymock.EasyMock.eq;
@@ -59,6 +58,7 @@ import org.apache.ambari.server.controller.spi.ClusterController;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.controller.spi.ResourceProvider;
 import org.apache.ambari.server.events.RequestFinishedEvent;
+import org.apache.ambari.server.events.publishers.AmbariEventPublisher;
 import org.apache.ambari.server.orm.dao.SettingDAO;
 import org.apache.ambari.server.orm.entities.SettingEntity;
 import org.apache.ambari.server.security.authorization.AuthorizationHelper;
@@ -278,10 +278,10 @@ public class TopologyManagerTest {
     expect(stack.getConfiguration()).andReturn(stackConfig).anyTimes();
     expect(stack.getName()).andReturn(STACK_NAME).anyTimes();
     expect(stack.getVersion()).andReturn(STACK_VERSION).anyTimes();
-    expect(stack.getExcludedConfigurationTypes("service1")).andReturn(Collections.emptySet()).anyTimes();
-    expect(stack.getExcludedConfigurationTypes("service2")).andReturn(Collections.emptySet()).anyTimes();
+    expect(stack.getExcludedConfigurationTypes("service1")).andReturn(new HashSet<String>()).anyTimes();
+    expect(stack.getExcludedConfigurationTypes("service2")).andReturn(new HashSet<String>()).anyTimes();
 
-    expect(request.getBlueprint()).andReturn(blueprint).anyTimes();
+    expect(request.getBlueprint()).andReturn(null).anyTimes();
     expect(request.getClusterId()).andReturn(CLUSTER_ID).anyTimes();
     expect(request.getClusterName()).andReturn(CLUSTER_NAME).anyTimes();
     expect(request.getDescription()).andReturn("Provision Cluster Test").anyTimes();
@@ -323,7 +323,7 @@ public class TopologyManagerTest {
 
     expect(ambariContext.getPersistedTopologyState()).andReturn(persistedState).anyTimes();
     //todo: don't ignore param
-    ambariContext.createAmbariResources(isA(ClusterTopology.class), eq(CLUSTER_NAME), (SecurityType) isNull(), (String) isNull(), anyLong());
+    ambariContext.createAmbariResources(isA(ClusterTopology.class), eq(CLUSTER_NAME), (SecurityType) isNull());
     expectLastCall().anyTimes();
     expect(ambariContext.getNextRequestId()).andReturn(1L).anyTimes();
     expect(ambariContext.isClusterKerberosEnabled(CLUSTER_ID)).andReturn(false).anyTimes();
@@ -345,7 +345,8 @@ public class TopologyManagerTest {
 
     expect(clusterController.ensureResourceProvider(anyObject(Resource.Type.class))).andReturn(resourceProvider);
 
-    expect(configureClusterTaskFactory.createConfigureClusterTask(anyObject(), anyObject(), anyObject())).andReturn(configureClusterTask);
+    expect(configureClusterTaskFactory.createConfigureClusterTask(anyObject(ClusterTopology.class), anyObject(ClusterConfigurationRequest.class),
+            anyObject(AmbariEventPublisher.class))).andReturn(configureClusterTask);
     expect(configureClusterTask.getTimeout()).andReturn(1000L);
     expect(configureClusterTask.getRepeatDelay()).andReturn(50L);
     expect(executor.submit(anyObject(AsyncCallableService.class))).andReturn(mockFuture).anyTimes();
@@ -399,10 +400,10 @@ public class TopologyManagerTest {
     requestList.add(logicalRequest);
     expect(logicalRequest.hasPendingHostRequests()).andReturn(false).anyTimes();
     allRequests.put(clusterTopologyMock, requestList);
-    expect(requestStatusResponse.getTasks()).andReturn(Collections.emptyList()).anyTimes();
+    expect(requestStatusResponse.getTasks()).andReturn(new ArrayList<ShortTaskStatus>()).anyTimes();
     expect(clusterTopologyMock.isClusterKerberosEnabled()).andReturn(true);
     expect(clusterTopologyMock.getClusterId()).andReturn(CLUSTER_ID).anyTimes();
-    expect(clusterTopologyMock.getBlueprint()).andReturn(blueprint).anyTimes();
+    expect(clusterTopologyMock.getBlueprint()).andReturn(null).anyTimes();
     expect(persistedState.getAllRequests()).andReturn(allRequests).anyTimes();
     expect(persistedState.getProvisionRequest(CLUSTER_ID)).andReturn(logicalRequest).anyTimes();
     expect(ambariContext.isTopologyResolved(CLUSTER_ID)).andReturn(true).anyTimes();
@@ -429,7 +430,7 @@ public class TopologyManagerTest {
     tasks.add(t3);
 
     expect(requestStatusResponse.getTasks()).andReturn(tasks).anyTimes();
-    expect(persistedState.getAllRequests()).andReturn(Collections.emptyMap()).anyTimes();
+    expect(persistedState.getAllRequests()).andReturn(new HashMap<ClusterTopology, List<LogicalRequest>>()).anyTimes();
     expect(persistedState.getProvisionRequest(CLUSTER_ID)).andReturn(logicalRequest).anyTimes();
     replayAll();
     topologyManager.provisionCluster(request);
@@ -451,7 +452,7 @@ public class TopologyManagerTest {
     tasks.add(t3);
 
     expect(requestStatusResponse.getTasks()).andReturn(tasks).anyTimes();
-    expect(persistedState.getAllRequests()).andReturn(Collections.emptyMap()).anyTimes();
+    expect(persistedState.getAllRequests()).andReturn(new HashMap<ClusterTopology, List<LogicalRequest>>()).anyTimes();
     expect(persistedState.getProvisionRequest(CLUSTER_ID)).andReturn(logicalRequest).anyTimes();
     replayAll();
     topologyManager.provisionCluster(request);
@@ -473,7 +474,7 @@ public class TopologyManagerTest {
     tasks.add(t3);
 
     expect(requestStatusResponse.getTasks()).andReturn(tasks).anyTimes();
-    expect(persistedState.getAllRequests()).andReturn(Collections.emptyMap()).anyTimes();
+    expect(persistedState.getAllRequests()).andReturn(new HashMap<ClusterTopology, List<LogicalRequest>>()).anyTimes();
     expect(persistedState.getProvisionRequest(CLUSTER_ID)).andReturn(logicalRequest).anyTimes();
     replayAll();
     topologyManager.provisionCluster(request);
@@ -545,9 +546,9 @@ public class TopologyManagerTest {
     propertySet.add(properties);
     BlueprintFactory bpfMock = EasyMock.createNiceMock(BlueprintFactory.class);
     EasyMock.expect(bpfMock.getBlueprint(BLUEPRINT_NAME)).andReturn(blueprint).anyTimes();
-    ScaleClusterRequest.init(bpfMock);
+    ScaleClusterRequest.init(null);
     replay(bpfMock);
-    expect(persistedState.getAllRequests()).andReturn(Collections.emptyMap()).anyTimes();
+    expect(persistedState.getAllRequests()).andReturn(new HashMap<ClusterTopology, List<LogicalRequest>>()).anyTimes();
     replayAll();
     topologyManager.provisionCluster(request);
     topologyManager.scaleHosts(new ScaleClusterRequest(propertySet));
@@ -556,7 +557,7 @@ public class TopologyManagerTest {
 
   @Test
   public void testProvisionCluster_QuickLinkProfileIsSavedTheFirstTime() throws Exception {
-    expect(persistedState.getAllRequests()).andReturn(Collections.emptyMap()).anyTimes();
+    expect(persistedState.getAllRequests()).andReturn(new HashMap<ClusterTopology, List<LogicalRequest>>()).anyTimes();
 
     // request has a quicklinks profile
     expect(request.getQuickLinksProfileJson()).andReturn(SAMPLE_QUICKLINKS_PROFILE_1).anyTimes();
@@ -579,7 +580,7 @@ public class TopologyManagerTest {
 
   @Test
   public void testProvisionCluster_ExistingQuickLinkProfileIsOverwritten() throws Exception {
-    expect(persistedState.getAllRequests()).andReturn(Collections.emptyMap()).anyTimes();
+    expect(persistedState.getAllRequests()).andReturn(new HashMap<ClusterTopology, List<LogicalRequest>>()).anyTimes();
 
     // request has a quicklinks profile
     expect(request.getQuickLinksProfileJson()).andReturn(SAMPLE_QUICKLINKS_PROFILE_2).anyTimes();

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/topology/validators/ClusterConfigTypeValidatorTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/validators/ClusterConfigTypeValidatorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/validators/ClusterConfigTypeValidatorTest.java
index c2fea1d..424ed63 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/validators/ClusterConfigTypeValidatorTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/validators/ClusterConfigTypeValidatorTest.java
@@ -62,7 +62,7 @@ public class ClusterConfigTypeValidatorTest extends EasyMockSupport {
   public void before() {
     EasyMock.expect(clusterTopologyMock.getConfiguration()).andReturn(clusterConfigurationMock).anyTimes();
 
-    EasyMock.expect(clusterTopologyMock.getBlueprint()).andReturn(blueprintMock).anyTimes();
+    EasyMock.expect(clusterTopologyMock.getBlueprint()).andReturn(null).anyTimes();
     EasyMock.expect(blueprintMock.getStack()).andReturn(stackMock).anyTimes();
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/topology/validators/HiveServiceValidatorTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/validators/HiveServiceValidatorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/validators/HiveServiceValidatorTest.java
index 74c3ae5..e3eca17 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/validators/HiveServiceValidatorTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/validators/HiveServiceValidatorTest.java
@@ -64,7 +64,7 @@ public class HiveServiceValidatorTest extends EasyMockSupport {
   public void testShouldValidationPassWhenHiveServiceIsNotInBlueprint() throws Exception {
 
     // GIVEN
-    EasyMock.expect(clusterTopologyMock.getBlueprint()).andReturn(blueprintMock);
+    EasyMock.expect(clusterTopologyMock.getBlueprint()).andReturn(null);
     EasyMock.expect(blueprintMock.getServices()).andReturn(Collections.emptySet());
     replayAll();
 
@@ -80,7 +80,7 @@ public class HiveServiceValidatorTest extends EasyMockSupport {
 
     // GIVEN
     Collection<String> blueprintServices = Arrays.asList("HIVE", "OOZIE");
-    EasyMock.expect(clusterTopologyMock.getBlueprint()).andReturn(blueprintMock);
+    EasyMock.expect(clusterTopologyMock.getBlueprint()).andReturn(null);
     EasyMock.expect(blueprintMock.getServices()).andReturn(blueprintServices);
     EasyMock.expect(clusterTopologyMock.getConfiguration()).andReturn(configurationMock);
     EasyMock.expect(configurationMock.getAllConfigTypes()).andReturn(Collections.emptySet());
@@ -100,7 +100,7 @@ public class HiveServiceValidatorTest extends EasyMockSupport {
     // GIVEN
     Collection<String> blueprintServices = Arrays.asList("HIVE", "OOZIE");
     Collection<String> configTypes = Arrays.asList("hive-env", "core-site", "hadoop-env");
-    EasyMock.expect(clusterTopologyMock.getBlueprint()).andReturn(blueprintMock);
+    EasyMock.expect(clusterTopologyMock.getBlueprint()).andReturn(null);
     EasyMock.expect(blueprintMock.getServices()).andReturn(blueprintServices);
     EasyMock.expect(clusterTopologyMock.getConfiguration()).andReturn(configurationMock);
     EasyMock.expect(configurationMock.getAllConfigTypes()).andReturn(configTypes);
@@ -120,7 +120,7 @@ public class HiveServiceValidatorTest extends EasyMockSupport {
     // GIVEN
     Collection<String> blueprintServices = Arrays.asList("HIVE", "HDFS");
     Collection<String> configTypes = Arrays.asList("hive-env", "core-site", "hadoop-env");
-    EasyMock.expect(clusterTopologyMock.getBlueprint()).andReturn(blueprintMock).anyTimes();
+    EasyMock.expect(clusterTopologyMock.getBlueprint()).andReturn(null).anyTimes();
     EasyMock.expect(blueprintMock.getServices()).andReturn(blueprintServices).anyTimes();
     EasyMock.expect(blueprintMock.getComponents("HIVE")).andReturn(Collections.emptyList()).anyTimes();
     EasyMock.expect(clusterTopologyMock.getConfiguration()).andReturn(configurationMock);
@@ -143,7 +143,7 @@ public class HiveServiceValidatorTest extends EasyMockSupport {
     Collection<String> blueprintServices = Arrays.asList("HIVE", "HDFS", "MYSQL_SERVER");
     Collection<String> hiveComponents = Arrays.asList("MYSQL_SERVER");
     Collection<String> configTypes = Arrays.asList("hive-env", "core-site", "hadoop-env");
-    EasyMock.expect(clusterTopologyMock.getBlueprint()).andReturn(blueprintMock).anyTimes();
+    EasyMock.expect(clusterTopologyMock.getBlueprint()).andReturn(null).anyTimes();
     EasyMock.expect(blueprintMock.getServices()).andReturn(blueprintServices).anyTimes();
     EasyMock.expect(blueprintMock.getComponents("HIVE")).andReturn(hiveComponents).anyTimes();
     EasyMock.expect(clusterTopologyMock.getConfiguration()).andReturn(configurationMock);

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/topology/validators/RequiredConfigPropertiesValidatorTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/validators/RequiredConfigPropertiesValidatorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/validators/RequiredConfigPropertiesValidatorTest.java
index 4853a4d..cfa3af1 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/validators/RequiredConfigPropertiesValidatorTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/validators/RequiredConfigPropertiesValidatorTest.java
@@ -96,7 +96,7 @@ public class RequiredConfigPropertiesValidatorTest extends EasyMockSupport {
     EasyMock.expect(clusterTopologyMock.getConfiguration()).andReturn(topologyConfigurationMock);
     EasyMock.expect(topologyConfigurationMock.getFullProperties(1)).andReturn(topologyConfigurationMap);
 
-    EasyMock.expect(clusterTopologyMock.getBlueprint()).andReturn(blueprintMock).anyTimes();
+    EasyMock.expect(clusterTopologyMock.getBlueprint()).andReturn(null).anyTimes();
 
     EasyMock.expect(blueprintMock.getHostGroups()).andReturn(hostGroups);
     EasyMock.expect(blueprintMock.getServices()).andReturn(bpServices);

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/topology/validators/StackConfigTypeValidatorTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/validators/StackConfigTypeValidatorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/validators/StackConfigTypeValidatorTest.java
index a807b42..e63ff45 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/validators/StackConfigTypeValidatorTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/validators/StackConfigTypeValidatorTest.java
@@ -62,7 +62,7 @@ public class StackConfigTypeValidatorTest extends EasyMockSupport {
   @Before
   public void before() {
     EasyMock.expect(clusterTopologyMock.getConfiguration()).andReturn(clusterConfigurationMock).anyTimes();
-    EasyMock.expect(clusterTopologyMock.getBlueprint()).andReturn(blueprintMock).anyTimes();
+    EasyMock.expect(clusterTopologyMock.getBlueprint()).andReturn(null).anyTimes();
 
     EasyMock.expect(blueprintMock.getStack()).andReturn(stackMock).anyTimes();
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/topology/validators/UnitValidatorTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/validators/UnitValidatorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/validators/UnitValidatorTest.java
index 334ee4b..95e539e 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/validators/UnitValidatorTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/validators/UnitValidatorTest.java
@@ -25,7 +25,7 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.ambari.server.controller.StackConfigurationResponse;
+import org.apache.ambari.server.controller.StackLevelConfigurationResponse;
 import org.apache.ambari.server.controller.internal.ConfigurationTopologyException;
 import org.apache.ambari.server.controller.internal.Stack;
 import org.apache.ambari.server.state.ValueAttributesInfo;
@@ -74,8 +74,8 @@ public class UnitValidatorTest extends EasyMockSupport {
 
   @Before
   public void setUp() throws Exception {
-    expect(clusterTopology.getBlueprint()).andReturn(blueprint).anyTimes();
-    expect(clusterTopology.getHostGroupInfo()).andReturn(Collections.emptyMap()).anyTimes();
+    expect(clusterTopology.getBlueprint()).andReturn(null).anyTimes();
+    expect(clusterTopology.getHostGroupInfo()).andReturn(null).anyTimes();
     expect(blueprint.getStack()).andReturn(stack).anyTimes();
     expect(stack.getConfigurationPropertiesWithMetadata(SERVICE, CONFIG_TYPE)).andReturn(stackConfigWithMetadata).anyTimes();
   }
@@ -98,7 +98,7 @@ public class UnitValidatorTest extends EasyMockSupport {
   private void stackUnitIs(String name, String unit) {
     ValueAttributesInfo propertyValueAttributes = new ValueAttributesInfo();
     propertyValueAttributes.setUnit(unit);
-    stackConfigWithMetadata.put(name, new Stack.ConfigProperty(new StackConfigurationResponse(
+    stackConfigWithMetadata.put(name, new Stack.ConfigProperty(new StackLevelConfigurationResponse(
       name,
       "any",
       "any",

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalogTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalogTest.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalogTest.java
index 066ec34..d7ad7f2 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalogTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalogTest.java
@@ -17,6 +17,7 @@
  */
 package org.apache.ambari.server.upgrade;
 
+import static org.easymock.EasyMock.anyLong;
 import static org.easymock.EasyMock.anyObject;
 import static org.easymock.EasyMock.anyString;
 import static org.easymock.EasyMock.createNiceMock;
@@ -131,7 +132,7 @@ public class AbstractUpgradeCatalogTest {
     mergedProperties.put("prop1", "v1-old");
     mergedProperties.put("prop4", "v4");
 
-    expect(amc.createConfig(eq(cluster), anyObject(StackId.class), eq("hdfs-site"), eq(mergedProperties), anyString(), eq(tags))).andReturn(null);
+    expect(amc.createConfig(eq(cluster), anyObject(StackId.class), eq("hdfs-site"), eq(mergedProperties), anyString(), eq(tags), eq(anyLong()))).andReturn(null);
 
     replay(injector, configHelper, amc, cluster, clusters, serviceInfo, oldConfig);
 
@@ -153,7 +154,7 @@ public class AbstractUpgradeCatalogTest {
     mergedProperties.put("prop2", "v2");
     mergedProperties.put("prop3", "v3-old");
 
-    expect(amc.createConfig(eq(cluster), anyObject(StackId.class), eq("hdfs-site"), eq(mergedProperties), anyString(), eq(tags))).andReturn(null);
+    expect(amc.createConfig(eq(cluster), anyObject(StackId.class), eq("hdfs-site"), eq(mergedProperties), anyString(), eq(tags), eq(anyLong()))).andReturn(null);
 
     replay(injector, configHelper, amc, cluster, clusters, serviceInfo, oldConfig);
 
@@ -172,7 +173,7 @@ public class AbstractUpgradeCatalogTest {
     Map<String, String> mergedProperties = new HashMap<>();
     mergedProperties.put("prop1", "v1-old");
 
-    expect(amc.createConfig(eq(cluster), anyObject(StackId.class), eq("hdfs-site"), eq(mergedProperties), anyString(), eq(tags))).andReturn(null);
+    expect(amc.createConfig(eq(cluster), anyObject(StackId.class), eq("hdfs-site"), eq(mergedProperties), anyString(), eq(tags), eq(anyLong()))).andReturn(null);
 
     replay(injector, configHelper, amc, cluster, clusters, serviceInfo, oldConfig);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog252Test.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog252Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog252Test.java
index d936c6d..07ed888 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog252Test.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog252Test.java
@@ -18,10 +18,12 @@
 
 package org.apache.ambari.server.upgrade;
 
+import static org.easymock.EasyMock.anyLong;
 import static org.easymock.EasyMock.anyObject;
 import static org.easymock.EasyMock.anyString;
 import static org.easymock.EasyMock.capture;
 import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.createNiceMock;
 import static org.easymock.EasyMock.eq;
 import static org.easymock.EasyMock.expect;
 import static org.easymock.EasyMock.expectLastCall;
@@ -190,6 +192,8 @@ public class UpgradeCatalog252Test {
     final Config livyConfNew = createMock(Config.class);
     final Config livy2Conf = createMock(Config.class);
     final Config livy2ConfNew = createMock(Config.class);
+    final Service sparkMock = createNiceMock(Service.class);
+    final Service spark2Mock = createNiceMock(Service.class);
     final AmbariManagementController controller = createMock(AmbariManagementController.class);
 
     StackId stackId = new StackId("HDP", "2.2");
@@ -215,11 +219,11 @@ public class UpgradeCatalog252Test {
     expect(cluster.getClusterName()).andReturn("c1").atLeastOnce();
     expect(cluster.getDesiredStackVersion()).andReturn(stackId).atLeastOnce();
     expect(cluster.getDesiredConfigByType("zeppelin-env")).andReturn(zeppelinEnv).atLeastOnce();
-    expect(cluster.getServiceByConfigType("livy-conf")).andReturn("SPARK").atLeastOnce();
+    expect(cluster.getServiceByConfigType("livy-conf")).andReturn(sparkMock).atLeastOnce();
     expect(cluster.getDesiredConfigByType("livy-conf")).andReturn(livyConf).atLeastOnce();
     expect(cluster.getConfigsByType("livy-conf")).andReturn(Collections.singletonMap("tag1", livyConf)).atLeastOnce();
     expect(cluster.getConfig(eq("livy-conf"), anyString())).andReturn(livyConfNew).atLeastOnce();
-    expect(cluster.getServiceByConfigType("livy2-conf")).andReturn("SPARK2").atLeastOnce();
+    expect(cluster.getServiceByConfigType("livy2-conf")).andReturn(spark2Mock).atLeastOnce();
     expect(cluster.getDesiredConfigByType("livy2-conf")).andReturn(livy2Conf).atLeastOnce();
     expect(cluster.getConfigsByType("livy2-conf")).andReturn(Collections.singletonMap("tag1", livy2Conf)).atLeastOnce();
     expect(cluster.getConfig(eq("livy2-conf"), anyString())).andReturn(livy2ConfNew).atLeastOnce();
@@ -227,25 +231,28 @@ public class UpgradeCatalog252Test {
 
     expect(zeppelinEnv.getProperties()).andReturn(Collections.singletonMap("zeppelin.server.kerberos.principal", "zeppelin_user@AMBARI.LOCAL")).once();
 
+    expect(sparkMock.getName()).andReturn("SPARK").atLeastOnce();
+    expect(spark2Mock.getName()).andReturn("SPARK2").atLeastOnce();
+
     expect(livyConf.getProperties()).andReturn(Collections.singletonMap("livy.superusers", "zeppelin-c1, some_user")).atLeastOnce();
     expect(livyConf.getPropertiesAttributes()).andReturn(Collections.<String, Map<String, String>>emptyMap()).atLeastOnce();
     expect(livy2Conf.getProperties()).andReturn(Collections.<String, String>emptyMap()).atLeastOnce();
     expect(livy2Conf.getPropertiesAttributes()).andReturn(Collections.<String, Map<String, String>>emptyMap()).atLeastOnce();
 
-    expect(controller.createConfig(eq(cluster), eq(stackId), eq("livy-conf"), capture(captureLivyConfProperties), anyString(), anyObject(Map.class)))
+    expect(controller.createConfig(eq(cluster), eq(stackId), eq("livy-conf"), capture(captureLivyConfProperties), anyString(), anyObject(Map.class), anyLong()))
         .andReturn(livyConfNew)
         .once();
-    expect(controller.createConfig(eq(cluster), eq(stackId), eq("livy2-conf"), capture(captureLivy2ConfProperties), anyString(), anyObject(Map.class)))
+    expect(controller.createConfig(eq(cluster), eq(stackId), eq("livy2-conf"), capture(captureLivy2ConfProperties), anyString(), anyObject(Map.class), anyLong()))
         .andReturn(livy2ConfNew)
         .once();
 
-    replay(clusters, cluster, zeppelinEnv, livy2Conf, livyConf, controller);
+    replay(clusters, cluster, zeppelinEnv, livy2Conf, livyConf, controller, sparkMock, spark2Mock);
 
     Injector injector = Guice.createInjector(module);
     UpgradeCatalog252 upgradeCatalog252 = injector.getInstance(UpgradeCatalog252.class);
     upgradeCatalog252.fixLivySuperusers();
 
-    verify(clusters, cluster, zeppelinEnv, livy2Conf, livyConf, controller);
+    verify(clusters, cluster, zeppelinEnv, livy2Conf, livyConf, controller, sparkMock, spark2Mock);
 
     Assert.assertTrue(captureLivyConfProperties.hasCaptured());
     Assert.assertEquals("some_user,zeppelin_user", captureLivyConfProperties.getValue().get("livy.superusers"));

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java
index cc58988..08d6a7f 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java
@@ -18,6 +18,7 @@
 
 package org.apache.ambari.server.upgrade;
 
+import static org.easymock.EasyMock.anyLong;
 import static org.easymock.EasyMock.anyObject;
 import static org.easymock.EasyMock.anyString;
 import static org.easymock.EasyMock.capture;
@@ -57,12 +58,14 @@ import org.apache.ambari.server.controller.AmbariManagementController;
 import org.apache.ambari.server.controller.AmbariManagementControllerImpl;
 import org.apache.ambari.server.controller.MaintenanceStateHelper;
 import org.apache.ambari.server.controller.ServiceConfigVersionResponse;
+import org.apache.ambari.server.mpack.MpackManagerFactory;
 import org.apache.ambari.server.orm.DBAccessor;
 import org.apache.ambari.server.orm.DBAccessor.DBColumnInfo;
 import org.apache.ambari.server.orm.dao.ArtifactDAO;
 import org.apache.ambari.server.orm.dao.WidgetDAO;
 import org.apache.ambari.server.orm.entities.ArtifactEntity;
 import org.apache.ambari.server.orm.entities.WidgetEntity;
+import org.apache.ambari.server.resources.RootLevelSettingsManagerFactory;
 import org.apache.ambari.server.stack.StackManagerFactory;
 import org.apache.ambari.server.state.Cluster;
 import org.apache.ambari.server.state.Clusters;
@@ -582,6 +585,7 @@ public class UpgradeCatalog260Test {
     final Config zeppelinEnvConf = createMock(Config.class);
     final Config coreSiteConf = createMock(Config.class);
     final Config coreSiteConfNew = createMock(Config.class);
+    final Service hdfsMock = createNiceMock(Service.class);
     final AmbariManagementController controller = injector.getInstance(AmbariManagementController.class);
 
     Capture<? extends Map<String, String>> captureCoreSiteConfProperties = newCapture();
@@ -594,15 +598,17 @@ public class UpgradeCatalog260Test {
     expect(cluster.getDesiredConfigByType("core-site")).andReturn(coreSiteConf).atLeastOnce();
     expect(cluster.getConfigsByType("core-site")).andReturn(Collections.singletonMap("tag1", coreSiteConf)).atLeastOnce();
     expect(cluster.getConfig(eq("core-site"), anyString())).andReturn(coreSiteConfNew).atLeastOnce();
-    expect(cluster.getServiceByConfigType("core-site")).andReturn("HDFS").atLeastOnce();
+    expect(cluster.getServiceByConfigType("core-site")).andReturn(hdfsMock).atLeastOnce();
     expect(cluster.addDesiredConfig(eq("ambari-upgrade"), anyObject(Set.class), anyString())).andReturn(null).atLeastOnce();
 
     expect(zeppelinEnvConf.getProperties()).andReturn(Collections.singletonMap("zeppelin_user", "zeppelin_user")).once();
 
+    expect(hdfsMock.getName()).andReturn("HDFS").atLeastOnce();
+
     expect(coreSiteConf.getProperties()).andReturn(Collections.singletonMap("hadoop.proxyuser.zeppelin_user.hosts", "existing_value")).atLeastOnce();
     expect(coreSiteConf.getPropertiesAttributes()).andReturn(Collections.<String, Map<String, String>>emptyMap()).atLeastOnce();
 
-    expect(controller.createConfig(eq(cluster), anyObject(StackId.class), eq("core-site"), capture(captureCoreSiteConfProperties), anyString(), anyObject(Map.class)))
+    expect(controller.createConfig(eq(cluster), anyObject(StackId.class), eq("core-site"), capture(captureCoreSiteConfProperties), anyString(), anyObject(Map.class), anyLong()))
         .andReturn(coreSiteConfNew)
         .once();
 
@@ -674,11 +680,12 @@ public class UpgradeCatalog260Test {
     StackId stackId = createMock(StackId.class);
 
     Cluster cluster = createMock(Cluster.class);
+    Service rangerMock = createNiceMock(Service.class);
     expect(cluster.getDesiredStackVersion()).andReturn(stackId).anyTimes();
     expect(cluster.getDesiredConfigByType("dbks-site")).andReturn(config).anyTimes();
     expect(cluster.getDesiredConfigByType("ranger-kms-audit")).andReturn(config).anyTimes();
     expect(cluster.getConfigsByType("ranger-kms-audit")).andReturn(Collections.singletonMap("version1", config)).anyTimes();
-    expect(cluster.getServiceByConfigType("ranger-kms-audit")).andReturn("RANGER").anyTimes();
+    expect(cluster.getServiceByConfigType("ranger-kms-audit")).andReturn(rangerMock).anyTimes();
     expect(cluster.getClusterName()).andReturn("cl1").anyTimes();
     expect(cluster.getConfig(eq("ranger-kms-audit"), anyString())).andReturn(newConfig).once();
     expect(cluster.addDesiredConfig("ambari-upgrade", Collections.singleton(newConfig), "Updated ranger-kms-audit during Ambari Upgrade from 2.5.2 to 2.6.0.")).andReturn(response).once();
@@ -686,10 +693,12 @@ public class UpgradeCatalog260Test {
     final Clusters clusters = injector.getInstance(Clusters.class);
     expect(clusters.getCluster(2L)).andReturn(cluster).anyTimes();
 
+    expect(rangerMock.getName()).andReturn("RANGER").atLeastOnce();
+
     Capture<? extends Map<String, String>> captureProperties = newCapture();
 
     AmbariManagementController controller = injector.getInstance(AmbariManagementController.class);
-    expect(controller.createConfig(eq(cluster), eq(stackId), eq("ranger-kms-audit"), capture(captureProperties), anyString(), anyObject(Map.class)))
+    expect(controller.createConfig(eq(cluster), eq(stackId), eq("ranger-kms-audit"), capture(captureProperties), anyString(), anyObject(Map.class), anyLong()))
         .andReturn(null)
         .once();
 
@@ -744,6 +753,7 @@ public class UpgradeCatalog260Test {
     Clusters clusters = easyMockSupport.createNiceMock(Clusters.class);
     final Cluster cluster = easyMockSupport.createNiceMock(Cluster.class);
     Config mockAmsSslClient = easyMockSupport.createNiceMock(Config.class);
+    Service amsMock = createNiceMock(Service.class);
 
     expect(clusters.getClusters()).andReturn(new HashMap<String, Cluster>() {{
       put("normal", cluster);
@@ -751,11 +761,14 @@ public class UpgradeCatalog260Test {
     expect(cluster.getDesiredConfigByType("ams-ssl-client")).andReturn(mockAmsSslClient).atLeastOnce();
     expect(mockAmsSslClient.getProperties()).andReturn(oldProperties).anyTimes();
 
+    expect(amsMock.getName()).andReturn("AMBARI_METRICS").atLeastOnce();
+    expect(cluster.getServiceByConfigType("ams-ssl-client")).andReturn(amsMock).atLeastOnce();
+
     Injector injector = easyMockSupport.createNiceMock(Injector.class);
     expect(injector.getInstance(Gson.class)).andReturn(null).anyTimes();
     expect(injector.getInstance(MaintenanceStateHelper.class)).andReturn(null).anyTimes();
 
-    replay(injector, clusters, mockAmsSslClient, cluster);
+    replay(injector, clusters, mockAmsSslClient);
 
     AmbariManagementControllerImpl controller = createMockBuilder(AmbariManagementControllerImpl.class)
       .addMockedMethod("createConfiguration")
@@ -770,9 +783,9 @@ public class UpgradeCatalog260Test {
     expect(injector2.getInstance(AmbariManagementController.class)).andReturn(controller).anyTimes();
     expect(controller.getClusters()).andReturn(clusters).anyTimes();
     expect(controller.createConfig(anyObject(Cluster.class), anyObject(StackId.class), anyString(), capture(propertiesCapture), anyString(),
-      anyObject(Map.class))).andReturn(createNiceMock(Config.class)).once();
+      anyObject(Map.class), anyLong())).andReturn(createNiceMock(Config.class)).once();
 
-    replay(controller, injector2);
+    replay(controller, injector2, cluster, amsMock);
     new UpgradeCatalog260(injector2).updateAmsConfigs();
     easyMockSupport.verifyAll();
 
@@ -788,6 +801,8 @@ public class UpgradeCatalog260Test {
          final Gson gson = new Gson();
          final WidgetDAO widgetDAO = createNiceMock(WidgetDAO.class);
          final AmbariMetaInfo metaInfo = createNiceMock(AmbariMetaInfo.class);
+         final MpackManagerFactory mmf = createNiceMock(MpackManagerFactory.class);
+         final RootLevelSettingsManagerFactory rootLevelSettingsManagerFactory = createNiceMock(RootLevelSettingsManagerFactory.class);
          WidgetEntity widgetEntity = createNiceMock(WidgetEntity.class);
          StackId stackId = new StackId("HDP", "2.0.0");
          StackInfo stackInfo = createNiceMock(StackInfo.class);
@@ -826,6 +841,8 @@ public class UpgradeCatalog260Test {
                  bind(Gson.class).toInstance(gson);
                  bind(WidgetDAO.class).toInstance(widgetDAO);
                  bind(StackManagerFactory.class).toInstance(createNiceMock(StackManagerFactory.class));
+                 bind(MpackManagerFactory.class).toInstance(mmf);
+                 bind(RootLevelSettingsManagerFactory.class).toInstance(rootLevelSettingsManagerFactory);
                  bind(AmbariMetaInfo.class).toInstance(metaInfo);
                }
      });

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog300Test.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog300Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog300Test.java
index 25e9dbf..03219bf 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog300Test.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog300Test.java
@@ -21,6 +21,7 @@ import static org.apache.ambari.server.upgrade.UpgradeCatalog300.COMPONENT_DESIR
 import static org.apache.ambari.server.upgrade.UpgradeCatalog300.COMPONENT_STATE_TABLE;
 import static org.apache.ambari.server.upgrade.UpgradeCatalog300.SECURITY_STATE_COLUMN;
 import static org.apache.ambari.server.upgrade.UpgradeCatalog300.SERVICE_DESIRED_STATE_TABLE;
+import static org.easymock.EasyMock.anyLong;
 import static org.easymock.EasyMock.anyObject;
 import static org.easymock.EasyMock.anyString;
 import static org.easymock.EasyMock.capture;
@@ -243,14 +244,14 @@ public class UpgradeCatalog300Test {
     expect(logFeederPropertiesConf.getProperties()).andReturn(Collections.emptyMap()).once();
     Capture<Map<String, String>> logFeederPropertiesCapture = EasyMock.newCapture();
     expect(controller.createConfig(anyObject(Cluster.class), anyObject(StackId.class), eq("logfeeder-properties"), capture(logFeederPropertiesCapture),
-        anyString(), EasyMock.anyObject())).andReturn(config).once();
+        anyString(), anyObject(Map.class), anyLong())).andReturn(config).once();
 
     Config logSearchPropertiesConf = easyMockSupport.createNiceMock(Config.class);
     expect(cluster.getDesiredConfigByType("logsearch-properties")).andReturn(logSearchPropertiesConf).times(2);
     expect(logSearchPropertiesConf.getProperties()).andReturn(oldLogSearchProperties).times(2);
     Capture<Map<String, String>> logSearchPropertiesCapture = EasyMock.newCapture();
     expect(controller.createConfig(anyObject(Cluster.class), anyObject(StackId.class), eq("logsearch-properties"), capture(logSearchPropertiesCapture),
-        anyString(), EasyMock.anyObject())).andReturn(config).once();
+        anyString(), anyObject(Map.class), anyLong())).andReturn(config).once();
 
     Map<String, String> oldLogFeederLog4j = ImmutableMap.of(
         "content", "<!DOCTYPE log4j:configuration SYSTEM \"log4j.dtd\">");
@@ -263,7 +264,7 @@ public class UpgradeCatalog300Test {
     expect(logFeederLog4jConf.getProperties()).andReturn(oldLogFeederLog4j).anyTimes();
     Capture<Map<String, String>> logFeederLog4jCapture = EasyMock.newCapture();
     expect(controller.createConfig(anyObject(Cluster.class), anyObject(StackId.class), anyString(), capture(logFeederLog4jCapture), anyString(),
-        EasyMock.anyObject())).andReturn(config).once();
+            anyObject(Map.class), anyLong())).andReturn(config).once();
 
     Map<String, String> oldLogSearchLog4j = ImmutableMap.of(
         "content", "<!DOCTYPE log4j:configuration SYSTEM \"log4j.dtd\">");
@@ -276,7 +277,7 @@ public class UpgradeCatalog300Test {
     expect(logSearchLog4jConf.getProperties()).andReturn(oldLogSearchLog4j).anyTimes();
     Capture<Map<String, String>> logSearchLog4jCapture = EasyMock.newCapture();
     expect(controller.createConfig(anyObject(Cluster.class), anyObject(StackId.class), anyString(), capture(logSearchLog4jCapture), anyString(),
-        EasyMock.anyObject())).andReturn(config).once();
+            anyObject(Map.class), anyLong())).andReturn(config).once();
 
     Map<String, String> oldLogSearchServiceLogsConf = ImmutableMap.of(
         "content", "<before/><requestHandler name=\"/admin/\"   class=\"solr.admin.AdminHandlers\" /><after/>");
@@ -289,7 +290,7 @@ public class UpgradeCatalog300Test {
     expect(logSearchServiceLogsConf.getProperties()).andReturn(oldLogSearchServiceLogsConf).anyTimes();
     Capture<Map<String, String>> logSearchServiceLogsConfCapture = EasyMock.newCapture();
     expect(controller.createConfig(anyObject(Cluster.class), anyObject(StackId.class), anyString(), capture(logSearchServiceLogsConfCapture), anyString(),
-        EasyMock.anyObject())).andReturn(config).once();
+            anyObject(Map.class), anyLong())).andReturn(config).once();
 
     Map<String, String> oldLogSearchAuditLogsConf = ImmutableMap.of(
         "content", "<before/><requestHandler name=\"/admin/\"   class=\"solr.admin.AdminHandlers\" /><after/>");
@@ -302,7 +303,7 @@ public class UpgradeCatalog300Test {
     expect(logSearchAuditLogsConf.getProperties()).andReturn(oldLogSearchAuditLogsConf).anyTimes();
     Capture<Map<String, String>> logSearchAuditLogsConfCapture = EasyMock.newCapture();
     expect(controller.createConfig(anyObject(Cluster.class), anyObject(StackId.class), anyString(), capture(logSearchAuditLogsConfCapture), anyString(),
-        EasyMock.anyObject())).andReturn(config).once();
+            anyObject(Map.class), anyLong())).andReturn(config).once();
 
     Map<String, String> oldLogFeederOutputConf = ImmutableMap.of(
         "content",
@@ -331,7 +332,7 @@ public class UpgradeCatalog300Test {
     expect(logFeederOutputConf.getProperties()).andReturn(oldLogFeederOutputConf).anyTimes();
     Capture<Map<String, String>> logFeederOutputConfCapture = EasyMock.newCapture();
     expect(controller.createConfig(anyObject(Cluster.class), anyObject(StackId.class), anyString(), capture(logFeederOutputConfCapture), anyString(),
-        EasyMock.anyObject())).andReturn(config).once();
+            anyObject(Map.class), anyLong())).andReturn(config).once();
 
     replay(clusters, cluster);
     replay(controller, injector2);

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java b/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java
index a28d419..96c8421 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java
@@ -1913,7 +1913,7 @@ public class ViewRegistryTest {
     replay(securityHelper, configuration, viewInstanceDAO, clusters, cluster, service, viewInstanceEntity);
 
 
-    ServiceInstalledEvent event = new ServiceInstalledEvent(99L, "HDP", "2.0", "HIVE");
+    ServiceInstalledEvent event = new ServiceInstalledEvent(99L, "HDP", "2.0", "HIVE", "", "");
 
     registry.onAmbariEvent(event);
 


[5/7] ambari git commit: AMBARI-22493. Fix build for test classes in feature branch.(vbrodetskyi)

Posted by vb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/BackgroundCustomCommandExecutionTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/BackgroundCustomCommandExecutionTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/BackgroundCustomCommandExecutionTest.java
index 3d8d161..0b07fb7 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/BackgroundCustomCommandExecutionTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/BackgroundCustomCommandExecutionTest.java
@@ -217,8 +217,8 @@ public class BackgroundCustomCommandExecutionTest {
     if (desiredState != null) {
       dStateStr = desiredState.toString();
     }
-    ServiceRequest r1 = new ServiceRequest(clusterName, serviceName,
-        m_repositoryVersion.getId(), dStateStr);
+    ServiceRequest r1 = new ServiceRequest(clusterName, "", serviceName,
+        m_repositoryVersion.getId(), dStateStr, null);
 
     Set<ServiceRequest> requests = new HashSet<>();
     requests.add(r1);
@@ -234,7 +234,7 @@ public class BackgroundCustomCommandExecutionTest {
     if (desiredState != null) {
       dStateStr = desiredState.toString();
     }
-    ServiceComponentRequest r = new ServiceComponentRequest(clusterName,
+    ServiceComponentRequest r = new ServiceComponentRequest(clusterName, "",
         serviceName, componentName, dStateStr);
     Set<ServiceComponentRequest> requests =
       new HashSet<>();
@@ -248,7 +248,7 @@ public class BackgroundCustomCommandExecutionTest {
     if (desiredState != null) {
       dStateStr = desiredState.toString();
     }
-    ServiceComponentHostRequest r = new ServiceComponentHostRequest(clusterName,
+    ServiceComponentHostRequest r = new ServiceComponentHostRequest(clusterName, "",
         serviceName, componentName, hostname, dStateStr);
     Set<ServiceComponentHostRequest> requests =
       new HashSet<>();

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/ClusterResponseTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/ClusterResponseTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/ClusterResponseTest.java
index c9e91e3..40d12de 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/ClusterResponseTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/ClusterResponseTest.java
@@ -40,7 +40,7 @@ public class ClusterResponseTest {
         new ClusterResponse(clusterId, clusterName, provisioningState, securityType,
           hostNames, hostNames.size(), "bar", null);
     
-    Assert.assertEquals(clusterId, r1.getClusterId());
+    Assert.assertTrue(clusterId == r1.getClusterId().longValue());
     Assert.assertEquals(clusterName, r1.getClusterName());
     Assert.assertEquals(provisioningState, r1.getProvisioningState());
     Assert.assertEquals(securityType, r1.getSecurityType());

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/RefreshYarnCapacitySchedulerReleaseConfigTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/RefreshYarnCapacitySchedulerReleaseConfigTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/RefreshYarnCapacitySchedulerReleaseConfigTest.java
index ef186f1..3ce6686 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/RefreshYarnCapacitySchedulerReleaseConfigTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/RefreshYarnCapacitySchedulerReleaseConfigTest.java
@@ -102,12 +102,12 @@ public class RefreshYarnCapacitySchedulerReleaseConfigTest {
     // Start
     ClusterRequest cr = new ClusterRequest(cluster.getClusterId(), "c1", cluster.getDesiredStackVersion().getStackVersion(), null);
 
-    cr.setDesiredConfig(Collections.singletonList(new ConfigurationRequest("c1","capacity-scheduler","version2", new HashMap<>(), null)));
+    cr.setDesiredConfig(Collections.singletonList(new ConfigurationRequest("c1","capacity-scheduler","version2", new HashMap<>(), null, 1L, 1L)));
 
     controller.updateClusters(Collections.singleton(cr) , null);
 
 
-    ServiceComponentHostRequest r = new ServiceComponentHostRequest("c1", null, null, null, null);
+    ServiceComponentHostRequest r = new ServiceComponentHostRequest("c1", null, null, null, null, null);
     r.setStaleConfig("true");
     Set<ServiceComponentHostResponse> resps = controller.getHostComponents(Collections.singleton(r));
     Assert.assertEquals(1, resps.size());
@@ -123,12 +123,12 @@ public class RefreshYarnCapacitySchedulerReleaseConfigTest {
     // Start
     ClusterRequest cr = new ClusterRequest(cluster.getClusterId(), "c1", cluster.getDesiredStackVersion().getStackVersion(), null);
 
-    cr.setDesiredConfig(Collections.singletonList(new ConfigurationRequest("c1","core-site","version2", new HashMap<>(),null)));
+    cr.setDesiredConfig(Collections.singletonList(new ConfigurationRequest("c1","core-site","version2", new HashMap<>(),null, 1L, 1L)));
 
     controller.updateClusters(Collections.singleton(cr) , null);
 
 
-    ServiceComponentHostRequest r = new ServiceComponentHostRequest("c1", null, null, null, null);
+    ServiceComponentHostRequest r = new ServiceComponentHostRequest("c1", null, null, null, null, null);
     r.setStaleConfig("true");
     Set<ServiceComponentHostResponse> resps = controller.getHostComponents(Collections.singleton(r));
     Assert.assertEquals(4, resps.size());
@@ -213,8 +213,8 @@ public class RefreshYarnCapacitySchedulerReleaseConfigTest {
     RepositoryVersionEntity repositoryVersion = ormTestHelper.getOrCreateRepositoryVersion(
         new StackId("HDP-2.0.7"), "2.0.7-1234");
 
-    ServiceRequest r1 = new ServiceRequest(clusterName, serviceName,
-        repositoryVersion.getId(), dStateStr);
+    ServiceRequest r1 = new ServiceRequest(clusterName, "", serviceName,
+        repositoryVersion.getId(), dStateStr, null);
 
     Set<ServiceRequest> requests = new HashSet<>();
     requests.add(r1);
@@ -230,7 +230,7 @@ public class RefreshYarnCapacitySchedulerReleaseConfigTest {
     if (desiredState != null) {
       dStateStr = desiredState.toString();
     }
-    ServiceComponentRequest r = new ServiceComponentRequest(clusterName,
+    ServiceComponentRequest r = new ServiceComponentRequest(clusterName, "",
         serviceName, componentName, dStateStr);
     Set<ServiceComponentRequest> requests =
       new HashSet<>();
@@ -244,7 +244,7 @@ public class RefreshYarnCapacitySchedulerReleaseConfigTest {
     if (desiredState != null) {
       dStateStr = desiredState.toString();
     }
-    ServiceComponentHostRequest r = new ServiceComponentHostRequest(clusterName,
+    ServiceComponentHostRequest r = new ServiceComponentHostRequest(clusterName, "",
         serviceName, componentName, hostname, dStateStr);
     Set<ServiceComponentHostRequest> requests =
       new HashSet<>();

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractResourceProviderTest.java
index 7165e48..0f04e74 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractResourceProviderTest.java
@@ -432,7 +432,7 @@ public class AbstractResourceProviderTest {
   public static class ConfigurationRequestMatcher extends ConfigurationRequest implements IArgumentMatcher {
 
     public ConfigurationRequestMatcher(String clusterName, String type, String tag, Map<String, String> configs, Map<String, Map<String, String>> configsAttributes) {
-      super(clusterName, type, tag, configs, configsAttributes);
+      super(clusterName, type, tag, configs, configsAttributes, 1L, 1L);
     }
 
     @Override
@@ -500,7 +500,7 @@ public class AbstractResourceProviderTest {
     public HostComponentRequestSetMatcher(String clusterName, String serviceName, String componentName, String hostName,
                                       Map<String, String> configVersions, String desiredState) {
       hostComponentRequest =
-          new ServiceComponentHostRequest(clusterName, serviceName, componentName,
+          new ServiceComponentHostRequest(clusterName, "", serviceName, componentName,
               hostName, desiredState);
       add(hostComponentRequest);
     }


[4/7] ambari git commit: AMBARI-22493. Fix build for test classes in feature branch.(vbrodetskyi)

Posted by vb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/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 22b0e6b..f9765f2 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
@@ -43,7 +43,7 @@ import java.util.Set;
 import org.apache.ambari.server.controller.AmbariManagementController;
 import org.apache.ambari.server.controller.AmbariServer;
 import org.apache.ambari.server.controller.KerberosHelper;
-import org.apache.ambari.server.controller.StackConfigurationResponse;
+import org.apache.ambari.server.controller.StackLevelConfigurationResponse;
 import org.apache.ambari.server.state.Cluster;
 import org.apache.ambari.server.state.Clusters;
 import org.apache.ambari.server.state.ConfigHelper;
@@ -290,7 +290,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     configProcessor.doUpdateForBlueprintExport();
 
     String updatedVal = properties.get("yarn-site").get("yarn.resourcemanager.hostname");
@@ -338,7 +338,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     configProcessor.doUpdateForBlueprintExport();
 
     assertEquals(properties.size(), 3);
@@ -372,7 +372,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
 
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // When
     configProcessor.doUpdateForBlueprintExport();
@@ -416,7 +416,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     configProcessor.doUpdateForBlueprintExport();
 
     assertEquals("%HOSTGROUP::group1%", clusterConfig.getPropertyValue("yarn-site", "yarn.resourcemanager.hostname"));
@@ -464,7 +464,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     configProcessor.doUpdateForBlueprintExport();
 
     assertEquals("%HOSTGROUP::group1%", properties.get("yarn-site").get("yarn.resourcemanager.hostname"));
@@ -499,7 +499,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     configProcessor.doUpdateForBlueprintExport();
 
     String updatedVal = properties.get("core-site").get("fs.defaultFS");
@@ -532,7 +532,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     configProcessor.doUpdateForBlueprintExport();
 
     assertFalse(properties.get("yarn-site").containsKey("yarn.resourcemanager.hostname"));
@@ -578,7 +578,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group3);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     configProcessor.doUpdateForBlueprintExport();
 
     String updatedVal = properties.get("hbase-site").get("hbase.zookeeper.quorum");
@@ -625,7 +625,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group3);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     configProcessor.doUpdateForBlueprintExport();
 
     String updatedVal = properties.get("webhcat-site").get("templeton.zookeeper.hosts");
@@ -680,7 +680,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group3);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     configProcessor.doUpdateForBlueprintExport();
 
     String updatedVal = properties.get("storm-site").get("storm.zookeeper.servers");
@@ -723,7 +723,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     configProcessor.doUpdateForBlueprintExport();
 
     String updatedVal = properties.get("hive-site").get("javax.jdo.option.ConnectionURL");
@@ -756,7 +756,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     configProcessor.doUpdateForBlueprintExport();
 
     assertFalse(properties.get("hive-site").containsKey("javax.jdo.option.ConnectionURL"));
@@ -808,7 +808,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     configProcessor.doUpdateForBlueprintExport();
 
 
@@ -891,7 +891,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     configProcessor.doUpdateForBlueprintExport();
 
     assertEquals("Falcon Broker URL property not properly exported",
@@ -928,7 +928,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     configProcessor.doUpdateForBlueprintExport();
 
     assertFalse("tez.tez-ui.history-url.base should not be present in exported blueprint in tez-site",
@@ -979,7 +979,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     configProcessor.doUpdateForBlueprintExport();
 
     // verify that these properties are filtered out of the exported configuration
@@ -1043,7 +1043,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     configProcessor.doUpdateForBlueprintExport();
 
     assertEquals("HTTPS address HA property not properly exported",
@@ -1116,7 +1116,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     configProcessor.doUpdateForBlueprintExport();
 
     assertEquals("HTTPS address HA property not properly exported",
@@ -1176,7 +1176,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     configProcessor.doUpdateForBlueprintExport();
 
     // verify that any properties that include nameservices are not removed from the exported blueprint's configuration
@@ -1212,7 +1212,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     configProcessor.doUpdateForBlueprintExport();
 
     assertEquals("Incorrect state for hdfs-site config after HA call in non-HA environment, should be zero",
@@ -1275,7 +1275,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     configProcessor.doUpdateForBlueprintExport();
 
     // verify results for name service one
@@ -1352,7 +1352,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     configProcessor.doUpdateForBlueprintExport();
 
     assertEquals("Yarn Log Server URL was incorrectly exported",
@@ -1418,7 +1418,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     configProcessor.doUpdateForBlueprintExport();
 
     assertEquals("Yarn Log Server URL was incorrectly exported",
@@ -1494,7 +1494,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     configProcessor.doUpdateForBlueprintExport();
 
     assertEquals("hdfs config property not exported properly",
@@ -1581,7 +1581,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // call top-level export method
     configProcessor.doUpdateForBlueprintExport();
@@ -1674,7 +1674,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // call top-level export method
     configProcessor.doUpdateForBlueprintExport();
@@ -1770,7 +1770,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     }
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // call top-level export method
     configProcessor.doUpdateForBlueprintExport();
@@ -1833,7 +1833,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     expect(stack.getCardinality("OOZIE_SERVER")).andReturn(new Cardinality("1+")).anyTimes();
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor blueprintConfigurationProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor blueprintConfigurationProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     assertTrue(BlueprintConfigurationProcessor.singleHostTopologyUpdaters.get("oozie-site").containsKey("oozie.service.JPAService.jdbc.url"));
     assertNull(blueprintConfigurationProcessor.getRemovePropertyUpdaters().get("oozie-site"));
@@ -1872,7 +1872,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     expect(stack.getCardinality("OOZIE_SERVER")).andReturn(new Cardinality("1+")).anyTimes();
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor blueprintConfigurationProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor blueprintConfigurationProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     assertTrue(BlueprintConfigurationProcessor.singleHostTopologyUpdaters.get("oozie-site").containsKey("oozie.service.JPAService.jdbc.url"));
     assertNull(blueprintConfigurationProcessor.getRemovePropertyUpdaters().get("oozie-site"));
@@ -1935,7 +1935,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // call top-level export method
     configProcessor.doUpdateForBlueprintExport();
@@ -2015,7 +2015,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // call top-level export method
     configProcessor.doUpdateForBlueprintExport();
@@ -2064,7 +2064,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // call top-level export method
     configProcessor.doUpdateForBlueprintExport();
@@ -2103,7 +2103,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // call top-level export method
     configProcessor.doUpdateForBlueprintExport();
@@ -2145,7 +2145,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     Set<String> configTypesUpdated =
       updater.doUpdateForClusterCreate();
@@ -2201,7 +2201,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
 
@@ -2248,7 +2248,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
 
@@ -2299,7 +2299,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     // todo: set as BP hostgroup
     topology.getHostGroupInfo().get("group2").getConfiguration().setParentConfiguration(group2BPConfig);
 
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
 
@@ -2335,7 +2335,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     expect(stack.getCardinality("APP_TIMELINE_SERVER")).andReturn(new Cardinality("1")).anyTimes();
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     //todo: should throw a checked exception, not the exception expected by the api
     try {
@@ -2378,7 +2378,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
 
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     try {
       updater.doUpdateForClusterCreate();
@@ -2422,7 +2422,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
 
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
     String updatedVal = topology.getConfiguration().getFullProperties().get("yarn-site").get("yarn.timeline-service.address");
@@ -2458,7 +2458,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     expect(stack.getCardinality("APP_TIMELINE_SERVER")).andReturn(new Cardinality("0-1")).anyTimes();
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
     String updatedVal = topology.getConfiguration().getFullProperties().get("yarn-site").get("yarn.timeline-service.address");
@@ -2490,7 +2490,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
     updater.doUpdateForClusterCreate();
     String updatedVal = topology.getConfiguration().getFullProperties().get("core-site").get("fs.defaultFS");
     assertEquals("testhost:5050", updatedVal);
@@ -2535,7 +2535,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group3);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
     updater.doUpdateForClusterCreate();
     String updatedVal = topology.getConfiguration().getFullProperties().get("hbase-site").get("hbase.zookeeper.quorum");
     String[] hosts = updatedVal.split(",");
@@ -2592,7 +2592,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group3);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
     updater.doUpdateForClusterCreate();
     String updatedVal = topology.getConfiguration().getFullProperties().get("webhcat-site").get("templeton.zookeeper.hosts");
     String[] hosts = updatedVal.split(",");
@@ -2645,7 +2645,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
 
     BlueprintConfigurationProcessor.MultipleHostTopologyUpdater mhtu = new BlueprintConfigurationProcessor.MultipleHostTopologyUpdater(component1);
-    String newValue = mhtu.updateForClusterCreate(propertyName, originalValue, properties, topology);
+    String newValue = mhtu.updateForClusterCreate(propertyName, originalValue, properties, topology, null);
 
     assertEquals("testhost1a", newValue);
   }
@@ -2679,7 +2679,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
 
     BlueprintConfigurationProcessor.MultipleHostTopologyUpdater mhtu = new BlueprintConfigurationProcessor.MultipleHostTopologyUpdater(component1);
-    String newValue = mhtu.updateForClusterCreate(propertyName, originalValue, properties, topology);
+    String newValue = mhtu.updateForClusterCreate(propertyName, originalValue, properties, topology, null);
 
     List<String> hostArray = Arrays.asList(newValue.split(","));
     Assert.assertTrue(hostArray.containsAll(hosts1) && hosts1.containsAll(hostArray));
@@ -2714,7 +2714,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
 
     BlueprintConfigurationProcessor.MultipleHostTopologyUpdater mhtu = new BlueprintConfigurationProcessor.MultipleHostTopologyUpdater(component1);
-    String newValue = mhtu.updateForClusterCreate(propertyName, originalValue, properties, topology);
+    String newValue = mhtu.updateForClusterCreate(propertyName, originalValue, properties, topology, null);
 
     List<String> hostArray = Arrays.asList(newValue.split(","));
     Assert.assertTrue(hostArray.containsAll(hosts1) && hosts1.containsAll(hostArray));
@@ -2733,7 +2733,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     TestHostGroup testHostGroup = new TestHostGroup("test-host-group-one", Collections.emptySet(), Collections.emptySet());
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, Collections.singleton(testHostGroup));
 
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     Set<String> updatedConfigTypes =
       updater.doUpdateForClusterCreate();
@@ -2773,7 +2773,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     TestHostGroup testHostGroup = new TestHostGroup("test-host-group-one", Collections.emptySet(), Collections.emptySet());
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, Collections.singleton(testHostGroup));
 
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     Set<String> updatedConfigTypes =
       updater.doUpdateForClusterCreate();
@@ -2860,7 +2860,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     expect(stack.getCardinality("SECONDARY_NAMENODE")).andReturn(new Cardinality("1")).anyTimes();
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
     updater.doUpdateForClusterCreate();
 
     // verify that dfs.internal.nameservices was added
@@ -2935,7 +2935,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
     updater.doUpdateForClusterCreate();
 
     assertEquals("Unexpected config update for templeton.hive.properties",
@@ -2984,7 +2984,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     expect(stack.getCardinality("HIVE_SERVER")).andReturn(new Cardinality("1+")).anyTimes();
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
     updater.doUpdateForClusterCreate();
 
     assertEquals("Unexpected config update for hive.metastore.uris",
@@ -3048,7 +3048,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     expect(stack.getCardinality("HIVE_SERVER")).andReturn(new Cardinality("1+")).anyTimes();
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
     updater.doUpdateForClusterCreate();
 
     assertEquals("Unexpected config update for hive.metastore.uris",
@@ -3109,7 +3109,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     }
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
     updater.doUpdateForClusterCreate();
     String updatedValue = webHCatSiteProperties.get(propertyKey);
 
@@ -3163,7 +3163,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
     updater.doUpdateForBlueprintExport();
 
     final String expectedPropertyValue = createExportedAddress("2181", expectedHostGroupName) + "," + createExportedAddress("2181", expectedHostGroupNameTwo);
@@ -3217,7 +3217,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     expect(stack.getCardinality("OOZIE_SERVER")).andReturn(new Cardinality("1+")).anyTimes();
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
     updater.doUpdateForClusterCreate();
 
     assertEquals("oozie property not updated correctly",
@@ -3283,7 +3283,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     expect(stack.getCardinality("OOZIE_SERVER")).andReturn(new Cardinality("1+")).anyTimes();
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
     updater.doUpdateForBlueprintExport();
 
     assertEquals("oozie property not updated correctly",
@@ -3337,7 +3337,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     expect(stack.getCardinality("RESOURCEMANAGER")).andReturn(new Cardinality("1-2")).anyTimes();
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
     updater.doUpdateForClusterCreate();
 
     // verify that the properties with hostname information was correctly preserved
@@ -3424,7 +3424,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     expect(stack.getCardinality("RESOURCEMANAGER")).andReturn(new Cardinality("1-2")).anyTimes();
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
     updater.doUpdateForBlueprintExport();
 
     // verify that the properties with hostname information was correctly preserved
@@ -3507,7 +3507,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
     updater.doUpdateForClusterCreate();
 
     // expect that all servers are included in configuration property without changes, and that the qjournal URL format is preserved
@@ -3556,7 +3556,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
 
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
     String updatedVal = topology.getConfiguration().getFullProperties().get("storm-site").get("storm.zookeeper.servers");
@@ -3607,7 +3607,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
     String updatedVal = topology.getConfiguration().getFullProperties().get("storm-site").get("nimbus.seeds");
@@ -3657,7 +3657,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
     String updatedVal = topology.getConfiguration().getFullProperties().get("storm-site").get("nimbus.seeds");
@@ -3692,7 +3692,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
     String updatedVal = topology.getConfiguration().getFullProperties().get("hbase-env").get("hbase_master_heapsize");
@@ -3724,7 +3724,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
     String updatedVal = topology.getConfiguration().getFullProperties().get("hbase-env").get("hbase_master_heapsize");
@@ -3756,7 +3756,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
     String updatedVal = topology.getConfiguration().getFullProperties().get("yarn-site").get("yarn.resourcemanager.hostname");
@@ -3788,7 +3788,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
     String updatedVal = topology.getConfiguration().getFullProperties().get("yarn-site").get("yarn.resourcemanager.hostname");
@@ -3820,7 +3820,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
     String updatedVal = topology.getConfiguration().getFullProperties().get("yarn-site").get("yarn.resourcemanager.hostname");
@@ -3852,7 +3852,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
     String updatedVal = topology.getConfiguration().getFullProperties().get("core-site").get("fs.defaultFS");
@@ -3898,7 +3898,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group3);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
     String updatedVal = topology.getConfiguration().getFullProperties().get("hbase-site").get("hbase.zookeeper.quorum");
@@ -3956,7 +3956,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group3);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
     String updatedVal = topology.getConfiguration().getFullProperties().get("webhcat-site").get("templeton.zookeeper.hosts");
@@ -4014,7 +4014,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group3);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
     String updatedVal = topology.getConfiguration().getFullProperties().get("core-site").get("ha.zookeeper.quorum");
@@ -4055,7 +4055,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
     assertEquals("Multi-host property with single host value was not correctly updated for cluster create.",
@@ -4111,7 +4111,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group4);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
     String updatedVal = topology.getConfiguration().getFullProperties().get("storm-site").get("storm.zookeeper.servers");
@@ -4185,7 +4185,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
     String updatedVal = topology.getConfiguration().getFullProperties().get("hive-site").get("javax.jdo.option.ConnectionURL");
@@ -4221,7 +4221,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
     String updatedVal = topology.getConfiguration().getFullProperties().get("hive-site").get("javax.jdo.option.ConnectionURL");
@@ -4254,7 +4254,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
     String updatedVal = topology.getConfiguration().getFullProperties().get("hive-env").get("javax.jdo.option.ConnectionURL");
@@ -4293,7 +4293,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
 
@@ -4330,7 +4330,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
 
@@ -4370,7 +4370,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
 
@@ -4415,7 +4415,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
 
@@ -4453,7 +4453,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
 
@@ -4494,7 +4494,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     // call top-level export method
     updater.doUpdateForClusterCreate();
@@ -4530,7 +4530,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     // call top-level cluster config update method
     updater.doUpdateForClusterCreate();
@@ -4606,7 +4606,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     // call top-level cluster config update method
     updater.doUpdateForClusterCreate();
@@ -4684,7 +4684,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     // call top-level cluster config update method
     updater.doUpdateForClusterCreate();
@@ -4762,7 +4762,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     // call top-level cluster config update method
     updater.doUpdateForClusterCreate();
@@ -4850,7 +4850,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     // call top-level cluster config update method
     updater.doUpdateForClusterCreate();
@@ -4918,7 +4918,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     // call top-level cluster config update method
     updater.doUpdateForClusterCreate();
@@ -4956,7 +4956,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     // call top-level cluster config update method
     updater.doUpdateForClusterCreate();
@@ -5009,7 +5009,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     // call top-level cluster config update method
     updater.doUpdateForClusterCreate();
@@ -5073,7 +5073,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     // call top-level cluster config update method
     updater.doUpdateForClusterCreate();
@@ -5113,7 +5113,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     expect(stack.getCardinality("GANGLIA_SERVER")).andReturn(new Cardinality("1")).anyTimes();
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     // call top-level export method
     updater.doUpdateForClusterCreate();
@@ -5161,7 +5161,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     // call top-level export method
     updater.doUpdateForClusterCreate();
@@ -5256,7 +5256,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     expect(stack.getCardinality("SECONDARY_NAMENODE")).andReturn(new Cardinality("1")).anyTimes();
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     Set<String> updatedConfigTypes =
       updater.doUpdateForClusterCreate();
@@ -5375,7 +5375,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     expect(stack.getCardinality("SECONDARY_NAMENODE")).andReturn(new Cardinality("1")).anyTimes();
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     Set<String> updatedConfigTypes =
       updater.doUpdateForClusterCreate();
@@ -5444,7 +5444,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
 
@@ -5591,7 +5591,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     // call top-level export method
     updater.doUpdateForClusterCreate();
@@ -5633,7 +5633,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     // call top-level export method
     updater.doUpdateForClusterCreate();
@@ -5684,7 +5684,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Lists.newArrayList(group1, group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // When
     configProcessor.doUpdateForClusterCreate();
@@ -5724,7 +5724,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     // call top-level export method
     Collection<String> requiredGroups = updater.getRequiredHostGroups();
@@ -5757,7 +5757,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     // call top-level export method
     Collection<String> requiredGroups = updater.getRequiredHostGroups();
@@ -5792,7 +5792,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     // call top-level export method
     Collection<String> requiredGroups = updater.getRequiredHostGroups();
@@ -5836,7 +5836,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Collections.singletonList(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     configProcessor.doUpdateForClusterCreate();
 
@@ -5881,7 +5881,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Collections.singletonList(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     configProcessor.doUpdateForClusterCreate();
 
@@ -5925,7 +5925,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Collections.singletonList(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     configProcessor.doUpdateForClusterCreate();
 
@@ -5968,7 +5968,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Collections.singletonList(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     configProcessor.doUpdateForClusterCreate();
 
@@ -6012,7 +6012,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Collections.singletonList(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     configProcessor.doUpdateForClusterCreate();
 
@@ -6103,7 +6103,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Collections.singletonList(group1);
 
     ClusterTopology topology1 = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology1);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(null, null);
 
     configProcessor.doUpdateForClusterCreate();
 
@@ -6151,7 +6151,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Collections.singletonList(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     configProcessor.doUpdateForClusterCreate();
 
@@ -6183,7 +6183,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Collections.singletonList(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     configProcessor.doUpdateForClusterCreate();
 
@@ -6214,7 +6214,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Collections.singletonList(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     configProcessor.doUpdateForClusterCreate();
 
@@ -6245,7 +6245,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Collections.singletonList(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     configProcessor.doUpdateForClusterCreate();
 
@@ -6277,7 +6277,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Collections.singletonList(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     configProcessor.doUpdateForClusterCreate();
 
@@ -6330,7 +6330,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
     topology.getAdvisedConfigurations().putAll(createAdvisedConfigMap());
     topology.setConfigRecommendationStrategy(ConfigRecommendationStrategy.ONLY_STACK_DEFAULTS_APPLY);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     reset(stack);
     expect(stack.getName()).andReturn(STACK_NAME).anyTimes();
@@ -6390,7 +6390,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
     topology.getAdvisedConfigurations().putAll(createAdvisedConfigMap());
     topology.setConfigRecommendationStrategy(ConfigRecommendationStrategy.ONLY_STACK_DEFAULTS_APPLY);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     reset(stack);
     expect(stack.getName()).andReturn(STACK_NAME).anyTimes();
@@ -6458,7 +6458,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
     topology.getAdvisedConfigurations().putAll(createAdvisedConfigMap());
     topology.setConfigRecommendationStrategy(ConfigRecommendationStrategy.ALWAYS_APPLY);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     // WHEN
     Set<String> configTypes = configProcessor.doUpdateForClusterCreate();
     // THEN
@@ -6513,7 +6513,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
     topology.getAdvisedConfigurations().putAll(createAdvisedConfigMap());
     topology.setConfigRecommendationStrategy(ConfigRecommendationStrategy.NEVER_APPLY);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     // WHEN
     configProcessor.doUpdateForClusterCreate();
     // THEN
@@ -6552,7 +6552,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Collections.singletonList(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // When
     configProcessor.doUpdateForClusterCreate();
@@ -6588,7 +6588,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Collections.singletonList(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // When
     configProcessor.doUpdateForClusterCreate();
@@ -6625,7 +6625,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Lists.newArrayList(group1, group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // When
     configProcessor.doUpdateForClusterCreate();
@@ -6680,7 +6680,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Lists.newArrayList(group1, group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // When
     configProcessor.doUpdateForClusterCreate();
@@ -6739,7 +6739,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Lists.newArrayList(group1);//, group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // When
     configProcessor.doUpdateForClusterCreate();
@@ -6805,7 +6805,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Lists.newArrayList(group1, group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // When
     configProcessor.doUpdateForClusterCreate();
@@ -6879,7 +6879,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Lists.newArrayList(group1, group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // When
     configProcessor.doUpdateForClusterCreate();
@@ -6945,7 +6945,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Lists.newArrayList(group1, group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // When
     configProcessor.doUpdateForBlueprintExport();
@@ -7017,7 +7017,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Lists.newArrayList(group1, group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // When
     configProcessor.doUpdateForBlueprintExport();
@@ -7068,7 +7068,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // When
     configProcessor.doUpdateForClusterCreate();
@@ -7108,7 +7108,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Collections.singleton(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // When
     configProcessor.doUpdateForClusterCreate();
@@ -7153,7 +7153,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Lists.newArrayList(group1, group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // When
     configProcessor.doUpdateForClusterCreate();
@@ -7207,7 +7207,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Lists.newArrayList(group1, group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
 
     // When
@@ -7252,7 +7252,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Lists.newArrayList(group1, group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // When
     configProcessor.doUpdateForClusterCreate();
@@ -7298,7 +7298,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Lists.newArrayList(group1, group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // When
     configProcessor.doUpdateForClusterCreate();
@@ -7352,7 +7352,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Lists.newArrayList(group1, group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // When
     configProcessor.doUpdateForClusterCreate();
@@ -7408,7 +7408,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Lists.newArrayList(group1, group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // When
     configProcessor.doUpdateForClusterCreate();
@@ -7452,7 +7452,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Lists.newArrayList(group1, group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // When
     configProcessor.doUpdateForClusterCreate();
@@ -7496,7 +7496,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Lists.newArrayList(group1, group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
 
     // When
@@ -7541,7 +7541,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Lists.newArrayList(group1, group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     // When
     configProcessor.doUpdateForClusterCreate();
@@ -7796,7 +7796,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group3);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
 
@@ -7828,7 +7828,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor updater = new BlueprintConfigurationProcessor(topology, null);
 
     updater.doUpdateForClusterCreate();
 
@@ -7856,7 +7856,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     typeProps.put("atlas.cluster.name", String.valueOf(clusterId));
     properties.put("hive-site", typeProps);
 
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     configProcessor.doUpdateForBlueprintExport();
 
     String updatedVal = properties.get("hive-site").get("atlas.cluster.name");
@@ -7895,7 +7895,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     stormSiteProps.put("metrics.reporter.register", someString);
     properties.put("storm-site", stormSiteProps);
 
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     configProcessor.doUpdateForBlueprintExport();
 
     String hiveExecPostHooks = properties.get("hive-site").get("hive.exec.post.hooks");
@@ -7930,7 +7930,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Arrays.asList(group1, group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     configProcessor.doUpdateForClusterCreate();
 
@@ -7960,7 +7960,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Collections.singletonList(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     configProcessor.doUpdateForClusterCreate();
 
@@ -7990,7 +7990,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Collections.singletonList(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     configProcessor.doUpdateForClusterCreate();
 
@@ -8025,7 +8025,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     hostGroups.add(group2);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     configProcessor.doUpdateForClusterCreate();
 
@@ -8061,7 +8061,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
 
     expect(stack.isPasswordProperty((String) anyObject(), (String) anyObject(), (String) anyObject())).andReturn(true).once();
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
     configProcessor.doUpdateForBlueprintExport();
 
     assertFalse(properties.get("ranger-admin-site").containsKey("ranger.service.https.attrib.keystore.pass"));
@@ -8119,11 +8119,11 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     valueAttributesInfoHost.setType("host");
 
     propertyConfigs.put("test.directories", new Stack.ConfigProperty(
-      new StackConfigurationResponse(null, null, null, null, "hdfs-site", null, null, null, valueAttributesInfoDirs, null)));
+      new StackLevelConfigurationResponse(null, null, null, null, "hdfs-site", null, null, null, valueAttributesInfoDirs, null)));
     propertyConfigs.put("test.password", new Stack.ConfigProperty(
-      new StackConfigurationResponse(null, null, null, null, "hdfs-site", null, Collections.singleton(PropertyInfo.PropertyType.PASSWORD), null, null, null)));
+      new StackLevelConfigurationResponse(null, null, null, null, "hdfs-site", null, Collections.singleton(PropertyInfo.PropertyType.PASSWORD), null, null, null)));
     propertyConfigs.put("test.host", new Stack.ConfigProperty(
-      new StackConfigurationResponse(null, null, null, null, "hdfs-site", null, null, null, valueAttributesInfoHost, null)));
+      new StackLevelConfigurationResponse(null, null, null, null, "hdfs-site", null, null, null, valueAttributesInfoHost, null)));
 
     expect(stack.getServiceForConfigType("hdfs-site")).andReturn("HDFS").anyTimes();
     expect(stack.getConfigurationPropertiesWithMetadata("HDFS", "hdfs-site")).andReturn(propertyConfigs).anyTimes();
@@ -8140,7 +8140,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     Collection<TestHostGroup> hostGroups = Collections.singletonList(group1);
 
     ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
-    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
+    BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology, null);
 
     configProcessor.doUpdateForClusterCreate();
 
@@ -8237,7 +8237,7 @@ public class BlueprintConfigurationProcessorTest extends EasyMockSupport {
     expect(bp.getHostGroups()).andReturn(allHostGroups).anyTimes();
 
     expect(topologyRequestMock.getClusterId()).andReturn(1L).anyTimes();
-    expect(topologyRequestMock.getBlueprint()).andReturn(blueprint).anyTimes();
+    expect(topologyRequestMock.getBlueprint()).andReturn(null).anyTimes();
     expect(topologyRequestMock.getConfiguration()).andReturn(configuration).anyTimes();
     expect(topologyRequestMock.getHostGroupInfo()).andReturn(hostGroupInfo).anyTimes();
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
index 833be5d..3ace62d 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
@@ -248,7 +248,7 @@ public class ClientConfigResourceProviderTest {
     HashMap<String, ServiceOsSpecific> serviceOsSpecificHashMap = new HashMap<>();
     serviceOsSpecificHashMap.put("key",serviceOsSpecific);
 
-    ServiceComponentHostResponse shr1 = new ServiceComponentHostResponse(clusterName, serviceName,
+    ServiceComponentHostResponse shr1 = new ServiceComponentHostResponse(1L, clusterName, 1L, "", 1L, serviceName, "", 1L,
         componentName, displayName, hostName, publicHostname, desiredState, "", null, null, null,
         null);
 
@@ -505,7 +505,7 @@ public class ClientConfigResourceProviderTest {
     HashMap<String, ServiceOsSpecific> serviceOsSpecificHashMap = new HashMap<>();
     serviceOsSpecificHashMap.put("key",serviceOsSpecific);
 
-    ServiceComponentHostResponse shr1 = new ServiceComponentHostResponse(clusterName, serviceName,
+    ServiceComponentHostResponse shr1 = new ServiceComponentHostResponse(1L, clusterName, 1L, "", 1L, serviceName, "", 1L,
         componentName, displayName, hostName, publicHostName, desiredState, "", null, null, null,
         null);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java
index 4a80893..6e503a6 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java
@@ -104,7 +104,7 @@ public class ClusterResourceProviderTest {
   @Before
   public void setup() throws Exception{
     ClusterResourceProvider.init(topologyManager, topologyFactory, securityFactory, gson);
-    ProvisionClusterRequest.init(blueprintFactory);
+    ProvisionClusterRequest.init(null);
     provider = new ClusterResourceProvider(controller);
 
     expect(blueprintFactory.getBlueprint(BLUEPRINT_NAME)).andReturn(blueprint).anyTimes();
@@ -188,7 +188,7 @@ public class ClusterResourceProviderTest {
     expect(securityFactory.createSecurityConfigurationFromRequest(EasyMock.anyObject(), anyBoolean())).andReturn
       (securityConfiguration).once();
     expect(topologyFactory.createProvisionClusterRequest(properties, securityConfiguration)).andReturn(topologyRequest).once();
-    expect(topologyRequest.getBlueprint()).andReturn(blueprint).anyTimes();
+    expect(topologyRequest.getBlueprint()).andReturn(null).anyTimes();
     expect(blueprint.getSecurity()).andReturn(blueprintSecurityConfiguration).anyTimes();
     expect(requestStatusResponse.getRequestId()).andReturn(5150L).anyTimes();
 


[7/7] ambari git commit: AMBARI-22493. Fix build for test classes in feature branch.(vbrodetskyi)

Posted by vb...@apache.org.
AMBARI-22493. Fix build for test classes in feature branch.(vbrodetskyi)


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

Branch: refs/heads/branch-feature-AMBARI-14714
Commit: 1f176845ec636adbc1dc710c03f8062f979f5405
Parents: 35d704c
Author: Vitaly Brodetskyi <vb...@hortonworks.com>
Authored: Thu Nov 23 12:22:11 2017 +0200
Committer: Vitaly Brodetskyi <vb...@hortonworks.com>
Committed: Thu Nov 23 12:22:11 2017 +0200

----------------------------------------------------------------------
 ambari-server/pom.xml                           |   2 +-
 .../ExecutionCommandWrapperTest.java            |   2 +-
 .../TestActionSchedulerThreading.java           |   8 +-
 .../server/agent/HeartbeatProcessorTest.java    |   2 +-
 .../server/agent/TestHeartbeatHandler.java      |   2 +-
 .../server/agent/TestHeartbeatMonitor.java      |  10 +-
 .../render/ClusterBlueprintRendererTest.java    |   8 +-
 .../api/services/ComponentServiceTest.java      |   4 +-
 .../api/services/ConfigurationServiceTest.java  |   2 +-
 .../server/api/services/ServiceServiceTest.java |   8 +-
 .../StackAdvisorBlueprintProcessorTest.java     |  12 +-
 .../checks/ComponentsInstallationCheckTest.java |  12 +-
 .../server/checks/ServicesUpCheckTest.java      |  16 +-
 .../configuration/RecoveryConfigHelperTest.java |  12 +-
 .../AmbariCustomCommandExecutionHelperTest.java |  13 +-
 .../AmbariManagementControllerImplTest.java     |  58 +-
 .../AmbariManagementControllerTest.java         | 892 +++++++++----------
 .../BackgroundCustomCommandExecutionTest.java   |   8 +-
 .../server/controller/ClusterResponseTest.java  |   2 +-
 ...hYarnCapacitySchedulerReleaseConfigTest.java |  16 +-
 .../internal/AbstractResourceProviderTest.java  |   4 +-
 .../BlueprintConfigurationProcessorTest.java    | 306 +++----
 .../ClientConfigResourceProviderTest.java       |   4 +-
 .../internal/ClusterResourceProviderTest.java   |   4 +-
 .../internal/ComponentResourceProviderTest.java |  20 +-
 .../ConfigGroupResourceProviderTest.java        |  10 +-
 .../internal/ExportBlueprintRequestTest.java    |   2 +-
 .../HostComponentResourceProviderTest.java      |  14 +-
 .../internal/HostResourceProviderTest.java      |  26 +-
 .../internal/JMXHostProviderTest.java           |  24 +-
 .../internal/ProvisionClusterRequestTest.java   |   2 +-
 .../internal/RequestResourceProviderTest.java   |   2 +-
 .../internal/ScaleClusterRequestTest.java       |   2 +-
 .../internal/ServiceResourceProviderTest.java   |   6 +-
 .../StackConfigurationResourceProviderTest.java |  14 +-
 .../StackDefinedPropertyProviderTest.java       |   8 +-
 ...kLevelConfigurationResourceProviderTest.java |  14 +-
 .../server/controller/internal/StackTest.java   |  17 +-
 .../StackUpgradeConfigurationMergeTest.java     |   6 +-
 .../controller/internal/UnitUpdaterTest.java    |   8 +-
 .../internal/UpgradeResourceProviderTest.java   |  20 +-
 .../UpgradeSummaryResourceProviderTest.java     |   2 +-
 .../VersionDefinitionResourceProviderTest.java  |   2 +-
 .../LoggingSearchPropertyProviderTest.java      |   6 +-
 .../utilities/KerberosIdentityCleanerTest.java  |   4 +-
 .../GeneralServiceCalculatedStateTest.java      |   2 +-
 .../apache/ambari/server/events/EventsTest.java |   4 +-
 .../HostVersionOutOfSyncListenerTest.java       |   8 +-
 .../apache/ambari/server/orm/OrmTestHelper.java |   5 +-
 .../apache/ambari/server/orm/TestOrmImpl.java   |  14 +-
 .../server/orm/dao/ServiceConfigDAOTest.java    |  30 +-
 .../orm/dao/TopologyLogicalRequestDAOTest.java  |   4 +-
 .../server/orm/dao/TopologyRequestDAOTest.java  |   8 +-
 .../orm/entities/ServiceConfigEntityTest.java   |   2 +-
 .../ComponentVersionCheckActionTest.java        |   4 +-
 .../upgrades/ConfigureActionTest.java           |   5 +-
 .../PreconfigureKerberosActionTest.java         |   2 +-
 .../upgrades/UpgradeActionTest.java             |   4 +-
 .../ambari/server/state/ConfigGroupTest.java    |   3 +-
 .../ambari/server/state/ConfigHelperTest.java   |  11 +-
 .../ambari/server/state/DesiredConfigTest.java  |   4 +-
 .../server/state/ServiceComponentTest.java      |  58 +-
 .../apache/ambari/server/state/ServiceTest.java |  16 +-
 .../ambari/server/state/UpgradeHelperTest.java  |  33 +-
 .../state/alerts/AlertEventPublisherTest.java   |   4 +-
 .../state/alerts/InitialAlertEventTest.java     |   4 +-
 .../state/cluster/ClusterDeadlockTest.java      |   3 +-
 .../server/state/cluster/ClusterImplTest.java   |   4 +-
 .../server/state/cluster/ClusterTest.java       | 137 +--
 .../state/cluster/ClustersDeadlockTest.java     |   3 +-
 .../server/state/cluster/ClustersTest.java      |  20 +-
 .../ConcurrentServiceConfigVersionTest.java     |   9 +-
 ...omponentHostConcurrentWriteDeadlockTest.java |   3 +-
 .../svccomphost/ServiceComponentHostTest.java   |  23 +-
 .../server/topology/AmbariContextTest.java      |  14 +-
 .../ClusterConfigurationRequestTest.java        |   8 +-
 .../ClusterDeployWithStartOnlyTest.java         |   4 +-
 ...InstallWithoutStartOnComponentLevelTest.java |   4 +-
 .../ClusterInstallWithoutStartTest.java         |   4 +-
 .../topology/ClusterTopologyImplTest.java       |  12 +-
 .../server/topology/LogicalRequestTest.java     |   2 +-
 .../topology/RequiredPasswordValidatorTest.java |   2 +-
 .../server/topology/TopologyManagerTest.java    |  31 +-
 .../ClusterConfigTypeValidatorTest.java         |   2 +-
 .../validators/HiveServiceValidatorTest.java    |  10 +-
 .../RequiredConfigPropertiesValidatorTest.java  |   2 +-
 .../StackConfigTypeValidatorTest.java           |   2 +-
 .../topology/validators/UnitValidatorTest.java  |   8 +-
 .../upgrade/AbstractUpgradeCatalogTest.java     |   7 +-
 .../server/upgrade/UpgradeCatalog252Test.java   |  19 +-
 .../server/upgrade/UpgradeCatalog260Test.java   |  31 +-
 .../server/upgrade/UpgradeCatalog300Test.java   |  15 +-
 .../ambari/server/view/ViewRegistryTest.java    |   2 +-
 93 files changed, 1151 insertions(+), 1071 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml
index e15e23e..5e07b3c 100644
--- a/ambari-server/pom.xml
+++ b/ambari-server/pom.xml
@@ -48,7 +48,7 @@
     <stacksSrcLocation>src/main/resources/stacks/${stack.distribution}</stacksSrcLocation>
     <tarballResourcesFolder>src/main/resources</tarballResourcesFolder>
     <skipPythonTests>false</skipPythonTests>
-    <maven.test.skip>true</maven.test.skip>
+    <maven.test.skip>false</maven.test.skip>
     <hadoop.version>2.7.2</hadoop.version>
     <empty.dir>src/main/package</empty.dir> <!-- any directory in project with not very big amount of files (not to waste-load them) -->
     <el.log>ALL</el.log> <!-- log level for EclipseLink eclipselink-staticweave-maven-plugin -->

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperTest.java b/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperTest.java
index fb84df5..8dbe691 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperTest.java
@@ -115,7 +115,7 @@ public class ExecutionCommandWrapperTest {
 
     OrmTestHelper helper = injector.getInstance(OrmTestHelper.class);
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(cluster1);
-    cluster1.addService("HDFS", repositoryVersion);
+    cluster1.addService(null, "HDFS", "", repositoryVersion);
 
     SERVICE_SITE_CLUSTER = new HashMap<>();
     SERVICE_SITE_CLUSTER.put(SERVICE_SITE_NAME1, SERVICE_SITE_VAL1);

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionSchedulerThreading.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionSchedulerThreading.java b/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionSchedulerThreading.java
index 96269f8..22f23c8 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionSchedulerThreading.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionSchedulerThreading.java
@@ -108,7 +108,7 @@ public class TestActionSchedulerThreading {
     // add a service
     String serviceName = "ZOOKEEPER";
     RepositoryVersionEntity repositoryVersion = ormTestHelper.getOrCreateRepositoryVersion(cluster);
-    Service service = cluster.addService(serviceName, repositoryVersion);
+    Service service = cluster.addService(null, serviceName, "", repositoryVersion);
     String configType = "zoo.cfg";
 
     Map<String, String> properties = new HashMap<>();
@@ -118,7 +118,7 @@ public class TestActionSchedulerThreading {
 
     // zoo-cfg for v1 on current stack
     properties.put("foo-property-1", "foo-value-1");
-    Config c1 = configFactory.createNew(stackId, cluster, configType, "version-1", properties, propertiesAttributes);
+    Config c1 = configFactory.createNew(stackId, cluster, configType, "version-1", properties, propertiesAttributes, 1L);
 
     // make v1 "current"
     cluster.addDesiredConfig("admin", Sets.newHashSet(c1), "note-1");
@@ -129,7 +129,7 @@ public class TestActionSchedulerThreading {
     // save v2
     // zoo-cfg for v2 on new stack
     properties.put("foo-property-2", "foo-value-2");
-    Config c2 = configFactory.createNew(newStackId, cluster, configType, "version-2", properties, propertiesAttributes);
+    Config c2 = configFactory.createNew(newStackId, cluster, configType, "version-2", properties, propertiesAttributes, 1L);
 
     // make v2 "current"
     cluster.addDesiredConfig("admin", Sets.newHashSet(c2), "note-2");
@@ -167,7 +167,7 @@ public class TestActionSchedulerThreading {
     threadInitialCachingSemaphore.acquire();
 
     // apply the configs for the old stack
-    cluster.applyLatestConfigurations(stackId, serviceName);
+    cluster.applyLatestConfigurations(stackId, 1L);
 
     // wake the thread up and have it verify that it can see the updated configs
     applyLatestConfigsSemaphore.release();

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/agent/HeartbeatProcessorTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/agent/HeartbeatProcessorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/agent/HeartbeatProcessorTest.java
index b3c4e26..8a6025f 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/agent/HeartbeatProcessorTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/agent/HeartbeatProcessorTest.java
@@ -1310,6 +1310,6 @@ public class HeartbeatProcessorTest {
    */
   private Service addService(Cluster cluster, String serviceName) throws AmbariException {
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(cluster);
-    return cluster.addService(serviceName, repositoryVersion);
+    return cluster.addService(null, serviceName, "", repositoryVersion);
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatHandler.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatHandler.java b/ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatHandler.java
index 20ff949..eecb92e 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatHandler.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatHandler.java
@@ -1575,7 +1575,7 @@ public class TestHeartbeatHandler {
    */
   private Service addService(Cluster cluster, String serviceName) throws AmbariException {
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(cluster);
-    return cluster.addService(serviceName, repositoryVersion);
+    return cluster.addService(null, serviceName, "", repositoryVersion);
   }
 
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatMonitor.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatMonitor.java b/ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatMonitor.java
index 374774a..4f8c423 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatMonitor.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatMonitor.java
@@ -173,7 +173,7 @@ public class TestHeartbeatMonitor {
 
 
     clusters.mapAndPublishHostsToCluster(hostNames, clusterName);
-    Service hdfs = cluster.addService(serviceName, repositoryVersion);
+    Service hdfs = cluster.addService(null, serviceName, "", repositoryVersion);
     hdfs.addServiceComponent(Role.DATANODE.name());
     hdfs.getServiceComponent(Role.DATANODE.name()).addServiceComponentHost(hostname1);
     hdfs.addServiceComponent(Role.NAMENODE.name());
@@ -275,7 +275,7 @@ public class TestHeartbeatMonitor {
 
 
     clusters.mapAndPublishHostsToCluster(hostNames, clusterName);
-    Service hdfs = cluster.addService(serviceName, repositoryVersion);
+    Service hdfs = cluster.addService(null, serviceName, "", repositoryVersion);
     hdfs.addServiceComponent(Role.DATANODE.name());
     hdfs.getServiceComponent(Role.DATANODE.name()).addServiceComponentHost
     (hostname1);
@@ -382,7 +382,7 @@ public class TestHeartbeatMonitor {
 
     clusters.mapAndPublishHostsToCluster(hostNames, clusterName);
 
-    Service hdfs = cluster.addService(serviceName, repositoryVersion);
+    Service hdfs = cluster.addService(null, serviceName, "", repositoryVersion);
     hdfs.addServiceComponent(Role.DATANODE.name());
     hdfs.getServiceComponent(Role.DATANODE.name()).addServiceComponentHost(hostname1);
     hdfs.addServiceComponent(Role.NAMENODE.name());
@@ -463,7 +463,7 @@ public class TestHeartbeatMonitor {
 
     clusters.mapAndPublishHostsToCluster(hostNames, clusterName);
 
-    Service hdfs = cluster.addService(serviceName, repositoryVersion);
+    Service hdfs = cluster.addService(null, serviceName, "", repositoryVersion);
     hdfs.addServiceComponent(Role.DATANODE.name());
     hdfs.getServiceComponent(Role.DATANODE.name()).addServiceComponentHost(hostname1);
     hdfs.addServiceComponent(Role.NAMENODE.name());
@@ -581,7 +581,7 @@ public class TestHeartbeatMonitor {
 
     clusters.mapAndPublishHostsToCluster(hostNames, clusterName);
 
-    Service hdfs = cluster.addService(serviceName, repositoryVersion);
+    Service hdfs = cluster.addService(null, serviceName, "", repositoryVersion);
 
     hdfs.addServiceComponent(Role.DATANODE.name());
     hdfs.getServiceComponent(Role.DATANODE.name()).addServiceComponentHost(hostname1);

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRendererTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRendererTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRendererTest.java
index b47a25d..3d44c55 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRendererTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRendererTest.java
@@ -155,9 +155,9 @@ public class ClusterBlueprintRendererTest {
     groupInfoMap.put("host_group_1", group1Info);
     groupInfoMap.put("host_group_2", group2Info);
 
-    expect(topology.isNameNodeHAEnabled()).andReturn(false).anyTimes();
+    expect(topology.isNameNodeHAEnabled(null)).andReturn(false).anyTimes();
     expect(topology.getConfiguration()).andReturn(clusterConfig).anyTimes();
-    expect(topology.getBlueprint()).andReturn(blueprint).anyTimes();
+    expect(topology.getBlueprint()).andReturn(null).anyTimes();
     expect(topology.getHostGroupInfo()).andReturn(groupInfoMap).anyTimes();
     expect(blueprint.getStack()).andReturn(stack).anyTimes();
     expect(blueprint.getHostGroups()).andReturn(hostGroups).anyTimes();
@@ -207,9 +207,9 @@ public class ClusterBlueprintRendererTest {
     groupInfoMap.put("host_group_1", group1Info);
     groupInfoMap.put("host_group_2", group2Info);
 
-    expect(topology.isNameNodeHAEnabled()).andReturn(false).anyTimes();
+    expect(topology.isNameNodeHAEnabled(null)).andReturn(false).anyTimes();
     expect(topology.getConfiguration()).andReturn(clusterConfig).anyTimes();
-    expect(topology.getBlueprint()).andReturn(blueprint).anyTimes();
+    expect(topology.getBlueprint()).andReturn(null).anyTimes();
     expect(topology.getHostGroupInfo()).andReturn(groupInfoMap).anyTimes();
     expect(topology.getClusterId()).andReturn(new Long(1)).anyTimes();
     expect(topology.getAmbariContext()).andReturn(ambariContext).anyTimes();

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/api/services/ComponentServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ComponentServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ComponentServiceTest.java
index e4285d0..52b3219 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ComponentServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ComponentServiceTest.java
@@ -92,13 +92,13 @@ public class ComponentServiceTest extends BaseServiceTest {
     private String m_componentId;
 
     private TestComponentService(String clusterId, String serviceId, String componentId) {
-      super(clusterId, serviceId);
+      super(null, null, null);
       m_clusterId = clusterId;
       m_serviceId = serviceId;
       m_componentId = componentId;
     }
 
-    @Override
+
     ResourceInstance createComponentResource(String clusterName, String serviceName, String componentName) {
       assertEquals(m_clusterId, clusterName);
       assertEquals(m_serviceId, serviceName);

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigurationServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigurationServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigurationServiceTest.java
index 679e645..1080f73 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigurationServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigurationServiceTest.java
@@ -60,7 +60,7 @@ public class ConfigurationServiceTest extends BaseServiceTest {
       m_clusterId = clusterId;
     }
 
-    @Override
+
     ResourceInstance createConfigurationResource(String clusterName) {
       assertEquals(m_clusterId, clusterName);
       return getTestResource();

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/api/services/ServiceServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ServiceServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ServiceServiceTest.java
index a5bb5e7..b8384a6 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ServiceServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ServiceServiceTest.java
@@ -133,26 +133,26 @@ public class ServiceServiceTest extends BaseServiceTest {
     private String m_artifact_id;
 
     private TestServiceService(String clusterId, String serviceId) {
-      super(clusterId);
+      super(clusterId, serviceId);
       m_clusterId = clusterId;
       m_serviceId = serviceId;
     }
 
     private TestServiceService(String clusterId, String serviceId, String artifactId) {
-      super(clusterId);
+      super(clusterId, serviceId);
       m_clusterId = clusterId;
       m_serviceId = serviceId;
       m_artifact_id = artifactId;
     }
 
-    @Override
+
     ResourceInstance createServiceResource(String clusterName, String serviceName) {
       assertEquals(m_clusterId, clusterName);
       assertEquals(m_serviceId, serviceName);
       return getTestResource();
     }
 
-    @Override
+
     ResourceInstance createArtifactResource(String clusterName, String serviceName, String artifactName) {
       assertEquals(m_clusterId, clusterName);
       assertEquals(m_serviceId, serviceName);

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorBlueprintProcessorTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorBlueprintProcessorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorBlueprintProcessorTest.java
index bc82999..8a5dec4 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorBlueprintProcessorTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorBlueprintProcessorTest.java
@@ -75,7 +75,7 @@ public class StackAdvisorBlueprintProcessorTest {
     // GIVEN
     Map<String, Map<String, String>> props = createProps();
     Map<String, AdvisedConfiguration> advisedConfigurations = new HashMap<>();
-    expect(clusterTopology.getBlueprint()).andReturn(blueprint).anyTimes();
+    expect(clusterTopology.getBlueprint()).andReturn(null).anyTimes();
     expect(clusterTopology.getHostGroupInfo()).andReturn(createHostGroupInfo()).anyTimes();
     expect(clusterTopology.getAdvisedConfigurations()).andReturn(advisedConfigurations).anyTimes();
     expect(clusterTopology.getConfiguration()).andReturn(configuration).anyTimes();
@@ -110,7 +110,7 @@ public class StackAdvisorBlueprintProcessorTest {
     // GIVEN
     Map<String, Map<String, String>> props = createProps();
     Map<String, AdvisedConfiguration> advisedConfigurations = new HashMap<>();
-    expect(clusterTopology.getBlueprint()).andReturn(blueprint).anyTimes();
+    expect(clusterTopology.getBlueprint()).andReturn(null).anyTimes();
     expect(clusterTopology.getHostGroupInfo()).andReturn(createHostGroupInfo()).anyTimes();
     expect(clusterTopology.getAdvisedConfigurations()).andReturn(advisedConfigurations).anyTimes();
     expect(clusterTopology.getConfiguration()).andReturn(configuration).anyTimes();
@@ -146,7 +146,7 @@ public class StackAdvisorBlueprintProcessorTest {
     Map<String, Map<String, String>> props = createProps();
     props.get("core-site").put("dummyKey3", "stackDefaultValue");
     Map<String, AdvisedConfiguration> advisedConfigurations = new HashMap<>();
-    expect(clusterTopology.getBlueprint()).andReturn(blueprint).anyTimes();
+    expect(clusterTopology.getBlueprint()).andReturn(null).anyTimes();
     expect(clusterTopology.getHostGroupInfo()).andReturn(createHostGroupInfo()).anyTimes();
     expect(clusterTopology.getAdvisedConfigurations()).andReturn(advisedConfigurations).anyTimes();
     expect(clusterTopology.getConfiguration()).andReturn(configuration).anyTimes();
@@ -180,7 +180,7 @@ public class StackAdvisorBlueprintProcessorTest {
     // GIVEN
     Map<String, Map<String, String>> props = createProps();
     Map<String, AdvisedConfiguration> advisedConfigurations = new HashMap<>();
-    expect(clusterTopology.getBlueprint()).andReturn(blueprint).anyTimes();
+    expect(clusterTopology.getBlueprint()).andReturn(null).anyTimes();
     expect(clusterTopology.getHostGroupInfo()).andReturn(createHostGroupInfo()).anyTimes();
     expect(clusterTopology.getAdvisedConfigurations()).andReturn(advisedConfigurations).anyTimes();
     expect(clusterTopology.getConfiguration()).andReturn(configuration).anyTimes();
@@ -213,7 +213,7 @@ public class StackAdvisorBlueprintProcessorTest {
     // GIVEN
     Map<String, Map<String, String>> props = createProps();
     Map<String, AdvisedConfiguration> advisedConfigurations = new HashMap<>();
-    expect(clusterTopology.getBlueprint()).andReturn(blueprint).anyTimes();
+    expect(clusterTopology.getBlueprint()).andReturn(null).anyTimes();
     expect(clusterTopology.getHostGroupInfo()).andReturn(createHostGroupInfo()).anyTimes();
     expect(clusterTopology.getAdvisedConfigurations()).andReturn(advisedConfigurations).anyTimes();
     expect(clusterTopology.getConfiguration()).andReturn(configuration).anyTimes();
@@ -242,7 +242,7 @@ public class StackAdvisorBlueprintProcessorTest {
     // GIVEN
     Map<String, Map<String, String>> props = createProps();
     Map<String, AdvisedConfiguration> advisedConfigurations = new HashMap<>();
-    expect(clusterTopology.getBlueprint()).andReturn(blueprint).anyTimes();
+    expect(clusterTopology.getBlueprint()).andReturn(null).anyTimes();
     expect(clusterTopology.getHostGroupInfo()).andReturn(createHostGroupInfo()).anyTimes();
     expect(clusterTopology.getAdvisedConfigurations()).andReturn(advisedConfigurations).anyTimes();
     expect(clusterTopology.getConfiguration()).andReturn(configuration).anyTimes();

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/checks/ComponentsInstallationCheckTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/checks/ComponentsInstallationCheckTest.java b/ambari-server/src/test/java/org/apache/ambari/server/checks/ComponentsInstallationCheckTest.java
index 0e57966..6d5189b 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/checks/ComponentsInstallationCheckTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/checks/ComponentsInstallationCheckTest.java
@@ -270,12 +270,12 @@ public class ComponentsInstallationCheckTest {
     Mockito.when(hcsMetricsMonitor.getHostName()).thenReturn("host3");
 
     // Mock the static method
-    Mockito.when(HostComponentSummary.getHostComponentSummaries("HDFS", "NAMENODE")).thenReturn(Arrays.asList(hcsNameNode));
-    Mockito.when(HostComponentSummary.getHostComponentSummaries("HDFS", "DATANODE")).thenReturn(Arrays.asList(hcsDataNode1, hcsDataNode2, hcsDataNode3));
-    Mockito.when(HostComponentSummary.getHostComponentSummaries("HDFS", "ZKFC")).thenReturn(Arrays.asList(hcsZKFC));
-    Mockito.when(HostComponentSummary.getHostComponentSummaries("TEZ", "TEZ_CLIENT")).thenReturn(Arrays.asList(hcsTezClient));
-    Mockito.when(HostComponentSummary.getHostComponentSummaries("AMBARI_METRICS", "METRICS_COLLECTOR")).thenReturn(Arrays.asList(hcsMetricsCollector));
-    Mockito.when(HostComponentSummary.getHostComponentSummaries("AMBARI_METRICS", "METRICS_MONITOR")).thenReturn(Arrays.asList(hcsMetricsMonitor));
+    Mockito.when(HostComponentSummary.getHostComponentSummaries(1L, 1L, 1L, "NAMENODE")).thenReturn(Arrays.asList(hcsNameNode));
+    Mockito.when(HostComponentSummary.getHostComponentSummaries(1L, 1L, 1L, "DATANODE")).thenReturn(Arrays.asList(hcsDataNode1, hcsDataNode2, hcsDataNode3));
+    Mockito.when(HostComponentSummary.getHostComponentSummaries(1L, 1L, 1L, "ZKFC")).thenReturn(Arrays.asList(hcsZKFC));
+    Mockito.when(HostComponentSummary.getHostComponentSummaries(1L, 1L, 1L, "TEZ_CLIENT")).thenReturn(Arrays.asList(hcsTezClient));
+    Mockito.when(HostComponentSummary.getHostComponentSummaries(1L, 1L, 1L, "METRICS_COLLECTOR")).thenReturn(Arrays.asList(hcsMetricsCollector));
+    Mockito.when(HostComponentSummary.getHostComponentSummaries(1L, 1L, 1L, "METRICS_MONITOR")).thenReturn(Arrays.asList(hcsMetricsMonitor));
     for (String hostName : hosts.keySet()) {
       Mockito.when(clusters.getHost(hostName)).thenReturn(hosts.get(hostName));
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/checks/ServicesUpCheckTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/checks/ServicesUpCheckTest.java b/ambari-server/src/test/java/org/apache/ambari/server/checks/ServicesUpCheckTest.java
index 4d00644..c79e761 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/checks/ServicesUpCheckTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/checks/ServicesUpCheckTest.java
@@ -276,13 +276,17 @@ public class ServicesUpCheckTest {
     allHostComponentSummaries.add(hcsMetricsCollector);
     allHostComponentSummaries.add(hcsMetricsMonitor);
 
+    long clusterId = 1;
+    long serviceGroupId = 1;
+    long serviceId = 1;
+
     // Mock the static method
-    Mockito.when(HostComponentSummary.getHostComponentSummaries("HDFS", "NAMENODE")).thenReturn(Arrays.asList(hcsNameNode));
-    Mockito.when(HostComponentSummary.getHostComponentSummaries("HDFS", "DATANODE")).thenReturn(Arrays.asList(hcsDataNode1, hcsDataNode2, hcsDataNode3));
-    Mockito.when(HostComponentSummary.getHostComponentSummaries("HDFS", "ZKFC")).thenReturn(Arrays.asList(hcsZKFC));
-    Mockito.when(HostComponentSummary.getHostComponentSummaries("TEZ", "TEZ_CLIENT")).thenReturn(Arrays.asList(hcsTezClient));
-    Mockito.when(HostComponentSummary.getHostComponentSummaries("AMBARI_METRICS", "METRICS_COLLECTOR")).thenReturn(Arrays.asList(hcsMetricsCollector));
-    Mockito.when(HostComponentSummary.getHostComponentSummaries("AMBARI_METRICS", "METRICS_MONITOR")).thenReturn(Arrays.asList(hcsMetricsMonitor));
+    Mockito.when(HostComponentSummary.getHostComponentSummaries(clusterId, serviceGroupId, serviceId, "NAMENODE")).thenReturn(Arrays.asList(hcsNameNode));
+    Mockito.when(HostComponentSummary.getHostComponentSummaries(clusterId, serviceGroupId, serviceId, "DATANODE")).thenReturn(Arrays.asList(hcsDataNode1, hcsDataNode2, hcsDataNode3));
+    Mockito.when(HostComponentSummary.getHostComponentSummaries(clusterId, serviceGroupId, serviceId, "ZKFC")).thenReturn(Arrays.asList(hcsZKFC));
+    Mockito.when(HostComponentSummary.getHostComponentSummaries(clusterId, serviceGroupId, serviceId, "TEZ_CLIENT")).thenReturn(Arrays.asList(hcsTezClient));
+    Mockito.when(HostComponentSummary.getHostComponentSummaries(clusterId, serviceGroupId, serviceId, "METRICS_COLLECTOR")).thenReturn(Arrays.asList(hcsMetricsCollector));
+    Mockito.when(HostComponentSummary.getHostComponentSummaries(clusterId, serviceGroupId, serviceId, "METRICS_MONITOR")).thenReturn(Arrays.asList(hcsMetricsMonitor));
 
     // Case 1. Initialize with good values
     for (HostComponentSummary hcs : allHostComponentSummaries) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/configuration/RecoveryConfigHelperTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/configuration/RecoveryConfigHelperTest.java b/ambari-server/src/test/java/org/apache/ambari/server/configuration/RecoveryConfigHelperTest.java
index 7b8bd8b..040b571 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/configuration/RecoveryConfigHelperTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/configuration/RecoveryConfigHelperTest.java
@@ -147,7 +147,7 @@ public class RecoveryConfigHelperTest {
     Cluster cluster = heartbeatTestHelper.getDummyCluster();
 
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(cluster);
-    Service hdfs = cluster.addService(HDFS, repositoryVersion);
+    Service hdfs = cluster.addService(null, HDFS, "", repositoryVersion);
 
     hdfs.addServiceComponent(DATANODE).setRecoveryEnabled(true);
     hdfs.getServiceComponent(DATANODE).addServiceComponentHost(DummyHostname1);
@@ -181,7 +181,7 @@ public class RecoveryConfigHelperTest {
       throws Exception {
     Cluster cluster = heartbeatTestHelper.getDummyCluster();
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(cluster);
-    Service hdfs = cluster.addService(HDFS, repositoryVersion);
+    Service hdfs = cluster.addService(null, HDFS, "", repositoryVersion);
 
     hdfs.addServiceComponent(DATANODE).setRecoveryEnabled(true);
     hdfs.getServiceComponent(DATANODE).addServiceComponentHost(DummyHostname1);
@@ -217,7 +217,7 @@ public class RecoveryConfigHelperTest {
       throws Exception {
     Cluster cluster = heartbeatTestHelper.getDummyCluster();
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(cluster);
-    Service hdfs = cluster.addService(HDFS, repositoryVersion);
+    Service hdfs = cluster.addService(null, HDFS, "", repositoryVersion);
 
     hdfs.addServiceComponent(DATANODE).setRecoveryEnabled(true);
     hdfs.getServiceComponent(DATANODE).addServiceComponentHost(DummyHostname1);
@@ -257,7 +257,7 @@ public class RecoveryConfigHelperTest {
       throws Exception {
     Cluster cluster = heartbeatTestHelper.getDummyCluster();
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(cluster);
-    Service hdfs = cluster.addService(HDFS, repositoryVersion);
+    Service hdfs = cluster.addService(null, HDFS, "", repositoryVersion);
 
     hdfs.addServiceComponent(DATANODE).setRecoveryEnabled(true);
     hdfs.getServiceComponent(DATANODE).addServiceComponentHost(DummyHostname1);
@@ -292,7 +292,7 @@ public class RecoveryConfigHelperTest {
       throws Exception {
     Cluster cluster = heartbeatTestHelper.getDummyCluster();
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(cluster);
-    Service hdfs = cluster.addService(HDFS, repositoryVersion);
+    Service hdfs = cluster.addService(null, HDFS, "", repositoryVersion);
 
     hdfs.addServiceComponent(DATANODE).setRecoveryEnabled(true);
     hdfs.getServiceComponent(DATANODE).addServiceComponentHost(DummyHostname1);
@@ -335,7 +335,7 @@ public class RecoveryConfigHelperTest {
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(cluster);
 
     // Add HDFS service with DATANODE component to the cluster
-    Service hdfs = cluster.addService(HDFS, repositoryVersion);
+    Service hdfs = cluster.addService(null, HDFS, "", repositoryVersion);
 
     hdfs.addServiceComponent(DATANODE).setRecoveryEnabled(true);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelperTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelperTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelperTest.java
index 883e891..f1fc7f5 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelperTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelperTest.java
@@ -598,8 +598,8 @@ public class AmbariCustomCommandExecutionHelperTest {
     repositoryVersion = repoVersionDAO.merge(repositoryVersion);
 
     // add a repo version associated with a component
-    ServiceComponentDesiredStateEntity componentEntity = componentDAO.findByName(cluster.getClusterId(),
-        serviceYARN.getName(), componentRM.getName());
+    ServiceComponentDesiredStateEntity componentEntity = componentDAO.findByName(cluster.getClusterId(), serviceYARN.getServiceGroupId(),
+        serviceYARN.getServiceId(), componentRM.getName());
 
     ServiceComponentVersionEntity componentVersionEntity = new ServiceComponentVersionEntity();
     componentVersionEntity.setRepositoryVersion(repositoryVersion);
@@ -688,8 +688,9 @@ public class AmbariCustomCommandExecutionHelperTest {
   private void createService(String clusterName, String serviceName,
       RepositoryVersionEntity repositoryVersion) throws AmbariException, AuthorizationException {
 
-    ServiceRequest r1 = new ServiceRequest(clusterName, serviceName,
-        repositoryVersion.getId(), null, "false");
+
+    ServiceRequest r1 = new ServiceRequest(clusterName, "", serviceName,
+        repositoryVersion.getId(), null, null);
 
     Set<ServiceRequest> requests = new HashSet<>();
     requests.add(r1);
@@ -705,7 +706,7 @@ public class AmbariCustomCommandExecutionHelperTest {
     if (desiredState != null) {
       dStateStr = desiredState.toString();
     }
-    ServiceComponentRequest r = new ServiceComponentRequest(clusterName,
+    ServiceComponentRequest r = new ServiceComponentRequest(clusterName, "",
         serviceName, componentName, dStateStr);
     Set<ServiceComponentRequest> requests =
       new HashSet<>();
@@ -719,7 +720,7 @@ public class AmbariCustomCommandExecutionHelperTest {
     if (desiredState != null) {
       dStateStr = desiredState.toString();
     }
-    ServiceComponentHostRequest r = new ServiceComponentHostRequest(clusterName,
+    ServiceComponentHostRequest r = new ServiceComponentHostRequest(clusterName, "",
         serviceName, componentName, hostname, dStateStr);
     Set<ServiceComponentHostRequest> requests =
       new HashSet<>();

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
index a5f83af..e56bc9b 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
@@ -360,7 +360,7 @@ public class AmbariManagementControllerImplTest {
     ComponentInfo compInfo = createNiceMock(ComponentInfo.class);
     expect(serviceInfo.getClientComponent()).andReturn(compInfo);
     expect(compInfo.getName()).andReturn("component");
-    expect(component.getServiceComponentHosts()).andReturn(Collections.singletonMap("host", null));
+    expect(component.getServiceComponentHosts()).andReturn(new HashMap<String, ServiceComponentHost>());
     expect(ambariMetaInfo.getService("stack", "1.0", "service")).andReturn(serviceInfo);
 
     replay(injector, cluster, service, component, serviceInfo, compInfo, ambariMetaInfo, stackId);
@@ -385,7 +385,7 @@ public class AmbariManagementControllerImplTest {
 
     expect(service.getName()).andReturn("service");
     expect(service.getServiceComponent("component")).andThrow(
-      new ServiceComponentNotFoundException("cluster", "service", "component"));
+      new ServiceComponentNotFoundException("cluster", "service", "component", "", ""));
     expect(service.getDesiredStackId()).andReturn(stackId);
     expect(stackId.getStackName()).andReturn("stack");
     expect(stackId.getStackVersion()).andReturn("1.0");
@@ -395,7 +395,7 @@ public class AmbariManagementControllerImplTest {
     expect(service.getServiceComponents()).andReturn(componentsMap);
     expect(component1.getServiceComponentHosts()).andReturn(Collections.emptyMap());
     expect(component2.getServiceComponentHosts()).andReturn(
-      Collections.singletonMap("anyHost", null));
+      new HashMap<String, ServiceComponentHost>());
 
     ServiceInfo serviceInfo = createNiceMock(ServiceInfo.class);
     ComponentInfo compInfo = createNiceMock(ComponentInfo.class);
@@ -433,7 +433,7 @@ public class AmbariManagementControllerImplTest {
     expect(service.getServiceComponents()).andReturn(componentsMap);
     expect(component1.getServiceComponentHosts()).andReturn(Collections.emptyMap());
     expect(component2.getServiceComponentHosts()).andReturn(
-      Collections.singletonMap("anyHost", null));
+      new HashMap<String, ServiceComponentHost>());
 
     ServiceInfo serviceInfo = createNiceMock(ServiceInfo.class);
     expect(serviceInfo.getClientComponent()).andReturn(null);
@@ -1044,7 +1044,7 @@ public class AmbariManagementControllerImplTest {
 
     // requests
     ServiceComponentHostRequest request1 = new ServiceComponentHostRequest(
-        "cluster1", null, "component1", "host1", null);
+        "cluster1", null, "component1", "host1", null, null);
 
     Set<ServiceComponentHostRequest> setRequests = new HashSet<>();
     setRequests.add(request1);
@@ -1111,7 +1111,7 @@ public class AmbariManagementControllerImplTest {
 
     // requests
     ServiceComponentHostRequest request1 = new ServiceComponentHostRequest(
-        "cluster1", null, "component1", "host1", null);
+        "cluster1", null, "component1", "host1", null, null);
 
 
     Set<ServiceComponentHostRequest> setRequests = new HashSet<>();
@@ -1177,7 +1177,7 @@ public class AmbariManagementControllerImplTest {
 
     // requests
     ServiceComponentHostRequest request1 = new ServiceComponentHostRequest(
-        "cluster1", null, "component1", "host1", null);
+        "cluster1", null, "component1", "host1", null, null);
     request1.setState("INSTALLED");
 
 
@@ -1254,7 +1254,7 @@ public class AmbariManagementControllerImplTest {
 
     // requests
     ServiceComponentHostRequest request1 = new ServiceComponentHostRequest(
-        "cluster1", null, "component1", "host1", null);
+        "cluster1", null, "component1", "host1", null, null);
     request1.setMaintenanceState("ON");
 
 
@@ -1338,13 +1338,13 @@ public class AmbariManagementControllerImplTest {
 
     // requests
     ServiceComponentHostRequest request1 = new ServiceComponentHostRequest(
-        "cluster1", null, "component1", "host1", null);
+        "cluster1", null, "component1", "host1", null, null);
 
     ServiceComponentHostRequest request2 = new ServiceComponentHostRequest(
-        "cluster1", null, "component2", "host1", null);
+        "cluster1", null, "component2", "host1", null, null);
 
     ServiceComponentHostRequest request3 = new ServiceComponentHostRequest(
-        "cluster1", null, "component3", "host1", null);
+        "cluster1", null, "component3", "host1", null, null);
 
 
     Set<ServiceComponentHostRequest> setRequests = new HashSet<>();
@@ -1437,13 +1437,13 @@ public class AmbariManagementControllerImplTest {
 
     // requests
     ServiceComponentHostRequest request1 = new ServiceComponentHostRequest(
-        "cluster1", null, "component1", "host1", null);
+        "cluster1", null, "component1", "host1", null, null);
 
     ServiceComponentHostRequest request2 = new ServiceComponentHostRequest(
-        "cluster1", null, "component2", "host1", null);
+        "cluster1", null, "component2", "host1", null, null);
 
     ServiceComponentHostRequest request3 = new ServiceComponentHostRequest(
-        "cluster1", null, "component3", "host1", null);
+        "cluster1", null, "component3", "host1", null, null);
 
 
     Set<ServiceComponentHostRequest> setRequests = new HashSet<>();
@@ -1543,13 +1543,13 @@ public class AmbariManagementControllerImplTest {
 
     // requests
     ServiceComponentHostRequest request1 = new ServiceComponentHostRequest(
-        "cluster1", null, "component1", "host1", null);
+        "cluster1", null, "component1", "host1", null, null);
 
     ServiceComponentHostRequest request2 = new ServiceComponentHostRequest(
-        "cluster1", null, "component2", "host1", null);
+        "cluster1", null, "component2", "host1", null, null);
 
     ServiceComponentHostRequest request3 = new ServiceComponentHostRequest(
-        "cluster1", null, "component3", "host1", null);
+        "cluster1", null, "component3", "host1", null, null);
 
 
     Set<ServiceComponentHostRequest> setRequests = new HashSet<>();
@@ -1592,7 +1592,7 @@ public class AmbariManagementControllerImplTest {
     expect(cluster.getServiceByComponentName("component2")).andReturn(service2);
     expect(service2.getName()).andReturn("service2");
     expect(service2.getServiceComponent("component2")).
-        andThrow(new ServiceComponentNotFoundException("cluster1", "service2", "component2"));
+        andThrow(new ServiceComponentNotFoundException("cluster1", "service2", "component2", "", ""));
 
 //    expect(ambariMetaInfo.getComponentToService("stackName", "stackVersion", "component3")).andReturn("service1");
     expect(cluster.getService("service1")).andReturn(service);
@@ -1653,13 +1653,13 @@ public class AmbariManagementControllerImplTest {
 
     // requests
     ServiceComponentHostRequest request1 = new ServiceComponentHostRequest(
-        "cluster1", null, "component1", null, null);
+        "cluster1", null, "component1", null, null, null);
 
     ServiceComponentHostRequest request2 = new ServiceComponentHostRequest(
-        "cluster1", null, "component2", "host2", null);
+        "cluster1", null, "component2", "host2", null, null);
 
     ServiceComponentHostRequest request3 = new ServiceComponentHostRequest(
-        "cluster1", null, "component3", null, null);
+        "cluster1", null, "component3", null, null, null);
 
 
     Set<ServiceComponentHostRequest> setRequests = new HashSet<>();
@@ -1738,13 +1738,13 @@ public class AmbariManagementControllerImplTest {
 
     // requests
     ServiceComponentHostRequest request1 = new ServiceComponentHostRequest(
-        "cluster1", null, "component1", "host1", null);
+        "cluster1", null, "component1", "host1", null, null);
 
     ServiceComponentHostRequest request2 = new ServiceComponentHostRequest(
-        "cluster1", null, "component2", "host1", null);
+        "cluster1", null, "component2", "host1", null, null);
 
     ServiceComponentHostRequest request3 = new ServiceComponentHostRequest(
-        "cluster1", null, "component3", "host1", null);
+        "cluster1", null, "component3", "host1", null, null);
 
 
     Set<ServiceComponentHostRequest> setRequests = new HashSet<>();
@@ -1793,13 +1793,13 @@ public class AmbariManagementControllerImplTest {
 
     // requests
     ServiceComponentHostRequest request1 = new ServiceComponentHostRequest(
-        "cluster1", null, "component1", "host1", null);
+        "cluster1", null, "component1", "host1", null, null);
 
     ServiceComponentHostRequest request2 = new ServiceComponentHostRequest(
-        "cluster1", null, "component2", "host2", null);
+        "cluster1", null, "component2", "host2", null, null);
 
     ServiceComponentHostRequest request3 = new ServiceComponentHostRequest(
-        "cluster1", null, "component3", "host1", null);
+        "cluster1", null, "component3", "host1", null, null);
 
 
     Set<ServiceComponentHostRequest> setRequests = new HashSet<>();
@@ -1858,7 +1858,7 @@ public class AmbariManagementControllerImplTest {
 
     // requests
     ServiceComponentHostRequest request1 = new ServiceComponentHostRequest(
-        "cluster1", null, "component1", null, null);
+        "cluster1", null, "component1", null, null, null);
 
 
     Set<ServiceComponentHostRequest> setRequests = new HashSet<>();
@@ -1938,7 +1938,7 @@ public class AmbariManagementControllerImplTest {
 
     // requests
     ServiceComponentHostRequest request1 = new ServiceComponentHostRequest(
-        "cluster1", null, null, null, null);
+        "cluster1", null, null, null, null, null);
 
 
     Set<ServiceComponentHostRequest> setRequests = new HashSet<>();


[6/7] ambari git commit: AMBARI-22493. Fix build for test classes in feature branch.(vbrodetskyi)

Posted by vb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
index 44b46f4..92eced2 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
@@ -77,6 +77,7 @@ import org.apache.ambari.server.agent.ExecutionCommand;
 import org.apache.ambari.server.agent.HeartBeatHandler;
 import org.apache.ambari.server.agent.rest.AgentResource;
 import org.apache.ambari.server.api.services.AmbariMetaInfo;
+import org.apache.ambari.server.api.services.ServiceKey;
 import org.apache.ambari.server.audit.AuditLogger;
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.controller.internal.ClusterStackVersionResourceProviderTest;
@@ -377,7 +378,7 @@ public class AmbariManagementControllerTest {
       dStateStr = desiredState.toString();
     }
 
-    ServiceRequest r1 = new ServiceRequest(clusterName, serviceName,
+    ServiceRequest r1 = new ServiceRequest(clusterName, "", serviceName,
         repositoryVersion.getId(), dStateStr,
         null);
 
@@ -394,7 +395,7 @@ public class AmbariManagementControllerTest {
     if (desiredState != null) {
       dStateStr = desiredState.toString();
     }
-    ServiceComponentRequest r = new ServiceComponentRequest(clusterName,
+    ServiceComponentRequest r = new ServiceComponentRequest(clusterName, "",
         serviceName, componentName, dStateStr);
     Set<ServiceComponentRequest> requests =
       new HashSet<>();
@@ -409,7 +410,7 @@ public class AmbariManagementControllerTest {
     if (desiredState != null) {
       dStateStr = desiredState.toString();
     }
-    ServiceComponentHostRequest r = new ServiceComponentHostRequest(clusterName,
+    ServiceComponentHostRequest r = new ServiceComponentHostRequest(clusterName, "",
         serviceName, componentName, hostname, dStateStr);
     Set<ServiceComponentHostRequest> requests =
       new HashSet<>();
@@ -424,7 +425,7 @@ public class AmbariManagementControllerTest {
     if (desiredState != null) {
       dStateStr = desiredState.toString();
     }
-    ServiceComponentHostRequest r = new ServiceComponentHostRequest(clusterName,
+    ServiceComponentHostRequest r = new ServiceComponentHostRequest(clusterName, "",
         serviceName, componentName, hostname, dStateStr);
     Set<ServiceComponentHostRequest> requests =
       new HashSet<>();
@@ -449,10 +450,9 @@ public class AmbariManagementControllerTest {
       configMap.put(config.getType(), config);
     }
 
-    ConfigGroup configGroup = configGroupFactory.createNew(cluster, serviceName, name,
-      tag, "", configMap, hostMap);
+    ConfigGroup configGroup = configGroupFactory.createNew(cluster, 1L, 1L, serviceName, tag, "", configMap, hostMap);
 
-    configGroup.setServiceName(serviceName);
+    //configGroup.setServiceName(serviceName);
 
     cluster.addConfigGroup(configGroup);
 
@@ -462,7 +462,7 @@ public class AmbariManagementControllerTest {
   private long stopService(String clusterName, String serviceName,
       boolean runSmokeTests, boolean reconfigureClients) throws
       AmbariException, AuthorizationException {
-    ServiceRequest r = new ServiceRequest(clusterName, serviceName, null, State.INSTALLED.toString(), null);
+    ServiceRequest r = new ServiceRequest(clusterName, "", serviceName, null, State.INSTALLED.toString(), null);
     Set<ServiceRequest> requests = new HashSet<>();
     requests.add(r);
     Map<String, String> mapRequestProps = new HashMap<>();
@@ -495,7 +495,7 @@ public class AmbariManagementControllerTest {
     for (ServiceComponent sc : s.getServiceComponents().values()) {
       for (ServiceComponentHost sch : sc.getServiceComponentHosts().values()) {
         ServiceComponentHostRequest schr = new ServiceComponentHostRequest
-          (clusterName, serviceName, sc.getName(),
+          (clusterName, "", serviceName, sc.getName(),
             sch.getHostName(), State.INSTALLED.name());
         requests.add(schr);
       }
@@ -527,7 +527,7 @@ public class AmbariManagementControllerTest {
                             boolean runSmokeTests, boolean reconfigureClients,
                             MaintenanceStateHelper maintenanceStateHelper) throws
       AmbariException, AuthorizationException {
-    ServiceRequest r = new ServiceRequest(clusterName, serviceName, repositoryVersion02.getId(),
+    ServiceRequest r = new ServiceRequest(clusterName, "", serviceName, repositoryVersion02.getId(),
         State.STARTED.toString(), null);
     Set<ServiceRequest> requests = new HashSet<>();
     requests.add(r);
@@ -582,7 +582,7 @@ public class AmbariManagementControllerTest {
                               Map<String, String> mapRequestPropsInput)
       throws AmbariException, AuthorizationException {
 
-    ServiceRequest r = new ServiceRequest(clusterName, serviceName, repositoryVersion02.getId(),
+    ServiceRequest r = new ServiceRequest(clusterName, "", serviceName, repositoryVersion02.getId(),
         State.INSTALLED.toString(), null);
 
     Set<ServiceRequest> requests = new HashSet<>();
@@ -711,7 +711,7 @@ public class AmbariManagementControllerTest {
     Assert.assertEquals(serviceName, s.getName());
     Assert.assertEquals(cluster1, s.getCluster().getClusterName());
 
-    ServiceRequest req = new ServiceRequest(cluster1, "HDFS", repositoryVersion02.getId(), null, null);
+    ServiceRequest req = new ServiceRequest(cluster1, "", "HDFS", repositoryVersion02.getId(), null, null);
 
     Set<ServiceResponse> r =
         ServiceResourceProviderTest.getServices(controller, Collections.singleton(req));
@@ -733,7 +733,7 @@ public class AmbariManagementControllerTest {
 
     try {
       set1.clear();
-      ServiceRequest rInvalid = new ServiceRequest(null, null, null, null, null);
+      ServiceRequest rInvalid = new ServiceRequest(null, null, null, null, null, null);
       set1.add(rInvalid);
       ServiceResourceProviderTest.createServices(controller, repositoryVersionDAO, set1);
       fail("Expected failure for invalid requests");
@@ -743,7 +743,7 @@ public class AmbariManagementControllerTest {
 
     try {
       set1.clear();
-      ServiceRequest rInvalid = new ServiceRequest("foo", null, null, null, null);
+      ServiceRequest rInvalid = new ServiceRequest("foo", null, null, null, null, null);
       set1.add(rInvalid);
       ServiceResourceProviderTest.createServices(controller, repositoryVersionDAO, set1);
       fail("Expected failure for invalid requests");
@@ -753,7 +753,7 @@ public class AmbariManagementControllerTest {
 
     try {
       set1.clear();
-      ServiceRequest rInvalid = new ServiceRequest("foo", "bar", null, null, null);
+      ServiceRequest rInvalid = new ServiceRequest("foo", "bar", null, null, null, null);
       set1.add(rInvalid);
       ServiceResourceProviderTest.createServices(controller, repositoryVersionDAO, set1);
       fail("Expected failure for invalid cluster");
@@ -771,8 +771,8 @@ public class AmbariManagementControllerTest {
 
     try {
       set1.clear();
-      ServiceRequest valid1 = new ServiceRequest(cluster1, "HDFS", null, null, null);
-      ServiceRequest valid2 = new ServiceRequest(cluster1, "HDFS", null, null, null);
+      ServiceRequest valid1 = new ServiceRequest(cluster1, "", "HDFS", null, null, null);
+      ServiceRequest valid2 = new ServiceRequest(cluster1, "", "HDFS", null, null, null);
       set1.add(valid1);
       set1.add(valid2);
       ServiceResourceProviderTest.createServices(controller, repositoryVersionDAO, set1);
@@ -783,7 +783,7 @@ public class AmbariManagementControllerTest {
 
     try {
       set1.clear();
-      ServiceRequest valid1 = new ServiceRequest(cluster1, "bar", repositoryVersion02.getId(), State.STARTED.toString(), null);
+      ServiceRequest valid1 = new ServiceRequest(cluster1, "", "bar", repositoryVersion02.getId(), State.STARTED.toString(), null);
       set1.add(valid1);
       ServiceResourceProviderTest.createServices(controller, repositoryVersionDAO, set1);
       fail("Expected failure for invalid service");
@@ -794,8 +794,8 @@ public class AmbariManagementControllerTest {
 
     try {
       set1.clear();
-      ServiceRequest valid1 = new ServiceRequest(cluster1, "HDFS", repositoryVersion02.getId(), State.STARTED.toString(), null);
-      ServiceRequest valid2 = new ServiceRequest(cluster2, "HDFS", repositoryVersion02.getId(), State.STARTED.toString(), null);
+      ServiceRequest valid1 = new ServiceRequest(cluster1, "", "HDFS", repositoryVersion02.getId(), State.STARTED.toString(), null);
+      ServiceRequest valid2 = new ServiceRequest(cluster2, "", "HDFS", repositoryVersion02.getId(), State.STARTED.toString(), null);
       set1.add(valid1);
       set1.add(valid2);
       ServiceResourceProviderTest.createServices(controller, repositoryVersionDAO, set1);
@@ -808,14 +808,14 @@ public class AmbariManagementControllerTest {
     Assert.assertEquals(0, clusters.getCluster(cluster1).getServices().size());
 
     set1.clear();
-    ServiceRequest valid = new ServiceRequest(cluster1, "HDFS", repositoryVersion02.getId(), null, null);
+    ServiceRequest valid = new ServiceRequest(cluster1, "", "HDFS", repositoryVersion02.getId(), null, null);
     set1.add(valid);
     ServiceResourceProviderTest.createServices(controller, repositoryVersionDAO, set1);
 
     try {
       set1.clear();
-      ServiceRequest valid1 = new ServiceRequest(cluster1, "HDFS", repositoryVersion02.getId(), State.STARTED.toString(), null);
-      ServiceRequest valid2 = new ServiceRequest(cluster1, "HDFS", repositoryVersion02.getId(), State.STARTED.toString(), null);
+      ServiceRequest valid1 = new ServiceRequest(cluster1, "", "HDFS", repositoryVersion02.getId(), State.STARTED.toString(), null);
+      ServiceRequest valid2 = new ServiceRequest(cluster1, "", "HDFS", repositoryVersion02.getId(), State.STARTED.toString(), null);
       set1.add(valid1);
       set1.add(valid2);
       ServiceResourceProviderTest.createServices(controller, repositoryVersionDAO, set1);
@@ -857,7 +857,7 @@ public class AmbariManagementControllerTest {
     String serviceName2 = "MAPREDUCE";
     createService(cluster1, serviceName2, State.INIT);
 
-    ServiceRequest r = new ServiceRequest(cluster1, null, null, null, null);
+    ServiceRequest r = new ServiceRequest(cluster1, null, null, null, null, null);
     Set<ServiceResponse> response = ServiceResourceProviderTest.getServices(controller, Collections.singleton(r));
     Assert.assertEquals(2, response.size());
 
@@ -877,15 +877,15 @@ public class AmbariManagementControllerTest {
 
     clusters.addCluster(cluster1, new StackId("HDP-0.1"));
 
-    ServiceRequest valid1 = new ServiceRequest(cluster1, "HDFS", repositoryVersion01.getId(), null, null);
-    ServiceRequest valid2 = new ServiceRequest(cluster1, "MAPREDUCE", repositoryVersion01.getId(), null, null);
+    ServiceRequest valid1 = new ServiceRequest(cluster1, "", "HDFS", repositoryVersion01.getId(), null, null);
+    ServiceRequest valid2 = new ServiceRequest(cluster1, "", "MAPREDUCE", repositoryVersion01.getId(), null, null);
     set1.add(valid1);
     set1.add(valid2);
     ServiceResourceProviderTest.createServices(controller, repositoryVersionDAO, set1);
 
     try {
-      valid1 = new ServiceRequest(cluster1, "PIG", repositoryVersion01.getId(), null, null);
-      valid2 = new ServiceRequest(cluster1, "MAPREDUCE", 4L, null, null);
+      valid1 = new ServiceRequest(cluster1, "", "PIG", repositoryVersion01.getId(), null, null);
+      valid2 = new ServiceRequest(cluster1, "", "MAPREDUCE", 4L, null, null);
       set1.add(valid1);
       set1.add(valid2);
       ServiceResourceProviderTest.createServices(controller, repositoryVersionDAO, set1);
@@ -930,7 +930,7 @@ public class AmbariManagementControllerTest {
         .getService(serviceName).getServiceComponent(componentName));
 
     ServiceComponentRequest r =
-        new ServiceComponentRequest(cluster1, serviceName, null, null);
+        new ServiceComponentRequest(cluster1, "", serviceName, null, null);
     Set<ServiceComponentResponse> response = ComponentResourceProviderTest.getComponents(controller, Collections.singleton(r));
     Assert.assertEquals(1, response.size());
 
@@ -958,7 +958,7 @@ public class AmbariManagementControllerTest {
     try {
       set1.clear();
       ServiceComponentRequest rInvalid =
-          new ServiceComponentRequest(null, null, null, null);
+          new ServiceComponentRequest(null, null, null, null, null, null);
       set1.add(rInvalid);
       ComponentResourceProviderTest.createComponents(controller, set1);
       fail("Expected failure for invalid requests");
@@ -969,7 +969,7 @@ public class AmbariManagementControllerTest {
     try {
       set1.clear();
       ServiceComponentRequest rInvalid =
-          new ServiceComponentRequest(cluster1, null, null, null);
+          new ServiceComponentRequest(cluster1, null, null, null, null);
       set1.add(rInvalid);
       ComponentResourceProviderTest.createComponents(controller, set1);
       fail("Expected failure for invalid requests");
@@ -980,7 +980,7 @@ public class AmbariManagementControllerTest {
     try {
       set1.clear();
       ServiceComponentRequest rInvalid =
-          new ServiceComponentRequest(cluster1, "s1", null, null);
+          new ServiceComponentRequest(cluster1, "s1", null, null, null);
       set1.add(rInvalid);
       ComponentResourceProviderTest.createComponents(controller, set1);
       fail("Expected failure for invalid requests");
@@ -991,7 +991,7 @@ public class AmbariManagementControllerTest {
     try {
       set1.clear();
       ServiceComponentRequest rInvalid =
-          new ServiceComponentRequest(cluster1, "s1", "sc1", null);
+          new ServiceComponentRequest(cluster1, "s1", "sc1", null, null);
       set1.add(rInvalid);
       ComponentResourceProviderTest.createComponents(controller, set1);
       fail("Expected failure for invalid cluster");
@@ -1005,7 +1005,7 @@ public class AmbariManagementControllerTest {
     try {
       set1.clear();
       ServiceComponentRequest rInvalid =
-          new ServiceComponentRequest(cluster1, "HDFS", "NAMENODE", null);
+          new ServiceComponentRequest(cluster1, "HDFS", "NAMENODE", null, null);
       set1.add(rInvalid);
       ComponentResourceProviderTest.createComponents(controller, set1);
       fail("Expected failure for invalid service");
@@ -1020,18 +1020,18 @@ public class AmbariManagementControllerTest {
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(stackId,
         stackId.getStackVersion());
 
-    Service s1 = serviceFactory.createNew(c1, "HDFS", repositoryVersion);
-    Service s2 = serviceFactory.createNew(c1, "MAPREDUCE", repositoryVersion);
+    Service s1 = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "HDFS", "", repositoryVersion);
+    Service s2 = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "MAPREDUCE", "", repositoryVersion);
     c1.addService(s1);
     c1.addService(s2);
 
     set1.clear();
     ServiceComponentRequest valid1 =
-        new ServiceComponentRequest(cluster1, "HDFS", "NAMENODE", null);
+        new ServiceComponentRequest(cluster1, "", "HDFS", "NAMENODE", null);
     ServiceComponentRequest valid2 =
-        new ServiceComponentRequest(cluster1, "MAPREDUCE", "JOBTRACKER", null);
+        new ServiceComponentRequest(cluster1, "", "MAPREDUCE", "JOBTRACKER", null);
     ServiceComponentRequest valid3 =
-        new ServiceComponentRequest(cluster1, "MAPREDUCE", "TASKTRACKER", null);
+        new ServiceComponentRequest(cluster1, "", "MAPREDUCE", "TASKTRACKER", null);
     set1.add(valid1);
     set1.add(valid2);
     set1.add(valid3);
@@ -1040,9 +1040,9 @@ public class AmbariManagementControllerTest {
     try {
       set1.clear();
       ServiceComponentRequest rInvalid1 =
-          new ServiceComponentRequest(cluster1, "HDFS", "HDFS_CLIENT", null);
+          new ServiceComponentRequest(cluster1, "", "HDFS", "HDFS_CLIENT", null);
       ServiceComponentRequest rInvalid2 =
-          new ServiceComponentRequest(cluster1, "HDFS", "HDFS_CLIENT", null);
+          new ServiceComponentRequest(cluster1, "", "HDFS", "HDFS_CLIENT", null);
       set1.add(rInvalid1);
       set1.add(rInvalid2);
       ComponentResourceProviderTest.createComponents(controller, set1);
@@ -1054,9 +1054,9 @@ public class AmbariManagementControllerTest {
     try {
       set1.clear();
       ServiceComponentRequest rInvalid1 =
-          new ServiceComponentRequest(cluster1, "HDFS", "HDFS_CLIENT", null);
+          new ServiceComponentRequest(cluster1, "", "HDFS", "HDFS_CLIENT", null);
       ServiceComponentRequest rInvalid2 =
-          new ServiceComponentRequest(cluster2, "HDFS", "HDFS_CLIENT", null);
+          new ServiceComponentRequest(cluster2, "", "HDFS", "HDFS_CLIENT", null);
       set1.add(rInvalid1);
       set1.add(rInvalid2);
       ComponentResourceProviderTest.createComponents(controller, set1);
@@ -1068,7 +1068,7 @@ public class AmbariManagementControllerTest {
     try {
       set1.clear();
       ServiceComponentRequest rInvalid =
-          new ServiceComponentRequest(cluster1, "HDFS", "NAMENODE", null);
+          new ServiceComponentRequest(cluster1, "", "HDFS", "NAMENODE", null);
       set1.add(rInvalid);
       ComponentResourceProviderTest.createComponents(controller, set1);
       fail("Expected failure for already existing component");
@@ -1122,7 +1122,7 @@ public class AmbariManagementControllerTest {
 
     ConfigurationRequest cr1;
     cr1 = new ConfigurationRequest(cluster1, "cluster-env","version1",
-                                   configs, null);
+                                   configs, null, 1L, 1L);
 
     ClusterRequest crReq = new ClusterRequest(cluster.getClusterId(), cluster1, null, null);
     crReq.setDesiredConfig(Collections.singletonList(cr1));
@@ -1143,7 +1143,7 @@ public class AmbariManagementControllerTest {
     // issue an install command, expect retry is enabled
     ServiceComponentHostRequest
         schr =
-        new ServiceComponentHostRequest(cluster1, "HDFS", "DATANODE", host2, "INSTALLED");
+        new ServiceComponentHostRequest(cluster1, "", "HDFS", "DATANODE", host2, "INSTALLED");
     Map<String, String> requestProps = new HashMap<>();
     requestProps.put("phase", "INITIAL_INSTALL");
     RequestStatusResponse rsr = updateHostComponents(Collections.singleton(schr), requestProps, false);
@@ -1169,7 +1169,7 @@ public class AmbariManagementControllerTest {
     }
 
     // issue an start command but no retry as phase is only INITIAL_INSTALL
-    schr = new ServiceComponentHostRequest(cluster1, "HDFS", "DATANODE", host2, "STARTED");
+    schr = new ServiceComponentHostRequest(cluster1, "", "HDFS", "DATANODE", host2, "STARTED");
     rsr = updateHostComponents(Collections.singleton(schr), requestProps, false);
     stages = actionDB.getAllStages(rsr.getRequestId());
     Assert.assertEquals(1, stages.size());
@@ -1192,14 +1192,14 @@ public class AmbariManagementControllerTest {
     configs.put("commands_to_retry", "START");
 
     cr1 = new ConfigurationRequest(cluster1, "cluster-env","version2",
-                                   configs, null);
+                                   configs, null, 1L, 1L);
     crReq = new ClusterRequest(cluster.getClusterId(), cluster1, null, null);
     crReq.setDesiredConfig(Collections.singletonList(cr1));
     controller.updateClusters(Collections.singleton(crReq), null);
 
     // issue an start command and retry is expected
     requestProps.put("phase", "INITIAL_START");
-    schr = new ServiceComponentHostRequest(cluster1, "HDFS", "DATANODE", host2, "STARTED");
+    schr = new ServiceComponentHostRequest(cluster1, "", "HDFS", "DATANODE", host2, "STARTED");
     rsr = updateHostComponents(Collections.singleton(schr), requestProps, false);
     stages = actionDB.getAllStages(rsr.getRequestId());
     Assert.assertEquals(1, stages.size());
@@ -1223,13 +1223,13 @@ public class AmbariManagementControllerTest {
     configs.put("commands_to_retry2", "START");
 
     cr1 = new ConfigurationRequest(cluster1, "cluster-env","version3",
-                                   configs, null);
+                                   configs, null, 1L, 1L);
     crReq = new ClusterRequest(cluster.getClusterId(), cluster1, null, null);
     crReq.setDesiredConfig(Collections.singletonList(cr1));
     controller.updateClusters(Collections.singleton(crReq), null);
 
     requestProps.put("phase", "INITIAL_START");
-    schr = new ServiceComponentHostRequest(cluster1, "HDFS", "DATANODE", host2, "STARTED");
+    schr = new ServiceComponentHostRequest(cluster1, "", "HDFS", "DATANODE", host2, "STARTED");
     rsr = updateHostComponents(Collections.singleton(schr), requestProps, false);
     stages = actionDB.getAllStages(rsr.getRequestId());
     Assert.assertEquals(1, stages.size());
@@ -1272,11 +1272,11 @@ public class AmbariManagementControllerTest {
     ConfigurationRequest cr1,cr2, cr3;
 
     cr1 = new ConfigurationRequest(cluster1, "core-site","version1",
-                                   configs, null);
+                                   configs, null, 1L, 1L);
     cr2 = new ConfigurationRequest(cluster1, "hdfs-site","version1",
-                                   configs, null);
+                                   configs, null, 1L, 1L);
     cr3 = new ConfigurationRequest(cluster1, "hadoop-env","version1",
-      hadoopEnvConfigs, null);
+      hadoopEnvConfigs, null, 1L, 1L);
 
     ClusterRequest crReq = new ClusterRequest(cluster.getClusterId(), cluster1, null, null);
     crReq.setDesiredConfig(Collections.singletonList(cr1));
@@ -1345,18 +1345,18 @@ public class AmbariManagementControllerTest {
 
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(stackId, stackId.getStackVersion());
 
-    Service s1 = serviceFactory.createNew(c1, "HDFS", repositoryVersion);
-    Service s2 = serviceFactory.createNew(c1, "MAPREDUCE", repositoryVersion);
+    Service s1 = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "HDFS", "", repositoryVersion);
+    Service s2 = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "MAPREDUCE", "", repositoryVersion);
     c1.addService(s1);
     c1.addService(s2);
 
     Set<ServiceComponentRequest> set1 = new HashSet<>();
     ServiceComponentRequest valid1 =
-        new ServiceComponentRequest(cluster1, "HDFS", "NAMENODE", null);
+        new ServiceComponentRequest(cluster1, "", "HDFS", "NAMENODE", null);
     ServiceComponentRequest valid2 =
-        new ServiceComponentRequest(cluster1, "MAPREDUCE", "JOBTRACKER", null);
+        new ServiceComponentRequest(cluster1, "", "MAPREDUCE", "JOBTRACKER", null);
     ServiceComponentRequest valid3 =
-        new ServiceComponentRequest(cluster1, "MAPREDUCE", "TASKTRACKER", null);
+        new ServiceComponentRequest(cluster1, "", "MAPREDUCE", "TASKTRACKER", null);
     set1.add(valid1);
     set1.add(valid2);
     set1.add(valid3);
@@ -1469,7 +1469,7 @@ public class AmbariManagementControllerTest {
         .getServiceComponentHost(host2));
 
     ServiceComponentHostRequest r =
-        new ServiceComponentHostRequest(clusterName, serviceName,
+        new ServiceComponentHostRequest(clusterName, "", serviceName,
             componentName2, null, null);
 
     Set<ServiceComponentHostResponse> response =
@@ -1499,16 +1499,16 @@ public class AmbariManagementControllerTest {
     Set<ServiceComponentHostRequest> set1 =
       new HashSet<>();
     ServiceComponentHostRequest r1 =
-        new ServiceComponentHostRequest(cluster1, serviceName,
+        new ServiceComponentHostRequest(cluster1, "", serviceName,
             componentName1, host1, State.INIT.toString());
     ServiceComponentHostRequest r2 =
-        new ServiceComponentHostRequest(cluster1, serviceName,
+        new ServiceComponentHostRequest(cluster1, "", serviceName,
             componentName2, host1, State.INIT.toString());
     ServiceComponentHostRequest r3 =
-        new ServiceComponentHostRequest(cluster1, serviceName,
+        new ServiceComponentHostRequest(cluster1, "", serviceName,
             componentName1, host2, State.INIT.toString());
     ServiceComponentHostRequest r4 =
-        new ServiceComponentHostRequest(cluster1, serviceName,
+        new ServiceComponentHostRequest(cluster1, "", serviceName,
             componentName2, host2, State.INIT.toString());
 
     set1.add(r1);
@@ -1554,7 +1554,7 @@ public class AmbariManagementControllerTest {
     try {
       set1.clear();
       ServiceComponentHostRequest rInvalid =
-          new ServiceComponentHostRequest(null, null, null, null, null);
+          new ServiceComponentHostRequest(null, null, null, null, null, null);
       set1.add(rInvalid);
       controller.createHostComponents(set1);
       fail("Expected failure for invalid requests");
@@ -1565,7 +1565,7 @@ public class AmbariManagementControllerTest {
     try {
       set1.clear();
       ServiceComponentHostRequest rInvalid =
-          new ServiceComponentHostRequest("foo", null, null, null, null);
+          new ServiceComponentHostRequest("foo", null, null, null, null, null);
       set1.add(rInvalid);
       controller.createHostComponents(set1);
       fail("Expected failure for invalid requests");
@@ -1576,7 +1576,7 @@ public class AmbariManagementControllerTest {
     try {
       set1.clear();
       ServiceComponentHostRequest rInvalid =
-          new ServiceComponentHostRequest("foo", "HDFS", null, null, null);
+          new ServiceComponentHostRequest("foo", "", "HDFS", null, null, null);
       set1.add(rInvalid);
       controller.createHostComponents(set1);
       fail("Expected failure for invalid requests");
@@ -1587,7 +1587,7 @@ public class AmbariManagementControllerTest {
     try {
       set1.clear();
       ServiceComponentHostRequest rInvalid =
-          new ServiceComponentHostRequest("foo", "HDFS", "NAMENODE", null, null);
+          new ServiceComponentHostRequest("foo", "", "HDFS", "NAMENODE", null, null);
       set1.add(rInvalid);
       controller.createHostComponents(set1);
       fail("Expected failure for invalid requests");
@@ -1606,7 +1606,7 @@ public class AmbariManagementControllerTest {
     try {
       set1.clear();
       ServiceComponentHostRequest rInvalid =
-          new ServiceComponentHostRequest(clusterFoo, "HDFS", "NAMENODE", host1, null);
+          new ServiceComponentHostRequest(clusterFoo, "", "HDFS", "NAMENODE", host1, null);
       set1.add(rInvalid);
       controller.createHostComponents(set1);
       fail("Expected failure for invalid cluster");
@@ -1642,7 +1642,7 @@ public class AmbariManagementControllerTest {
     try {
       set1.clear();
       ServiceComponentHostRequest rInvalid =
-          new ServiceComponentHostRequest(clusterFoo, "HDFS", "NAMENODE", host1, null);
+          new ServiceComponentHostRequest(clusterFoo, "", "HDFS", "NAMENODE", host1, null);
       set1.add(rInvalid);
       controller.createHostComponents(set1);
       fail("Expected failure for invalid service");
@@ -1650,18 +1650,18 @@ public class AmbariManagementControllerTest {
       // Expected
     }
 
-    Service s1 = serviceFactory.createNew(foo, "HDFS", repositoryVersion);
+    Service s1 = serviceFactory.createNew(foo, null, new ArrayList<ServiceKey>(), "HDFS", "", repositoryVersion);
     foo.addService(s1);
-    Service s2 = serviceFactory.createNew(c1, "HDFS", repositoryVersion);
+    Service s2 = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "HDFS", "", repositoryVersion);
     c1.addService(s2);
-    Service s3 = serviceFactory.createNew(c2, "HDFS", repositoryVersion);
+    Service s3 = serviceFactory.createNew(c2, null, new ArrayList<ServiceKey>(), "HDFS", "", repositoryVersion);
     c2.addService(s3);
 
 
     try {
       set1.clear();
       ServiceComponentHostRequest rInvalid =
-          new ServiceComponentHostRequest(clusterFoo, "HDFS", "NAMENODE", host1, null);
+          new ServiceComponentHostRequest(clusterFoo, "", "HDFS", "NAMENODE", host1, null);
       set1.add(rInvalid);
       controller.createHostComponents(set1);
       fail("Expected failure for invalid service");
@@ -1680,7 +1680,7 @@ public class AmbariManagementControllerTest {
     try {
       set1.clear();
       ServiceComponentHostRequest rInvalid =
-          new ServiceComponentHostRequest(clusterFoo, "HDFS", "NAMENODE", host1, null);
+          new ServiceComponentHostRequest(clusterFoo, "", "HDFS", "NAMENODE", host1, null);
       set1.add(rInvalid);
       controller.createHostComponents(set1);
       fail("Expected failure for invalid host");
@@ -1707,7 +1707,7 @@ public class AmbariManagementControllerTest {
     try {
       set1.clear();
       ServiceComponentHostRequest rInvalid =
-          new ServiceComponentHostRequest(clusterFoo, "HDFS", "NAMENODE", host1, null);
+          new ServiceComponentHostRequest(clusterFoo, "", "HDFS", "NAMENODE", host1, null);
       set1.add(rInvalid);
       controller.createHostComponents(set1);
       fail("Expected failure for invalid host cluster mapping");
@@ -1725,16 +1725,16 @@ public class AmbariManagementControllerTest {
 
     set1.clear();
     ServiceComponentHostRequest valid =
-        new ServiceComponentHostRequest(clusterFoo, "HDFS", "NAMENODE", host1, null);
+        new ServiceComponentHostRequest(clusterFoo, "", "HDFS", "NAMENODE", host1, null);
     set1.add(valid);
     controller.createHostComponents(set1);
 
     try {
       set1.clear();
       ServiceComponentHostRequest rInvalid1 =
-          new ServiceComponentHostRequest(clusterFoo, "HDFS", "NAMENODE", host2, null);
+          new ServiceComponentHostRequest(clusterFoo, "", "HDFS", "NAMENODE", host2, null);
       ServiceComponentHostRequest rInvalid2 =
-          new ServiceComponentHostRequest(clusterFoo, "HDFS", "NAMENODE", host2, null);
+          new ServiceComponentHostRequest(clusterFoo, "", "HDFS", "NAMENODE", host2, null);
       set1.add(rInvalid1);
       set1.add(rInvalid2);
       controller.createHostComponents(set1);
@@ -1746,10 +1746,10 @@ public class AmbariManagementControllerTest {
     try {
       set1.clear();
       ServiceComponentHostRequest rInvalid1 =
-          new ServiceComponentHostRequest(cluster1, "HDFS", "NAMENODE", host2,
+          new ServiceComponentHostRequest(cluster1, "", "HDFS", "NAMENODE", host2,
               null);
       ServiceComponentHostRequest rInvalid2 =
-          new ServiceComponentHostRequest(cluster2, "HDFS", "NAMENODE", host3,
+          new ServiceComponentHostRequest(cluster2, "", "HDFS", "NAMENODE", host3,
               null);
       set1.add(rInvalid1);
       set1.add(rInvalid2);
@@ -1762,10 +1762,10 @@ public class AmbariManagementControllerTest {
     try {
       set1.clear();
       ServiceComponentHostRequest rInvalid1 =
-          new ServiceComponentHostRequest(clusterFoo, "HDFS", "NAMENODE", host1,
+          new ServiceComponentHostRequest(clusterFoo, "", "HDFS", "NAMENODE", host1,
               null);
       ServiceComponentHostRequest rInvalid2 =
-          new ServiceComponentHostRequest(clusterFoo, "HDFS", "NAMENODE", host2,
+          new ServiceComponentHostRequest(clusterFoo, "", "HDFS", "NAMENODE", host2,
               null);
       set1.add(rInvalid1);
       set1.add(rInvalid2);
@@ -1781,14 +1781,14 @@ public class AmbariManagementControllerTest {
 
     set1.clear();
     ServiceComponentHostRequest valid1 =
-        new ServiceComponentHostRequest(cluster1, "HDFS", "NAMENODE", host1,
+        new ServiceComponentHostRequest(cluster1, "", "HDFS", "NAMENODE", host1,
             null);
     set1.add(valid1);
     controller.createHostComponents(set1);
 
     set1.clear();
     ServiceComponentHostRequest valid2 =
-        new ServiceComponentHostRequest(cluster2, "HDFS", "NAMENODE", host1,
+        new ServiceComponentHostRequest(cluster2, "", "HDFS", "NAMENODE", host1,
             null);
     set1.add(valid2);
     controller.createHostComponents(set1);
@@ -1965,7 +1965,7 @@ public class AmbariManagementControllerTest {
     Config c1 = configFactory.createNew(cluster, "hdfs-site", "v1",  properties, propertiesAttributes);
     configs.put(c1.getType(), c1);
 
-    ServiceRequest r = new ServiceRequest(cluster1, serviceName, repositoryVersion02.getId(),
+    ServiceRequest r = new ServiceRequest(cluster1, "", serviceName, repositoryVersion02.getId(),
         State.INSTALLED.toString(), null);
 
     Set<ServiceRequest> requests = new HashSet<>();
@@ -2017,7 +2017,7 @@ public class AmbariManagementControllerTest {
     configs.put(c1.getType(), c1);
     configs.put(c2.getType(), c2);
 
-    ServiceRequest r = new ServiceRequest(cluster1, serviceName, repositoryVersion02.getId(),
+    ServiceRequest r = new ServiceRequest(cluster1, "", serviceName, repositoryVersion02.getId(),
         State.INSTALLED.toString(), null);
 
     Set<ServiceRequest> requests = new HashSet<>();
@@ -2126,7 +2126,7 @@ public class AmbariManagementControllerTest {
       }
     }
 
-    r = new ServiceRequest(cluster1, serviceName, repositoryVersion02.getId(), State.STARTED.toString(),
+    r = new ServiceRequest(cluster1, "", serviceName, repositoryVersion02.getId(), State.STARTED.toString(),
         null);
     requests.clear();
     requests.add(r);
@@ -2173,7 +2173,7 @@ public class AmbariManagementControllerTest {
       }
     }
 
-    r = new ServiceRequest(cluster1, serviceName, repositoryVersion02.getId(), State.INSTALLED.toString(),
+    r = new ServiceRequest(cluster1, "", serviceName, repositoryVersion02.getId(), State.INSTALLED.toString(),
         null);
     requests.clear();
     requests.add(r);
@@ -2271,17 +2271,17 @@ public class AmbariManagementControllerTest {
 
     clusters.addCluster(cluster1, stackId);
     Cluster c1 = clusters.getCluster(cluster1);
-    Service s1 = serviceFactory.createNew(c1, "HDFS", repositoryVersion);
+    Service s1 = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "HDFS", "", repositoryVersion);
 
     c1.addService(s1);
     s1.setDesiredState(State.INSTALLED);
 
-    ServiceRequest r = new ServiceRequest(cluster1, null, null, null, null);
+    ServiceRequest r = new ServiceRequest(cluster1, null, null, null, null, null);
     Set<ServiceResponse> resp = ServiceResourceProviderTest.getServices(controller, Collections.singleton(r));
 
     ServiceResponse resp1 = resp.iterator().next();
 
-    Assert.assertEquals(s1.getClusterId(), resp1.getClusterId().longValue());
+    Assert.assertTrue(s1.getClusterId().longValue() == resp1.getClusterId().longValue());
     Assert.assertEquals(s1.getCluster().getClusterName(), resp1.getClusterName());
     Assert.assertEquals(s1.getName(), resp1.getServiceName());
     Assert.assertEquals("HDP-0.1", s1.getDesiredStackId().getStackId());
@@ -2306,11 +2306,11 @@ public class AmbariManagementControllerTest {
     c1.setDesiredStackVersion(stackId);
     c2.setDesiredStackVersion(stackId);
 
-    Service s1 = serviceFactory.createNew(c1, "HDFS", repositoryVersion);
-    Service s2 = serviceFactory.createNew(c1, "MAPREDUCE", repositoryVersion);
-    Service s3 = serviceFactory.createNew(c1, "HBASE", repositoryVersion);
-    Service s4 = serviceFactory.createNew(c2, "HIVE", repositoryVersion);
-    Service s5 = serviceFactory.createNew(c2, "ZOOKEEPER", repositoryVersion);
+    Service s1 = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "HDFS", "", repositoryVersion);
+    Service s2 = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(),"MAPREDUCE", "", repositoryVersion);
+    Service s3 = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(),"HBASE", "", repositoryVersion);
+    Service s4 = serviceFactory.createNew(c2, null, new ArrayList<ServiceKey>(),"HIVE", "", repositoryVersion);
+    Service s5 = serviceFactory.createNew(c2, null, new ArrayList<ServiceKey>(),"ZOOKEEPER", "", repositoryVersion);
 
     c1.addService(s1);
     c1.addService(s2);
@@ -2322,7 +2322,7 @@ public class AmbariManagementControllerTest {
     s2.setDesiredState(State.INSTALLED);
     s4.setDesiredState(State.INSTALLED);
 
-    ServiceRequest r = new ServiceRequest(null, null, null, null, null);
+    ServiceRequest r = new ServiceRequest(null, null, null, null, null, null);
     Set<ServiceResponse> resp;
 
     try {
@@ -2332,35 +2332,35 @@ public class AmbariManagementControllerTest {
       // Expected
     }
 
-    r = new ServiceRequest(c1.getClusterName(), null, null, null, null);
+    r = new ServiceRequest(c1.getClusterName(), null, null, null, null, null);
     resp = ServiceResourceProviderTest.getServices(controller, Collections.singleton(r));
     Assert.assertEquals(3, resp.size());
 
-    r = new ServiceRequest(c1.getClusterName(), s2.getName(), null, null, null);
+    r = new ServiceRequest(c1.getClusterName(), "", s2.getName(), null, null, null);
     resp = ServiceResourceProviderTest.getServices(controller, Collections.singleton(r));
     Assert.assertEquals(1, resp.size());
     Assert.assertEquals(s2.getName(), resp.iterator().next().getServiceName());
 
     try {
-      r = new ServiceRequest(c2.getClusterName(), s1.getName(), null, null, null);
+      r = new ServiceRequest(c2.getClusterName(), "", s1.getName(), null, null, null);
       ServiceResourceProviderTest.getServices(controller, Collections.singleton(r));
       fail("Expected failure for invalid service");
     } catch (Exception e) {
       // Expected
     }
 
-    r = new ServiceRequest(c1.getClusterName(), null, null, "INSTALLED", null);
+    r = new ServiceRequest(c1.getClusterName(), "", null, null, "INSTALLED", null);
     resp = ServiceResourceProviderTest.getServices(controller, Collections.singleton(r));
     Assert.assertEquals(2, resp.size());
 
-    r = new ServiceRequest(c2.getClusterName(), null, null, "INIT", null);
+    r = new ServiceRequest(c2.getClusterName(), "", null, null, "INIT", null);
     resp = ServiceResourceProviderTest.getServices(controller, Collections.singleton(r));
     Assert.assertEquals(1, resp.size());
 
     ServiceRequest r1, r2, r3;
-    r1 = new ServiceRequest(c1.getClusterName(), null, null, "INSTALLED", null);
-    r2 = new ServiceRequest(c2.getClusterName(), null, null, "INIT", null);
-    r3 = new ServiceRequest(c2.getClusterName(), null, null, "INIT", null);
+    r1 = new ServiceRequest(c1.getClusterName(), "", null, null, "INSTALLED", null);
+    r2 = new ServiceRequest(c2.getClusterName(), "", null, null, "INIT", null);
+    r3 = new ServiceRequest(c2.getClusterName(), "", null, null, "INIT", null);
 
     Set<ServiceRequest> reqs = new HashSet<>();
     reqs.addAll(Arrays.asList(r1, r2, r3));
@@ -2381,14 +2381,14 @@ public class AmbariManagementControllerTest {
     clusters.addCluster(cluster1, stackId);
     Cluster c1 = clusters.getCluster(cluster1);
     c1.setDesiredStackVersion(stackId);
-    Service s1 = serviceFactory.createNew(c1, "HDFS", repositoryVersion);
+    Service s1 = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "HDFS", "", repositoryVersion);
     c1.addService(s1);
     s1.setDesiredState(State.INSTALLED);
     ServiceComponent sc1 = serviceComponentFactory.createNew(s1, "DATANODE");
     s1.addServiceComponent(sc1);
     sc1.setDesiredState(State.UNINSTALLED);
 
-    ServiceComponentRequest r = new ServiceComponentRequest(cluster1,
+    ServiceComponentRequest r = new ServiceComponentRequest(cluster1, "",
        s1.getName(), sc1.getName(), null);
 
     Set<ServiceComponentResponse> resps = ComponentResourceProviderTest.getComponents(controller, Collections.singleton(r));
@@ -2402,7 +2402,7 @@ public class AmbariManagementControllerTest {
     Assert.assertEquals("HDP-0.2", resp.getDesiredStackId());
     Assert.assertEquals(sc1.getDesiredState().toString(),
         resp.getDesiredState());
-    Assert.assertEquals(c1.getClusterId(), resp.getClusterId().longValue());
+    Assert.assertTrue(c1.getClusterId().longValue() == resp.getClusterId().longValue());
 
   }
 
@@ -2421,11 +2421,11 @@ public class AmbariManagementControllerTest {
     Cluster c1 = clusters.getCluster(cluster1);
     Cluster c2 = clusters.getCluster(cluster2);
 
-    Service s1 = serviceFactory.createNew(c1, "HDFS", repositoryVersion);
-    Service s2 = serviceFactory.createNew(c1, "MAPREDUCE", repositoryVersion);
-    Service s3 = serviceFactory.createNew(c1, "HBASE", repositoryVersion);
-    Service s4 = serviceFactory.createNew(c2, "HIVE", repositoryVersion);
-    Service s5 = serviceFactory.createNew(c2, "ZOOKEEPER", repositoryVersion);
+    Service s1 = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "HDFS", "", repositoryVersion);
+    Service s2 = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "MAPREDUCE", "", repositoryVersion);
+    Service s3 = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "HBASE", "", repositoryVersion);
+    Service s4 = serviceFactory.createNew(c2, null, new ArrayList<ServiceKey>(), "HIVE", "", repositoryVersion);
+    Service s5 = serviceFactory.createNew(c2, null, new ArrayList<ServiceKey>(), "ZOOKEEPER", "", repositoryVersion);
 
     c1.addService(s1);
     c1.addService(s2);
@@ -2462,7 +2462,7 @@ public class AmbariManagementControllerTest {
     sc7.setDesiredState(State.UNINSTALLED);
     sc8.setDesiredState(State.UNINSTALLED);
 
-    ServiceComponentRequest r = new ServiceComponentRequest(null, null,
+    ServiceComponentRequest r = new ServiceComponentRequest(null, null, null,
         null, null);
 
     try {
@@ -2473,25 +2473,25 @@ public class AmbariManagementControllerTest {
     }
 
     // all comps per cluster
-    r = new ServiceComponentRequest(c1.getClusterName(),
+    r = new ServiceComponentRequest(c1.getClusterName(), null,
         null, null, null);
     Set<ServiceComponentResponse> resps = ComponentResourceProviderTest.getComponents(controller, Collections.singleton(r));
     Assert.assertEquals(3, resps.size());
 
     // all comps per cluster filter on state
-    r = new ServiceComponentRequest(c2.getClusterName(),
+    r = new ServiceComponentRequest(c2.getClusterName(), null,
         null, null, State.UNINSTALLED.toString());
     resps = ComponentResourceProviderTest.getComponents(controller, Collections.singleton(r));
     Assert.assertEquals(4, resps.size());
 
     // all comps for given service
-    r = new ServiceComponentRequest(c2.getClusterName(),
+    r = new ServiceComponentRequest(c2.getClusterName(), null,
         s5.getName(), null, null);
     resps = ComponentResourceProviderTest.getComponents(controller, Collections.singleton(r));
     Assert.assertEquals(2, resps.size());
 
     // all comps for given service filter by state
-    r = new ServiceComponentRequest(c2.getClusterName(),
+    r = new ServiceComponentRequest(c2.getClusterName(), null,
         s4.getName(), null, State.INIT.toString());
     resps = ComponentResourceProviderTest.getComponents(controller, Collections.singleton(r));
     Assert.assertEquals(1, resps.size());
@@ -2499,7 +2499,7 @@ public class AmbariManagementControllerTest {
         resps.iterator().next().getComponentName());
 
     // get single given comp
-    r = new ServiceComponentRequest(c2.getClusterName(),
+    r = new ServiceComponentRequest(c2.getClusterName(), null,
         null, sc5.getName(), State.INIT.toString());
     resps = ComponentResourceProviderTest.getComponents(controller, Collections.singleton(r));
     Assert.assertEquals(1, resps.size());
@@ -2507,7 +2507,7 @@ public class AmbariManagementControllerTest {
         resps.iterator().next().getComponentName());
 
     // get single given comp and given svc
-    r = new ServiceComponentRequest(c2.getClusterName(),
+    r = new ServiceComponentRequest(c2.getClusterName(), null,
         s4.getName(), sc5.getName(), State.INIT.toString());
     resps = ComponentResourceProviderTest.getComponents(controller, Collections.singleton(r));
     Assert.assertEquals(1, resps.size());
@@ -2517,11 +2517,11 @@ public class AmbariManagementControllerTest {
 
     ServiceComponentRequest r1, r2, r3;
     Set<ServiceComponentRequest> reqs = new HashSet<>();
-    r1 = new ServiceComponentRequest(c2.getClusterName(),
+    r1 = new ServiceComponentRequest(c2.getClusterName(), null,
         null, null, State.UNINSTALLED.toString());
-    r2 = new ServiceComponentRequest(c1.getClusterName(),
+    r2 = new ServiceComponentRequest(c1.getClusterName(), null,
         null, null, null);
-    r3 = new ServiceComponentRequest(c1.getClusterName(),
+    r3 = new ServiceComponentRequest(c1.getClusterName(), null,
         null, null, State.INIT.toString());
     reqs.addAll(Arrays.asList(r1, r2, r3));
     resps = ComponentResourceProviderTest.getComponents(controller, reqs);
@@ -2536,7 +2536,7 @@ public class AmbariManagementControllerTest {
     Cluster c1 = setupClusterWithHosts(cluster1, "HDP-0.1", Lists.newArrayList(host1), "centos5");
     RepositoryVersionEntity repositoryVersion = repositoryVersion01;
 
-    Service s1 = serviceFactory.createNew(c1, "HDFS", repositoryVersion);
+    Service s1 = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "HDFS", "", repositoryVersion);
     c1.addService(s1);
     ServiceComponent sc1 = serviceComponentFactory.createNew(s1, "DATANODE");
     s1.addServiceComponent(sc1);
@@ -2552,7 +2552,7 @@ public class AmbariManagementControllerTest {
 
 
     ServiceComponentHostRequest r =
-        new ServiceComponentHostRequest(c1.getClusterName(),
+        new ServiceComponentHostRequest(c1.getClusterName(), null,
             null, null, null, null);
     Set<ServiceComponentHostResponse> resps = controller.getHostComponents(Collections.singleton(r));
     Assert.assertEquals(1, resps.size());
@@ -2621,7 +2621,7 @@ public class AmbariManagementControllerTest {
 
     ConfigurationRequest cr1;
     cr1 = new ConfigurationRequest(cluster1, "hdfs-site", "version1",
-        configs, null);
+        configs, null, 1L, 1L);
     ClusterRequest crReq = new ClusterRequest(clusterId, cluster1, null, null);
     crReq.setDesiredConfig(Collections.singletonList(cr1));
     controller.updateClusters(Collections.singleton(crReq), null);
@@ -2650,30 +2650,30 @@ public class AmbariManagementControllerTest {
     s1.getServiceComponent(componentName3).getServiceComponentHost(host2).updateActualConfigs(actualConfig);
 
     ServiceComponentHostRequest r =
-        new ServiceComponentHostRequest(cluster1, null, null, null, null);
+        new ServiceComponentHostRequest(cluster1, null, null, null, null, null);
     Set<ServiceComponentHostResponse> resps = controller.getHostComponents(Collections.singleton(r));
     Assert.assertEquals(5, resps.size());
 
     //Get all host components with stale config = true
-    r = new ServiceComponentHostRequest(cluster1, null, null, null, null);
+    r = new ServiceComponentHostRequest(cluster1, null, null, null, null, null);
     r.setStaleConfig("true");
     resps = controller.getHostComponents(Collections.singleton(r));
     Assert.assertEquals(2, resps.size());
 
     //Get all host components with stale config = false
-    r = new ServiceComponentHostRequest(cluster1, null, null, null, null);
+    r = new ServiceComponentHostRequest(cluster1, null, null, null, null, null);
     r.setStaleConfig("false");
     resps = controller.getHostComponents(Collections.singleton(r));
     Assert.assertEquals(3, resps.size());
 
     //Get all host components with stale config = false and hostname filter
-    r = new ServiceComponentHostRequest(cluster1, null, null, host1, null);
+    r = new ServiceComponentHostRequest(cluster1, null, null, host1, null, null);
     r.setStaleConfig("false");
     resps = controller.getHostComponents(Collections.singleton(r));
     Assert.assertEquals(2, resps.size());
 
     //Get all host components with stale config = false and hostname filter
-    r = new ServiceComponentHostRequest(cluster1, null, null, host2, null);
+    r = new ServiceComponentHostRequest(cluster1, null, null, host2, null, null);
     r.setStaleConfig("true");
     resps = controller.getHostComponents(Collections.singleton(r));
     Assert.assertEquals(1, resps.size());
@@ -2729,30 +2729,30 @@ public class AmbariManagementControllerTest {
         setComponentAdminState(HostComponentAdminState.INSERVICE);
 
     ServiceComponentHostRequest r =
-        new ServiceComponentHostRequest(cluster1, null, null, null, null);
+        new ServiceComponentHostRequest(cluster1, null, null, null, null, null);
     Set<ServiceComponentHostResponse> resps = controller.getHostComponents(Collections.singleton(r));
     Assert.assertEquals(5, resps.size());
 
     //Get all host components with decommissiond = true
-    r = new ServiceComponentHostRequest(cluster1, null, null, null, null);
+    r = new ServiceComponentHostRequest(cluster1, null, null, null, null, null);
     r.setAdminState("DECOMMISSIONED");
     resps = controller.getHostComponents(Collections.singleton(r));
     Assert.assertEquals(1, resps.size());
 
     //Get all host components with decommissioned = false
-    r = new ServiceComponentHostRequest(cluster1, null, null, null, null);
+    r = new ServiceComponentHostRequest(cluster1, null, null, null, null, null);
     r.setAdminState("INSERVICE");
     resps = controller.getHostComponents(Collections.singleton(r));
     Assert.assertEquals(1, resps.size());
 
     //Get all host components with decommissioned = some random string
-    r = new ServiceComponentHostRequest(cluster1, null, null, null, null);
+    r = new ServiceComponentHostRequest(cluster1, null, null, null, null, null);
     r.setAdminState("INSTALLED");
     resps = controller.getHostComponents(Collections.singleton(r));
     Assert.assertEquals(0, resps.size());
 
     //Update adminState
-    r = new ServiceComponentHostRequest(cluster1, "HDFS", "DATANODE", host2, null);
+    r = new ServiceComponentHostRequest(cluster1, "", "HDFS", "DATANODE", host2, null);
     r.setAdminState("DECOMMISSIONED");
     try {
       updateHostComponents(Collections.singleton(r), new HashMap<>(), false);
@@ -2932,9 +2932,9 @@ public class AmbariManagementControllerTest {
 
     RepositoryVersionEntity repositoryVersion = repositoryVersion02;
 
-    Service s1 = serviceFactory.createNew(c1, "HDFS", repositoryVersion);
-    Service s2 = serviceFactory.createNew(c1, "MAPREDUCE", repositoryVersion);
-    Service s3 = serviceFactory.createNew(c1, "HBASE", repositoryVersion);
+    Service s1 = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "HDFS", "", repositoryVersion);
+    Service s2 = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "MAPREDUCE", "", repositoryVersion);
+    Service s3 = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "HBASE", "", repositoryVersion);
 
     c1.addService(s1);
     c1.addService(s2);
@@ -2975,7 +2975,7 @@ public class AmbariManagementControllerTest {
     sch5.setDesiredState(State.UNINSTALLED);
 
     ServiceComponentHostRequest r =
-        new ServiceComponentHostRequest(null, null, null, null, null);
+        new ServiceComponentHostRequest(null, null, null, null, null, null);
 
     try {
       controller.getHostComponents(Collections.singleton(r));
@@ -2985,77 +2985,77 @@ public class AmbariManagementControllerTest {
     }
 
     // all across cluster
-    r = new ServiceComponentHostRequest(c1.getClusterName(), null,
+    r = new ServiceComponentHostRequest(c1.getClusterName(), null, null,
         null, null, null);
     Set<ServiceComponentHostResponse> resps = controller.getHostComponents(Collections.singleton(r));
     Assert.assertEquals(6, resps.size());
 
     // all for service
-    r = new ServiceComponentHostRequest(c1.getClusterName(), s1.getName(),
+    r = new ServiceComponentHostRequest(c1.getClusterName(), "", s1.getName(),
         null, null, null);
     resps = controller.getHostComponents(Collections.singleton(r));
     Assert.assertEquals(5, resps.size());
 
     // all for component
-    r = new ServiceComponentHostRequest(c1.getClusterName(), null,
+    r = new ServiceComponentHostRequest(c1.getClusterName(), null, null,
         sc3.getName(), null, null);
     resps = controller.getHostComponents(Collections.singleton(r));
     Assert.assertEquals(1, resps.size());
 
     // all for host
-    r = new ServiceComponentHostRequest(c1.getClusterName(), null,
+    r = new ServiceComponentHostRequest(c1.getClusterName(), null, null,
         null, host2, null);
     resps = controller.getHostComponents(Collections.singleton(r));
     Assert.assertEquals(2, resps.size());
 
     // all across cluster with state filter
-    r = new ServiceComponentHostRequest(c1.getClusterName(), null,
+    r = new ServiceComponentHostRequest(c1.getClusterName(), null, null,
         null, null, State.UNINSTALLED.toString());
     resps = controller.getHostComponents(Collections.singleton(r));
     Assert.assertEquals(1, resps.size());
 
     // all for service with state filter
-    r = new ServiceComponentHostRequest(c1.getClusterName(), s1.getName(),
+    r = new ServiceComponentHostRequest(c1.getClusterName(), "", s1.getName(),
         null, null, State.INIT.toString());
     resps = controller.getHostComponents(Collections.singleton(r));
     Assert.assertEquals(2, resps.size());
 
     // all for component with state filter
-    r = new ServiceComponentHostRequest(c1.getClusterName(), null,
+    r = new ServiceComponentHostRequest(c1.getClusterName(), "", null,
         sc3.getName(), null, State.INSTALLED.toString());
     resps = controller.getHostComponents(Collections.singleton(r));
     Assert.assertEquals(0, resps.size());
 
     // all for host with state filter
-    r = new ServiceComponentHostRequest(c1.getClusterName(), null,
+    r = new ServiceComponentHostRequest(c1.getClusterName(), "", null,
         null, host2, State.INIT.toString());
     resps = controller.getHostComponents(Collections.singleton(r));
     Assert.assertEquals(1, resps.size());
 
     // for service and host
-    r = new ServiceComponentHostRequest(c1.getClusterName(), s3.getName(),
+    r = new ServiceComponentHostRequest(c1.getClusterName(), "", s3.getName(),
         null, host1, null);
     resps = controller.getHostComponents(Collections.singleton(r));
     Assert.assertEquals(0, resps.size());
 
     // single sch - given service and host and component
-    r = new ServiceComponentHostRequest(c1.getClusterName(), s3.getName(),
+    r = new ServiceComponentHostRequest(c1.getClusterName(), "", s3.getName(),
         sc3.getName(), host3, State.INSTALLED.toString());
     resps = controller.getHostComponents(Collections.singleton(r));
     Assert.assertEquals(0, resps.size());
 
     // single sch - given service and host and component
-    r = new ServiceComponentHostRequest(c1.getClusterName(), s3.getName(),
+    r = new ServiceComponentHostRequest(c1.getClusterName(), "", s3.getName(),
         sc3.getName(), host3, null);
     resps = controller.getHostComponents(Collections.singleton(r));
     Assert.assertEquals(1, resps.size());
 
     ServiceComponentHostRequest r1, r2, r3;
-    r1 = new ServiceComponentHostRequest(c1.getClusterName(), null,
+    r1 = new ServiceComponentHostRequest(c1.getClusterName(), "", null,
         null, host3, null);
-    r2 = new ServiceComponentHostRequest(c1.getClusterName(), s3.getName(),
+    r2 = new ServiceComponentHostRequest(c1.getClusterName(), "", s3.getName(),
         sc3.getName(), host2, null);
-    r3 = new ServiceComponentHostRequest(c1.getClusterName(), null,
+    r3 = new ServiceComponentHostRequest(c1.getClusterName(), "", null,
         null, host2, null);
     Set<ServiceComponentHostRequest> reqs =
       new HashSet<>();
@@ -3162,7 +3162,7 @@ public class AmbariManagementControllerTest {
     ServiceRequest r;
 
     try {
-      r = new ServiceRequest(cluster1, serviceName, repositoryVersion02.getId(),
+      r = new ServiceRequest(cluster1, "", serviceName, repositoryVersion02.getId(),
           State.INSTALLING.toString(), null);
       reqs.clear();
       reqs.add(r);
@@ -3172,7 +3172,7 @@ public class AmbariManagementControllerTest {
       // Expected
     }
 
-    r = new ServiceRequest(cluster1, serviceName, repositoryVersion02.getId(), State.INSTALLED.toString(),
+    r = new ServiceRequest(cluster1, "", serviceName, repositoryVersion02.getId(), State.INSTALLED.toString(),
         null);
     reqs.clear();
     reqs.add(r);
@@ -3218,9 +3218,9 @@ public class AmbariManagementControllerTest {
     ServiceRequest req1, req2;
     try {
       reqs.clear();
-      req1 = new ServiceRequest(cluster1, serviceName1, repositoryVersion02.getId(),
+      req1 = new ServiceRequest(cluster1, "", serviceName1, repositoryVersion02.getId(),
           State.INSTALLED.toString(), null);
-      req2 = new ServiceRequest(cluster2, serviceName2, repositoryVersion02.getId(),
+      req2 = new ServiceRequest(cluster2, "", serviceName2, repositoryVersion02.getId(),
           State.INSTALLED.toString(), null);
       reqs.add(req1);
       reqs.add(req2);
@@ -3232,9 +3232,9 @@ public class AmbariManagementControllerTest {
 
     try {
       reqs.clear();
-      req1 = new ServiceRequest(cluster1, serviceName1, repositoryVersion02.getId(),
+      req1 = new ServiceRequest(cluster1, "", serviceName1, repositoryVersion02.getId(),
           State.INSTALLED.toString(), null);
-      req2 = new ServiceRequest(cluster1, serviceName1, repositoryVersion02.getId(),
+      req2 = new ServiceRequest(cluster1, "", serviceName1, repositoryVersion02.getId(),
           State.INSTALLED.toString(), null);
       reqs.add(req1);
       reqs.add(req2);
@@ -3249,9 +3249,9 @@ public class AmbariManagementControllerTest {
 
     try {
       reqs.clear();
-      req1 = new ServiceRequest(cluster1, serviceName1, repositoryVersion02.getId(),
+      req1 = new ServiceRequest(cluster1, "", serviceName1, repositoryVersion02.getId(),
           State.INSTALLED.toString(), null);
-      req2 = new ServiceRequest(cluster1, serviceName2, repositoryVersion02.getId(),
+      req2 = new ServiceRequest(cluster1, "", serviceName2, repositoryVersion02.getId(),
           State.STARTED.toString(), null);
       reqs.add(req1);
       reqs.add(req2);
@@ -3300,22 +3300,22 @@ public class AmbariManagementControllerTest {
     Set<ServiceComponentHostRequest> set1 =
       new HashSet<>();
     ServiceComponentHostRequest r1 =
-        new ServiceComponentHostRequest(cluster1, serviceName1,
+        new ServiceComponentHostRequest(cluster1, "", serviceName1,
             componentName1, host1, State.INIT.toString());
     ServiceComponentHostRequest r2 =
-        new ServiceComponentHostRequest(cluster1, serviceName1,
+        new ServiceComponentHostRequest(cluster1, "", serviceName1,
             componentName2, host1, State.INIT.toString());
     ServiceComponentHostRequest r3 =
-        new ServiceComponentHostRequest(cluster1, serviceName1,
+        new ServiceComponentHostRequest(cluster1, "", serviceName1,
             componentName1, host2, State.INIT.toString());
     ServiceComponentHostRequest r4 =
-        new ServiceComponentHostRequest(cluster1, serviceName1,
+        new ServiceComponentHostRequest(cluster1, "", serviceName1,
             componentName2, host2, State.INIT.toString());
     ServiceComponentHostRequest r5 =
-        new ServiceComponentHostRequest(cluster1, serviceName2,
+        new ServiceComponentHostRequest(cluster1, "", serviceName2,
             componentName3, host1, State.INIT.toString());
     ServiceComponentHostRequest r6 =
-        new ServiceComponentHostRequest(cluster1, serviceName1,
+        new ServiceComponentHostRequest(cluster1, "", serviceName1,
             componentName4, host2, State.INIT.toString());
 
     set1.add(r1);
@@ -3363,7 +3363,7 @@ public class AmbariManagementControllerTest {
     ServiceRequest req1, req2;
     try {
       reqs.clear();
-      req1 = new ServiceRequest(cluster1, serviceName1, repositoryVersion02.getId(),
+      req1 = new ServiceRequest(cluster1, "", serviceName1, repositoryVersion02.getId(),
           State.STARTED.toString(), null);
       reqs.add(req1);
       ServiceResourceProviderTest.updateServices(controller, reqs, mapRequestProps, true, false);
@@ -3390,7 +3390,7 @@ public class AmbariManagementControllerTest {
 
     try {
       reqs.clear();
-      req1 = new ServiceRequest(cluster1, serviceName1, repositoryVersion02.getId(),
+      req1 = new ServiceRequest(cluster1, "", serviceName1, repositoryVersion02.getId(),
           State.STARTED.toString(), null);
       reqs.add(req1);
       ServiceResourceProviderTest.updateServices(controller, reqs, mapRequestProps, true, false);
@@ -3418,9 +3418,9 @@ public class AmbariManagementControllerTest {
     sch5.setState(State.INSTALLED);
 
     reqs.clear();
-    req1 = new ServiceRequest(cluster1, serviceName1, repositoryVersion02.getId(),
+    req1 = new ServiceRequest(cluster1, "", serviceName1, repositoryVersion02.getId(),
         State.STARTED.toString(), null);
-    req2 = new ServiceRequest(cluster1, serviceName2, repositoryVersion02.getId(),
+    req2 = new ServiceRequest(cluster1, "", serviceName2, repositoryVersion02.getId(),
         State.STARTED.toString(), null);
     reqs.add(req1);
     reqs.add(req2);
@@ -3506,9 +3506,9 @@ public class AmbariManagementControllerTest {
 
     // test no-op
     reqs.clear();
-    req1 = new ServiceRequest(cluster1, serviceName1, repositoryVersion02.getId(),
+    req1 = new ServiceRequest(cluster1, "", serviceName1, repositoryVersion02.getId(),
         State.STARTED.toString(), null);
-    req2 = new ServiceRequest(cluster1, serviceName2, repositoryVersion02.getId(),
+    req2 = new ServiceRequest(cluster1, "", serviceName2, repositoryVersion02.getId(),
         State.STARTED.toString(), null);
     reqs.add(req1);
     reqs.add(req2);
@@ -3544,19 +3544,19 @@ public class AmbariManagementControllerTest {
     Set<ServiceComponentHostRequest> set1 =
       new HashSet<>();
     ServiceComponentHostRequest r1 =
-        new ServiceComponentHostRequest(cluster1, serviceName1,
+        new ServiceComponentHostRequest(cluster1, "", serviceName1,
             componentName1, host1, State.INIT.toString());
     ServiceComponentHostRequest r2 =
-        new ServiceComponentHostRequest(cluster1, serviceName1,
+        new ServiceComponentHostRequest(cluster1, "", serviceName1,
             componentName2, host1, State.INIT.toString());
     ServiceComponentHostRequest r3 =
-        new ServiceComponentHostRequest(cluster1, serviceName1,
+        new ServiceComponentHostRequest(cluster1, "", serviceName1,
             componentName1, host2, State.INIT.toString());
     ServiceComponentHostRequest r4 =
-        new ServiceComponentHostRequest(cluster1, serviceName1,
+        new ServiceComponentHostRequest(cluster1, "", serviceName1,
             componentName2, host2, State.INIT.toString());
     ServiceComponentHostRequest r5 =
-        new ServiceComponentHostRequest(cluster1, serviceName1,
+        new ServiceComponentHostRequest(cluster1, "", serviceName1,
             componentName3, host1, State.INIT.toString());
 
     set1.add(r1);
@@ -3597,13 +3597,13 @@ public class AmbariManagementControllerTest {
     ServiceComponentRequest req1, req2, req3;
 
     // confirm an UNKOWN doesn't fail
-    req1 = new ServiceComponentRequest(cluster1, serviceName1,
+    req1 = new ServiceComponentRequest(cluster1, "", serviceName1,
         sc3.getName(), State.INSTALLED.toString());
     reqs.add(req1);
     ComponentResourceProviderTest.updateComponents(controller, reqs, Collections.emptyMap(), true);
     try {
       reqs.clear();
-      req1 = new ServiceComponentRequest(cluster1, serviceName1,
+      req1 = new ServiceComponentRequest(cluster1, "", serviceName1,
           sc1.getName(), State.INIT.toString());
       reqs.add(req1);
       ComponentResourceProviderTest.updateComponents(controller, reqs, Collections.emptyMap(), true);
@@ -3629,7 +3629,7 @@ public class AmbariManagementControllerTest {
 
     try {
       reqs.clear();
-      req1 = new ServiceComponentRequest(cluster1, serviceName1,
+      req1 = new ServiceComponentRequest(cluster1, "", serviceName1,
           sc1.getName(), State.STARTED.toString());
       reqs.add(req1);
       ComponentResourceProviderTest.updateComponents(controller, reqs, Collections.emptyMap(), true);
@@ -3654,11 +3654,11 @@ public class AmbariManagementControllerTest {
     sch5.setState(State.INIT);
 
     reqs.clear();
-    req1 = new ServiceComponentRequest(cluster1, serviceName1,
+    req1 = new ServiceComponentRequest(cluster1, "", serviceName1,
         sc1.getName(), State.INSTALLED.toString());
-    req2 = new ServiceComponentRequest(cluster1, serviceName1,
+    req2 = new ServiceComponentRequest(cluster1, "", serviceName1,
         sc2.getName(), State.INSTALLED.toString());
-    req3 = new ServiceComponentRequest(cluster1, serviceName1,
+    req3 = new ServiceComponentRequest(cluster1, "", serviceName1,
         sc3.getName(), State.INSTALLED.toString());
     reqs.add(req1);
     reqs.add(req2);
@@ -3701,9 +3701,9 @@ public class AmbariManagementControllerTest {
 
     // test no-op
     reqs.clear();
-    req1 = new ServiceComponentRequest(cluster1, serviceName1,
+    req1 = new ServiceComponentRequest(cluster1, "", serviceName1,
         sc1.getName(), State.INSTALLED.toString());
-    req2 = new ServiceComponentRequest(cluster1, serviceName1,
+    req2 = new ServiceComponentRequest(cluster1, "", serviceName1,
         sc2.getName(), State.INSTALLED.toString());
     reqs.add(req1);
     reqs.add(req2);
@@ -3735,19 +3735,19 @@ public class AmbariManagementControllerTest {
     Set<ServiceComponentHostRequest> set1 =
       new HashSet<>();
     ServiceComponentHostRequest r1 =
-        new ServiceComponentHostRequest(cluster1, serviceName1,
+        new ServiceComponentHostRequest(cluster1, "", serviceName1,
             componentName1, host1, State.INIT.toString());
     ServiceComponentHostRequest r2 =
-        new ServiceComponentHostRequest(cluster1, serviceName1,
+        new ServiceComponentHostRequest(cluster1, "", serviceName1,
             componentName2, host1, State.INIT.toString());
     ServiceComponentHostRequest r3 =
-        new ServiceComponentHostRequest(cluster1, serviceName1,
+        new ServiceComponentHostRequest(cluster1, "", serviceName1,
             componentName1, host2, State.INIT.toString());
     ServiceComponentHostRequest r4 =
-        new ServiceComponentHostRequest(cluster1, serviceName1,
+        new ServiceComponentHostRequest(cluster1, "", serviceName1,
             componentName2, host2, State.INIT.toString());
     ServiceComponentHostRequest r5 =
-        new ServiceComponentHostRequest(cluster1, serviceName1,
+        new ServiceComponentHostRequest(cluster1, "", serviceName1,
             componentName3, host1, State.INIT.toString());
 
     set1.add(r1);
@@ -3804,19 +3804,19 @@ public class AmbariManagementControllerTest {
 
     try {
       reqs.clear();
-      req1 = new ServiceComponentHostRequest(cluster1, serviceName1,
+      req1 = new ServiceComponentHostRequest(cluster1, "", serviceName1,
           componentName1, host1,
           State.INSTALLED.toString());
-      req2 = new ServiceComponentHostRequest(cluster1, serviceName1,
+      req2 = new ServiceComponentHostRequest(cluster1, "", serviceName1,
           componentName1, host2,
           State.INSTALLED.toString());
-      req3 = new ServiceComponentHostRequest(cluster1, serviceName1,
+      req3 = new ServiceComponentHostRequest(cluster1, "", serviceName1,
           componentName2, host1,
           State.INSTALLED.toString());
-      req4 = new ServiceComponentHostRequest(cluster1, serviceName1,
+      req4 = new ServiceComponentHostRequest(cluster1, "", serviceName1,
           componentName2, host2,
           State.INSTALLED.toString());
-      req5 = new ServiceComponentHostRequest(cluster1, serviceName1,
+      req5 = new ServiceComponentHostRequest(cluster1, "", serviceName1,
           componentName3, host1,
           State.STARTED.toString());
       reqs.add(req1);
@@ -3831,15 +3831,15 @@ public class AmbariManagementControllerTest {
     }
 
     reqs.clear();
-    req1 = new ServiceComponentHostRequest(cluster1, null,
+    req1 = new ServiceComponentHostRequest(cluster1, "", null,
         componentName1, host1, State.INSTALLED.toString());
-    req2 = new ServiceComponentHostRequest(cluster1, serviceName1,
+    req2 = new ServiceComponentHostRequest(cluster1, "", serviceName1,
         componentName1, host2, State.INSTALLED.toString());
-    req3 = new ServiceComponentHostRequest(cluster1, null,
+    req3 = new ServiceComponentHostRequest(cluster1, "", null,
         componentName2, host1, State.INSTALLED.toString());
-    req4 = new ServiceComponentHostRequest(cluster1, serviceName1,
+    req4 = new ServiceComponentHostRequest(cluster1, "", serviceName1,
         componentName2, host2, State.INSTALLED.toString());
-    req5 = new ServiceComponentHostRequest(cluster1, serviceName1,
+    req5 = new ServiceComponentHostRequest(cluster1, "", serviceName1,
         componentName3, host1, State.INSTALLED.toString());
     reqs.add(req1);
     reqs.add(req2);
@@ -3871,10 +3871,10 @@ public class AmbariManagementControllerTest {
 
     // test no-op
     reqs.clear();
-    req1 = new ServiceComponentHostRequest(cluster1, serviceName1,
+    req1 = new ServiceComponentHostRequest(cluster1, "", serviceName1,
         componentName1, host1,
         State.INSTALLED.toString());
-    req2 = new ServiceComponentHostRequest(cluster1, serviceName1,
+    req2 = new ServiceComponentHostRequest(cluster1, "", serviceName1,
         componentName1, host2,
         State.INSTALLED.toString());
     reqs.add(req1);
@@ -3921,8 +3921,8 @@ public class AmbariManagementControllerTest {
 
     RepositoryVersionEntity repositoryVersion = repositoryVersion206;
 
-    Service hdfs = cluster.addService("HDFS", repositoryVersion);
-    Service mapred = cluster.addService("YARN", repositoryVersion);
+    Service hdfs = cluster.addService(null, "HDFS", "", repositoryVersion);
+    Service mapred = cluster.addService(null, "YARN", "", repositoryVersion);
 
     hdfs.addServiceComponent(Role.HDFS_CLIENT.name());
     hdfs.addServiceComponent(Role.NAMENODE.name());
@@ -4084,7 +4084,7 @@ public class AmbariManagementControllerTest {
 
     RepositoryVersionEntity repositoryVersion = repositoryVersion207;
 
-    Service hdfs = cluster.addService("HDFS", repositoryVersion);
+    Service hdfs = cluster.addService(null, "HDFS", "", repositoryVersion);
 
     hdfs.addServiceComponent(Role.HDFS_CLIENT.name());
     hdfs.addServiceComponent(Role.NAMENODE.name());
@@ -4191,8 +4191,8 @@ public class AmbariManagementControllerTest {
     cluster.addDesiredConfig("_test", Collections.singleton(config1));
     cluster.addDesiredConfig("_test", Collections.singleton(config2));
 
-    Service hdfs = cluster.addService("HDFS", repositoryVersion);
-    Service hive = cluster.addService("HIVE", repositoryVersion);
+    Service hdfs = cluster.addService(null, "HDFS", "", repositoryVersion);
+    Service hive = cluster.addService(null, "HIVE", "", repositoryVersion);
 
     hdfs.addServiceComponent(Role.HDFS_CLIENT.name());
     hdfs.addServiceComponent(Role.NAMENODE.name());
@@ -4463,8 +4463,8 @@ public class AmbariManagementControllerTest {
     cluster.addDesiredConfig("_test", Collections.singleton(config1));
     cluster.addDesiredConfig("_test", Collections.singleton(config2));
 
-    Service hdfs = cluster.addService("HDFS", repositoryVersion);
-    Service mapReduce = cluster.addService("MAPREDUCE", repositoryVersion);
+    Service hdfs = cluster.addService(null, "HDFS", "", repositoryVersion);
+    Service mapReduce = cluster.addService(null, "MAPREDUCE", "", repositoryVersion);
 
     hdfs.addServiceComponent(Role.HDFS_CLIENT.name());
     mapReduce.addServiceComponent(Role.MAPREDUCE_CLIENT.name());
@@ -4678,7 +4678,7 @@ public class AmbariManagementControllerTest {
             .getServiceComponentHost(host2));
 
     // Install
-    ServiceRequest r = new ServiceRequest(cluster1, serviceName, repositoryVersion01.getId(),
+    ServiceRequest r = new ServiceRequest(cluster1, "", serviceName, repositoryVersion01.getId(),
         State.INSTALLED.toString(), null);
     Set<ServiceRequest> requests = new HashSet<>();
     requests.add(r);
@@ -4698,7 +4698,7 @@ public class AmbariManagementControllerTest {
     }
 
     // Start
-    r = new ServiceRequest(cluster1, serviceName, repositoryVersion01.getId(),
+    r = new ServiceRequest(cluster1, "", serviceName, repositoryVersion01.getId(),
         State.STARTED.toString(), null);
     requests.clear();
     requests.add(r);
@@ -4737,14 +4737,14 @@ public class AmbariManagementControllerTest {
     configs.put("a", "b");
 
     ConfigurationRequest cr1, cr2, cr3, cr4, cr5, cr6, cr7, cr8;
-    cr1 = new ConfigurationRequest(cluster1, "typeA","v1", configs, null);
-    cr2 = new ConfigurationRequest(cluster1, "typeB","v1", configs, null);
-    cr3 = new ConfigurationRequest(cluster1, "typeC","v1", configs, null);
-    cr4 = new ConfigurationRequest(cluster1, "typeD","v1", configs, null);
-    cr5 = new ConfigurationRequest(cluster1, "typeA","v2", configs, null);
-    cr6 = new ConfigurationRequest(cluster1, "typeB","v2", configs, null);
-    cr7 = new ConfigurationRequest(cluster1, "typeC","v2", configs, null);
-    cr8 = new ConfigurationRequest(cluster1, "typeE","v1", configs, null);
+    cr1 = new ConfigurationRequest(cluster1, "typeA","v1", configs, null, 1L, 1L);
+    cr2 = new ConfigurationRequest(cluster1, "typeB","v1", configs, null, 1L, 1L);
+    cr3 = new ConfigurationRequest(cluster1, "typeC","v1", configs, null, 1L, 1L);
+    cr4 = new ConfigurationRequest(cluster1, "typeD","v1", configs, null, 1L, 1L);
+    cr5 = new ConfigurationRequest(cluster1, "typeA","v2", configs, null, 1L, 1L);
+    cr6 = new ConfigurationRequest(cluster1, "typeB","v2", configs, null, 1L, 1L);
+    cr7 = new ConfigurationRequest(cluster1, "typeC","v2", configs, null, 1L, 1L);
+    cr8 = new ConfigurationRequest(cluster1, "typeE","v1", configs, null, 1L, 1L);
     controller.createConfiguration(cr1);
     controller.createConfiguration(cr2);
     controller.createConfiguration(cr3);
@@ -4773,7 +4773,7 @@ public class AmbariManagementControllerTest {
     configVersions.put("typeB", "v1");
     configVersions.put("typeC", "v1");
     schReqs.clear();
-    schReqs.add(new ServiceComponentHostRequest(cluster1, serviceName,
+    schReqs.add(new ServiceComponentHostRequest(cluster1, "", serviceName,
             componentName1, host1, null));
     Assert.assertNull(updateHostComponents(schReqs, Collections.emptyMap(), true));
 
@@ -4781,7 +4781,7 @@ public class AmbariManagementControllerTest {
     configVersions.put("typeC", "v1");
     configVersions.put("typeD", "v1");
     scReqs.clear();
-    scReqs.add(new ServiceComponentRequest(cluster1, serviceName, componentName2, null));
+    scReqs.add(new ServiceComponentRequest(cluster1, "", serviceName, componentName2, null));
     Assert.assertNull(ComponentResourceProviderTest.updateComponents(controller, scReqs, Collections.emptyMap(), true));
 
     // update configs at service level
@@ -4790,7 +4790,7 @@ public class AmbariManagementControllerTest {
     configVersions.put("typeC", "v2");
     configVersions.put("typeE", "v1");
     sReqs.clear();
-    sReqs.add(new ServiceRequest(cluster1, serviceName, repositoryVersion01.getId(), null, null));
+    sReqs.add(new ServiceRequest(cluster1, "", serviceName, repositoryVersion01.getId(), null, null));
     Assert.assertNull(ServiceResourceProviderTest.updateServices(controller, sReqs, mapRequestProps, true, false));
 
 
@@ -4800,7 +4800,7 @@ public class AmbariManagementControllerTest {
     configVersions.put("typeB", "v1");
     configVersions.put("typeC", "v1");
     schReqs.clear();
-    schReqs.add(new ServiceComponentHostRequest(cluster1, serviceName,
+    schReqs.add(new ServiceComponentHostRequest(cluster1, "", serviceName,
             componentName1, host1, null));
     Assert.assertNull(updateHostComponents(schReqs, Collections.emptyMap(), true));
 
@@ -4809,7 +4809,7 @@ public class AmbariManagementControllerTest {
     configVersions.put("typeC", "v2");
     configVersions.put("typeD", "v1");
     scReqs.clear();
-    scReqs.add(new ServiceComponentRequest(cluster1, serviceName,
+    scReqs.add(new ServiceComponentRequest(cluster1, "", serviceName,
             componentName1, null));
     Assert.assertNull(ComponentResourceProviderTest.updateComponents(controller, scReqs, Collections.emptyMap(), true));
 
@@ -4885,14 +4885,14 @@ public class AmbariManagementControllerTest {
     configAttributes.get("final").put("a", "true");
 
     ConfigurationRequest cr1, cr2, cr3, cr4, cr5, cr6, cr7, cr8;
-    cr1 = new ConfigurationRequest(cluster1, "typeA","v1", configs, configAttributes);
-    cr2 = new ConfigurationRequest(cluster1, "typeB","v1", configs, configAttributes);
-    cr3 = new ConfigurationRequest(cluster1, "typeC","v1", configs, configAttributes);
-    cr4 = new ConfigurationRequest(cluster1, "typeD","v1", configs, configAttributes);
-    cr5 = new ConfigurationRequest(cluster1, "typeA","v2", configs, configAttributes);
-    cr6 = new ConfigurationRequest(cluster1, "typeB","v2", configs, configAttributes);
-    cr7 = new ConfigurationRequest(cluster1, "typeC","v2", configs, configAttributes);
-    cr8 = new ConfigurationRequest(cluster1, "typeE","v1", configs, configAttributes);
+    cr1 = new ConfigurationRequest(cluster1, "typeA","v1", configs, configAttributes, 1L, 1L);
+    cr2 = new ConfigurationRequest(cluster1, "typeB","v1", configs, configAttributes, 1L, 1L);
+    cr3 = new ConfigurationRequest(cluster1, "typeC","v1", configs, configAttributes, 1L, 1L);
+    cr4 = new ConfigurationRequest(cluster1, "typeD","v1", configs, configAttributes, 1L, 1L);
+    cr5 = new ConfigurationRequest(cluster1, "typeA","v2", configs, configAttributes, 1L, 1L);
+    cr6 = new ConfigurationRequest(cluster1, "typeB","v2", configs, configAttributes, 1L, 1L);
+    cr7 = new ConfigurationRequest(cluster1, "typeC","v2", configs, configAttributes, 1L, 1L);
+    cr8 = new ConfigurationRequest(cluster1, "typeE","v1", configs, configAttributes, 1L, 1L);
     controller.createConfiguration(cr1);
     controller.createConfiguration(cr2);
     controller.createConfiguration(cr3);
@@ -4921,7 +4921,7 @@ public class AmbariManagementControllerTest {
     configVersions.put("typeB", "v1");
     configVersions.put("typeC", "v1");
     schReqs.clear();
-    schReqs.add(new ServiceComponentHostRequest(cluster1, serviceName,
+    schReqs.add(new ServiceComponentHostRequest(cluster1, "", serviceName,
         componentName1, host1, null));
     Assert.assertNull(updateHostComponents(schReqs, Collections.emptyMap(), true));
 
@@ -4929,7 +4929,7 @@ public class AmbariManagementControllerTest {
     configVersions.put("typeC", "v1");
     configVersions.put("typeD", "v1");
     scReqs.clear();
-    scReqs.add(new ServiceComponentRequest(cluster1, serviceName,
+    scReqs.add(new ServiceComponentRequest(cluster1, "", serviceName,
         componentName2, null));
     Assert.assertNull(ComponentResourceProviderTest.updateComponents(controller, scReqs, Collections.emptyMap(), true));
 
@@ -4939,7 +4939,7 @@ public class AmbariManagementControllerTest {
     configVersions.put("typeC", "v2");
     configVersions.put("typeE", "v1");
     sReqs.clear();
-    sReqs.add(new ServiceRequest(cluster1, serviceName, repositoryVersion01.getId(), null, null));
+    sReqs.add(new ServiceRequest(cluster1, "", serviceName, repositoryVersion01.getId(), null, null));
     Assert.assertNull(ServiceResourceProviderTest.updateServices(controller, sReqs, mapRequestProps, true, false));
 
     // update configs at SCH level
@@ -4948,7 +4948,7 @@ public class AmbariManagementControllerTest {
     configVersions.put("typeB", "v1");
     configVersions.put("typeC", "v1");
     schReqs.clear();
-    schReqs.add(new ServiceComponentHostRequest(cluster1, serviceName,
+    schReqs.add(new ServiceComponentHostRequest(cluster1, "", serviceName,
         componentName1, host1, null));
     Assert.assertNull(updateHostComponents(schReqs, Collections.emptyMap(), true));
 
@@ -4957,7 +4957,7 @@ public class AmbariManagementControllerTest {
     configVersions.put("typeC", "v2");
     configVersions.put("typeD", "v1");
     scReqs.clear();
-    scReqs.add(new ServiceComponentRequest(cluster1, serviceName,
+    scReqs.add(new ServiceComponentRequest(cluster1, "", serviceName,
         componentName1, null));
     Assert.assertNull(ComponentResourceProviderTest.updateComponents(controller, scReqs, Collections.emptyMap(), true));
 
@@ -5005,8 +5005,8 @@ public class AmbariManagementControllerTest {
       host2, null);
 
     // Install
-    ServiceRequest r = new ServiceRequest(cluster1, serviceName, repositoryVersion01.getId(),
-      State.INSTALLED.toString());
+    ServiceRequest r = new ServiceRequest(cluster1, "", serviceName, repositoryVersion01.getId(),
+      State.INSTALLED.toString(), null);
     Set<ServiceRequest> requests = new HashSet<>();
     requests.add(r);
 
@@ -5030,11 +5030,11 @@ public class AmbariManagementControllerTest {
 
     ConfigurationRequest cr1,cr2,cr3;
     cr1 = new ConfigurationRequest(cluster1, "core-site","version1",
-      configs, null);
+      configs, null, 1L, 1L);
     cr2 = new ConfigurationRequest(cluster1, "hdfs-site","version1",
-      configs, null);
+      configs, null, 1L, 1L);
     cr3 = new ConfigurationRequest(cluster1, "core-site","version122",
-      configs, null);
+      configs, null, 1L, 1L);
     controller.createConfiguration(cr1);
     controller.createConfiguration(cr2);
     controller.createConfiguration(cr3);
@@ -5057,7 +5057,7 @@ public class AmbariManagementControllerTest {
     configVersions.put("core-site", "version1");
     configVersions.put("hdfs-site", "version1");
     schReqs.clear();
-    schReqs.add(new ServiceComponentHostRequest(cluster1, serviceName,
+    schReqs.add(new ServiceComponentHostRequest(cluster1, "", serviceName,
       componentName1, host1, null));
     Assert.assertNull(updateHostComponents(schReqs, Collections.emptyMap(), true));
 
@@ -5065,7 +5065,7 @@ public class AmbariManagementControllerTest {
     configVersions.clear();
     configVersions.put("core-site", "version122");
     schReqs.clear();
-    schReqs.add(new ServiceComponentHostRequest(cluster1, serviceName,
+    schReqs.add(new ServiceComponentHostRequest(cluster1, "", serviceName,
       componentName1, host1, null));
     Assert.assertNull(updateHostComponents(schReqs, Collections.emptyMap(), true));
 
@@ -5076,11 +5076,11 @@ public class AmbariManagementControllerTest {
     configVersions.clear();
     configVersions.put("core-site", "version1");
     configVersions.put("hdfs-site", "version1");
-    scReqs.add(new ServiceComponentRequest(cluster1, serviceName,
+    scReqs.add(new ServiceComponentRequest(cluster1, "", serviceName,
       componentName2, null));
     Assert.assertNull(ComponentResourceProviderTest.updateComponents(controller, scReqs, Collections.emptyMap(), true));
 
-    scReqs.add(new ServiceComponentRequest(cluster1, serviceName,
+    scReqs.add(new ServiceComponentRequest(cluster1, "", serviceName,
       componentName1, null));
     Assert.assertNull(ComponentResourceProviderTest.updateComponents(controller, scReqs, Collections.emptyMap(), true));
 
@@ -5089,12 +5089,12 @@ public class AmbariManagementControllerTest {
     configVersions.put("core-site", "version122");
 
     scReqs.clear();
-    scReqs.add(new ServiceComponentRequest(cluster1, serviceName,
+    scReqs.add(new ServiceComponentRequest(cluster1, "", serviceName,
       componentName2, null));
     Assert.assertNull(ComponentResourceProviderTest.updateComponents(controller, scReqs, Collections.emptyMap(), true));
 
     scReqs.clear();
-    scReqs.add(new ServiceComponentRequest(cluster1, serviceName,
+    scReqs.add(new ServiceComponentRequest(cluster1, "", serviceName,
       componentName1, null));
     Assert.assertNull(ComponentResourceProviderTest.updateComponents(controller, scReqs, Collections.emptyMap(), true));
 
@@ -5105,7 +5105,7 @@ public class AmbariManagementControllerTest {
     configVersions.put("core-site", "version1");
     configVersions.put("hdfs-site", "version1");
     sReqs.clear();
-    sReqs.add(new ServiceRequest(cluster1, serviceName, repositoryVersion01.getId(), null));
+    sReqs.add(new ServiceRequest(cluster1, "", serviceName, repositoryVersion01.getId(), null, null));
     Assert.assertNull(ServiceResourceProviderTest.updateServices(controller, sReqs, mapRequestProps, true, false));
 
     // Reconfigure S Level
@@ -5113,7 +5113,7 @@ public class AmbariManagementControllerTest {
     configVersions.put("core-site", "version122");
 
     sReqs.clear();
-    sReqs.add(new ServiceRequest(cluster1, serviceName, repositoryVersion01.getId(), null));
+    sReqs.add(new ServiceRequest(cluster1, "", serviceName, repositoryVersion01.getId(), null, null));
     Assert.assertNull(ServiceResourceProviderTest.updateServices(controller, sReqs, mapRequestProps, true, false));
 
     entityManager.clear();
@@ -5187,11 +5187,11 @@ public class AmbariManagementControllerTest {
 
     ConfigurationRequest cr1,cr2,cr3,cr4;
     cr1 = new ConfigurationRequest(cluster1, "core-site","version1",
-      configs, null);
+      configs, null, 1L, 1L);
     cr2 = new ConfigurationRequest(cluster1, "hdfs-site","version1",
-      configs, null);
+      configs, null, 1L, 1L);
     cr4 = new ConfigurationRequest(cluster1, "kerberos-env", "version1",
-      configs3, null);
+      configs3, null, 1L, 1L);
 
     ConfigFactory cf = injector.getInstance(ConfigFactory.class);
     Config config1 = cf.createNew(cluster, "kerberos-env", "version1",
@@ -5223,7 +5223,7 @@ public class AmbariManagementControllerTest {
 
     // Reconfigure
     cr3 = new ConfigurationRequest(cluster1, "core-site","version122",
-        configs2, null);
+        configs2, null, 1L, 1L);
     crReq = new ClusterRequest(cluster.getClusterId(), cluster1, null, null);
     crReq.setDesiredConfig(Collections.singletonList(cr3));
     controller.updateClusters(Collections.singleton(crReq), null);
@@ -5353,9 +5353,9 @@ public class AmbariManagementControllerTest {
 
     ConfigurationRequest cr1,cr2,cr3;
     cr1 = new ConfigurationRequest(cluster1, "core-site","version1",
-      configs, null);
+      configs, null, 1L, 1L);
     cr2 = new ConfigurationRequest(cluster1, "hdfs-site","version1",
-      configs, null);
+      configs, null, 1L, 1L);
 
     ClusterRequest crReq = new ClusterRequest(cluster.getClusterId(), cluster1, null, null);
     crReq.setDesiredConfig(Collections.singletonList(cr1));
@@ -5380,7 +5380,7 @@ public class AmbariManagementControllerTest {
 
     // Reconfigure
     cr3 = new ConfigurationRequest(cluster1, "core-site","version122",
-      configs2, null);
+      configs2, null, 1L, 1L);
     crReq = new ClusterRequest(cluster.getClusterId(), cluster1, null, null);
     crReq.setDesiredConfig(Collections.singletonList(cr3));
     controller.updateClusters(Collections.singleton(crReq), null);
@@ -5426,8 +5426,8 @@ public class AmbariManagementControllerTest {
     createServiceComponentHost(cluster1, null, componentName1,
         host2, null);
 
-    ServiceRequest r = new ServiceRequest(cluster1, serviceName, repositoryVersion01.getId(),
-        State.INSTALLED.toString());
+    ServiceRequest r = new ServiceRequest(cluster1, "", serviceName, repositoryVersion01.getId(),
+        State.INSTALLED.toString(), null);
     Set<ServiceRequest> requests = new HashSet<>();
     requests.add(r);
 
@@ -5463,7 +5463,7 @@ public class AmbariManagementControllerTest {
       }
     }
 
-    r = new ServiceRequest(cluster1, serviceName, repositoryVersion01.getId(), State.STARTED.toString());
+    r = new ServiceRequest(cluster1, "", serviceName, repositoryVersion01.getId(), State.STARTED.toString(), null);
     requests.clear();
     requests.add(r);
 
@@ -5835,7 +5835,7 @@ public class AmbariManagementControllerTest {
 
     // Reinstall SCH
     ServiceComponentHostRequest schr = new ServiceComponentHostRequest
-      (cluster1, serviceName, componentName3, host3, State.INSTALLED.name());
+      (cluster1, "", serviceName, componentName3, host3, State.INSTALLED.name());
     Set<ServiceComponentHost

<TRUNCATED>

[3/7] ambari git commit: AMBARI-22493. Fix build for test classes in feature branch.(vbrodetskyi)

Posted by vb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ComponentResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ComponentResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ComponentResourceProviderTest.java
index 110e359..efa351a 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ComponentResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ComponentResourceProviderTest.java
@@ -244,13 +244,13 @@ public class ComponentResourceProviderTest {
     expect(service.getServiceComponents()).andReturn(serviceComponentMap).anyTimes();
 
     expect(serviceComponent1.convertToResponse()).andReturn(
-      new ServiceComponentResponse(100L, "Cluster100", "Service100", "Component100", stackId, "", serviceComponentStateCountMap,
+      new ServiceComponentResponse(100L, "Cluster100", 1L, "", 1L, "Service100", "", "Component100", stackId, "", serviceComponentStateCountMap,
               true /* recovery enabled */, "Component100 Client", null, null));
     expect(serviceComponent2.convertToResponse()).andReturn(
-      new ServiceComponentResponse(100L, "Cluster100", "Service100", "Component101", stackId, "", serviceComponentStateCountMap,
+      new ServiceComponentResponse(100L, "Cluster100", 1L, "", 1L, "Service100", "", "Component101", stackId, "", serviceComponentStateCountMap,
               false /* recovery not enabled */, "Component101 Client", null, null));
     expect(serviceComponent3.convertToResponse()).andReturn(
-      new ServiceComponentResponse(100L, "Cluster100", "Service100", "Component102", stackId, "", serviceComponentStateCountMap,
+      new ServiceComponentResponse(100L, "Cluster100", 1L, "", 1L, "Service100", "", "Component102", stackId, "", serviceComponentStateCountMap,
               true /* recovery enabled */, "Component102 Client", "1.1", RepositoryVersionState.CURRENT));
 
     expect(ambariMetaInfo.getComponent("FOO", "1.0", null, "Component100")).andReturn(
@@ -423,13 +423,13 @@ public class ComponentResourceProviderTest {
     expect(component3Info.getCategory()).andReturn(null);
 
     expect(serviceComponent1.convertToResponse()).andReturn(
-      new ServiceComponentResponse(100L, "Cluster100", "Service100", "Component101", stackId, "", serviceComponentStateCountMap,
+      new ServiceComponentResponse(100L, "Cluster100", 1L, "", 1L, "Service100", "", "Component101", stackId, "", serviceComponentStateCountMap,
               false /* recovery not enabled */, "Component101 Client", null, null));
     expect(serviceComponent2.convertToResponse()).andReturn(
-      new ServiceComponentResponse(100L, "Cluster100", "Service100", "Component102", stackId, "", serviceComponentStateCountMap,
+      new ServiceComponentResponse(100L, "Cluster100", 1L, "", 1L, "Service100", "", "Component102", stackId, "", serviceComponentStateCountMap,
               false /* recovery not enabled */, "Component102 Client", null, null));
     expect(serviceComponent3.convertToResponse()).andReturn(
-      new ServiceComponentResponse(100L, "Cluster100", "Service100", "Component103", stackId, "", serviceComponentStateCountMap,
+      new ServiceComponentResponse(100L, "Cluster100", 1L, "", 1L, "Service100", "", "Component103", stackId, "", serviceComponentStateCountMap,
               false /* recovery not enabled */, "Component103 Client", null, null));
     expect(serviceComponent1.getDesiredState()).andReturn(State.INSTALLED).anyTimes();
     expect(serviceComponent2.getDesiredState()).andReturn(State.INSTALLED).anyTimes();
@@ -731,7 +731,7 @@ public class ComponentResourceProviderTest {
     expect(component1Info.getCategory()).andReturn(null);
 
     expect(serviceComponent1.convertToResponse()).andReturn(
-        new ServiceComponentResponse(100L, "Cluster100", "Service100", "Component101", stackId, "", serviceComponentStateCountMap,
+        new ServiceComponentResponse(100L, "Cluster100", 1L, "", 1L, "Service100", "", "Component101", stackId, "", serviceComponentStateCountMap,
             false /* recovery not enabled */, "Component101 Client", null, null));
     expect(serviceComponent1.getDesiredState()).andReturn(State.INSTALLED).anyTimes();
 
@@ -897,8 +897,8 @@ public class ComponentResourceProviderTest {
     expect(component4Info.getCategory()).andReturn(null);
 
     expect(service.getName()).andReturn("service1").anyTimes();
-    expect(service.getServiceComponent("component1")).andThrow(new ServiceComponentNotFoundException("cluster1", "service1", "component1"));
-    expect(service.getServiceComponent("component2")).andThrow(new ServiceComponentNotFoundException("cluster1", "service1", "component2"));
+    expect(service.getServiceComponent("component1")).andThrow(new ServiceComponentNotFoundException("cluster1", "service1", "component1", "", ""));
+    expect(service.getServiceComponent("component2")).andThrow(new ServiceComponentNotFoundException("cluster1", "service1", "component2", "", ""));
     expect(service.getServiceComponent("component3")).andReturn(component1);
     expect(service.getServiceComponent("component4")).andReturn(component2);
 
@@ -966,7 +966,7 @@ public class ComponentResourceProviderTest {
     expect(clusters.getCluster("cluster1")).andReturn(cluster);
     expect(cluster.getService("service1")).andReturn(service);
     expect(service.getServiceComponent("component1")).andThrow(
-        new ServiceComponentNotFoundException("cluster1", "service1", "component1"));
+        new ServiceComponentNotFoundException("cluster1", "service1", "component1", "", ""));
     // replay mocks
     replay(maintHelper, injector, clusters, cluster, service);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java
index 78f79ea..f90d5fc 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java
@@ -172,14 +172,16 @@ public class ConfigGroupResourceProviderTest {
 
     Capture<Cluster> clusterCapture = newCapture();
     Capture<String> serviceName = newCapture();
+    Capture<Long> servcieId = newCapture();
+    Capture<Long> servcieGroupId = newCapture();
     Capture<String> captureName = newCapture();
     Capture<String> captureDesc = newCapture();
     Capture<String> captureTag = newCapture();
     Capture<Map<String, Config>> captureConfigs = newCapture();
     Capture<Map<Long, Host>> captureHosts = newCapture();
 
-    expect(configGroupFactory.createNew(capture(clusterCapture), capture(serviceName),
-        capture(captureName), capture(captureTag), capture(captureDesc),
+    expect(configGroupFactory.createNew(capture(clusterCapture), capture(servcieGroupId), capture(servcieId), capture(serviceName),
+        capture(captureTag), capture(captureDesc),
         capture(captureConfigs), capture(captureHosts))).andReturn(configGroup);
 
     replay(managementController, clusters, cluster, configGroupFactory,
@@ -283,8 +285,8 @@ public class ConfigGroupResourceProviderTest {
     expect(managementController.getAuthName()).andReturn("admin").anyTimes();
     expect(cluster.getConfigGroups()).andReturn(configGroupMap);
 
-    expect(configGroupFactory.createNew((Cluster) anyObject(), (String) anyObject(), (String) anyObject(),
-        (String) anyObject(), (String) anyObject(), EasyMock.anyObject(),
+    expect(configGroupFactory.createNew((Cluster) anyObject(), (Long) anyObject(), (Long) anyObject(),
+        (String) anyObject(), (String) anyObject(), (String) anyObject(), EasyMock.anyObject(),
         EasyMock.anyObject())).andReturn(configGroup).anyTimes();
 
     expect(configGroup.getClusterName()).andReturn("Cluster100").anyTimes();

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ExportBlueprintRequestTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ExportBlueprintRequestTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ExportBlueprintRequestTest.java
index e1f5583..743d1d5 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ExportBlueprintRequestTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ExportBlueprintRequestTest.java
@@ -120,7 +120,7 @@ public class ExportBlueprintRequestTest {
 
     // assertions
     assertEquals(CLUSTER_NAME, exportBlueprintRequest.getClusterName());
-    Blueprint bp = exportBlueprintRequest.getBlueprint();
+    Blueprint bp = null; exportBlueprintRequest.getBlueprint();
     assertEquals("exported-blueprint", bp.getName());
     Map<String, HostGroup> hostGroups = bp.getHostGroups();
     assertEquals(2, hostGroups.size());

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostComponentResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostComponentResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostComponentResourceProviderTest.java
index 7e32c15..6611c55 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostComponentResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostComponentResourceProviderTest.java
@@ -186,17 +186,17 @@ public class HostComponentResourceProviderTest {
     String repositoryVersion2 = "0.2-1234";
 
     allResponse.add(new ServiceComponentHostResponse(
-        "Cluster100", "Service100", "Component100", "Component 100", "Host100", "Host100",
+        1L, "Cluster100", 1L, "", 1L, "Service100", "", 1L, "Component100", "Component 100", "Host100", "Host100",
         State.INSTALLED.toString(), stackId.getStackId(), State.STARTED.toString(),
         stackId2.getStackId(), repositoryVersion2, null));
 
     allResponse.add(new ServiceComponentHostResponse(
-        "Cluster100", "Service100", "Component101", "Component 101", "Host100", "Host100",
+        1L, "Cluster100", 1L, "", 1L, "Service100", "", 1L, "Component101", "Component 101", "Host100", "Host100",
         State.INSTALLED.toString(), stackId.getStackId(), State.STARTED.toString(),
         stackId2.getStackId(), repositoryVersion2, null));
 
     allResponse.add(new ServiceComponentHostResponse(
-        "Cluster100", "Service100", "Component102", "Component 102", "Host100", "Host100",
+        1L, "Cluster100", 1L, "", 1L, "Service100", "", 1L, "Component102", "Component 102", "Host100", "Host100",
         State.INSTALLED.toString(), stackId.getStackId(), State.STARTED.toString(),
         stackId2.getStackId(), repositoryVersion2, null));
 
@@ -353,12 +353,12 @@ public class HostComponentResourceProviderTest {
 
     Set<ServiceComponentHostResponse> nameResponse = new HashSet<>();
     nameResponse.add(new ServiceComponentHostResponse(
-        "Cluster102", "Service100", "Component100", "Component 100", "Host100", "Host100",
+        1L, "Cluster102", 1L, "", 1L, "Service100", "", 1L, "Component100", "Component 100", "Host100", "Host100",
         "INSTALLED", "", "", "", "", null));
 
     // set expectations
     expect(managementController.getClusters()).andReturn(clusters).anyTimes();
-    expect(managementController.findServiceName(cluster, "Component100")).andReturn("Service100").anyTimes();
+    //expect(managementController.findServiceName(cluster, "Component100")).andReturn("Service100").anyTimes();
     expect(clusters.getCluster("Cluster102")).andReturn(cluster).anyTimes();
     expect(cluster.getClusterId()).andReturn(2L).anyTimes();
     expect(cluster.getService("Service100")).andReturn(service).anyTimes();
@@ -555,12 +555,12 @@ public class HostComponentResourceProviderTest {
 
     Set<ServiceComponentHostResponse> nameResponse = new HashSet<>();
     nameResponse.add(new ServiceComponentHostResponse(
-        "Cluster102", "Service100", "Component100", "Component 100", "Host100", "Host100",
+        1L, "Cluster102", 1L, "", 1L, "Service100", "", 1L, "Component100", "Component 100", "Host100", "Host100",
         "INSTALLED", "", "", "", "", null));
 
     // set expectations
     expect(managementController.getClusters()).andReturn(clusters).anyTimes();
-    expect(managementController.findServiceName(cluster, "Component100")).andReturn("Service100").anyTimes();
+    //expect(managementController.findServiceName(cluster, "Component100")).andReturn("Service100").anyTimes();
     expect(clusters.getCluster("Cluster102")).andReturn(cluster).anyTimes();
     expect(cluster.getClusterId()).andReturn(2L).anyTimes();
     expect(cluster.getService("Service100")).andReturn(service).anyTimes();

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
index fd28081..90b7ea9 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
@@ -320,11 +320,11 @@ public class HostResourceProviderTest extends EasyMockSupport {
     Set<Cluster> clusterSet = new HashSet<>();
     clusterSet.add(cluster);
 
-    ServiceComponentHostResponse shr1 = new ServiceComponentHostResponse("Cluster100", "Service100", "Component100", "Component 100",
+    ServiceComponentHostResponse shr1 = new ServiceComponentHostResponse(1L, "Cluster100", 1L, "", 1L, "Service100", "", 1L, "Component100", "Component 100",
         "Host100", "Host100", "STARTED", "", null, null, null, null);
-    ServiceComponentHostResponse shr2 = new ServiceComponentHostResponse("Cluster100", "Service100", "Component102", "Component 102",
+    ServiceComponentHostResponse shr2 = new ServiceComponentHostResponse(1L,"Cluster100", 1L, "", 1L, "Service100", "", 1L, "Component102", "Component 102",
         "Host100", "Host100", "STARTED", "", null, null, null, null);
-    ServiceComponentHostResponse shr3 = new ServiceComponentHostResponse("Cluster100", "Service100", "Component103", "Component 103",
+    ServiceComponentHostResponse shr3 = new ServiceComponentHostResponse(1L,"Cluster100", 1L, "", 1L, "Service100", "", 1L, "Component103", "Component 103",
         "Host100", "Host100", "STARTED", "", null, null, null, null);
 
     Set<ServiceComponentHostResponse> responses = new HashSet<>();
@@ -418,11 +418,11 @@ public class HostResourceProviderTest extends EasyMockSupport {
     Set<Cluster> clusterSet = new HashSet<>();
     clusterSet.add(cluster);
 
-    ServiceComponentHostResponse shr1 = new ServiceComponentHostResponse("Cluster100", "Service100", "Component100", "Component 100",
+    ServiceComponentHostResponse shr1 = new ServiceComponentHostResponse(1L, "Cluster100", 1L, "", 1L, "Service100", "", 1L, "Component100", "Component 100",
         "Host100", "Host100", "STARTED", "", null, null, null, null);
-    ServiceComponentHostResponse shr2 = new ServiceComponentHostResponse("Cluster100", "Service100", "Component102", "Component 102",
+    ServiceComponentHostResponse shr2 = new ServiceComponentHostResponse(1L, "Cluster100", 1L, "", 1L, "Service100", "", 1L, "Component102", "Component 102",
         "Host100", "Host100", "STARTED", "", null, null, null, null);
-    ServiceComponentHostResponse shr3 = new ServiceComponentHostResponse("Cluster100", "Service100", "Component103", "Component 103",
+    ServiceComponentHostResponse shr3 = new ServiceComponentHostResponse(1L, "Cluster100", 1L, "", 1L, "Service100", "", 1L, "Component103", "Component 103",
         "Host100", "Host100", "STARTED", "", null, null, null, null);
 
     Set<ServiceComponentHostResponse> responses = new HashSet<>();
@@ -513,11 +513,11 @@ public class HostResourceProviderTest extends EasyMockSupport {
     Set<Cluster> clusterSet = new HashSet<>();
     clusterSet.add(cluster);
 
-    ServiceComponentHostResponse shr1 = new ServiceComponentHostResponse("Cluster100", "Service100", "Component100", "Component 100",
+    ServiceComponentHostResponse shr1 = new ServiceComponentHostResponse(1L, "Cluster100", 1L, "", 1L, "Service100", "", 1L, "Component100", "Component 100",
         "Host100", "Host100", "STARTED", "", null, null, null, null);
-    ServiceComponentHostResponse shr2 = new ServiceComponentHostResponse("Cluster100", "Service100", "Component102", "Component 102",
+    ServiceComponentHostResponse shr2 = new ServiceComponentHostResponse(1L, "Cluster100", 1L, "", 1L, "Service100", "", 1L, "Component102", "Component 102",
         "Host100", "Host100", "INSTALLED", "", null, null, null, null);
-    ServiceComponentHostResponse shr3 = new ServiceComponentHostResponse("Cluster100", "Service100", "Component103", "Component 103",
+    ServiceComponentHostResponse shr3 = new ServiceComponentHostResponse(1L, "Cluster100", 1L, "", 1L, "Service100", "", 1L, "Component103", "Component 103",
         "Host100", "Host100", "STARTED", "", null, null, null, null);
 
     Set<ServiceComponentHostResponse> responses = new HashSet<>();
@@ -706,7 +706,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
     Set<Cluster> clusterSet = new HashSet<>();
     clusterSet.add(cluster);
 
-    ServiceComponentHostResponse shr1 = new ServiceComponentHostResponse("Cluster100", "Service100", "Component100", "Component 100",
+    ServiceComponentHostResponse shr1 = new ServiceComponentHostResponse(1L, "Cluster100", 1L, "", 1L, "Service100", "", 1L, "Component100", "Component 100",
         "Host100", "Host100", "STARTED", "", null, null, null, null);
 
     Set<ServiceComponentHostResponse> responses = new HashSet<>();
@@ -793,11 +793,11 @@ public class HostResourceProviderTest extends EasyMockSupport {
     Set<Cluster> clusterSet = new HashSet<>();
     clusterSet.add(cluster);
 
-    ServiceComponentHostResponse shr1 = new ServiceComponentHostResponse("Cluster100", "Service100", "Component100", "Component 100",
+    ServiceComponentHostResponse shr1 = new ServiceComponentHostResponse(1L, "Cluster100", 1L, "", 1L, "Service100", "", 1L, "Component100", "Component 100",
         "Host100", "Host100", "STARTED", "", null, null, null, null);
-    ServiceComponentHostResponse shr2 = new ServiceComponentHostResponse("Cluster100", "Service100", "Component102", "Component 102",
+    ServiceComponentHostResponse shr2 = new ServiceComponentHostResponse(1L, "Cluster100", 1L, "", 1L, "Service100", "", 1L, "Component102", "Component 102",
         "Host100", "Host100", "INSTALLED", "", null, null, null, null);
-    ServiceComponentHostResponse shr3 = new ServiceComponentHostResponse("Cluster100", "Service100", "Component103", "Component 103",
+    ServiceComponentHostResponse shr3 = new ServiceComponentHostResponse(1L, "Cluster100", 1L, "", 1L, "Service100", "", 1L, "Component103", "Component 103",
         "Host100", "Host100", "STARTED", "", null, null, null, null);
 
     Set<ServiceComponentHostResponse> responses = new HashSet<>();

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/JMXHostProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/JMXHostProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/JMXHostProviderTest.java
index e19ad29..e23ad79 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/JMXHostProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/JMXHostProviderTest.java
@@ -124,7 +124,7 @@ public class JMXHostProviderTest {
       dStateStr = desiredState.toString();
     }
 
-    ServiceRequest r1 = new ServiceRequest(clusterName, serviceName, m_repositoryVersion.getId(), dStateStr);
+    ServiceRequest r1 = new ServiceRequest(clusterName, "", serviceName, m_repositoryVersion.getId(), dStateStr, null);
 
     Set<ServiceRequest> requests = new HashSet<>();
     requests.add(r1);
@@ -140,7 +140,7 @@ public class JMXHostProviderTest {
     if (desiredState != null) {
       dStateStr = desiredState.toString();
     }
-    ServiceComponentRequest r = new ServiceComponentRequest(clusterName,
+    ServiceComponentRequest r = new ServiceComponentRequest(clusterName, "",
       serviceName, componentName, dStateStr);
     Set<ServiceComponentRequest> requests =
       new HashSet<>();
@@ -155,7 +155,7 @@ public class JMXHostProviderTest {
     if (desiredState != null) {
       dStateStr = desiredState.toString();
     }
-    ServiceComponentHostRequest r = new ServiceComponentHostRequest(clusterName,
+    ServiceComponentHostRequest r = new ServiceComponentHostRequest(clusterName, "",
       serviceName, componentName, hostname, dStateStr);
     Set<ServiceComponentHostRequest> requests =
       new HashSet<>();
@@ -216,7 +216,7 @@ public class JMXHostProviderTest {
       configs.put("ambari.dfs.datanode.http.port", "70070");
 
       ConfigurationRequest cr = new ConfigurationRequest(clusterName,
-        "hdfs-site", "version1", configs, null);
+        "hdfs-site", "version1", configs, null, 1L, 1L);
       ClusterRequest crequest = new ClusterRequest(cluster.getClusterId(), clusterName, null, null);
       crequest.setDesiredConfig(Collections.singletonList(cr));
       controller.updateClusters(Collections.singleton(crequest), new HashMap<>());
@@ -227,7 +227,7 @@ public class JMXHostProviderTest {
       configs.put(DATANODE_PORT, "localhost:70075");
 
       ConfigurationRequest cr = new ConfigurationRequest(clusterName,
-        "hdfs-site", "version2", configs, null);
+        "hdfs-site", "version2", configs, null, 1L, 1L);
 
       ClusterRequest crequest = new ClusterRequest(cluster.getClusterId(), clusterName, null, null);
       crequest.setDesiredConfig(Collections.singletonList(cr));
@@ -344,7 +344,7 @@ public class JMXHostProviderTest {
     hbaseConfigs.put("hbase.ssl.enabled", "true");
 
     ConfigurationRequest cr1 = new ConfigurationRequest(clusterName,
-      "hdfs-site", "versionN", configs, null);
+      "hdfs-site", "versionN", configs, null, 1L, 1L);
 
     ClusterRequest crReq = new ClusterRequest(cluster.getClusterId(), clusterName, null, null);
     crReq.setDesiredConfig(Collections.singletonList(cr1));
@@ -354,17 +354,17 @@ public class JMXHostProviderTest {
       .getTag());
 
     ConfigurationRequest cr2 = new ConfigurationRequest(clusterName,
-      "yarn-site", "versionN", yarnConfigs, null);
+      "yarn-site", "versionN", yarnConfigs, null, 1L, 1L);
     crReq.setDesiredConfig(Collections.singletonList(cr2));
     controller.updateClusters(Collections.singleton(crReq), null);
 
     ConfigurationRequest cr3 = new ConfigurationRequest(clusterName,
-        "mapred-site", "versionN", mapreduceConfigs, null);
+        "mapred-site", "versionN", mapreduceConfigs, null, 1L ,1L);
       crReq.setDesiredConfig(Collections.singletonList(cr3));
       controller.updateClusters(Collections.singleton(crReq), null);
 
     ConfigurationRequest cr4 = new ConfigurationRequest(clusterName,
-        "hbase-site", "versionN", hbaseConfigs, null);
+        "hbase-site", "versionN", hbaseConfigs, null, 1L, 1L);
       crReq.setDesiredConfig(Collections.singletonList(cr4));
       controller.updateClusters(Collections.singleton(crReq), null);
 
@@ -434,7 +434,7 @@ public class JMXHostProviderTest {
 
 
     ConfigurationRequest cr1 = new ConfigurationRequest(clusterName,
-        "hdfs-site", "version1", configs, null);
+        "hdfs-site", "version1", configs, null, 1L, 1L);
 
     ClusterRequest crReq = new ClusterRequest(cluster.getClusterId(), clusterName, null, null);
     crReq.setDesiredConfig(Collections.singletonList(cr1));
@@ -533,7 +533,7 @@ public class JMXHostProviderTest {
     hostComponents.put("host1", null);
 
     expect(managementControllerMock.getClusters()).andReturn(clustersMock).anyTimes();
-    expect(managementControllerMock.findServiceName(clusterMock, "DATANODE")).andReturn("HDFS");
+    //expect(managementControllerMock.findServiceName(clusterMock, "DATANODE")).andReturn("HDFS");
     expect(clustersMock.getCluster("c1")).andReturn(clusterMock).anyTimes();
     expect(clusterMock.getService("HDFS")).andReturn(serviceMock).anyTimes();
     expect(serviceMock.getServiceComponent("DATANODE")).andReturn(serviceComponentMock).anyTimes();
@@ -632,7 +632,7 @@ public class JMXHostProviderTest {
     yarnConfigs.put(RESOURCEMANAGER_PORT, "localhost:50030");
     yarnConfigs.put(NODEMANAGER_PORT, "localhost:11111");
     ConfigurationRequest cr2 = new ConfigurationRequest("c1",
-      "yarn-site", "versionN+1", yarnConfigs, null);
+      "yarn-site", "versionN+1", yarnConfigs, null, 1L, 1L);
 
     ClusterRequest crReq = new ClusterRequest(1L, "c1", null, null);
     crReq.setDesiredConfig(Collections.singletonList(cr2));

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequestTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequestTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequestTest.java
index 5ed582f..01d69a5 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequestTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequestTest.java
@@ -82,7 +82,7 @@ public class ProvisionClusterRequestTest {
   @Before
   public void setUp() throws Exception {
     reset(blueprintFactory, blueprint, hostResourceProvider);
-    ProvisionClusterRequest.init(blueprintFactory);
+    ProvisionClusterRequest.init(null);
     // set host resource provider field
     Class clazz = BaseClusterRequest.class;
     Field f = clazz.getDeclaredField("hostResourceProvider");

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
index c0695b1..4e52250 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java
@@ -1717,7 +1717,7 @@ public class RequestResourceProviderTest {
 
     TopologyRequest topologyRequest = createNiceMock(TopologyRequest.class);
     expect(topologyRequest.getHostGroupInfo()).andReturn(hostGroupInfoMap).anyTimes();
-    expect(topology.getBlueprint()).andReturn(blueprint).anyTimes();
+    expect(topology.getBlueprint()).andReturn(null).anyTimes();
     expect(blueprint.shouldSkipFailure()).andReturn(true).anyTimes();
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ScaleClusterRequestTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ScaleClusterRequestTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ScaleClusterRequestTest.java
index 2a03b1f..b1e52cc 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ScaleClusterRequestTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ScaleClusterRequestTest.java
@@ -75,7 +75,7 @@ public class ScaleClusterRequestTest {
 
   @Before
   public void setUp() throws Exception {
-    ScaleClusterRequest.init(blueprintFactory);
+    ScaleClusterRequest.init(null);
     // set host resource provider field
     Class clazz = BaseClusterRequest.class;
     Field f = clazz.getDeclaredField("hostResourceProvider");

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ServiceResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ServiceResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ServiceResourceProviderTest.java
index 20730d1..4593409 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ServiceResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ServiceResourceProviderTest.java
@@ -123,7 +123,7 @@ public class ServiceResourceProviderTest {
     expect(managementController.getClusters()).andReturn(clusters).anyTimes();
     expect(managementController.getAmbariMetaInfo()).andReturn(ambariMetaInfo).anyTimes();
 
-    expect(cluster.addService(eq("Service100"),
+    expect(cluster.addService(eq(anyObject()), eq("Service100"), eq(anyObject()),
         EasyMock.anyObject(RepositoryVersionEntity.class))).andReturn(service);
 
     expect(clusters.getCluster("Cluster100")).andReturn(cluster).anyTimes();
@@ -1170,7 +1170,7 @@ public class ServiceResourceProviderTest {
     expect(managementController.getClusters()).andReturn(clusters).anyTimes();
     expect(managementController.getAmbariMetaInfo()).andReturn(ambariMetaInfo).anyTimes();
 
-    expect(cluster.addService(eq("Service200"), EasyMock.anyObject(RepositoryVersionEntity.class))).andReturn(service2);
+    expect(cluster.addService(eq(anyObject()), eq("Service200"), eq(anyObject()), EasyMock.anyObject(RepositoryVersionEntity.class))).andReturn(service2);
 
     expect(clusters.getCluster("Cluster100")).andReturn(cluster).anyTimes();
 
@@ -1242,7 +1242,7 @@ public class ServiceResourceProviderTest {
     expect(managementController.getClusters()).andReturn(clusters).anyTimes();
     expect(managementController.getAmbariMetaInfo()).andReturn(ambariMetaInfo).anyTimes();
 
-    expect(cluster.addService(eq("Service200"), EasyMock.anyObject(RepositoryVersionEntity.class))).andReturn(service2);
+    expect(cluster.addService(eq(anyObject()), eq("Service200"), eq(anyObject()), EasyMock.anyObject(RepositoryVersionEntity.class))).andReturn(service2);
 
     expect(clusters.getCluster("Cluster100")).andReturn(cluster).anyTimes();
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackConfigurationResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackConfigurationResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackConfigurationResourceProviderTest.java
index 9c48ad0..91c048b 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackConfigurationResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackConfigurationResourceProviderTest.java
@@ -29,7 +29,7 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.ambari.server.controller.AmbariManagementController;
-import org.apache.ambari.server.controller.StackConfigurationResponse;
+import org.apache.ambari.server.controller.StackLevelConfigurationResponse;
 import org.apache.ambari.server.controller.spi.Request;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.controller.spi.ResourceProvider;
@@ -54,14 +54,14 @@ public class StackConfigurationResourceProviderTest {
 
     AmbariManagementController managementController = createMock(AmbariManagementController.class);
 
-    Set<StackConfigurationResponse> allResponse = new HashSet<>();
+    Set<StackLevelConfigurationResponse> allResponse = new HashSet<>();
     
-    allResponse.add(new StackConfigurationResponse(PROPERTY_NAME, PROPERTY_VALUE, PROPERTY_DESC, TYPE, attributes));
+    allResponse.add(new StackLevelConfigurationResponse(PROPERTY_NAME, PROPERTY_VALUE, PROPERTY_DESC, TYPE, attributes));
    
     // set expectations
     expect(managementController.getStackConfigurations(
         AbstractResourceProviderTest.Matcher.getStackConfigurationRequestSet(null, null, null, null))).
-        andReturn(allResponse).times(1);
+        andReturn(null).times(1);
     // replay
     replay(managementController);
 
@@ -126,14 +126,14 @@ public class StackConfigurationResourceProviderTest {
 
     AmbariManagementController managementController = createMock(AmbariManagementController.class);
 
-    Set<StackConfigurationResponse> allResponse = new HashSet<>();
+    Set<StackLevelConfigurationResponse> allResponse = new HashSet<>();
 
-    allResponse.add(new StackConfigurationResponse(PROPERTY_NAME, PROPERTY_VALUE, PROPERTY_DESC, TYPE, attributes));
+    allResponse.add(new StackLevelConfigurationResponse(PROPERTY_NAME, PROPERTY_VALUE, PROPERTY_DESC, TYPE, attributes));
 
     // set expectations
     expect(managementController.getStackConfigurations(
         AbstractResourceProviderTest.Matcher.getStackConfigurationRequestSet(null, null, null, null))).
-        andReturn(allResponse).times(1);
+        andReturn(null).times(1);
     // replay
     replay(managementController);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProviderTest.java
index e3fa676..aee1952 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProviderTest.java
@@ -139,22 +139,22 @@ public class StackDefinedPropertyProviderTest {
 
     cluster.setDesiredStackVersion(stackId);
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(stackId, stackId.getStackVersion());
-    Service service = cluster.addService("HDFS", repositoryVersion);
+    Service service = cluster.addService(null, "HDFS", "", repositoryVersion);
     service.addServiceComponent("NAMENODE");
     service.addServiceComponent("DATANODE");
     service.addServiceComponent("JOURNALNODE");
 
-    service = cluster.addService("YARN", repositoryVersion);
+    service = cluster.addService(null, "YARN", "", repositoryVersion);
     service.addServiceComponent("RESOURCEMANAGER");
 
-    service = cluster.addService("HBASE", repositoryVersion);
+    service = cluster.addService(null, "HBASE", "", repositoryVersion);
     service.addServiceComponent("HBASE_MASTER");
     service.addServiceComponent("HBASE_REGIONSERVER");
 
     stackId = new StackId("HDP-2.1.1");
     repositoryVersion = helper.getOrCreateRepositoryVersion(stackId, stackId.getStackVersion());
 
-    service = cluster.addService("STORM", repositoryVersion);
+    service = cluster.addService(null, "STORM", "", repositoryVersion);
     service.addServiceComponent("STORM_REST_API");
 
     clusters.addHost("h1");

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackLevelConfigurationResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackLevelConfigurationResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackLevelConfigurationResourceProviderTest.java
index e9742bd..a50c3ad 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackLevelConfigurationResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackLevelConfigurationResourceProviderTest.java
@@ -29,7 +29,7 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.ambari.server.controller.AmbariManagementController;
-import org.apache.ambari.server.controller.StackConfigurationResponse;
+import org.apache.ambari.server.controller.StackLevelConfigurationResponse;
 import org.apache.ambari.server.controller.spi.Request;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.controller.spi.ResourceProvider;
@@ -54,14 +54,14 @@ public class StackLevelConfigurationResourceProviderTest {
 
     AmbariManagementController managementController = createMock(AmbariManagementController.class);
 
-    Set<StackConfigurationResponse> allResponse = new HashSet<>();
+    Set<StackLevelConfigurationResponse> allResponse = new HashSet<>();
     
-    allResponse.add(new StackConfigurationResponse(PROPERTY_NAME, PROPERTY_VALUE, PROPERTY_DESC, TYPE, attributes));
+    allResponse.add(new StackLevelConfigurationResponse(PROPERTY_NAME, PROPERTY_VALUE, PROPERTY_DESC, TYPE, attributes));
    
     // set expectations
     expect(managementController.getStackLevelConfigurations(
         AbstractResourceProviderTest.Matcher.getStackLevelConfigurationRequestSet(null, null, null))).
-        andReturn(allResponse).times(1);
+        andReturn(null).times(1);
     // replay
     replay(managementController);
 
@@ -120,14 +120,14 @@ public class StackLevelConfigurationResourceProviderTest {
 
     AmbariManagementController managementController = createMock(AmbariManagementController.class);
 
-    Set<StackConfigurationResponse> allResponse = new HashSet<>();
+    Set<StackLevelConfigurationResponse> allResponse = new HashSet<>();
 
-    allResponse.add(new StackConfigurationResponse(PROPERTY_NAME, PROPERTY_VALUE, PROPERTY_DESC, TYPE, attributes));
+    allResponse.add(new StackLevelConfigurationResponse(PROPERTY_NAME, PROPERTY_VALUE, PROPERTY_DESC, TYPE, attributes));
 
     // set expectations
     expect(managementController.getStackLevelConfigurations(
         AbstractResourceProviderTest.Matcher.getStackLevelConfigurationRequestSet(null, null, null))).
-        andReturn(allResponse).times(1);
+        andReturn(null).times(1);
     // replay
     replay(managementController);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackTest.java
index 68257d1..9e61a70 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackTest.java
@@ -38,8 +38,9 @@ import java.util.Set;
 import org.apache.ambari.server.api.services.AmbariMetaInfo;
 import org.apache.ambari.server.controller.AmbariManagementController;
 import org.apache.ambari.server.controller.StackConfigurationRequest;
-import org.apache.ambari.server.controller.StackConfigurationResponse;
+//import org.apache.ambari.server.controller.StackConfigurationResponse;
 import org.apache.ambari.server.controller.StackLevelConfigurationRequest;
+import org.apache.ambari.server.controller.StackLevelConfigurationResponse;
 import org.apache.ambari.server.controller.StackServiceComponentRequest;
 import org.apache.ambari.server.controller.StackServiceComponentResponse;
 import org.apache.ambari.server.controller.StackServiceRequest;
@@ -71,7 +72,7 @@ public class StackTest {
     StackServiceComponentResponse stackComponentResponse = createNiceMock(StackServiceComponentResponse.class);
     Capture<Set<StackConfigurationRequest>> stackConfigurationRequestCapture = EasyMock.newCapture();
     Capture<Set<StackLevelConfigurationRequest>> stackLevelConfigurationRequestCapture = EasyMock.newCapture();
-    StackConfigurationResponse stackConfigurationResponse = EasyMock.createNiceMock(StackConfigurationResponse.class);
+    StackLevelConfigurationResponse stackConfigurationResponse = EasyMock.createNiceMock(StackLevelConfigurationResponse.class);
 
     expect(controller.getStackServices(capture(stackServiceRequestCapture))).
         andReturn(Collections.singleton(stackServiceResponse)).anyTimes();
@@ -134,7 +135,7 @@ public class StackTest {
 
     Set<PropertyDependencyInfo> setOfDependencyInfo = new HashSet<>();
 
-    StackConfigurationResponse mockResponse = mockSupport.createMock(StackConfigurationResponse.class);
+    StackLevelConfigurationResponse mockResponse = mockSupport.createMock(StackLevelConfigurationResponse.class);
     expect(mockResponse.getPropertyName()).andReturn("test-property-one");
     expect(mockResponse.getPropertyValue()).andReturn("test-value-one");
     expect(mockResponse.getPropertyAttributes()).andReturn(Collections.emptyMap());
@@ -166,8 +167,8 @@ public class StackTest {
     StackServiceComponentResponse stackComponentResponse = createNiceMock(StackServiceComponentResponse.class);
     Capture<Set<StackConfigurationRequest>> stackConfigurationRequestCapture = EasyMock.newCapture();
     Capture<Set<StackLevelConfigurationRequest>> stackLevelConfigurationRequestCapture = EasyMock.newCapture();
-    StackConfigurationResponse stackConfigurationResponse = EasyMock.createNiceMock(StackConfigurationResponse.class);
-    StackConfigurationResponse stackConfigurationResponse2 = EasyMock.createNiceMock(StackConfigurationResponse.class);
+    StackLevelConfigurationResponse stackConfigurationResponse = EasyMock.createNiceMock(StackLevelConfigurationResponse.class);
+    StackLevelConfigurationResponse stackConfigurationResponse2 = EasyMock.createNiceMock(StackLevelConfigurationResponse.class);
 
     expect(controller.getStackServices(capture(stackServiceRequestCapture))).
         andReturn(Collections.singleton(stackServiceResponse)).anyTimes();
@@ -249,8 +250,8 @@ public class StackTest {
     AmbariMetaInfo metaInfo = createNiceMock(AmbariMetaInfo.class);
     StackServiceResponse stackServiceResponse = createNiceMock(StackServiceResponse.class);
     StackServiceComponentResponse stackComponentResponse = createNiceMock(StackServiceComponentResponse.class);
-    StackConfigurationResponse stackConfigurationResponse1 = createNiceMock(StackConfigurationResponse.class);
-    StackConfigurationResponse stackConfigurationResponse2 = createNiceMock(StackConfigurationResponse.class);
+    StackLevelConfigurationResponse stackConfigurationResponse1 = createNiceMock(StackLevelConfigurationResponse.class);
+    StackLevelConfigurationResponse stackConfigurationResponse2 = createNiceMock(StackLevelConfigurationResponse.class);
 
     String testServiceName = "service1";
     String testEmptyConfigType = "test-empty-config-type";
@@ -320,7 +321,7 @@ public class StackTest {
     AmbariMetaInfo metaInfo = createNiceMock(AmbariMetaInfo.class);
     StackServiceResponse stackServiceResponse = createNiceMock(StackServiceResponse.class);
     StackServiceComponentResponse stackComponentResponse = createNiceMock(StackServiceComponentResponse.class);
-    StackConfigurationResponse stackConfigurationResponse1 = createNiceMock(StackConfigurationResponse.class);
+    StackLevelConfigurationResponse stackConfigurationResponse1 = createNiceMock(StackLevelConfigurationResponse.class);
 
     String testServiceName = "service1";
     String testEmptyConfigType = "test-empty-config-type";

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackUpgradeConfigurationMergeTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackUpgradeConfigurationMergeTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackUpgradeConfigurationMergeTest.java
index 51be08b..b7bf53d 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackUpgradeConfigurationMergeTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackUpgradeConfigurationMergeTest.java
@@ -17,7 +17,7 @@
  */
 package org.apache.ambari.server.controller.internal;
 
-import static org.easymock.EasyMock.eq;
+import static org.easymock.EasyMock.anyLong;
 import static org.easymock.EasyMock.expect;
 import static org.easymock.EasyMock.expectLastCall;
 import static org.junit.Assert.assertEquals;
@@ -261,7 +261,7 @@ public class StackUpgradeConfigurationMergeTest extends EasyMockSupport {
     ServiceConfigDAO serviceConfigDAOMock = m_injector.getInstance(ServiceConfigDAO.class);
     List<ServiceConfigEntity> latestServiceConfigs = Lists.newArrayList(zookeeperServiceConfig);
     expect(serviceConfigDAOMock.getLastServiceConfigsForService(EasyMock.anyLong(),
-        eq("ZOOKEEPER"))).andReturn(latestServiceConfigs).once();
+        anyLong())).andReturn(latestServiceConfigs).once();
 
     UpgradeContext context = createNiceMock(UpgradeContext.class);
     expect(context.getCluster()).andReturn(cluster).atLeastOnce();
@@ -393,7 +393,7 @@ public class StackUpgradeConfigurationMergeTest extends EasyMockSupport {
     ServiceConfigDAO serviceConfigDAOMock = m_injector.getInstance(ServiceConfigDAO.class);
     List<ServiceConfigEntity> latestServiceConfigs = Lists.newArrayList(zookeeperServiceConfig);
     expect(serviceConfigDAOMock.getLastServiceConfigsForService(EasyMock.anyLong(),
-        eq(serviceName))).andReturn(latestServiceConfigs).once();
+        anyLong())).andReturn(latestServiceConfigs).once();
 
     UpgradeContext context = createNiceMock(UpgradeContext.class);
     expect(context.getCluster()).andReturn(cluster).atLeastOnce();

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UnitUpdaterTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UnitUpdaterTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UnitUpdaterTest.java
index 6de6cd1..320e167 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UnitUpdaterTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UnitUpdaterTest.java
@@ -24,7 +24,7 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.ambari.server.controller.StackConfigurationResponse;
+import org.apache.ambari.server.controller.StackLevelConfigurationResponse;
 import org.apache.ambari.server.state.ValueAttributesInfo;
 import org.apache.ambari.server.topology.Blueprint;
 import org.apache.ambari.server.topology.ClusterTopology;
@@ -89,7 +89,7 @@ public class UnitUpdaterTest extends EasyMockSupport {
   private void stackUnitIs(String name, String unit) {
     ValueAttributesInfo propertyValueAttributes = new ValueAttributesInfo();
     propertyValueAttributes.setUnit(unit);
-    stackConfigWithMetadata.put(name, new Stack.ConfigProperty(new StackConfigurationResponse(
+    stackConfigWithMetadata.put(name, new Stack.ConfigProperty(new StackLevelConfigurationResponse(
       name,
       "any",
       "any",
@@ -105,10 +105,10 @@ public class UnitUpdaterTest extends EasyMockSupport {
 
   private String updateUnit(String serviceName, String configType, String propName, String propValue) throws InvalidTopologyException, ConfigurationTopologyException {
     UnitUpdater updater = new UnitUpdater(serviceName, configType);
-    expect(clusterTopology.getBlueprint()).andReturn(blueprint).anyTimes();
+    expect(clusterTopology.getBlueprint()).andReturn(null).anyTimes();
     expect(blueprint.getStack()).andReturn(stack).anyTimes();
     expect(stack.getConfigurationPropertiesWithMetadata(serviceName, configType)).andReturn(stackConfigWithMetadata).anyTimes();
     replayAll();
-    return updater.updateForClusterCreate(propName, propValue, Collections.emptyMap(), clusterTopology);
+    return updater.updateForClusterCreate(propName, propValue, Collections.emptyMap(), clusterTopology, null);
   }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java
index d6b1ab3..9c5fb98 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java
@@ -260,7 +260,7 @@ public class UpgradeResourceProviderTest extends EasyMockSupport {
     clusters.mapHostToCluster("h1", "c1");
 
     // add a single ZK server and client on 2.1.1.0
-    Service service = cluster.addService("ZOOKEEPER", repoVersionEntity2110);
+    Service service = cluster.addService(null, "ZOOKEEPER", "", repoVersionEntity2110);
     ServiceComponent component = service.addServiceComponent("ZOOKEEPER_SERVER");
     ServiceComponentHost sch = component.addServiceComponentHost("h1");
     sch.setVersion("2.1.1.0");
@@ -321,7 +321,7 @@ public class UpgradeResourceProviderTest extends EasyMockSupport {
     assertEquals(1, upgrades.size());
 
     UpgradeEntity entity = upgrades.get(0);
-    assertEquals(cluster.getClusterId(), entity.getClusterId().longValue());
+    assertTrue(cluster.getClusterId().longValue() == entity.getClusterId().longValue());
 
     List<UpgradeGroupEntity> upgradeGroups = entity.getUpgradeGroups();
     assertEquals(3, upgradeGroups.size());
@@ -382,7 +382,7 @@ public class UpgradeResourceProviderTest extends EasyMockSupport {
     assertEquals(1, upgrades.size());
 
     UpgradeEntity entity = upgrades.get(0);
-    assertEquals(cluster.getClusterId(), entity.getClusterId().longValue());
+    assertTrue(cluster.getClusterId().longValue() == entity.getClusterId().longValue());
 
     List<UpgradeGroupEntity> upgradeGroups = entity.getUpgradeGroups();
     assertEquals(2, upgradeGroups.size());
@@ -428,7 +428,7 @@ public class UpgradeResourceProviderTest extends EasyMockSupport {
     assertEquals(1, upgrades.size());
 
     UpgradeEntity entity = upgrades.get(0);
-    assertEquals(cluster.getClusterId(), entity.getClusterId().longValue());
+    assertTrue(cluster.getClusterId().longValue() == entity.getClusterId().longValue());
 
     List<UpgradeGroupEntity> upgradeGroups = entity.getUpgradeGroups();
     assertEquals(2, upgradeGroups.size());
@@ -682,7 +682,7 @@ public class UpgradeResourceProviderTest extends EasyMockSupport {
     assertEquals(2, upgrades.size());
 
     UpgradeEntity downgrade = upgrades.get(1);
-    assertEquals(cluster.getClusterId(), downgrade.getClusterId().longValue());
+    assertTrue(cluster.getClusterId().longValue() == downgrade.getClusterId().longValue());
 
     List<UpgradeGroupEntity> upgradeGroups = downgrade.getUpgradeGroups();
     assertEquals(3, upgradeGroups.size());
@@ -780,7 +780,7 @@ public class UpgradeResourceProviderTest extends EasyMockSupport {
     Cluster cluster = clusters.getCluster("c1");
 
     // add additional service for the test
-    Service service = cluster.addService("HIVE", repoVersionEntity2110);
+    Service service = cluster.addService(null, "HIVE", "", repoVersionEntity2110);
 
     ServiceComponent component = service.addServiceComponent("HIVE_SERVER");
     ServiceComponentHost sch = component.addServiceComponentHost("h1");
@@ -1200,7 +1200,7 @@ public class UpgradeResourceProviderTest extends EasyMockSupport {
     assertEquals(1, upgrades.size());
 
     UpgradeEntity entity = upgrades.get(0);
-    assertEquals(cluster.getClusterId(), entity.getClusterId().longValue());
+    assertTrue(cluster.getClusterId().longValue() == entity.getClusterId().longValue());
     assertEquals(UpgradeType.ROLLING, entity.getUpgradeType());
 
     StageDAO stageDAO = injector.getInstance(StageDAO.class);
@@ -1455,7 +1455,7 @@ public class UpgradeResourceProviderTest extends EasyMockSupport {
   @Test
   public void testCreateUpgradeDowngradeCycleAdvertisingVersion() throws Exception {
     Cluster cluster = clusters.getCluster("c1");
-    Service service = cluster.addService("STORM", repoVersionEntity2110);
+    Service service = cluster.addService(null, "STORM", "", repoVersionEntity2110);
 
     ServiceComponent component = service.addServiceComponent("DRPC_SERVER");
     ServiceComponentHost sch = component.addServiceComponentHost("h1");
@@ -1638,7 +1638,7 @@ public class UpgradeResourceProviderTest extends EasyMockSupport {
     Cluster cluster = clusters.getCluster("c1");
 
     // add a single ZK server and client on 2.1.1.0
-    Service service = cluster.addService("HBASE", repoVersionEntity2110);
+    Service service = cluster.addService(null, "HBASE", "", repoVersionEntity2110);
     ServiceComponent component = service.addServiceComponent("HBASE_MASTER");
     ServiceComponentHost sch = component.addServiceComponentHost("h1");
     sch.setVersion("2.1.1.0");
@@ -1725,7 +1725,7 @@ public class UpgradeResourceProviderTest extends EasyMockSupport {
     Cluster cluster = clusters.getCluster("c1");
 
     // add a single ZK server and client on 2.1.1.0
-    Service service = cluster.addService("HBASE", repoVersionEntity2110);
+    Service service = cluster.addService(null, "HBASE", "", repoVersionEntity2110);
     ServiceComponent component = service.addServiceComponent("HBASE_MASTER");
     ServiceComponentHost sch = component.addServiceComponentHost("h1");
     sch.setVersion("2.1.1.0");

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeSummaryResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeSummaryResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeSummaryResourceProviderTest.java
index 4834ef8..387fa45 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeSummaryResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeSummaryResourceProviderTest.java
@@ -173,7 +173,7 @@ public class UpgradeSummaryResourceProviderTest {
     clusters.mapHostToCluster("h1", "c1");
 
     // add a single ZOOKEEPER server
-    Service service = cluster.addService("ZOOKEEPER", repoVersionEntity);
+    Service service = cluster.addService(null, "ZOOKEEPER", "", repoVersionEntity);
 
     ServiceComponent component = service.addServiceComponent("ZOOKEEPER_SERVER");
     ServiceComponentHost sch = component.addServiceComponentHost("h1");

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProviderTest.java
index 402a8f8..8e968cc 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProviderTest.java
@@ -695,7 +695,7 @@ public class VersionDefinitionResourceProviderTest {
       cluster = clusters.getCluster("c1");
     }
 
-    cluster.addService(serviceName, serviceRepo);
+    cluster.addService(null, serviceName, "", serviceRepo);
   }
 
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LoggingSearchPropertyProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LoggingSearchPropertyProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LoggingSearchPropertyProviderTest.java
index 1d19632..e9f7c4d 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LoggingSearchPropertyProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LoggingSearchPropertyProviderTest.java
@@ -198,7 +198,7 @@ public class LoggingSearchPropertyProviderTest {
           mockSupport.createMock(LogDefinition.class);
 
       Service serviceMock = mockSupport.createNiceMock(Service.class);
-      expect(controllerMock.findServiceName(clusterMock, expectedComponentName)).andReturn(expectedServiceName).atLeastOnce();
+      //expect(controllerMock.findServiceName(clusterMock, expectedComponentName)).andReturn(expectedServiceName).atLeastOnce();
       expect(clusterMock.getService(expectedServiceName)).andReturn(serviceMock).anyTimes();
       expect(serviceMock.getDesiredStackId()).andReturn(stackIdMock).anyTimes();
 
@@ -406,7 +406,7 @@ public class LoggingSearchPropertyProviderTest {
           mockSupport.createMock(LoggingRequestHelper.class);
 
       Service serviceMock = mockSupport.createNiceMock(Service.class);
-      expect(controllerMock.findServiceName(clusterMock, expectedComponentName)).andReturn(expectedServiceName).atLeastOnce();
+      //expect(controllerMock.findServiceName(clusterMock, expectedComponentName)).andReturn(expectedServiceName).atLeastOnce();
       expect(clusterMock.getService(expectedServiceName)).andReturn(serviceMock).anyTimes();
       expect(serviceMock.getDesiredStackId()).andReturn(stackIdMock).anyTimes();
 
@@ -573,7 +573,7 @@ public class LoggingSearchPropertyProviderTest {
           mockSupport.createMock(LoggingRequestHelper.class);
 
       Service serviceMock = mockSupport.createNiceMock(Service.class);
-      expect(controllerMock.findServiceName(clusterMock, expectedComponentName)).andReturn(expectedServiceName).atLeastOnce();
+      //expect(controllerMock.findServiceName(clusterMock, expectedComponentName)).andReturn(expectedServiceName).atLeastOnce();
       expect(clusterMock.getService(expectedServiceName)).andReturn(serviceMock).anyTimes();
       expect(serviceMock.getDesiredStackId()).andReturn(stackIdMock).anyTimes();
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/KerberosIdentityCleanerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/KerberosIdentityCleanerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/KerberosIdentityCleanerTest.java
index 2518da9..687cbee 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/KerberosIdentityCleanerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/KerberosIdentityCleanerTest.java
@@ -163,11 +163,11 @@ public class KerberosIdentityCleanerTest extends EasyMockSupport {
   }
 
   private void uninstallComponent(String service, String component, String host) throws KerberosMissingAdminCredentialsException {
-    kerberosIdentityCleaner.componentRemoved(new ServiceComponentUninstalledEvent(CLUSTER_ID, "any", "any", service, component, host, false));
+    kerberosIdentityCleaner.componentRemoved(new ServiceComponentUninstalledEvent(CLUSTER_ID, "any", "any", service, "", "", component, host, false));
   }
 
   private void uninstallService(String service, List<Component> components) throws KerberosMissingAdminCredentialsException {
-    kerberosIdentityCleaner.serviceRemoved(new ServiceRemovedEvent(CLUSTER_ID, "any", "any", service, components));
+    kerberosIdentityCleaner.serviceRemoved(new ServiceRemovedEvent(CLUSTER_ID, "any", "any", service, "", "", components));
   }
 
   @Before

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/state/GeneralServiceCalculatedStateTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/state/GeneralServiceCalculatedStateTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/state/GeneralServiceCalculatedStateTest.java
index 015b0c2..0b6c3f3 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/state/GeneralServiceCalculatedStateTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/state/GeneralServiceCalculatedStateTest.java
@@ -86,7 +86,7 @@ public abstract class GeneralServiceCalculatedStateTest {
     clusters.addCluster(clusterName, stack211);
     cluster = clusters.getCluster(clusterName);
 
-    service = cluster.addService(getServiceName(), repositoryVersion);
+    service = cluster.addService(null, getServiceName(), "", repositoryVersion);
 
     createComponentsAndHosts();
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/events/EventsTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/events/EventsTest.java b/ambari-server/src/test/java/org/apache/ambari/server/events/EventsTest.java
index 6ebd444..2376079 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/events/EventsTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/events/EventsTest.java
@@ -17,6 +17,7 @@
  */
 package org.apache.ambari.server.events;
 
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -25,6 +26,7 @@ import java.util.UUID;
 import javax.persistence.EntityManager;
 
 import org.apache.ambari.server.H2DatabaseCleaner;
+import org.apache.ambari.server.api.services.ServiceKey;
 import org.apache.ambari.server.events.AmbariEvent.AmbariEventType;
 import org.apache.ambari.server.orm.GuiceJpaInitializer;
 import org.apache.ambari.server.orm.InMemoryDefaultTestModule;
@@ -379,7 +381,7 @@ public class EventsTest {
 
   private void installHdfsService() throws Exception {
     String serviceName = "HDFS";
-    Service service = m_serviceFactory.createNew(m_cluster, serviceName, m_repositoryVersion);
+    Service service = m_serviceFactory.createNew(m_cluster, null, new ArrayList<ServiceKey>(), serviceName, "", m_repositoryVersion);
     service = m_cluster.getService(serviceName);
     Assert.assertNotNull(service);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/upgrade/HostVersionOutOfSyncListenerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/upgrade/HostVersionOutOfSyncListenerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/upgrade/HostVersionOutOfSyncListenerTest.java
index 24d4f55..ed3a744 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/upgrade/HostVersionOutOfSyncListenerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/events/listeners/upgrade/HostVersionOutOfSyncListenerTest.java
@@ -514,7 +514,7 @@ public class HostVersionOutOfSyncListenerTest {
 
         ServiceComponentUninstalledEvent event = new ServiceComponentUninstalledEvent(
             c1.getClusterId(), clusterStackId.getStackName(), clusterStackId.getStackVersion(),
-            "HDFS", "DATANODE", sch.getHostName(), false);
+            "HDFS", "", "", "DATANODE", sch.getHostName(), false);
 
         m_eventPublisher.publish(event);
       }
@@ -548,7 +548,7 @@ public class HostVersionOutOfSyncListenerTest {
       String serviceName, RepositoryVersionEntity repositoryVersionEntity) throws AmbariException {
     StackId stackIdObj = new StackId(stackId);
     cl.setDesiredStackVersion(stackIdObj);
-    cl.addService(serviceName, repositoryVersionEntity);
+    cl.addService(null, serviceName, "", repositoryVersionEntity);
 
     for (Map.Entry<String, List<Integer>> component : topology.entrySet()) {
 
@@ -564,7 +564,7 @@ public class HostVersionOutOfSyncListenerTest {
       }
 
       ServiceInstalledEvent event = new ServiceInstalledEvent(cl.getClusterId(),
-          stackIdObj.getStackName(), stackIdObj.getStackVersion(), serviceName);
+          stackIdObj.getStackName(), stackIdObj.getStackVersion(), serviceName, "", "");
       m_eventPublisher.publish(event);
     }
   }
@@ -585,7 +585,7 @@ public class HostVersionOutOfSyncListenerTest {
           .getServiceComponent(componentName), hostName));
       ServiceComponentInstalledEvent event = new ServiceComponentInstalledEvent(cl.getClusterId(),
           stackIdObj.getStackName(), stackIdObj.getStackVersion(),
-          serviceName, componentName, hostName, false /* recovery not enabled */);
+          serviceName, "", "",componentName, hostName, false /* recovery not enabled */);
       m_eventPublisher.publish(event);
     }
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/orm/OrmTestHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/OrmTestHelper.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/OrmTestHelper.java
index bd8be3b..27fb18b 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/OrmTestHelper.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/OrmTestHelper.java
@@ -42,6 +42,7 @@ import org.apache.ambari.server.Role;
 import org.apache.ambari.server.RoleCommand;
 import org.apache.ambari.server.actionmanager.HostRoleStatus;
 import org.apache.ambari.server.api.services.AmbariMetaInfo;
+import org.apache.ambari.server.api.services.ServiceKey;
 import org.apache.ambari.server.orm.dao.AlertDefinitionDAO;
 import org.apache.ambari.server.orm.dao.AlertDispatchDAO;
 import org.apache.ambari.server.orm.dao.AlertsDAO;
@@ -453,7 +454,7 @@ public class OrmTestHelper {
         cluster.getDesiredStackVersion().getStackVersion());
 
     String serviceName = "HDFS";
-    Service service = serviceFactory.createNew(cluster, serviceName, repositoryVersion);
+    Service service = serviceFactory.createNew(cluster, null, new ArrayList<ServiceKey>(), serviceName, "", repositoryVersion);
     service = cluster.getService(serviceName);
     assertNotNull(service);
 
@@ -487,7 +488,7 @@ public class OrmTestHelper {
         cluster.getDesiredStackVersion().getStackVersion());
 
     String serviceName = "YARN";
-    Service service = serviceFactory.createNew(cluster, serviceName, repositoryVersion);
+    Service service = serviceFactory.createNew(cluster, null, new ArrayList<ServiceKey>(), serviceName, "", repositoryVersion);
     service = cluster.getService(serviceName);
     assertNotNull(service);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/orm/TestOrmImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/TestOrmImpl.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/TestOrmImpl.java
index 62ac31c..4a49cdc 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/TestOrmImpl.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/TestOrmImpl.java
@@ -170,11 +170,11 @@ public class TestOrmImpl extends Assert {
 
     createService(currentTime, serviceName, clusterName);
 
-    ClusterServiceEntity clusterServiceEntity = clusterServiceDAO.findByClusterAndServiceNames(clusterName, serviceName);
+    ClusterServiceEntity clusterServiceEntity = null;//clusterServiceDAO.findByClusterAndServiceNames(clusterName, serviceName);
 
     clusterServiceDAO.remove(clusterServiceEntity);
 
-    assertNull(clusterServiceDAO.findByClusterAndServiceNames(clusterName, serviceName));
+    //assertNull(clusterServiceDAO.findByClusterAndServiceNames(clusterName, serviceName));
 
   }
 
@@ -190,7 +190,7 @@ public class TestOrmImpl extends Assert {
     clusterServiceDAO.create(clusterServiceEntity);
     clusterDAO.merge(cluster);
 
-    clusterServiceEntity = clusterServiceDAO.findByClusterAndServiceNames(clusterName, serviceName);
+    clusterServiceEntity = null;//clusterServiceDAO.findByClusterAndServiceNames(clusterName, serviceName);
     assertNotNull(clusterServiceEntity);
 
     clusterServiceDAO.merge(clusterServiceEntity);
@@ -207,12 +207,12 @@ public class TestOrmImpl extends Assert {
 
     createService(currentTime, serviceName, clusterName);
 
-    ClusterServiceEntity clusterServiceEntity = clusterServiceDAO.findByClusterAndServiceNames(clusterName, serviceName);
+    ClusterServiceEntity clusterServiceEntity = null;//clusterServiceDAO.findByClusterAndServiceNames(clusterName, serviceName);
     clusterServiceDAO.remove(clusterServiceEntity);
 
-    Assert.assertNull(
-        clusterServiceDAO.findByClusterAndServiceNames(clusterName,
-            serviceName));
+    //Assert.assertNull(
+    //    clusterServiceDAO.findByClusterAndServiceNames(clusterName,
+    //        serviceName));
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java
index 80cb4dc..de9c7d3 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java
@@ -138,7 +138,7 @@ public class ServiceConfigDAOTest {
     }
 
     ServiceConfigEntity serviceConfigEntity = new ServiceConfigEntity();
-    serviceConfigEntity.setServiceName(serviceName);
+    //serviceConfigEntity.setServiceName(serviceName);
     serviceConfigEntity.setUser(userName);
     serviceConfigEntity.setVersion(version);
     serviceConfigEntity.setServiceConfigId(serviceConfigId);
@@ -198,7 +198,7 @@ public class ServiceConfigDAOTest {
     createServiceConfig("HDFS", "admin", 1L, 1L, 1111L, null);
 
     ServiceConfigEntity serviceConfigEntity =
-      serviceConfigDAO.findByServiceAndVersion("HDFS", 1L);
+      serviceConfigDAO.findByServiceAndVersion(1L, 1L);
 
     Long clusterId = clusterDAO.findByName("c1").getClusterId();
 
@@ -221,10 +221,10 @@ public class ServiceConfigDAOTest {
     createServiceConfig("YARN", "admin", 1L, 3L, 3333L, null);
 
     long hdfsVersion = serviceConfigDAO.findNextServiceConfigVersion(
-        clusterDAO.findByName("c1").getClusterId(), "HDFS");
+        clusterDAO.findByName("c1").getClusterId(), 1L);
 
     long yarnVersion = serviceConfigDAO.findNextServiceConfigVersion(
-        clusterDAO.findByName("c1").getClusterId(), "YARN");
+        clusterDAO.findByName("c1").getClusterId(), 1L);
 
     Assert.assertEquals(3, hdfsVersion);
     Assert.assertEquals(2, yarnVersion);
@@ -280,7 +280,7 @@ public class ServiceConfigDAOTest {
     configGroupEntity1.setGroupName("group1");
     configGroupEntity1.setDescription("group1_desc");
     configGroupEntity1.setTag("HDFS");
-    configGroupEntity1.setServiceName("HDFS");
+    //configGroupEntity1.setServiceName("HDFS");
     configGroupDAO.create(configGroupEntity1);
     ConfigGroupEntity group1 = configGroupDAO.findByName("group1");
     ConfigGroupEntity configGroupEntity2 = new ConfigGroupEntity();
@@ -289,7 +289,7 @@ public class ServiceConfigDAOTest {
     configGroupEntity2.setGroupName("group2");
     configGroupEntity2.setDescription("group2_desc");
     configGroupEntity2.setTag("HDFS");
-    configGroupEntity2.setServiceName("HDFS");
+    //configGroupEntity2.setServiceName("HDFS");
     configGroupDAO.create(configGroupEntity2);
     ConfigGroupEntity group2 = configGroupDAO.findByName("group2");
     createServiceConfig(serviceName, "admin", 1L, 1L, 1111L, null);
@@ -299,7 +299,7 @@ public class ServiceConfigDAOTest {
     createServiceConfigWithGroup(serviceName, "admin", 4L, 4L, 3330L, null, group2.getGroupId());
 
     List<ServiceConfigEntity> serviceConfigEntities = serviceConfigDAO
-        .getLastServiceConfigsForService(clusterDAO.findByName("c1").getClusterId(), serviceName);
+        .getLastServiceConfigsForService(clusterDAO.findByName("c1").getClusterId(), 1L);
     Assert.assertNotNull(serviceConfigEntities);
     Assert.assertEquals(3, serviceConfigEntities.size());
 
@@ -321,7 +321,7 @@ public class ServiceConfigDAOTest {
     Long clusterId = clusterDAO.findByName("c1").getClusterId();
 
     ServiceConfigEntity serviceConfigEntity =
-      serviceConfigDAO.getLastServiceConfig(clusterId, "HDFS");
+      serviceConfigDAO.getLastServiceConfig(clusterId, 1L);
 
     Assert.assertNotNull(serviceConfigEntity);
     Assert.assertEquals("c1", serviceConfigEntity.getClusterEntity().getClusterName());
@@ -391,14 +391,14 @@ public class ServiceConfigDAOTest {
     long clusterId = serviceConfigEntity.getClusterId();
 
     List<ServiceConfigEntity> serviceConfigs = serviceConfigDAO.getServiceConfigsForServiceAndStack(
-        clusterId, HDP_01, "HDFS");
+        clusterId, HDP_01, 1L);
 
     Assert.assertEquals(3, serviceConfigs.size());
 
-    serviceConfigs = serviceConfigDAO.getServiceConfigsForServiceAndStack(clusterId, HDP_01, "YARN");
+    serviceConfigs = serviceConfigDAO.getServiceConfigsForServiceAndStack(clusterId, HDP_01, 1L);
     Assert.assertEquals(1, serviceConfigs.size());
     
-    serviceConfigs = serviceConfigDAO.getServiceConfigsForServiceAndStack(clusterId, HDP_02, "HDFS");
+    serviceConfigs = serviceConfigDAO.getServiceConfigsForServiceAndStack(clusterId, HDP_02, 1L);
     Assert.assertEquals(0, serviceConfigs.size());
   }
 
@@ -423,7 +423,7 @@ public class ServiceConfigDAOTest {
     configGroupEntity1.setGroupName("group1");
     configGroupEntity1.setDescription("group1_desc");
     configGroupEntity1.setTag("HDFS");
-    configGroupEntity1.setServiceName("HDFS");
+    //configGroupEntity1.setServiceName("HDFS");
     configGroupDAO.create(configGroupEntity1);
     ConfigGroupEntity group1 = configGroupDAO.findByName("group1");
     createServiceConfigWithGroup("HDFS", "admin", 3L, 8L, 2222L, null, group1.getGroupId());
@@ -606,16 +606,16 @@ public class ServiceConfigDAOTest {
     configGroupEntity1.setGroupName("toTestDeleteGroup_OOZIE");
     configGroupEntity1.setDescription("toTestDeleteGroup_OOZIE_DESC");
     configGroupEntity1.setTag("OOZIE");
-    configGroupEntity1.setServiceName("OOZIE");
+    //configGroupEntity1.setServiceName("OOZIE");
     configGroupDAO.create(configGroupEntity1);
     ConfigGroupEntity testDeleteGroup_OOZIE = configGroupDAO.findByName("toTestDeleteGroup_OOZIE");
     createServiceConfigWithGroup("OOZIE", "", 2L, 2L, System.currentTimeMillis(), null,
         testDeleteGroup_OOZIE.getGroupId());
     Collection<ServiceConfigEntity> serviceConfigEntityList = serviceConfigDAO.getLastServiceConfigsForService(clusterId,
-        "OOZIE");
+        1L);
     Assert.assertEquals(2, serviceConfigEntityList.size());
     configGroupDAO.remove(configGroupEntity1);
-    serviceConfigEntityList = serviceConfigDAO.getLastServiceConfigsForService(clusterId, "OOZIE");
+    serviceConfigEntityList = serviceConfigDAO.getLastServiceConfigsForService(clusterId, 1L);
     Assert.assertEquals(1, serviceConfigEntityList.size());
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/TopologyLogicalRequestDAOTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/TopologyLogicalRequestDAOTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/TopologyLogicalRequestDAOTest.java
index 6d6d32a..bd529c9 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/TopologyLogicalRequestDAOTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/TopologyLogicalRequestDAOTest.java
@@ -72,8 +72,8 @@ public class TopologyLogicalRequestDAOTest {
     TopologyRequestEntity requestEntity = new TopologyRequestEntity();
     requestEntity.setAction("a1");
     requestEntity.setBlueprintName("bp1");
-    requestEntity.setClusterAttributes("attributes");
-    requestEntity.setClusterProperties("properties");
+    //requestEntity.setClusterAttributes("attributes");
+    //requestEntity.setClusterProperties("properties");
     requestEntity.setClusterId(clusterId);
     requestEntity.setDescription("description");
     requestDAO.create(requestEntity);

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/TopologyRequestDAOTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/TopologyRequestDAOTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/TopologyRequestDAOTest.java
index 68aef6c..3437d7d 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/TopologyRequestDAOTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/TopologyRequestDAOTest.java
@@ -63,8 +63,8 @@ public class TopologyRequestDAOTest {
     TopologyRequestEntity requestEntity = new TopologyRequestEntity();
     requestEntity.setAction("a1");
     requestEntity.setBlueprintName("bp1");
-    requestEntity.setClusterAttributes("attributes");
-    requestEntity.setClusterProperties("properties");
+    //requestEntity.setClusterAttributes("attributes");
+    //requestEntity.setClusterProperties("properties");
     requestEntity.setClusterId(clusterId);
     requestEntity.setDescription("description");
     TopologyHostGroupEntity hostGroupEntity = new TopologyHostGroupEntity();
@@ -88,8 +88,8 @@ public class TopologyRequestDAOTest {
     TopologyRequestEntity requestEntity = requestEntities.iterator().next();
     Assert.assertEquals("a1", requestEntity.getAction());
     Assert.assertEquals("bp1", requestEntity.getBlueprintName());
-    Assert.assertEquals("attributes", requestEntity.getClusterAttributes());
-    Assert.assertEquals("properties", requestEntity.getClusterProperties());
+    //Assert.assertEquals("attributes", requestEntity.getClusterAttributes());
+    //Assert.assertEquals("properties", requestEntity.getClusterProperties());
     Assert.assertEquals("description", requestEntity.getDescription());
     Collection<TopologyHostGroupEntity> hostGroupEntities = requestEntity.getTopologyHostGroupEntities();
     Assert.assertEquals(1, hostGroupEntities.size());

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ServiceConfigEntityTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ServiceConfigEntityTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ServiceConfigEntityTest.java
index c82c58e..fe0fcaa 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ServiceConfigEntityTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ServiceConfigEntityTest.java
@@ -29,7 +29,7 @@ public class ServiceConfigEntityTest {
   @Test
   public void testSettersGetters() {
     ServiceConfigEntity entity = new ServiceConfigEntity();
-    entity.setServiceName("foo");
+    //entity.setServiceName("foo");
     entity.setUser("bar");
     entity.setNote("note");
     entity.setVersion(1L);

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/ComponentVersionCheckActionTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/ComponentVersionCheckActionTest.java b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/ComponentVersionCheckActionTest.java
index 9f87312..3ceb6fa 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/ComponentVersionCheckActionTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/ComponentVersionCheckActionTest.java
@@ -21,6 +21,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -36,6 +37,7 @@ import org.apache.ambari.server.actionmanager.HostRoleCommandFactory;
 import org.apache.ambari.server.actionmanager.HostRoleStatus;
 import org.apache.ambari.server.agent.CommandReport;
 import org.apache.ambari.server.agent.ExecutionCommand;
+import org.apache.ambari.server.api.services.ServiceKey;
 import org.apache.ambari.server.orm.GuiceJpaInitializer;
 import org.apache.ambari.server.orm.InMemoryDefaultTestModule;
 import org.apache.ambari.server.orm.OrmTestHelper;
@@ -498,7 +500,7 @@ public class ComponentVersionCheckActionTest {
   }
 
   private Service installService(Cluster cluster, String serviceName, RepositoryVersionEntity repositoryVersion) throws AmbariException {
-    Service service = serviceFactory.createNew(cluster, serviceName, repositoryVersion);
+    Service service = serviceFactory.createNew(cluster, null, new ArrayList<ServiceKey>(), serviceName, "", repositoryVersion);
     cluster.addService(service);
     return service;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/ConfigureActionTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/ConfigureActionTest.java b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/ConfigureActionTest.java
index 0bb72af..cc2bba7 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/ConfigureActionTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/ConfigureActionTest.java
@@ -39,6 +39,7 @@ import org.apache.ambari.server.actionmanager.HostRoleCommand;
 import org.apache.ambari.server.actionmanager.HostRoleCommandFactory;
 import org.apache.ambari.server.agent.CommandReport;
 import org.apache.ambari.server.agent.ExecutionCommand;
+import org.apache.ambari.server.api.services.ServiceKey;
 import org.apache.ambari.server.orm.GuiceJpaInitializer;
 import org.apache.ambari.server.orm.InMemoryDefaultTestModule;
 import org.apache.ambari.server.orm.OrmTestHelper;
@@ -1756,7 +1757,7 @@ public class ConfigureActionTest {
     try {
       service = cluster.getService(serviceName);
     } catch (ServiceNotFoundException e) {
-      service = serviceFactory.createNew(cluster, serviceName, repositoryVersion);
+      service = serviceFactory.createNew(cluster, null, new ArrayList<ServiceKey>(), serviceName, "", repositoryVersion);
       cluster.addService(service);
     }
 
@@ -1847,6 +1848,6 @@ public class ConfigureActionTest {
   private Config createConfig(Cluster cluster, RepositoryVersionEntity repoVersion, String type,
       String tag, Map<String, String> properties) {
     return configFactory.createNew(repoVersion.getStackId(), cluster, type, tag, properties,
-        NO_ATTRIBUTES);
+        NO_ATTRIBUTES, 1L);
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosActionTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosActionTest.java b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosActionTest.java
index a7bf33c..05dd805 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosActionTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/PreconfigureKerberosActionTest.java
@@ -522,7 +522,7 @@ public class PreconfigureKerberosActionTest extends EasyMockSupport {
     configTypeService.put("gateway-site", "KNOX");
 
     for (Map.Entry<String, String> entry : configTypeService.entrySet()) {
-      expect(cluster.getServiceByConfigType(entry.getKey())).andReturn(entry.getValue()).anyTimes();
+      expect(cluster.getServiceByConfigType(entry.getKey())).andReturn(null).anyTimes();
     }
 
     for (Map.Entry<String, Config> entry : clusterConfigs.entrySet()) {


[2/7] ambari git commit: AMBARI-22493. Fix build for test classes in feature branch.(vbrodetskyi)

Posted by vb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java
index 82d5481..e9da564 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java
@@ -22,6 +22,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
 import java.lang.reflect.Field;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.List;
@@ -40,6 +41,7 @@ import org.apache.ambari.server.actionmanager.HostRoleStatus;
 import org.apache.ambari.server.agent.CommandReport;
 import org.apache.ambari.server.agent.ExecutionCommand;
 import org.apache.ambari.server.api.services.AmbariMetaInfo;
+import org.apache.ambari.server.api.services.ServiceKey;
 import org.apache.ambari.server.controller.AmbariManagementController;
 import org.apache.ambari.server.controller.AmbariServer;
 import org.apache.ambari.server.controller.ServiceConfigVersionResponse;
@@ -602,7 +604,7 @@ public class UpgradeActionTest {
     try {
       service = cluster.getService(serviceName);
     } catch (ServiceNotFoundException e) {
-      service = serviceFactory.createNew(cluster, serviceName, repositoryVersionEntity);
+      service = serviceFactory.createNew(cluster, null, new ArrayList<ServiceKey>(), serviceName, "", repositoryVersionEntity);
       cluster.addService(service);
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigGroupTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigGroupTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigGroupTest.java
index cc23e9b..1296be9 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigGroupTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigGroupTest.java
@@ -105,8 +105,7 @@ public class ConfigGroupTest {
     configs.put(config.getType(), config);
     hosts.put(host.getHostId(), host);
 
-    ConfigGroup configGroup = configGroupFactory.createNew(cluster, "HDFS", "cg-test",
-      "HDFS", "New HDFS configs for h1", configs, hosts);
+    ConfigGroup configGroup = configGroupFactory.createNew(cluster, 1L, 1L, "HDFS", "", "New HDFS configs for h1", configs, hosts);
 
     cluster.addConfigGroup(configGroup);
     return configGroup;

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
index 7e1e2da..ff28eb7 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
@@ -156,9 +156,9 @@ public class ConfigHelperTest {
       cr2.setType("flume-conf");
       cr2.setVersionTag("version1");
 
-      cluster.addService("FLUME", repositoryVersion);
-      cluster.addService("OOZIE", repositoryVersion);
-      cluster.addService("HDFS", repositoryVersion);
+      cluster.addService(null, "", "FLUME", repositoryVersion);
+      cluster.addService(null, "", "OOZIE", repositoryVersion);
+      cluster.addService(null, "", "HDFS", repositoryVersion);
 
       final ClusterRequest clusterRequest2 =
           new ClusterRequest(cluster.getClusterId(), clusterName,
@@ -298,7 +298,10 @@ public class ConfigHelperTest {
         configMap.put(config.getType(), config);
       }
 
-      ConfigGroup configGroup = configGroupFactory.createNew(cluster, null, name,
+      long serviceGroupId = 1;
+      long serviceId = 1;
+
+      ConfigGroup configGroup = configGroupFactory.createNew(cluster, serviceGroupId, serviceId, name,
           tag, "", configMap, hostMap);
       LOG.info("Config group created with tag " + tag);
       configGroup.setTag(tag);

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/state/DesiredConfigTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/DesiredConfigTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/DesiredConfigTest.java
index 7fd92fb..e96fad8 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/DesiredConfigTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/DesiredConfigTest.java
@@ -34,10 +34,10 @@ public class DesiredConfigTest {
   @Test
   public void testDesiredConfig() throws Exception {
     DesiredConfig dc = new DesiredConfig();
-    dc.setServiceName("service");
+    //dc.setServiceName("service");
     dc.setTag("global");
 
-    Assert.assertEquals("Expected service 'service'", "service", dc.getServiceName());
+    //Assert.assertEquals("Expected service 'service'", "service", dc.getServiceName());
     Assert.assertEquals("Expected version 'global'", "global", dc.getTag());
     Assert.assertEquals("Expected no host overrides", 0, dc.getHostOverrides().size());
     

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/state/ServiceComponentTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/ServiceComponentTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/ServiceComponentTest.java
index c753f49..f4c3d20 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/ServiceComponentTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/ServiceComponentTest.java
@@ -23,12 +23,14 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.fail;
 
 import java.sql.SQLException;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.H2DatabaseCleaner;
+import org.apache.ambari.server.api.services.ServiceKey;
 import org.apache.ambari.server.controller.ServiceComponentResponse;
 import org.apache.ambari.server.orm.GuiceJpaInitializer;
 import org.apache.ambari.server.orm.InMemoryDefaultTestModule;
@@ -98,7 +100,7 @@ public class ServiceComponentTest {
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(stackId,
         stackId.getStackVersion());
 
-    Service s = serviceFactory.createNew(cluster, serviceName, repositoryVersion);
+    Service s = serviceFactory.createNew(cluster, null, new ArrayList<ServiceKey>(), serviceName, "", repositoryVersion);
     cluster.addService(s);
     service = cluster.getService(serviceName);
     Assert.assertNotNull(service);
@@ -155,8 +157,11 @@ public class ServiceComponentTest {
     ServiceComponentDesiredStateDAO serviceComponentDesiredStateDAO =
         injector.getInstance(ServiceComponentDesiredStateDAO.class);
 
+    long serviceGroupId = 1;
+    long serviceId = 1;
+
     ServiceComponentDesiredStateEntity serviceComponentDesiredStateEntity = serviceComponentDesiredStateDAO.findByName(
-        cluster.getClusterId(), serviceName, componentName);
+        cluster.getClusterId(), serviceGroupId, serviceId, componentName);
 
     ServiceComponent sc1 = serviceComponentFactory.createExisting(service,
         serviceComponentDesiredStateEntity);
@@ -245,17 +250,20 @@ public class ServiceComponentTest {
     HostComponentStateDAO liveStateDAO = injector.getInstance(
         HostComponentStateDAO.class);
 
+    long serviceGroupId = 1;
+    long serviceId = 1;
 
     HostComponentDesiredStateEntity desiredStateEntity =
         desiredStateDAO.findByIndex(
           cluster.getClusterId(),
-          serviceName,
+          serviceGroupId,
+                serviceId,
           componentName,
           hostEntity1.getHostId()
         );
 
     HostComponentStateEntity stateEntity = liveStateDAO.findByIndex(cluster.getClusterId(),
-        serviceName, componentName, hostEntity1.getHostId());
+            serviceGroupId, serviceId, componentName, hostEntity1.getHostId());
 
     ServiceComponentHost sch = serviceComponentHostFactory.createExisting(sc,
         stateEntity, desiredStateEntity);
@@ -302,7 +310,7 @@ public class ServiceComponentTest {
 
     ServiceComponentResponse r = sc.convertToResponse();
     Assert.assertEquals(sc.getClusterName(), r.getClusterName());
-    Assert.assertEquals(sc.getClusterId(), r.getClusterId().longValue());
+    Assert.assertTrue(sc.getClusterId().equals(r.getClusterId()));
     Assert.assertEquals(sc.getName(), r.getComponentName());
     Assert.assertEquals(sc.getServiceName(), r.getServiceName());
     Assert.assertEquals(sc.getDesiredStackId().getStackId(), r.getDesiredStackId());
@@ -367,8 +375,11 @@ public class ServiceComponentTest {
     sc.setDesiredState(State.STARTED);
     Assert.assertEquals(State.STARTED, sc.getDesiredState());
 
+    long serviceGroupId = 1;
+    long serviceId = 1;
+
     ServiceComponentDesiredStateEntity serviceComponentDesiredStateEntity = serviceComponentDesiredStateDAO.findByName(
-        cluster.getClusterId(), serviceName, componentName);
+        cluster.getClusterId(), serviceGroupId, serviceId, componentName);
 
     Assert.assertNotNull(serviceComponentDesiredStateEntity);
 
@@ -408,7 +419,7 @@ public class ServiceComponentTest {
 
     // verify history is gone, too
     serviceComponentDesiredStateEntity = serviceComponentDesiredStateDAO.findByName(
-        cluster.getClusterId(), serviceName, componentName);
+        cluster.getClusterId(), serviceGroupId, serviceId, componentName);
 
     Assert.assertNull(serviceComponentDesiredStateEntity);
  }
@@ -428,8 +439,11 @@ public class ServiceComponentTest {
     sc.setDesiredState(State.INSTALLED);
     Assert.assertEquals(State.INSTALLED, sc.getDesiredState());
 
+    long serviceGroupId = 1;
+    long serviceId = 1;
+
     ServiceComponentDesiredStateEntity serviceComponentDesiredStateEntity = serviceComponentDesiredStateDAO.findByName(
-        cluster.getClusterId(), serviceName, componentName);
+        cluster.getClusterId(), serviceGroupId, serviceId, componentName);
 
     StackDAO stackDAO = injector.getInstance(StackDAO.class);
     StackEntity stackEntity = stackDAO.find("HDP", "2.2.0");
@@ -460,7 +474,7 @@ public class ServiceComponentTest {
         serviceComponentDesiredStateEntity);
 
     serviceComponentDesiredStateEntity = serviceComponentDesiredStateDAO.findByName(
-        cluster.getClusterId(), serviceName, componentName);
+        cluster.getClusterId(), serviceGroupId, serviceId, componentName);
 
     assertEquals(1, serviceComponentDesiredStateEntity.getVersions().size());
     ServiceComponentVersionEntity persistedVersion = serviceComponentDesiredStateEntity.getVersions().iterator().next();
@@ -483,8 +497,11 @@ public class ServiceComponentTest {
     sc.setDesiredState(State.INSTALLED);
     Assert.assertEquals(State.INSTALLED, sc.getDesiredState());
 
+    long serviceGroupId = 1;
+    long serviceId = 1;
+
     ServiceComponentDesiredStateEntity serviceComponentDesiredStateEntity = serviceComponentDesiredStateDAO.findByName(
-        cluster.getClusterId(), serviceName, componentName);
+        cluster.getClusterId(), serviceGroupId, serviceId, componentName);
 
     StackDAO stackDAO = injector.getInstance(StackDAO.class);
     StackEntity stackEntity = stackDAO.find("HDP", "2.2.0");
@@ -514,7 +531,7 @@ public class ServiceComponentTest {
         serviceComponentDesiredStateEntity);
 
     serviceComponentDesiredStateEntity = serviceComponentDesiredStateDAO.findByName(
-        cluster.getClusterId(), serviceName, componentName);
+        cluster.getClusterId(), serviceGroupId, serviceId, componentName);
 
     assertEquals(1, serviceComponentDesiredStateEntity.getVersions().size());
     ServiceComponentVersionEntity persistedVersion = serviceComponentDesiredStateEntity.getVersions().iterator().next();
@@ -524,12 +541,12 @@ public class ServiceComponentTest {
     sc.delete();
 
     serviceComponentDesiredStateEntity = serviceComponentDesiredStateDAO.findByName(
-        cluster.getClusterId(), serviceName, componentName);
+        cluster.getClusterId(), serviceGroupId, serviceId, componentName);
     Assert.assertNull(serviceComponentDesiredStateEntity);
 
 
     // verify versions are gone, too
-    List<ServiceComponentVersionEntity> list = serviceComponentDesiredStateDAO.findVersions(cluster.getClusterId(), serviceName, componentName);
+    List<ServiceComponentVersionEntity> list = serviceComponentDesiredStateDAO.findVersions(cluster.getClusterId(), serviceGroupId, serviceId, componentName);
     assertEquals(0, list.size());
   }
 
@@ -554,7 +571,10 @@ public class ServiceComponentTest {
     ServiceComponent sc = service.getServiceComponent(componentName);
     Assert.assertNotNull(sc);
 
-    ServiceComponentDesiredStateEntity entity = serviceComponentDesiredStateDAO.findByName(cluster.getClusterId(), serviceName, componentName);
+    long serviceGroupId = 1;
+    long serviceId = 1;
+
+    ServiceComponentDesiredStateEntity entity = serviceComponentDesiredStateDAO.findByName(cluster.getClusterId(), serviceGroupId, serviceId, componentName);
 
     RepositoryVersionEntity repoVersion2201 = helper.getOrCreateRepositoryVersion(
         component.getDesiredStackId(), "2.2.0.1");
@@ -576,7 +596,7 @@ public class ServiceComponentTest {
     sch1.setVersion("2.2.0.1");
     sch2.setVersion("2.2.0.2");
     sc.updateRepositoryState("2.2.0.2");
-    entity = serviceComponentDesiredStateDAO.findByName(cluster.getClusterId(), serviceName, componentName);
+    entity = serviceComponentDesiredStateDAO.findByName(cluster.getClusterId(), serviceGroupId, serviceId, componentName);
     assertEquals(RepositoryVersionState.OUT_OF_SYNC, entity.getRepositoryState());
 
     // !!! case 2: component desired is UNKNOWN, all h-c same version
@@ -584,7 +604,7 @@ public class ServiceComponentTest {
     sch1.setVersion("2.2.0.1");
     sch2.setVersion("2.2.0.1");
     sc.updateRepositoryState("2.2.0.1");
-    entity = serviceComponentDesiredStateDAO.findByName(cluster.getClusterId(), serviceName, componentName);
+    entity = serviceComponentDesiredStateDAO.findByName(cluster.getClusterId(), serviceGroupId, serviceId, componentName);
     assertEquals(RepositoryVersionState.OUT_OF_SYNC, entity.getRepositoryState());
 
     // !!! case 3: component desired is known, any component reports different version
@@ -592,7 +612,7 @@ public class ServiceComponentTest {
     sch1.setVersion("2.2.0.1");
     sch2.setVersion("2.2.0.2");
     sc.updateRepositoryState("2.2.0.2");
-    entity = serviceComponentDesiredStateDAO.findByName(cluster.getClusterId(), serviceName, componentName);
+    entity = serviceComponentDesiredStateDAO.findByName(cluster.getClusterId(), serviceGroupId, serviceId, componentName);
     assertEquals(RepositoryVersionState.OUT_OF_SYNC, entity.getRepositoryState());
 
     // !!! case 4: component desired is known, component reports same as desired, mix of h-c versions
@@ -600,7 +620,7 @@ public class ServiceComponentTest {
     sch1.setVersion("2.2.0.1");
     sch2.setVersion("2.2.0.2");
     sc.updateRepositoryState("2.2.0.1");
-    entity = serviceComponentDesiredStateDAO.findByName(cluster.getClusterId(), serviceName, componentName);
+    entity = serviceComponentDesiredStateDAO.findByName(cluster.getClusterId(), serviceGroupId, serviceId, componentName);
     assertEquals(RepositoryVersionState.OUT_OF_SYNC, entity.getRepositoryState());
 
     // !!! case 5: component desired is known, component reports same as desired, all h-c the same
@@ -608,7 +628,7 @@ public class ServiceComponentTest {
     sch1.setVersion("2.2.0.1");
     sch2.setVersion("2.2.0.1");
     sc.updateRepositoryState("2.2.0.1");
-    entity = serviceComponentDesiredStateDAO.findByName(cluster.getClusterId(), serviceName, componentName);
+    entity = serviceComponentDesiredStateDAO.findByName(cluster.getClusterId(), serviceGroupId, serviceId, componentName);
     assertEquals(RepositoryVersionState.CURRENT, entity.getRepositoryState());
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/state/ServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/ServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/ServiceTest.java
index f4d0a9a..4e1c139 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/ServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/ServiceTest.java
@@ -22,11 +22,13 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
 import java.sql.SQLException;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.H2DatabaseCleaner;
+import org.apache.ambari.server.api.services.ServiceKey;
 import org.apache.ambari.server.controller.ServiceResponse;
 import org.apache.ambari.server.orm.GuiceJpaInitializer;
 import org.apache.ambari.server.orm.InMemoryDefaultTestModule;
@@ -84,7 +86,7 @@ public class ServiceTest {
 
   @Test
   public void testCanBeRemoved() throws Exception{
-    Service service = cluster.addService("HDFS", repositoryVersion);
+    Service service = cluster.addService(null, "HDFS", "", repositoryVersion);
 
     for (State state : State.values()) {
       service.setDesiredState(state);
@@ -126,7 +128,7 @@ public class ServiceTest {
   @Test
   public void testGetAndSetServiceInfo() throws AmbariException {
     String serviceName = "HDFS";
-    Service s = serviceFactory.createNew(cluster, serviceName, repositoryVersion);
+    Service s = serviceFactory.createNew(cluster, null, new ArrayList<ServiceKey>(), serviceName, "", repositoryVersion);
     cluster.addService(s);
 
     Service service = cluster.getService(serviceName);
@@ -152,7 +154,7 @@ public class ServiceTest {
   @Test
   public void testAddGetDeleteServiceComponents() throws AmbariException {
     String serviceName = "HDFS";
-    Service s = serviceFactory.createNew(cluster, serviceName, repositoryVersion);
+    Service s = serviceFactory.createNew(cluster, null, new ArrayList<ServiceKey>(), serviceName, "", repositoryVersion);
     cluster.addService(s);
 
     Service service = cluster.getService(serviceName);
@@ -234,7 +236,7 @@ public class ServiceTest {
   @Test
   public void testConvertToResponse() throws AmbariException {
     String serviceName = "HDFS";
-    Service s = serviceFactory.createNew(cluster, serviceName, repositoryVersion);
+    Service s = serviceFactory.createNew(cluster, null, new ArrayList<ServiceKey>(), serviceName, "", repositoryVersion);
     cluster.addService(s);
     Service service = cluster.getService(serviceName);
     Assert.assertNotNull(service);
@@ -270,14 +272,14 @@ public class ServiceTest {
   @Test
   public void testServiceMaintenance() throws Exception {
     String serviceName = "HDFS";
-    Service s = serviceFactory.createNew(cluster, serviceName, repositoryVersion);
+    Service s = serviceFactory.createNew(cluster, null, new ArrayList<ServiceKey>(), serviceName, "", repositoryVersion);
     cluster.addService(s);
 
     Service service = cluster.getService(serviceName);
     Assert.assertNotNull(service);
 
     ClusterServiceDAO dao = injector.getInstance(ClusterServiceDAO.class);
-    ClusterServiceEntity entity = dao.findByClusterAndServiceNames(clusterName, serviceName);
+    ClusterServiceEntity entity = null;//dao.findByClusterAndServiceNames(clusterName, serviceName);
     Assert.assertNotNull(entity);
     Assert.assertEquals(MaintenanceState.OFF, entity.getServiceDesiredStateEntity().getMaintenanceState());
     Assert.assertEquals(MaintenanceState.OFF, service.getMaintenanceState());
@@ -285,7 +287,7 @@ public class ServiceTest {
     service.setMaintenanceState(MaintenanceState.ON);
     Assert.assertEquals(MaintenanceState.ON, service.getMaintenanceState());
 
-    entity = dao.findByClusterAndServiceNames(clusterName, serviceName);
+    entity = null;//dao.findByClusterAndServiceNames(clusterName, serviceName);
     Assert.assertNotNull(entity);
     Assert.assertEquals(MaintenanceState.ON, entity.getServiceDesiredStateEntity().getMaintenanceState());
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
index 8b8e7e1..5e5395a 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
@@ -17,7 +17,6 @@
  */
 package org.apache.ambari.server.state;
 
-import static org.easymock.EasyMock.eq;
 import static org.easymock.EasyMock.expect;
 import static org.easymock.EasyMock.expectLastCall;
 import static org.easymock.EasyMock.replay;
@@ -28,6 +27,7 @@ import static org.junit.Assert.assertTrue;
 
 import java.lang.reflect.Field;
 import java.sql.SQLException;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
@@ -46,6 +46,7 @@ import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.H2DatabaseCleaner;
 import org.apache.ambari.server.actionmanager.HostRoleCommandFactory;
 import org.apache.ambari.server.api.services.AmbariMetaInfo;
+import org.apache.ambari.server.api.services.ServiceKey;
 import org.apache.ambari.server.controller.AmbariManagementController;
 import org.apache.ambari.server.controller.ClusterRequest;
 import org.apache.ambari.server.controller.ConfigurationRequest;
@@ -1257,11 +1258,11 @@ public class UpgradeHelperTest extends EasyMockSupport {
     }
 
     // !!! add services
-    c.addService(serviceFactory.createNew(c, "HDFS", repositoryVersion));
-    c.addService(serviceFactory.createNew(c, "YARN", repositoryVersion));
-    c.addService(serviceFactory.createNew(c, "ZOOKEEPER", repositoryVersion));
-    c.addService(serviceFactory.createNew(c, "HIVE", repositoryVersion));
-    c.addService(serviceFactory.createNew(c, "OOZIE", repositoryVersion));
+    c.addService(serviceFactory.createNew(c, null, new ArrayList<ServiceKey>(), "HDFS", "", repositoryVersion));
+    c.addService(serviceFactory.createNew(c, null, new ArrayList<ServiceKey>(), "YARN", "", repositoryVersion));
+    c.addService(serviceFactory.createNew(c, null, new ArrayList<ServiceKey>(), "ZOOKEEPER", "", repositoryVersion));
+    c.addService(serviceFactory.createNew(c, null, new ArrayList<ServiceKey>(), "HIVE", "", repositoryVersion));
+    c.addService(serviceFactory.createNew(c, null, new ArrayList<ServiceKey>(), "OOZIE", "", repositoryVersion));
 
     Service s = c.getService("HDFS");
     ServiceComponent sc = s.addServiceComponent("NAMENODE");
@@ -1365,7 +1366,7 @@ public class UpgradeHelperTest extends EasyMockSupport {
     expect(m_masterHostResolver.getCluster()).andReturn(c).anyTimes();
 
     for(String service : additionalServices) {
-      c.addService(service, repositoryVersion);
+      c.addService(null, service, "", repositoryVersion);
       if (service.equals("HBASE")) {
         type = new HostsType();
         type.hosts.addAll(Arrays.asList("h1", "h2"));
@@ -1477,7 +1478,7 @@ public class UpgradeHelperTest extends EasyMockSupport {
     }
 
     // !!! add services
-    c.addService(serviceFactory.createNew(c, "HDFS", repositoryVersion));
+    c.addService(serviceFactory.createNew(c, null, new ArrayList<ServiceKey>(), "HDFS", "", repositoryVersion));
 
     Service s = c.getService("HDFS");
     ServiceComponent sc = s.addServiceComponent("NAMENODE");
@@ -1549,7 +1550,7 @@ public class UpgradeHelperTest extends EasyMockSupport {
     }
 
     // !!! add services
-    c.addService(serviceFactory.createNew(c, "ZOOKEEPER", repositoryVersion2110));
+    c.addService(serviceFactory.createNew(c, null, new ArrayList<ServiceKey>(), "ZOOKEEPER", "", repositoryVersion2110));
 
     Service s = c.getService("ZOOKEEPER");
     ServiceComponent sc = s.addServiceComponent("ZOOKEEPER_SERVER");
@@ -1616,7 +1617,7 @@ public class UpgradeHelperTest extends EasyMockSupport {
     }
 
     // Add services
-    c.addService(serviceFactory.createNew(c, "HDFS", repositoryVersion211));
+    c.addService(serviceFactory.createNew(c, null, new ArrayList<ServiceKey>(), "HDFS", "", repositoryVersion211));
 
     Service s = c.getService("HDFS");
     ServiceComponent sc = s.addServiceComponent("NAMENODE");
@@ -1685,7 +1686,7 @@ public class UpgradeHelperTest extends EasyMockSupport {
     }
 
     // Add services
-    c.addService(serviceFactory.createNew(c, "HDFS", repositoryVersion211));
+    c.addService(serviceFactory.createNew(c, null, new ArrayList<ServiceKey>(), "HDFS", "", repositoryVersion211));
 
     Service s = c.getService("HDFS");
     ServiceComponent sc = s.addServiceComponent("NAMENODE");
@@ -1805,7 +1806,7 @@ public class UpgradeHelperTest extends EasyMockSupport {
     }
 
     // !!! add storm
-    c.addService(serviceFactory.createNew(c, "STORM", repoVersion211));
+    c.addService(serviceFactory.createNew(c, null, new ArrayList<ServiceKey>(), "STORM", "", repoVersion211));
 
     Service s = c.getService("STORM");
     ServiceComponent sc = s.addServiceComponent("NIMBUS");
@@ -1910,7 +1911,7 @@ public class UpgradeHelperTest extends EasyMockSupport {
     }
 
     // !!! add services
-    c.addService(serviceFactory.createNew(c, "ZOOKEEPER", repositoryVersion));
+    c.addService(serviceFactory.createNew(c, null, new ArrayList<ServiceKey>(), "ZOOKEEPER", "", repositoryVersion));
 
     Service s = c.getService("ZOOKEEPER");
     ServiceComponent sc = s.addServiceComponent("ZOOKEEPER_SERVER");
@@ -2095,8 +2096,8 @@ public class UpgradeHelperTest extends EasyMockSupport {
 
     // add ZK Server to both hosts, and then Nimbus to only 1 - this will test
     // how the HOU breaks out dependencies into stages
-    c.addService(serviceFactory.createNew(c, "ZOOKEEPER", repoVersion211));
-    c.addService(serviceFactory.createNew(c, "HBASE", repoVersion211));
+    c.addService(serviceFactory.createNew(c, null, new ArrayList<ServiceKey>(), "ZOOKEEPER", "", repoVersion211));
+    c.addService(serviceFactory.createNew(c, null, new ArrayList<ServiceKey>(), "HBASE", "", repoVersion211));
     Service zookeeper = c.getService("ZOOKEEPER");
     Service hbase = c.getService("HBASE");
     ServiceComponent zookeeperServer = zookeeper.addServiceComponent("ZOOKEEPER_SERVER");
@@ -2378,7 +2379,7 @@ public class UpgradeHelperTest extends EasyMockSupport {
 
     List<ServiceConfigEntity> latestServiceConfigs = Lists.newArrayList(zookeeperServiceConfig);
     expect(serviceConfigDAOMock.getLastServiceConfigsForService(EasyMock.anyLong(),
-        eq("ZOOKEEPER"))).andReturn(latestServiceConfigs).once();
+            EasyMock.anyLong())).andReturn(latestServiceConfigs).once();
 
     replay(serviceConfigDAOMock);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertEventPublisherTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertEventPublisherTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertEventPublisherTest.java
index 504f6e7..50555d0 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertEventPublisherTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertEventPublisherTest.java
@@ -17,9 +17,11 @@
  */
 package org.apache.ambari.server.state.alerts;
 
+import java.util.ArrayList;
 import java.util.UUID;
 
 import org.apache.ambari.server.H2DatabaseCleaner;
+import org.apache.ambari.server.api.services.ServiceKey;
 import org.apache.ambari.server.events.AlertDefinitionChangedEvent;
 import org.apache.ambari.server.events.AlertDefinitionDeleteEvent;
 import org.apache.ambari.server.events.AmbariEvent;
@@ -312,7 +314,7 @@ public class AlertEventPublisherTest {
         cluster.getCurrentStackVersion(), REPO_VERSION);
 
     String serviceName = "HDFS";
-    Service service = serviceFactory.createNew(cluster, serviceName, repositoryVersion);
+    Service service = serviceFactory.createNew(cluster, null, new ArrayList<ServiceKey>(), serviceName, "", repositoryVersion);
     service = cluster.getService(serviceName);
 
     Assert.assertNotNull(service);

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/InitialAlertEventTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/InitialAlertEventTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/InitialAlertEventTest.java
index 3d25ef7..37e0878 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/InitialAlertEventTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/InitialAlertEventTest.java
@@ -17,11 +17,13 @@
  */
 package org.apache.ambari.server.state.alerts;
 
+import java.util.ArrayList;
 import java.util.List;
 
 import javax.persistence.EntityManager;
 
 import org.apache.ambari.server.H2DatabaseCleaner;
+import org.apache.ambari.server.api.services.ServiceKey;
 import org.apache.ambari.server.events.AlertReceivedEvent;
 import org.apache.ambari.server.events.InitialAlertEvent;
 import org.apache.ambari.server.events.MockEventListener;
@@ -187,7 +189,7 @@ public class InitialAlertEventTest {
 
   private void installHdfsService() throws Exception {
     String serviceName = "HDFS";
-    Service service = m_serviceFactory.createNew(m_cluster, serviceName, m_repositoryVersion);
+    Service service = m_serviceFactory.createNew(m_cluster, null, new ArrayList<ServiceKey>(), serviceName, "", m_repositoryVersion);
     service = m_cluster.getService(serviceName);
 
     Assert.assertNotNull(service);

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterDeadlockTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterDeadlockTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterDeadlockTest.java
index 0f70980..88275bd 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterDeadlockTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterDeadlockTest.java
@@ -31,6 +31,7 @@ import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.H2DatabaseCleaner;
 import org.apache.ambari.server.ServiceComponentNotFoundException;
 import org.apache.ambari.server.ServiceNotFoundException;
+import org.apache.ambari.server.api.services.ServiceKey;
 import org.apache.ambari.server.events.listeners.upgrade.HostVersionOutOfSyncListener;
 import org.apache.ambari.server.orm.GuiceJpaInitializer;
 import org.apache.ambari.server.orm.InMemoryDefaultTestModule;
@@ -590,7 +591,7 @@ public class ClusterDeadlockTest {
     try {
       service = cluster.getService(serviceName);
     } catch (ServiceNotFoundException e) {
-      service = serviceFactory.createNew(cluster, serviceName, repositoryVersion);
+      service = serviceFactory.createNew(cluster, null, new ArrayList<ServiceKey>(), serviceName, "", repositoryVersion);
       cluster.addService(service);
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterImplTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterImplTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterImplTest.java
index 1d8c7fb..a52f438 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterImplTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterImplTest.java
@@ -233,7 +233,7 @@ public class ClusterImplTest {
 
     clusters.mapAndPublishHostsToCluster(Sets.newHashSet(hostName1, hostName2), clusterName);
 
-    Service hdfs = cluster.addService("HDFS", repositoryVersion);
+    Service hdfs = cluster.addService(null, "HDFS", "", repositoryVersion);
 
     ServiceComponent nameNode = hdfs.addServiceComponent("NAMENODE");
     nameNode.addServiceComponentHost(hostName1);
@@ -246,7 +246,7 @@ public class ClusterImplTest {
     hdfsClient.addServiceComponentHost(hostName1);
     hdfsClient.addServiceComponentHost(hostName2);
 
-    Service tez = cluster.addService(serviceToDelete, repositoryVersion);
+    Service tez = cluster.addService(null, serviceToDelete, "", repositoryVersion);
 
     ServiceComponent tezClient = tez.addServiceComponent("TEZ_CLIENT");
     ServiceComponentHost tezClientHost1 =  tezClient.addServiceComponentHost(hostName1);

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java
index c9e3ce9..4ce7387 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java
@@ -52,6 +52,7 @@ import org.apache.ambari.server.agent.AgentEnv.Directory;
 import org.apache.ambari.server.agent.DiskInfo;
 import org.apache.ambari.server.agent.HostInfo;
 import org.apache.ambari.server.api.services.AmbariMetaInfo;
+import org.apache.ambari.server.api.services.ServiceKey;
 import org.apache.ambari.server.controller.ClusterResponse;
 import org.apache.ambari.server.controller.ConfigurationResponse;
 import org.apache.ambari.server.controller.ServiceConfigVersionResponse;
@@ -334,9 +335,9 @@ public class ClusterTest {
     }
 
     // Add Services
-    Service s1 = serviceFactory.createNew(cluster, "HDFS", repositoryVersion);
-    Service s2 = serviceFactory.createNew(cluster, "ZOOKEEPER", repositoryVersion);
-    Service s3 = serviceFactory.createNew(cluster, "GANGLIA", repositoryVersion);
+    Service s1 = serviceFactory.createNew(cluster, null, new ArrayList<ServiceKey>(), "HDFS", "", repositoryVersion);
+    Service s2 = serviceFactory.createNew(cluster, null, new ArrayList<ServiceKey>(), "ZOOKEEPER", "", repositoryVersion);
+    Service s3 = serviceFactory.createNew(cluster, null, new ArrayList<ServiceKey>(), "GANGLIA", "", repositoryVersion);
     cluster.addService(s1);
     cluster.addService(s2);
     cluster.addService(s3);
@@ -464,7 +465,7 @@ public class ClusterTest {
       HostComponentStateEntity hce = hostComponentStates.get(i);
       ComponentInfo compInfo = metaInfo.getComponent(
           stackId.getStackName(), stackId.getStackVersion(),
-          hce.getServiceName(),
+          "",
           hce.getComponentName());
 
       if (compInfo.isVersionAdvertised()) {
@@ -475,7 +476,7 @@ public class ClusterTest {
       RepositoryVersionEntity rv = helper.getOrCreateRepositoryVersion(stackId, version);
 
       // Simulate the StackVersionListener during the installation
-      Service svc = cluster.getService(hce.getServiceName());
+      Service svc = cluster.getService("");
       ServiceComponent svcComp = svc.getServiceComponent(hce.getComponentName());
       ServiceComponentHost scHost = svcComp.getServiceComponentHost(hce.getHostName());
 
@@ -603,8 +604,8 @@ public class ClusterTest {
 
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(c1);
 
-    Service s1 = serviceFactory.createNew(c1, "HDFS", repositoryVersion);
-    Service s2 = serviceFactory.createNew(c1, "MAPREDUCE", repositoryVersion);
+    Service s1 = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "HDFS", "", repositoryVersion);
+    Service s2 = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "MAPREDUCE", "", repositoryVersion);
 
     Service s = c1.getService("HDFS");
     Assert.assertNotNull(s);
@@ -633,7 +634,7 @@ public class ClusterTest {
 
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(c1);
 
-    Service s = serviceFactory.createNew(c1, "HDFS", repositoryVersion);
+    Service s = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "HDFS", "", repositoryVersion);
     c1.addService(s);
     ServiceComponent sc = serviceComponentFactory.createNew(s, "NAMENODE");
     s.addServiceComponent(sc);
@@ -651,7 +652,7 @@ public class ClusterTest {
     try {
       while (iterator.hasNext()) {
         iterator.next();
-        Service s1 = serviceFactory.createNew(c1, "PIG", repositoryVersion);
+        Service s1 = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "PIG", "", repositoryVersion);
         c1.addService(s1);
         ServiceComponent sc1 = serviceComponentFactory.createNew(s1, "PIG");
         s1.addServiceComponent(sc1);
@@ -672,7 +673,7 @@ public class ClusterTest {
 
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(c1);
 
-    Service s = serviceFactory.createNew(c1, "HDFS", repositoryVersion);
+    Service s = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "HDFS", "", repositoryVersion);
     c1.addService(s);
 
     ServiceComponent scNN = serviceComponentFactory.createNew(s, "NAMENODE");
@@ -702,7 +703,7 @@ public class ClusterTest {
 
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(c1);
 
-    Service s = serviceFactory.createNew(c1, "HDFS", repositoryVersion);
+    Service s = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "HDFS", "", repositoryVersion);
     c1.addService(s);
 
     ServiceComponent scNN = serviceComponentFactory.createNew(s, "NAMENODE");
@@ -738,7 +739,7 @@ public class ClusterTest {
 
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(c1);
 
-    Service s = serviceFactory.createNew(c1, "HDFS", repositoryVersion);
+    Service s = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(),  "HDFS", "", repositoryVersion);
     c1.addService(s);
 
     ServiceComponent scNN = serviceComponentFactory.createNew(s, "NAMENODE");
@@ -772,10 +773,10 @@ public class ClusterTest {
 
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(c1);
 
-    Service sfHDFS = serviceFactory.createNew(c1, "HDFS", repositoryVersion);
+    Service sfHDFS = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "HDFS", "", repositoryVersion);
     c1.addService(sfHDFS);
 
-    Service sfMR = serviceFactory.createNew(c1, "MAPREDUCE", repositoryVersion);
+    Service sfMR = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "MAPREDUCE", "", repositoryVersion);
     c1.addService(sfMR);
 
     ServiceComponent scNN = serviceComponentFactory.createNew(sfHDFS, "NAMENODE");
@@ -830,10 +831,10 @@ public class ClusterTest {
 
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(c1);
 
-    Service sfHDFS = serviceFactory.createNew(c1, "HDFS", repositoryVersion);
+    Service sfHDFS = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "HDFS", "", repositoryVersion);
     c1.addService(sfHDFS);
 
-    Service sfMR = serviceFactory.createNew(c1, "MAPREDUCE", repositoryVersion);
+    Service sfMR = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "MAPREDUCE", "", repositoryVersion);
     c1.addService(sfMR);
 
     ServiceComponent scNN = serviceComponentFactory.createNew(sfHDFS, "NAMENODE");
@@ -889,10 +890,10 @@ public class ClusterTest {
 
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(c1);
 
-    Service sfHDFS = serviceFactory.createNew(c1, "HDFS", repositoryVersion);
+    Service sfHDFS = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "HDFS", "", repositoryVersion);
     c1.addService(sfHDFS);
 
-    Service sfMR = serviceFactory.createNew(c1, "MAPREDUCE", repositoryVersion);
+    Service sfMR = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "MAPREDUCE", "", repositoryVersion);
     c1.addService(sfMR);
 
     ServiceComponent scNN = serviceComponentFactory.createNew(sfHDFS, "NAMENODE");
@@ -1075,9 +1076,9 @@ public class ClusterTest {
 
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(c1);
 
-    c1.addService("MAPREDUCE", repositoryVersion);
+    c1.addService(null, "MAPREDUCE", "", repositoryVersion);
 
-    Service hdfs = c1.addService("HDFS", repositoryVersion);
+    Service hdfs = c1.addService(null, "HDFS", "", repositoryVersion);
     ServiceComponent nameNode = hdfs.addServiceComponent("NAMENODE");
 
     assertEquals(2, c1.getServices().size());
@@ -1097,7 +1098,7 @@ public class ClusterTest {
 
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(c1);
 
-    c1.addService("HDFS", repositoryVersion);
+    c1.addService(null, "HDFS", "", repositoryVersion);
 
     Config config1 = configFactory.createNew(c1, "hdfs-site", "version1",
       new HashMap<String, String>() {{ put("a", "b"); }}, new HashMap<>());
@@ -1243,7 +1244,7 @@ public class ClusterTest {
     assertEquals(Long.valueOf(2), hdfsResponse.getVersion());
 
     // Rollback , clonning version1 config, created new ServiceConfigVersion
-    c1.setServiceConfigVersion("HDFS", 1L, "admin", "test_note");
+    c1.setServiceConfigVersion(1L, 1L, "admin", "test_note");
     serviceConfigVersions = c1.getServiceConfigVersions();
     Assert.assertNotNull(serviceConfigVersions);
     // created new ServiceConfigVersion
@@ -1293,7 +1294,7 @@ public class ClusterTest {
     createDefaultCluster();
 
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(c1);
-    c1.addService("HDFS", repositoryVersion);
+    c1.addService(null, "HDFS", "", repositoryVersion);
 
     Config config1 = configFactory.createNew(c1, "hdfs-site", "version1",
       new HashMap<String, String>() {{ put("a", "b"); }}, new HashMap<>());
@@ -1312,12 +1313,12 @@ public class ClusterTest {
       new HashMap<String, String>() {{ put("a", "c"); }}, new HashMap<>());
 
     ConfigGroup configGroup =
-      configGroupFactory.createNew(c1, "HDFS", "test group", "HDFS", "descr", Collections.singletonMap("hdfs-site", config2),
-        Collections.emptyMap());
+      configGroupFactory.createNew(c1, 1L, 1L, "HDFS", "", "descr", Collections.singletonMap("hdfs-site", config2),
+        new HashMap<Long, Host>());
 
     c1.addConfigGroup(configGroup);
 
-    scvResponse = c1.createServiceConfigVersion("HDFS", "admin", "test note", configGroup);
+    scvResponse = c1.createServiceConfigVersion(1L, "admin", "test note", configGroup);
     assertEquals("SCV 2 should be created", Long.valueOf(2), scvResponse.getVersion());
 
     //two scv active
@@ -1330,7 +1331,7 @@ public class ClusterTest {
 
     configGroup.setConfigurations(Collections.singletonMap("hdfs-site", config3));
 
-    scvResponse = c1.createServiceConfigVersion("HDFS", "admin", "test note", configGroup);
+    scvResponse = c1.createServiceConfigVersion(1L, "admin", "test note", configGroup);
     assertEquals("SCV 3 should be created", Long.valueOf(3), scvResponse.getVersion());
 
     //still two scv active, 3 total
@@ -1342,7 +1343,7 @@ public class ClusterTest {
 
     //rollback group
 
-    scvResponse = c1.setServiceConfigVersion("HDFS", 2L, "admin", "group rollback");
+    scvResponse = c1.setServiceConfigVersion(1L, 2L, "admin", "group rollback");
     assertEquals("SCV 4 should be created", Long.valueOf(4), scvResponse.getVersion());
 
     configGroup = c1.getConfigGroups().get(configGroup.getId()); //refresh?
@@ -1364,13 +1365,13 @@ public class ClusterTest {
         Collections.singletonMap("a", "b"), null);
 
     ConfigGroup configGroup2 =
-        configGroupFactory.createNew(c1, "HDFS", "test group 2", "HDFS", "descr",
+        configGroupFactory.createNew(c1, 1L, 1L, "HDFS", "HDFS", "descr",
             new HashMap<>(Collections.singletonMap("hdfs-site", config4)),
             Collections.emptyMap());
 
     c1.addConfigGroup(configGroup2);
 
-    scvResponse = c1.createServiceConfigVersion("HDFS", "admin", "test note", configGroup2);
+    scvResponse = c1.createServiceConfigVersion(1L, "admin", "test note", configGroup2);
     assertEquals("SCV 5 should be created", Long.valueOf(5), scvResponse.getVersion());
 
     activeServiceConfigVersions = c1.getActiveServiceConfigVersions();
@@ -1385,7 +1386,7 @@ public class ClusterTest {
     createDefaultCluster();
 
     Config hdfsSiteConfigV1 = configFactory.createNew(c1, "hdfs-site", "version1",
-        ImmutableMap.of("p1", "v1"), ImmutableMap.of());
+        ImmutableMap.of("p1", "v1"), new HashMap<String, Map<String, String>>());
 
     ServiceConfigVersionResponse hdfsSiteConfigResponseV1 = c1.addDesiredConfig("admin", Collections.singleton(hdfsSiteConfigV1));
     List<ConfigurationResponse> configResponsesDefaultGroup =  Collections.singletonList(
@@ -1397,12 +1398,12 @@ public class ClusterTest {
     hdfsSiteConfigResponseV1.setConfigurations(configResponsesDefaultGroup);
 
     Config hdfsSiteConfigV2 = configFactory.createNew(c1, "hdfs-site", "version2",
-        ImmutableMap.of("p1", "v2"), ImmutableMap.of());
+        ImmutableMap.of("p1", "v2"), new HashMap<String, Map<String, String>>());
 
-    ConfigGroup configGroup = configGroupFactory.createNew(c1, "HDFS", "configGroup1", "version1", "test description", ImmutableMap.of(hdfsSiteConfigV2.getType(), hdfsSiteConfigV2), ImmutableMap.of());
+    ConfigGroup configGroup = configGroupFactory.createNew(c1, 1L, 1L,"HDFS", "configGroup1", "test description", ImmutableMap.of(hdfsSiteConfigV2.getType(), hdfsSiteConfigV2), new HashMap<Long, Host>());
 
     c1.addConfigGroup(configGroup);
-    ServiceConfigVersionResponse hdfsSiteConfigResponseV2 = c1.createServiceConfigVersion("HDFS", "admin", "test note", configGroup);
+    ServiceConfigVersionResponse hdfsSiteConfigResponseV2 = c1.createServiceConfigVersion(1L, "admin", "test note", configGroup);
     hdfsSiteConfigResponseV2.setConfigurations(Collections.singletonList(
       new ConfigurationResponse(c1.getClusterName(), hdfsSiteConfigV2.getStackId(),
         hdfsSiteConfigV2.getType(), hdfsSiteConfigV2.getTag(), hdfsSiteConfigV2.getVersion(),
@@ -1411,7 +1412,7 @@ public class ClusterTest {
     hdfsSiteConfigResponseV2.setIsCurrent(true); // this is the active config in 'configGroup1' config group as it's the solely service config
 
     // hdfs config v3
-    ServiceConfigVersionResponse hdfsSiteConfigResponseV3 = c1.createServiceConfigVersion("HDFS", "admin", "new config in default group", null);
+    ServiceConfigVersionResponse hdfsSiteConfigResponseV3 = c1.createServiceConfigVersion(1L, "admin", "new config in default group", null);
     hdfsSiteConfigResponseV3.setConfigurations(configResponsesDefaultGroup);
     hdfsSiteConfigResponseV3.setIsCurrent(true); // this is the active config in default config group as it's more recent than V1
 
@@ -1444,7 +1445,7 @@ public class ClusterTest {
     createDefaultCluster();
 
     Config hdfsSiteConfigV1 = configFactory.createNew(c1, "hdfs-site", "version1",
-        ImmutableMap.of("p1", "v1"), ImmutableMap.of());
+        ImmutableMap.of("p1", "v1"), new HashMap<String, Map<String, String>>());
 
     ServiceConfigVersionResponse hdfsSiteConfigResponseV1 = c1.addDesiredConfig("admin", Collections.singleton(hdfsSiteConfigV1));
     List<ConfigurationResponse> configResponsesDefaultGroup =  Collections.singletonList(
@@ -1456,12 +1457,12 @@ public class ClusterTest {
     hdfsSiteConfigResponseV1.setConfigurations(configResponsesDefaultGroup);
 
     Config hdfsSiteConfigV2 = configFactory.createNew(c1, "hdfs-site", "version2",
-        ImmutableMap.of("p1", "v2"), ImmutableMap.of());
+        ImmutableMap.of("p1", "v2"), new HashMap<String, Map<String, String>>());
 
-    ConfigGroup configGroup = configGroupFactory.createNew(c1, "HDFS", "configGroup1", "version1", "test description", ImmutableMap.of(hdfsSiteConfigV2.getType(), hdfsSiteConfigV2), ImmutableMap.of());
+    ConfigGroup configGroup = configGroupFactory.createNew(c1, 1L, 1L, "HDFS", "version1", "test description", ImmutableMap.of(hdfsSiteConfigV2.getType(), hdfsSiteConfigV2), new HashMap<Long, Host>());
 
     c1.addConfigGroup(configGroup);
-    ServiceConfigVersionResponse hdfsSiteConfigResponseV2 = c1.createServiceConfigVersion("HDFS", "admin", "test note", configGroup);
+    ServiceConfigVersionResponse hdfsSiteConfigResponseV2 = c1.createServiceConfigVersion(1L, "admin", "test note", configGroup);
     hdfsSiteConfigResponseV2.setConfigurations(Collections.singletonList(
       new ConfigurationResponse(c1.getClusterName(), hdfsSiteConfigV2.getStackId(),
         hdfsSiteConfigV2.getType(), hdfsSiteConfigV2.getTag(), hdfsSiteConfigV2.getVersion(),
@@ -1473,7 +1474,7 @@ public class ClusterTest {
 
 
     // hdfs config v3
-    ServiceConfigVersionResponse hdfsSiteConfigResponseV3 = c1.createServiceConfigVersion("HDFS", "admin", "new config in default group", null);
+    ServiceConfigVersionResponse hdfsSiteConfigResponseV3 = c1.createServiceConfigVersion(1L, "admin", "new config in default group", null);
     hdfsSiteConfigResponseV3.setConfigurations(configResponsesDefaultGroup);
     hdfsSiteConfigResponseV3.setIsCurrent(true); // this is the active config in default config group as it's more recent than V1
 
@@ -1556,7 +1557,7 @@ public class ClusterTest {
     assertTrue(checked);
 
     // add some host components
-    Service hdfs = serviceFactory.createNew(c1, "HDFS", repositoryVersion);
+    Service hdfs = serviceFactory.createNew(c1, null, new ArrayList<ServiceKey>(), "HDFS", "", repositoryVersion);
     c1.addService(hdfs);
 
     // Add HDFS components
@@ -1675,7 +1676,7 @@ public class ClusterTest {
       HostComponentStateEntity hce = hostComponentStates.get(i);
       ComponentInfo compInfo = metaInfo.getComponent(
           stackId.getStackName(), stackId.getStackVersion(),
-          hce.getServiceName(),
+          "",
           hce.getComponentName());
 
       if (compInfo.isVersionAdvertised()) {
@@ -1685,7 +1686,7 @@ public class ClusterTest {
       }
 
       // Simulate the StackVersionListener during the installation of the first Stack Version
-      Service svc = cluster.getService(hce.getServiceName());
+      Service svc = cluster.getService("");
       ServiceComponent svcComp = svc.getServiceComponent(hce.getComponentName());
       ServiceComponentHost scHost = svcComp.getServiceComponentHost(hce.getHostName());
 
@@ -1770,7 +1771,7 @@ public class ClusterTest {
       HostComponentStateEntity hce = hostComponentStates.get(i);
       ComponentInfo compInfo = metaInfo.getComponent(
           stackId.getStackName(), stackId.getStackVersion(),
-          hce.getServiceName(),
+          "",
           hce.getComponentName());
 
       if (compInfo.isVersionAdvertised()) {
@@ -1780,7 +1781,7 @@ public class ClusterTest {
       }
 
       // Simulate the StackVersionListener during the installation of the first Stack Version
-      Service svc = cluster.getService(hce.getServiceName());
+      Service svc = cluster.getService("");
       ServiceComponent svcComp = svc.getServiceComponent(hce.getComponentName());
       ServiceComponentHost scHost = svcComp.getServiceComponentHost(hce.getHostName());
 
@@ -1826,7 +1827,7 @@ public class ClusterTest {
       HostComponentStateEntity hce = hostComponentStates.get(i);
       ComponentInfo compInfo = metaInfo.getComponent(
               stackId.getStackName(), stackId.getStackVersion(),
-              hce.getServiceName(),
+              "",
               hce.getComponentName());
 
       if (hce.getHostName().equals(deadHost.getHostName())) {
@@ -1840,7 +1841,7 @@ public class ClusterTest {
       }
 
       // Simulate the StackVersionListener during the installation of the first Stack Version
-      Service svc = cluster.getService(hce.getServiceName());
+      Service svc = cluster.getService("");
       ServiceComponent svcComp = svc.getServiceComponent(hce.getComponentName());
       ServiceComponentHost scHost = svcComp.getServiceComponentHost(hce.getHostName());
 
@@ -1893,12 +1894,12 @@ public class ClusterTest {
 
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(c1);
 
-    Service service = c1.addService("ZOOKEEPER", repositoryVersion);
+    Service service = c1.addService(null, "ZOOKEEPER", "", repositoryVersion);
     ServiceComponent sc = service.addServiceComponent("ZOOKEEPER_SERVER");
     sc.addServiceComponentHost("h-1");
     sc.addServiceComponentHost("h-2");
 
-    service = c1.addService("SQOOP", repositoryVersion);
+    service = c1.addService(null, "SQOOP", "", repositoryVersion);
     sc = service.addServiceComponent("SQOOP");
     sc.addServiceComponentHost("h-3");
 
@@ -1941,12 +1942,12 @@ public class ClusterTest {
           }
         }, new HashMap<>());
 
-    ConfigGroup configGroup = configGroupFactory.createNew(cluster, "HDFS", "g1", "t1", "",
+    ConfigGroup configGroup = configGroupFactory.createNew(cluster, 1L, 1L, "HDFS", "t1", "",
         new HashMap<String, Config>() {
           {
             put("foo-site", originalConfig);
           }
-        }, Collections.emptyMap());
+        }, new HashMap<Long, Host>());
 
     cluster.addConfigGroup(configGroup);
 
@@ -2004,7 +2005,7 @@ public class ClusterTest {
     // add a service
     String serviceName = "ZOOKEEPER";
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(c1);
-    Service service = cluster.addService(serviceName, repositoryVersion);
+    Service service = cluster.addService(null, serviceName, "", repositoryVersion);
     String configType = "zoo.cfg";
 
     ClusterConfigEntity clusterConfig1 = new ClusterConfigEntity();
@@ -2022,7 +2023,7 @@ public class ClusterTest {
     clusterEntity.getClusterConfigEntities().add(clusterConfig1);
     clusterEntity = clusterDAO.merge(clusterEntity);
 
-    cluster.createServiceConfigVersion(serviceName, "", "version-1", null);
+    cluster.createServiceConfigVersion(1L, "", "version-1", null);
 
     ClusterConfigEntity clusterConfig2 = new ClusterConfigEntity();
     clusterConfig2.setClusterEntity(clusterEntity);
@@ -2042,7 +2043,7 @@ public class ClusterTest {
     // before creating the new service config version, we need to push the
     // service's desired repository forward
     service.setDesiredRepositoryVersion(repoVersion220);
-    cluster.createServiceConfigVersion(serviceName, "", "version-2", null);
+    cluster.createServiceConfigVersion(1L, "", "version-2", null);
 
     // check that the original config is enabled
     Collection<ClusterConfigEntity> clusterConfigs = clusterEntity.getClusterConfigEntities();
@@ -2055,7 +2056,7 @@ public class ClusterTest {
       }
     }
 
-    cluster.applyLatestConfigurations(newStackId, serviceName);
+    cluster.applyLatestConfigurations(newStackId, 1L);
     clusterEntity = clusterDAO.findByName("c1");
 
     // now check that the new config is enabled
@@ -2095,7 +2096,7 @@ public class ClusterTest {
     // add a service
     String serviceName = "ZOOKEEPER";
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(c1);
-    Service service = cluster.addService(serviceName, repositoryVersion);
+    Service service = cluster.addService(null, serviceName, "", repositoryVersion);
     String configType = "zoo.cfg";
 
     // create 5 configurations in the current stack
@@ -2127,7 +2128,7 @@ public class ClusterTest {
     clusterEntity = clusterDAO.merge(clusterEntity);
 
     // create a service configuration for them
-    cluster.createServiceConfigVersion(serviceName, "", "version-1", null);
+    cluster.createServiceConfigVersion(1L, "", "version-1", null);
 
     // create a new configuration in the new stack and enable it
     ClusterConfigEntity clusterConfigNewStack = new ClusterConfigEntity();
@@ -2148,7 +2149,7 @@ public class ClusterTest {
     // before creating the new service config version, we need to push the
     // service's desired repository forward
     service.setDesiredRepositoryVersion(repoVersion220);
-    cluster.createServiceConfigVersion(serviceName, "", "version-2", null);
+    cluster.createServiceConfigVersion(1L, "", "version-2", null);
 
     // check that only the newest configuration is enabled
     ClusterConfigEntity clusterConfig = clusterDAO.findEnabledConfigByType(
@@ -2157,7 +2158,7 @@ public class ClusterTest {
     Assert.assertEquals(clusterConfigNewStack.getTag(), clusterConfig.getTag());
 
     // move back to the original stack
-    cluster.applyLatestConfigurations(stackId, serviceName);
+    cluster.applyLatestConfigurations(stackId, 1L);
     clusterEntity = clusterDAO.findByName("c1");
 
     // now check that latest config from the original stack is enabled
@@ -2187,7 +2188,7 @@ public class ClusterTest {
     // add a service
     String serviceName = "ZOOKEEPER";
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(c1);
-    Service service = cluster.addService(serviceName, repositoryVersion);
+    Service service = cluster.addService(null, serviceName, "", repositoryVersion);
     String configType = "zoo.cfg";
 
     Map<String, String> properties = new HashMap<>();
@@ -2195,7 +2196,7 @@ public class ClusterTest {
 
     // config for v1 on current stack
     properties.put("foo-property-1", "foo-value-1");
-    Config c1 = configFactory.createNew(stackId, cluster, configType, "version-1", properties, propertiesAttributes);
+    Config c1 = configFactory.createNew(stackId, cluster, configType, "version-1", properties, propertiesAttributes, 1L);
 
     // make v1 "current"
     cluster.addDesiredConfig("admin", Sets.newHashSet(c1), "note-1");
@@ -2206,7 +2207,7 @@ public class ClusterTest {
     // save v2
     // config for v2 on new stack
     properties.put("foo-property-2", "foo-value-2");
-    Config c2 = configFactory.createNew(newStackId, cluster, configType, "version-2", properties, propertiesAttributes);
+    Config c2 = configFactory.createNew(newStackId, cluster, configType, "version-2", properties, propertiesAttributes, 1L);
 
     // make v2 "current"
     cluster.addDesiredConfig("admin", Sets.newHashSet(c2), "note-2");
@@ -2231,7 +2232,7 @@ public class ClusterTest {
     service.setDesiredRepositoryVersion(repositoryVersion);
 
     // apply the configs for the old stack
-    cluster.applyLatestConfigurations(stackId, serviceName);
+    cluster.applyLatestConfigurations(stackId, 1L);
 
     // {config-type={tag=version-1}}
     effectiveDesiredTags = configHelper.getEffectiveDesiredTags(cluster, hostName);
@@ -2267,7 +2268,7 @@ public class ClusterTest {
     // add a service
     String serviceName = "ZOOKEEPER";
     RepositoryVersionEntity repositoryVersion = helper.getOrCreateRepositoryVersion(c1);
-    Service service = cluster.addService(serviceName, repositoryVersion);
+    Service service = cluster.addService(null, serviceName, "", repositoryVersion);
     String configType = "zoo.cfg";
 
     ClusterConfigEntity clusterConfig = new ClusterConfigEntity();
@@ -2286,7 +2287,7 @@ public class ClusterTest {
     clusterEntity = clusterDAO.merge(clusterEntity);
 
     // create the service version association
-    cluster.createServiceConfigVersion(serviceName, "", "version-1", null);
+    cluster.createServiceConfigVersion(1L, "", "version-1", null);
 
     // now un-select it and create a new config
     clusterConfig.setSelected(false);
@@ -2310,9 +2311,9 @@ public class ClusterTest {
     // before creating the new service config version, we need to push the
     // service's desired repository forward
     service.setDesiredRepositoryVersion(repoVersion220);
-    cluster.createServiceConfigVersion(serviceName, "", "version-2", null);
+    cluster.createServiceConfigVersion(1L, "", "version-2", null);
 
-    cluster.applyLatestConfigurations(newStackId, serviceName);
+    cluster.applyLatestConfigurations(newStackId, 1L);
 
     // get back the cluster configs for the new stack
     List<ClusterConfigEntity> clusterConfigs = clusterDAO.getAllConfigurations(
@@ -2321,7 +2322,7 @@ public class ClusterTest {
     Assert.assertEquals(1, clusterConfigs.size());
 
     // remove the configs
-    cluster.removeConfigurations(newStackId, serviceName);
+    cluster.removeConfigurations(newStackId, 1L);
 
     clusterConfigs = clusterDAO.getAllConfigurations(cluster.getClusterId(), newStackId);
     Assert.assertEquals(0, clusterConfigs.size());

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersDeadlockTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersDeadlockTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersDeadlockTest.java
index a1407a0..42141f1 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersDeadlockTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersDeadlockTest.java
@@ -30,6 +30,7 @@ import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.H2DatabaseCleaner;
 import org.apache.ambari.server.ServiceComponentNotFoundException;
 import org.apache.ambari.server.ServiceNotFoundException;
+import org.apache.ambari.server.api.services.ServiceKey;
 import org.apache.ambari.server.events.listeners.upgrade.HostVersionOutOfSyncListener;
 import org.apache.ambari.server.orm.GuiceJpaInitializer;
 import org.apache.ambari.server.orm.InMemoryDefaultTestModule;
@@ -388,7 +389,7 @@ public class ClustersDeadlockTest {
     try {
       service = cluster.getService(serviceName);
     } catch (ServiceNotFoundException e) {
-      service = serviceFactory.createNew(cluster, serviceName, repositoryVersion);
+      service = serviceFactory.createNew(cluster, null, new ArrayList<ServiceKey>(), serviceName, "", repositoryVersion);
       cluster.addService(service);
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java
index c204268..be4a907 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersTest.java
@@ -49,7 +49,6 @@ import org.apache.ambari.server.events.HostRegisteredEvent;
 import org.apache.ambari.server.orm.GuiceJpaInitializer;
 import org.apache.ambari.server.orm.InMemoryDefaultTestModule;
 import org.apache.ambari.server.orm.OrmTestHelper;
-import org.apache.ambari.server.orm.dao.ClusterServiceDAO;
 import org.apache.ambari.server.orm.dao.HostComponentDesiredStateDAO;
 import org.apache.ambari.server.orm.dao.HostComponentStateDAO;
 import org.apache.ambari.server.orm.dao.HostDAO;
@@ -188,7 +187,7 @@ public class ClustersTest {
 
     Cluster changed = clusters.getCluster("foobar");
     Assert.assertNotNull(changed);
-    Assert.assertEquals(cId, changed.getClusterId());
+    Assert.assertTrue(cId == changed.getClusterId().longValue());
 
     Assert.assertEquals("foobar",
         clusters.getClusterById(cId).getClusterName());
@@ -427,9 +426,9 @@ public class ClustersTest {
     // host config override
     host1.addDesiredConfig(cluster.getClusterId(), true, "_test", config2);
 
-    Service hdfs = cluster.addService("HDFS", repositoryVersion);
+    Service hdfs = cluster.addService(null, "HDFS", "", repositoryVersion);
 
-    Assert.assertNotNull(injector.getInstance(ClusterServiceDAO.class).findByClusterAndServiceNames(c1, "HDFS"));
+    //Assert.assertNotNull(injector.getInstance(ClusterServiceDAO.class).findByClusterAndServiceNames(c1, "HDFS"));
 
     ServiceComponent nameNode = hdfs.addServiceComponent("NAMENODE");
     ServiceComponent dataNode = hdfs.addServiceComponent("DATANODE");
@@ -446,12 +445,13 @@ public class ClustersTest {
     serviceCheckNodeHost.setState(State.UNKNOWN);
 
     Assert.assertNotNull(injector.getInstance(HostComponentStateDAO.class).findByIndex(
-      nameNodeHost.getClusterId(), nameNodeHost.getServiceName(),
+      nameNodeHost.getClusterId(), 1L, 1L,
       nameNodeHost.getServiceComponentName(), nameNodeHostEntity.getHostId()));
 
     Assert.assertNotNull(injector.getInstance(HostComponentDesiredStateDAO.class).findByIndex(
       nameNodeHost.getClusterId(),
-      nameNodeHost.getServiceName(),
+      1L,
+      1L,
       nameNodeHost.getServiceComponentName(),
       nameNodeHostEntity.getHostId()
     ));
@@ -472,7 +472,7 @@ public class ClustersTest {
 
     ProvisionClusterRequest topologyRequest = createNiceMock(ProvisionClusterRequest.class);
     expect(topologyRequest.getType()).andReturn(TopologyRequest.Type.PROVISION).anyTimes();
-    expect(topologyRequest.getBlueprint()).andReturn(bp).anyTimes();
+    expect(topologyRequest.getBlueprint()).andReturn(null).anyTimes();
     expect(topologyRequest.getClusterId()).andReturn(cluster.getClusterId()).anyTimes();
     expect(topologyRequest.getConfiguration()).andReturn(clusterConfig).anyTimes();
     expect(topologyRequest.getDescription()).andReturn("Test description").anyTimes();
@@ -489,11 +489,11 @@ public class ClustersTest {
 
     Assert.assertEquals(2, hostDAO.findAll().size());
     Assert.assertNull(injector.getInstance(HostComponentStateDAO.class).findByIndex(
-      nameNodeHost.getClusterId(), nameNodeHost.getServiceName(),
+      nameNodeHost.getClusterId(), 1L, 1L,
       nameNodeHost.getServiceComponentName(), nameNodeHostEntity.getHostId()));
 
     Assert.assertNull(injector.getInstance(HostComponentDesiredStateDAO.class).findByIndex(
-      nameNodeHost.getClusterId(), nameNodeHost.getServiceName(),
+      nameNodeHost.getClusterId(), 1L, 1L,
       nameNodeHost.getServiceComponentName(), nameNodeHostEntity.getHostId()
     ));
     Assert.assertEquals(0, injector.getProvider(EntityManager.class).get().createQuery("SELECT config FROM ClusterConfigEntity config").getResultList().size());
@@ -576,7 +576,7 @@ public class ClustersTest {
 
     ProvisionClusterRequest topologyRequest = createNiceMock(ProvisionClusterRequest.class);
     expect(topologyRequest.getType()).andReturn(TopologyRequest.Type.PROVISION).anyTimes();
-    expect(topologyRequest.getBlueprint()).andReturn(bp).anyTimes();
+    expect(topologyRequest.getBlueprint()).andReturn(null).anyTimes();
     expect(topologyRequest.getClusterId()).andReturn(cluster.getClusterId()).anyTimes();
     expect(topologyRequest.getConfiguration()).andReturn(clusterConfig).anyTimes();
     expect(topologyRequest.getDescription()).andReturn("Test description").anyTimes();

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ConcurrentServiceConfigVersionTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ConcurrentServiceConfigVersionTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ConcurrentServiceConfigVersionTest.java
index d7b652b..d7214f4 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ConcurrentServiceConfigVersionTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ConcurrentServiceConfigVersionTest.java
@@ -28,6 +28,7 @@ import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.H2DatabaseCleaner;
 import org.apache.ambari.server.ServiceComponentNotFoundException;
 import org.apache.ambari.server.ServiceNotFoundException;
+import org.apache.ambari.server.api.services.ServiceKey;
 import org.apache.ambari.server.controller.ServiceConfigVersionResponse;
 import org.apache.ambari.server.events.listeners.upgrade.HostVersionOutOfSyncListener;
 import org.apache.ambari.server.orm.GuiceJpaInitializer;
@@ -141,7 +142,7 @@ public class ConcurrentServiceConfigVersionTest {
   @Test
   public void testConcurrentServiceConfigVersions() throws Exception {
     long nextVersion = serviceConfigDAO.findNextServiceConfigVersion(
-        cluster.getClusterId(), "HDFS");
+        cluster.getClusterId(), 1L);
 
     Assert.assertEquals(nextVersion, 1);
 
@@ -159,7 +160,7 @@ public class ConcurrentServiceConfigVersionTest {
 
     long maxVersion = NUMBER_OF_THREADS * NUMBER_OF_SERVICE_CONFIG_VERSIONS;
     nextVersion = serviceConfigDAO.findNextServiceConfigVersion(
-        cluster.getClusterId(), "HDFS");
+        cluster.getClusterId(), 1L);
 
     Assert.assertEquals(maxVersion + 1, nextVersion);
   }
@@ -180,7 +181,7 @@ public class ConcurrentServiceConfigVersionTest {
       try {
         for (int i = 0; i < NUMBER_OF_SERVICE_CONFIG_VERSIONS; i++) {
           ServiceConfigVersionResponse response = cluster.createServiceConfigVersion(
-              "HDFS", null, getName() + "-serviceConfig" + i, null);
+              1L, null, getName() + "-serviceConfig" + i, null);
 
           Thread.sleep(100);
         }
@@ -219,7 +220,7 @@ public class ConcurrentServiceConfigVersionTest {
     try {
       service = cluster.getService(serviceName);
     } catch (ServiceNotFoundException e) {
-      service = serviceFactory.createNew(cluster, serviceName, repositoryVersion);
+      service = serviceFactory.createNew(cluster, null, new ArrayList<ServiceKey>(), serviceName, "", repositoryVersion);
       cluster.addService(service);
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ServiceComponentHostConcurrentWriteDeadlockTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ServiceComponentHostConcurrentWriteDeadlockTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ServiceComponentHostConcurrentWriteDeadlockTest.java
index 4303bf5..983143c 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ServiceComponentHostConcurrentWriteDeadlockTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ServiceComponentHostConcurrentWriteDeadlockTest.java
@@ -30,6 +30,7 @@ import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.H2DatabaseCleaner;
 import org.apache.ambari.server.ServiceComponentNotFoundException;
 import org.apache.ambari.server.ServiceNotFoundException;
+import org.apache.ambari.server.api.services.ServiceKey;
 import org.apache.ambari.server.events.listeners.upgrade.HostVersionOutOfSyncListener;
 import org.apache.ambari.server.orm.GuiceJpaInitializer;
 import org.apache.ambari.server.orm.InMemoryDefaultTestModule;
@@ -242,7 +243,7 @@ public class ServiceComponentHostConcurrentWriteDeadlockTest {
     try {
       service = cluster.getService(serviceName);
     } catch (ServiceNotFoundException e) {
-      service = serviceFactory.createNew(cluster, serviceName, m_repositoryVersion);
+      service = serviceFactory.createNew(cluster, null, new ArrayList<ServiceKey>(), serviceName, "", m_repositoryVersion);
       cluster.addService(service);
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java
index 48864cc..658ba84 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java
@@ -32,6 +32,7 @@ import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.H2DatabaseCleaner;
 import org.apache.ambari.server.ServiceComponentNotFoundException;
 import org.apache.ambari.server.ServiceNotFoundException;
+import org.apache.ambari.server.api.services.ServiceKey;
 import org.apache.ambari.server.controller.ServiceComponentHostResponse;
 import org.apache.ambari.server.orm.GuiceJpaInitializer;
 import org.apache.ambari.server.orm.InMemoryDefaultTestModule;
@@ -187,7 +188,7 @@ public class ServiceComponentHostTest {
     } catch (ServiceNotFoundException e) {
       LOG.debug("Calling service create, serviceName={}", svc);
 
-      s = serviceFactory.createNew(c, svc, repositoryVersion);
+      s = serviceFactory.createNew(c, null, new ArrayList<ServiceKey>(), svc, "", repositoryVersion);
       c.addService(s);
     }
 
@@ -550,8 +551,8 @@ public class ServiceComponentHostTest {
 
     Cluster cluster = clusters.getCluster(clusterName);
 
-    final ConfigGroup configGroup = configGroupFactory.createNew(cluster, "HDFS",
-      "cg1", "t1", "", new HashMap<>(), new HashMap<>());
+    final ConfigGroup configGroup = configGroupFactory.createNew(cluster, 1L, 1L, "HDFS",
+      "t1", "", new HashMap<>(), new HashMap<>());
 
     cluster.addConfigGroup(configGroup);
 
@@ -804,7 +805,7 @@ public class ServiceComponentHostTest {
       new HashMap<>());
 
     host.addDesiredConfig(cluster.getClusterId(), true, "user", c);
-    ConfigGroup configGroup = configGroupFactory.createNew(cluster, "HDFS", "g1",
+    ConfigGroup configGroup = configGroupFactory.createNew(cluster, 1L, 1L, "HDFS",
       "t1", "", new HashMap<String, Config>() {{ put("hdfs-site", c); }},
       new HashMap<Long, Host>() {{ put(hostEntity.getHostId(), host); }});
     cluster.addConfigGroup(configGroup);
@@ -860,7 +861,7 @@ public class ServiceComponentHostTest {
     final Config c1 = configFactory.createNew(cluster, "core-site", "version2",
       new HashMap<String, String>() {{ put("fs.trash.interval", "400"); }},
       new HashMap<>());
-    configGroup = configGroupFactory.createNew(cluster, "HDFS", "g2",
+    configGroup = configGroupFactory.createNew(cluster, 1L, 1L, "HDFS",
       "t2", "", new HashMap<String, Config>() {{ put("core-site", c1); }},
       new HashMap<Long, Host>() {{ put(hostEntity.getHostId(), host); }});
     cluster.addConfigGroup(configGroup);
@@ -1012,7 +1013,7 @@ public class ServiceComponentHostTest {
    * @param tag the config tag
    * @param values the values for the config
    */
-  private void makeConfig(Cluster cluster, String type, String tag, Map<String, String> values, Map<String, Map<String, String>> attributes) {
+  private void makeConfig(Cluster cluster, String type, String tag, Map<String, String> values, Map<String, Map<String, String>> attributes) throws AmbariException {
     Config config = configFactory.createNew(cluster, type, tag, values, attributes);
     cluster.addDesiredConfig("user", Collections.singleton(config));
   }
@@ -1042,7 +1043,8 @@ public class ServiceComponentHostTest {
 
     HostComponentDesiredStateEntity entity = hostComponentDesiredStateDAO.findByIndex(
       cluster.getClusterId(),
-      sch1.getServiceName(),
+      1L,
+      1L,
       sch1.getServiceComponentName(),
       hostEntity.getHostId()
     );
@@ -1054,7 +1056,8 @@ public class ServiceComponentHostTest {
 
     entity = hostComponentDesiredStateDAO.findByIndex(
       cluster.getClusterId(),
-      sch1.getServiceName(),
+      1L,
+      1L,
       sch1.getServiceComponentName(),
       hostEntity.getHostId()
     );
@@ -1099,7 +1102,7 @@ public class ServiceComponentHostTest {
     hostEntity = hostDAO.findByName(hostName1);
     Collection<HostComponentStateEntity> hostComponentStates = hostEntity.getHostComponentStateEntities();
     for( HostComponentStateEntity hostComponentState : hostComponentStates ) {
-      if( StringUtils.equals("HDFS", hostComponentState.getServiceName() ) ) {
+      if( StringUtils.equals("HDFS", "" ) ) {
         hostComponentState.setVersion(State.UNKNOWN.name());
         hostComponentStateDAO.merge(hostComponentState);
       }
@@ -1119,7 +1122,7 @@ public class ServiceComponentHostTest {
     hostEntity = hostDAO.findByName(hostName1);
     hostComponentStates = hostEntity.getHostComponentStateEntities();
     for( HostComponentStateEntity hostComponentState : hostComponentStates ) {
-      if( StringUtils.equals("ZOOKEEPER", hostComponentState.getServiceName() ) ) {
+      if( StringUtils.equals("ZOOKEEPER", "" ) ) {
         hostComponentState.setVersion(patchRepositoryVersion.getVersion());
         hostComponentState.setUpgradeState(UpgradeState.COMPLETE);
         hostComponentStateDAO.merge(hostComponentState);

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/topology/AmbariContextTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/AmbariContextTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/AmbariContextTest.java
index 0deeae9..16de535 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/AmbariContextTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/AmbariContextTest.java
@@ -225,7 +225,7 @@ public class AmbariContextTest {
     blueprintServices.add("service2");
 
     expect(topology.getClusterId()).andReturn(CLUSTER_ID).anyTimes();
-    expect(topology.getBlueprint()).andReturn(blueprint).anyTimes();
+    expect(topology.getBlueprint()).andReturn(null).anyTimes();
     expect(topology.getHostGroupInfo()).andReturn(Collections.singletonMap(HOST_GROUP_1, group1Info)).anyTimes();
 
     expect(blueprint.getName()).andReturn(BP_NAME).anyTimes();
@@ -315,7 +315,7 @@ public class AmbariContextTest {
     replayAll();
 
     // test
-    context.createAmbariResources(topology, CLUSTER_NAME, null, null, null);
+    context.createAmbariResources(topology, CLUSTER_NAME, null);
 
     // assertions
     ClusterRequest clusterRequest = clusterRequestCapture.getValue();
@@ -400,7 +400,7 @@ public class AmbariContextTest {
     components.add("component3");
     componentsMap.put("service2", components);
 
-    context.createAmbariHostResources(CLUSTER_ID, "host1", componentsMap);
+    context.createAmbariHostResources(CLUSTER_ID, "host1", new HashMap<org.apache.ambari.server.topology.Service, Collection<ComponentV2>>());
 
     assertEquals(requestsCapture.getValue().size(), 3);
   }
@@ -430,7 +430,7 @@ public class AmbariContextTest {
     components.add("component3");
     componentsMap.put("service2", components);
 
-    context.createAmbariHostResources(CLUSTER_ID, "host1", componentsMap);
+    context.createAmbariHostResources(CLUSTER_ID, "host1", new HashMap<org.apache.ambari.server.topology.Service, Collection<ComponentV2>>());
 
     assertEquals(requestsCapture.getValue().size(), 2);
   }
@@ -744,7 +744,7 @@ public class AmbariContextTest {
     replayAll();
 
     // test
-    context.createAmbariResources(topology, CLUSTER_NAME, null, null, null);
+    context.createAmbariResources(topology, CLUSTER_NAME, null);
   }
 
   @Test
@@ -769,7 +769,7 @@ public class AmbariContextTest {
 
     // test
     try {
-      context.createAmbariResources(topology, CLUSTER_NAME, null, null, null);
+      context.createAmbariResources(topology, CLUSTER_NAME, null);
       fail("Expected failure when several versions are found");
     } catch (IllegalArgumentException e) {
       assertEquals(
@@ -792,7 +792,7 @@ public class AmbariContextTest {
 
     // test
     try {
-      context.createAmbariResources(topology, CLUSTER_NAME, null, "xyz", null);
+      context.createAmbariResources(topology, CLUSTER_NAME, null);
       fail("Expected failure when a bad version is provided");
     } catch (IllegalArgumentException e) {
       assertEquals(

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java
index 771b89f..ca74cf0 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java
@@ -263,7 +263,7 @@ public class ClusterConfigurationRequestTest {
 
     expect(topology.getAmbariContext()).andReturn(ambariContext).anyTimes();
     expect(topology.getConfigRecommendationStrategy()).andReturn(ConfigRecommendationStrategy.NEVER_APPLY).anyTimes();
-    expect(topology.getBlueprint()).andReturn(blueprint).anyTimes();
+    expect(topology.getBlueprint()).andReturn(null).anyTimes();
     expect(blueprint.isValidConfigType("testConfigType")).andReturn(true).anyTimes();
 
     expect(topology.getConfiguration()).andReturn(blueprintConfig).anyTimes();
@@ -352,7 +352,7 @@ public class ClusterConfigurationRequestTest {
 
     expect(topology.getAmbariContext()).andReturn(ambariContext).anyTimes();
     expect(topology.getConfigRecommendationStrategy()).andReturn(ConfigRecommendationStrategy.NEVER_APPLY).anyTimes();
-    expect(topology.getBlueprint()).andReturn(blueprint).anyTimes();
+    expect(topology.getBlueprint()).andReturn(null).anyTimes();
     expect(topology.getConfiguration()).andReturn(stackConfig).anyTimes();
     expect(topology.getHostGroupInfo()).andReturn(Collections.emptyMap()).anyTimes();
     expect(topology.getClusterId()).andReturn(Long.valueOf(1)).anyTimes();
@@ -390,7 +390,7 @@ public class ClusterConfigurationRequestTest {
 
     expect(topology.getAmbariContext()).andReturn(ambariContext).anyTimes();
     expect(topology.getConfiguration()).andReturn(configuration).anyTimes();
-    expect(topology.getBlueprint()).andReturn(blueprint).anyTimes();
+    expect(topology.getBlueprint()).andReturn(null).anyTimes();
     expect(topology.getHostGroupInfo()).andReturn(hostGroupInfoMap);
     expect(blueprint.getStack()).andReturn(stack).anyTimes();
     expect(blueprint.getServices()).andReturn(services).anyTimes();
@@ -440,7 +440,7 @@ public class ClusterConfigurationRequestTest {
 
     expect(topology.getAmbariContext()).andReturn(ambariContext).anyTimes();
     expect(topology.getConfiguration()).andReturn(configuration).anyTimes();
-    expect(topology.getBlueprint()).andReturn(blueprint).anyTimes();
+    expect(topology.getBlueprint()).andReturn(null).anyTimes();
     expect(topology.getHostGroupInfo()).andReturn(hostGroupInfoMap);
     expect(blueprint.getStack()).andReturn(stack).anyTimes();
     expect(blueprint.getServices()).andReturn(services).anyTimes();

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterDeployWithStartOnlyTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterDeployWithStartOnlyTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterDeployWithStartOnlyTest.java
index aecc6cb..a22cef3 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterDeployWithStartOnlyTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterDeployWithStartOnlyTest.java
@@ -288,7 +288,7 @@ public class ClusterDeployWithStartOnlyTest extends EasyMockSupport {
     expect(stack.getExcludedConfigurationTypes("service1")).andReturn(Collections.emptySet()).anyTimes();
     expect(stack.getExcludedConfigurationTypes("service2")).andReturn(Collections.emptySet()).anyTimes();
 
-    expect(request.getBlueprint()).andReturn(blueprint).anyTimes();
+    expect(request.getBlueprint()).andReturn(null).anyTimes();
     expect(request.getClusterId()).andReturn(CLUSTER_ID).anyTimes();
     expect(request.getClusterName()).andReturn(CLUSTER_NAME).anyTimes();
     expect(request.getDescription()).andReturn("Provision Cluster Test").anyTimes();
@@ -341,7 +341,7 @@ public class ClusterDeployWithStartOnlyTest extends EasyMockSupport {
 
     expect(ambariContext.getPersistedTopologyState()).andReturn(persistedState).anyTimes();
     //todo: don't ignore param
-    ambariContext.createAmbariResources(isA(ClusterTopology.class), eq(CLUSTER_NAME), (SecurityType) isNull(), eq("1"), anyLong());
+    ambariContext.createAmbariResources(isA(ClusterTopology.class), eq(CLUSTER_NAME), (SecurityType) isNull());
     expectLastCall().once();
     expect(ambariContext.getNextRequestId()).andReturn(1L).once();
     expect(ambariContext.isClusterKerberosEnabled(CLUSTER_ID)).andReturn(false).anyTimes();

http://git-wip-us.apache.org/repos/asf/ambari/blob/1f176845/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterInstallWithoutStartOnComponentLevelTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterInstallWithoutStartOnComponentLevelTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterInstallWithoutStartOnComponentLevelTest.java
index a4b2160..ba2118d 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterInstallWithoutStartOnComponentLevelTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterInstallWithoutStartOnComponentLevelTest.java
@@ -284,7 +284,7 @@ public class ClusterInstallWithoutStartOnComponentLevelTest extends EasyMockSupp
     expect(stack.getExcludedConfigurationTypes("service1")).andReturn(Collections.emptySet()).anyTimes();
     expect(stack.getExcludedConfigurationTypes("service2")).andReturn(Collections.emptySet()).anyTimes();
 
-    expect(request.getBlueprint()).andReturn(blueprint).anyTimes();
+    expect(request.getBlueprint()).andReturn(null).anyTimes();
     expect(request.getClusterId()).andReturn(CLUSTER_ID).anyTimes();
     expect(request.getClusterName()).andReturn(CLUSTER_NAME).anyTimes();
     expect(request.getDescription()).andReturn("Provision Cluster Test").anyTimes();
@@ -343,7 +343,7 @@ public class ClusterInstallWithoutStartOnComponentLevelTest extends EasyMockSupp
 
     expect(ambariContext.getPersistedTopologyState()).andReturn(persistedState).anyTimes();
     //todo: don't ignore param
-    ambariContext.createAmbariResources(isA(ClusterTopology.class), eq(CLUSTER_NAME), (SecurityType) isNull(), (String) eq("1"), anyLong());
+    ambariContext.createAmbariResources(isA(ClusterTopology.class), eq(CLUSTER_NAME), (SecurityType) isNull());
     expectLastCall().once();
     expect(ambariContext.getNextRequestId()).andReturn(1L).once();
     expect(ambariContext.isClusterKerberosEnabled(CLUSTER_ID)).andReturn(false).anyTimes();