ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srima...@apache.org
Subject [68/98] [abbrv] ambari git commit: Revert "AMBARI-16272. Ambari Upgrade shouldn't automatically add stack configs (dlysnichenko)" - failing tests.
Date Thu, 02 Jun 2016 05:49:17 GMT
http://git-wip-us.apache.org/repos/asf/ambari/blob/3148759f/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 67be4e5..5bcfd86 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
@@ -17,8 +17,6 @@
  */
 package org.apache.ambari.server.controller.internal;
 
-import static com.google.common.collect.ImmutableMap.of;
-import static com.google.common.collect.Sets.newHashSet;
 import static org.easymock.EasyMock.createNiceMock;
 import static org.easymock.EasyMock.expect;
 import static org.easymock.EasyMock.replay;
@@ -83,8 +81,6 @@ import org.apache.ambari.server.state.ConfigImpl;
 import org.apache.ambari.server.state.DesiredConfig;
 import org.apache.ambari.server.state.Host;
 import org.apache.ambari.server.state.HostState;
-import org.apache.ambari.server.state.PropertyInfo;
-import org.apache.ambari.server.state.PropertyUpgradeBehavior;
 import org.apache.ambari.server.state.RepositoryVersionState;
 import org.apache.ambari.server.state.Service;
 import org.apache.ambari.server.state.ServiceComponent;
@@ -146,7 +142,7 @@ public class UpgradeResourceProviderTest {
     expect(
         configHelper.getDefaultProperties(EasyMock.anyObject(StackId.class),
             EasyMock.anyObject(Cluster.class))).andReturn(
-        new HashMap<String, Set<PropertyInfo>>()).anyTimes();
+        new HashMap<String, Map<String, String>>()).anyTimes();
 
 
     EasyMock.replay(configHelper);
@@ -1092,57 +1088,59 @@ public class UpgradeResourceProviderTest {
     StackId stack211 = new StackId("HDP-2.1.1");
     StackId stack220 = new StackId("HDP-2.2.0");
 
-    Set<PropertyInfo> stack211FirstConfig = newHashSet(
-        createProperty("1", "one", new PropertyUpgradeBehavior(true,false,false)),
-        createProperty("11", "one-one", new PropertyUpgradeBehavior(true,false,false))
-    );
-    Set<PropertyInfo> stack211SecondConfig = newHashSet(createProperty("2", "two", new PropertyUpgradeBehavior(true,false,false)));
-    Set<PropertyInfo> stack211ThirdConfig = newHashSet(createProperty("3", "three", new PropertyUpgradeBehavior(true,false,false)));
-
-    Map<String, Set<PropertyInfo>> stack211Configs = new HashMap<>(of(
-        "first-site", stack211FirstConfig,
-        "second-site", stack211SecondConfig,
-        "third-site", stack211ThirdConfig
-    ));
-
-    Set<PropertyInfo> stack220FirstConfig = newHashSet(
-        createProperty("1", "one-new", new PropertyUpgradeBehavior(false,false,true)),
-        createProperty("11", "any", new PropertyUpgradeBehavior(false,true,false)),
-        createProperty("111", "one-one-one", new PropertyUpgradeBehavior(true,false,false)),
-        createProperty("2", "two", new PropertyUpgradeBehavior(false,false,true))
-    );
-    Set<PropertyInfo> stack220ThirdConfig = newHashSet(createProperty("3", "three-ignored", new PropertyUpgradeBehavior(false,false,false)));
-    Set<PropertyInfo> stack220FlumeEnvConfig = newHashSet(createProperty("flume_env_key", "flume-env-value", new PropertyUpgradeBehavior(false,false,false)));
-    Map<String, Set<PropertyInfo>> stack220Configs = new HashMap<>(of(
-        "first-site", stack220FirstConfig,
-        "third-site", stack220ThirdConfig,
-        "flume-env", stack220FlumeEnvConfig
-    ));
-
-    Map<String, String> firstConfigProperties = new HashMap<>(of("1", "one", "11", "one-one"));
-    Map<String, String> secondConfigProperties = new HashMap<>(of("2", "two"));
-    Map<String, String> thirdConfigProperties = new HashMap<>(of("3", "three-changed"));
-
-    Config firstConfig = EasyMock.createNiceMock(Config.class);
-    Config secondConfig = EasyMock.createNiceMock(Config.class);
-    Config thirdConfig = EasyMock.createNiceMock(Config.class);
-
-    expect(firstConfig.getProperties()).andReturn(firstConfigProperties);
-    expect(secondConfig.getProperties()).andReturn(secondConfigProperties);
-    expect(thirdConfig.getProperties()).andReturn(thirdConfigProperties);
-
-    Map<String, DesiredConfig> desiredConfigurations = new HashMap<>();
-    desiredConfigurations.put("first-site", null);
-    desiredConfigurations.put("second-site", null);
-    desiredConfigurations.put("third-site", null);
+    Map<String, Map<String, String>> stack211Configs = new HashMap<String, Map<String, String>>();
+    Map<String, String> stack211FooType = new HashMap<String, String>();
+    Map<String, String> stack211BarType = new HashMap<String, String>();
+    Map<String, String> stack211BazType = new HashMap<String, String>();
+    stack211Configs.put("foo-site", stack211FooType);
+    stack211Configs.put("bar-site", stack211BarType);
+    stack211Configs.put("baz-site", stack211BazType);
+    stack211FooType.put("1", "one");
+    stack211FooType.put("11", "one-one");
+    stack211BarType.put("2", "two");
+    stack211BazType.put("3", "three");
+
+    Map<String, Map<String, String>> stack220Configs = new HashMap<String, Map<String, String>>();
+    Map<String, String> stack220FooType = new HashMap<String, String>();
+    Map<String, String> stack220BazType = new HashMap<String, String>();
+    Map<String, String> stack220FlumeEnvType = new HashMap<String, String>();
+    stack220Configs.put("foo-site", stack220FooType);
+    stack220Configs.put("baz-site", stack220BazType);
+    stack220Configs.put("flume-env", stack220FlumeEnvType);
+    stack220FooType.put("1", "one-new");
+    stack220FooType.put("111", "one-one-one");
+    stack220BazType.put("3", "three-new");
+    stack220FlumeEnvType.put("flume_env_key", "flume-env-value");
+
+    Map<String, String> clusterFooType = new HashMap<String, String>();
+    Map<String, String> clusterBarType = new HashMap<String, String>();
+    Map<String, String> clusterBazType = new HashMap<String, String>();
+
+    Config fooConfig = EasyMock.createNiceMock(Config.class);
+    Config barConfig = EasyMock.createNiceMock(Config.class);
+    Config bazConfig = EasyMock.createNiceMock(Config.class);
+
+    clusterFooType.put("1", "one");
+    clusterFooType.put("11", "one-one");
+    clusterBarType.put("2", "two");
+    clusterBazType.put("3", "three-changed");
+
+    expect(fooConfig.getProperties()).andReturn(clusterFooType);
+    expect(barConfig.getProperties()).andReturn(clusterBarType);
+    expect(bazConfig.getProperties()).andReturn(clusterBazType);
+
+    Map<String, DesiredConfig> desiredConfigurations = new HashMap<String, DesiredConfig>();
+    desiredConfigurations.put("foo-site", null);
+    desiredConfigurations.put("bar-site", null);
+    desiredConfigurations.put("baz-site", null);
 
     Cluster cluster = EasyMock.createNiceMock(Cluster.class);
     expect(cluster.getCurrentStackVersion()).andReturn(stack211);
     expect(cluster.getDesiredStackVersion()).andReturn(stack220);
     expect(cluster.getDesiredConfigs()).andReturn(desiredConfigurations);
-    expect(cluster.getDesiredConfigByType("first-site")).andReturn(firstConfig);
-    expect(cluster.getDesiredConfigByType("second-site")).andReturn(secondConfig);
-    expect(cluster.getDesiredConfigByType("third-site")).andReturn(thirdConfig);
+    expect(cluster.getDesiredConfigByType("foo-site")).andReturn(fooConfig);
+    expect(cluster.getDesiredConfigByType("bar-site")).andReturn(barConfig);
+    expect(cluster.getDesiredConfigByType("baz-site")).andReturn(bazConfig);
 
     // setup the config helper for placeholder resolution
     EasyMock.reset(configHelper);
@@ -1164,7 +1162,7 @@ public class UpgradeResourceProviderTest {
 
     EasyMock.expectLastCall().once();
 
-    EasyMock.replay(configHelper, cluster, firstConfig, secondConfig, thirdConfig);
+    EasyMock.replay(configHelper, cluster, fooConfig, barConfig, bazConfig);
 
     UpgradeResourceProvider upgradeResourceProvider = createProvider(amc);
 
@@ -1173,22 +1171,21 @@ public class UpgradeResourceProviderTest {
     upgradeResourceProvider.applyStackAndProcessConfigurations(stack211.getStackName(), cluster, "2.2.0.0", Direction.UPGRADE, upgrade, "admin");
 
     Map<String, Map<String, String>> expectedConfigurations = expectedConfigurationsCapture.getValue();
-    Map<String, String> resultingFirstConfig = expectedConfigurations.get("first-site");
-    Map<String, String> resultingSecondConfig = expectedConfigurations.get("second-site");
-    Map<String, String> resultingThirdConfig = expectedConfigurations.get("third-site");
+    Map<String, String> expectedFooType = expectedConfigurations.get("foo-site");
+    Map<String, String> expectedBarType = expectedConfigurations.get("bar-site");
+    Map<String, String> expectedBazType = expectedConfigurations.get("baz-site");
 
     // As the upgrade pack did not have any Flume updates, its configs should not be updated.
     assertFalse(expectedConfigurations.containsKey("flume-env"));
 
     // the really important values are one-new and three-changed; one-new
-    // indicates that the new stack value is changed since it was marked CHANGE_ON_UPGRADE
+    // indicates that the new stack value is changed since it was not customized
     // while three-changed represents that the customized value was preserved
     // even though the stack value changed
-    assertEquals("one-new", resultingFirstConfig.get("1"));
-    assertEquals(null, resultingFirstConfig.get("11"));
-    assertEquals("one-one-one", resultingFirstConfig.get("111"));
-    assertEquals("two", resultingSecondConfig.get("2"));
-    assertEquals("three-changed", resultingThirdConfig.get("3"));
+    assertEquals("one-new", expectedFooType.get("1"));
+    assertEquals("one-one", expectedFooType.get("11"));
+    assertEquals("two", expectedBarType.get("2"));
+    assertEquals("three-changed", expectedBazType.get("3"));
   }
 
   /**
@@ -1199,18 +1196,6 @@ public class UpgradeResourceProviderTest {
     return new UpgradeResourceProvider(amc);
   }
 
-  private PropertyInfo createProperty(String name, String value) {
-    return createProperty(name, value, null);
-  }
-
-  private PropertyInfo createProperty(String name, String value, PropertyUpgradeBehavior propertyStackUpgradeBehavior) {
-    PropertyInfo propertyInfo = new PropertyInfo();
-    propertyInfo.setName(name);
-    propertyInfo.setValue(value);
-    propertyInfo.setPropertyStackUpgradeBehavior(propertyStackUpgradeBehavior);
-    return propertyInfo;
-  }
-
   private RequestStatus testCreateResources() throws Exception {
 
     Cluster cluster = clusters.getCluster("c1");

http://git-wip-us.apache.org/repos/asf/ambari/blob/3148759f/ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerCommonServicesTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerCommonServicesTest.java b/ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerCommonServicesTest.java
index 182df79..6f3cf78 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerCommonServicesTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerCommonServicesTest.java
@@ -97,7 +97,7 @@ public class StackManagerCommonServicesTest {
     replay(metaInfoDao, actionMetadata);
 
     StackManager stackManager = new StackManager(new File(stackRoot), new File(
-        commonServicesRoot), osFamily, true, metaInfoDao, actionMetadata, stackDao);
+        commonServicesRoot), osFamily, metaInfoDao, actionMetadata, stackDao);
 
     EasyMock.verify( config, stackDao );
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/3148759f/ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerMiscTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerMiscTest.java b/ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerMiscTest.java
index b1f7cd1..850c716 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerMiscTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerMiscTest.java
@@ -62,7 +62,7 @@ public class StackManagerMiscTest  {
       String stacksCycle1 = ClassLoader.getSystemClassLoader().getResource("stacks_with_cycle").getPath();
 
       StackManager stackManager = new StackManager(new File(stacksCycle1),
-          null, osFamily, true, metaInfoDao, actionMetadata, stackDao);
+          null, osFamily, metaInfoDao, actionMetadata, stackDao);
 
       fail("Expected exception due to cyclic stack");
     } catch (AmbariException e) {
@@ -74,7 +74,7 @@ public class StackManagerMiscTest  {
           "stacks_with_cycle2").getPath();
 
       StackManager stackManager = new StackManager(new File(stacksCycle2),
-          null, osFamily, true, metaInfoDao, actionMetadata, stackDao);
+          null, osFamily, metaInfoDao, actionMetadata, stackDao);
 
       fail("Expected exception due to cyclic stack");
     } catch (AmbariException e) {
@@ -108,7 +108,7 @@ public class StackManagerMiscTest  {
 
     StackManager stackManager = new StackManager(new File(singleStack.replace(
         StackManager.PATH_DELIMITER, File.separator)),
-        null, osFamily, true, metaInfoDao, actionMetadata, stackDao);
+        null, osFamily, metaInfoDao, actionMetadata, stackDao);
 
 
     Collection<StackInfo> stacks = stackManager.getStacks();
@@ -140,7 +140,7 @@ public class StackManagerMiscTest  {
       String upgradeCycle = ClassLoader.getSystemClassLoader().getResource("stacks_with_upgrade_cycle").getPath();
 
       StackManager stackManager = new StackManager(new File(upgradeCycle),
-          null, osFamily, true, metaInfoDao, actionMetadata, stackDao);
+          null, osFamily, metaInfoDao, actionMetadata, stackDao);
 
       fail("Expected exception due to cyclic service upgrade xml");
     } catch (AmbariException e) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/3148759f/ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerTest.java
index 3919fec..8e9f81a 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/stack/StackManagerTest.java
@@ -101,7 +101,7 @@ public class StackManagerTest {
     osFamily = new OsFamily(config);
 
     StackManager stackManager = new StackManager(new File(stackRoot), null,
-        osFamily, true, metaInfoDao, actionMetadata, stackDao);
+        osFamily, metaInfoDao, actionMetadata, stackDao);
 
     verify(config, metaInfoDao, stackDao, actionMetadata);
 
@@ -667,7 +667,7 @@ public class StackManagerTest {
     OsFamily osFamily = new OsFamily(config);
 
     StackManager stackManager = new StackManager(stackRoot, commonServices,
-            osFamily, true, metaInfoDao, actionMetadata, stackDao);
+            osFamily, metaInfoDao, actionMetadata, stackDao);
 
     for (StackInfo stackInfo : stackManager.getStacks()) {
       for (ServiceInfo serviceInfo : stackInfo.getServices()) {
@@ -710,7 +710,7 @@ public class StackManagerTest {
 
     OsFamily osFamily = new OsFamily(config);
 
-    StackManager stackManager = new StackManager(stackRoot, commonServices, osFamily, true, metaInfoDao, actionMetadata, stackDao);
+    StackManager stackManager = new StackManager(stackRoot, commonServices, osFamily, metaInfoDao, actionMetadata, stackDao);
 
     String rangerUserSyncRoleCommand = Role.RANGER_USERSYNC + "-" + RoleCommand.START;
     String rangerAdminRoleCommand = Role.RANGER_ADMIN + "-" + RoleCommand.START;
@@ -817,7 +817,7 @@ public class StackManagerTest {
 
     OsFamily osFamily = new OsFamily(config);
 
-    StackManager stackManager = new StackManager(stackRoot, commonServices, osFamily, true, metaInfoDao, actionMetadata, stackDao);
+    StackManager stackManager = new StackManager(stackRoot, commonServices, osFamily, metaInfoDao, actionMetadata, stackDao);
 
     String zookeeperServerRoleCommand = Role.ZOOKEEPER_SERVER + "-" + RoleCommand.START;
     String logsearchServerRoleCommand = Role.LOGSEARCH_SERVER + "-" + RoleCommand.START;

http://git-wip-us.apache.org/repos/asf/ambari/blob/3148759f/ambari-server/src/test/java/org/apache/ambari/server/state/PropertyInfoTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/PropertyInfoTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/PropertyInfoTest.java
index e55058f..b11c5d8 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/PropertyInfoTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/PropertyInfoTest.java
@@ -37,7 +37,6 @@ import static org.easymock.EasyMock.createNiceMock;
 import static org.easymock.EasyMock.expect;
 import static org.easymock.EasyMock.replay;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
 public class PropertyInfoTest {
@@ -97,30 +96,6 @@ public class PropertyInfoTest {
   }
 
   @Test
-  public void testUpgradeBehaviorTag() throws JAXBException {
-    // given
-    String xml =
-      "<property>\n" +
-      "  <name>prop_name</name>\n" +
-      "  <value>prop_val</value>\n" +
-      "  <on-ambari-upgrade add=\"false\" change=\"true\" delete=\"true\"/>\n" +
-      "  <on-stack-upgrade add=\"true\" change=\"true\" delete=\"false\"/>\n" +
-      "</property>";
-
-    // when
-    PropertyInfo propertyInfo = propertyInfoFrom(xml);
-
-    // then
-    assertFalse(propertyInfo.getPropertyAmbariUpgradeBehavior().isAdd());
-    assertTrue(propertyInfo.getPropertyAmbariUpgradeBehavior().isChange());
-    assertTrue(propertyInfo.getPropertyAmbariUpgradeBehavior().isDelete());
-
-    assertTrue(propertyInfo.getPropertyStackUpgradeBehavior().isAdd());
-    assertTrue(propertyInfo.getPropertyStackUpgradeBehavior().isChange());
-    assertFalse(propertyInfo.getPropertyStackUpgradeBehavior().isDelete());
-  }
-
-  @Test
   public void testUnknownPropertyType() throws Exception {
     // Given
     String xml =
@@ -142,14 +117,14 @@ public class PropertyInfoTest {
   }
 
   public static PropertyInfo propertyInfoFrom(String xml) throws JAXBException {
-    JAXBContext jaxbCtx = JAXBContext.newInstance(PropertyInfo.class, PropertyUpgradeBehavior.class);
+    JAXBContext jaxbCtx = JAXBContext.newInstance(PropertyInfo.class);
     Unmarshaller unmarshaller = jaxbCtx.createUnmarshaller();
 
     return unmarshaller.unmarshal(
       new StreamSource(
         new ByteArrayInputStream(xml.getBytes())
-      ),
-      PropertyInfo.class
+      )
+      , PropertyInfo.class
     ).getValue();
   }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3148759f/ambari-server/src/test/java/org/apache/ambari/server/state/ServicePropertiesTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/ServicePropertiesTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/ServicePropertiesTest.java
deleted file mode 100644
index 79f3538..0000000
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/ServicePropertiesTest.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ambari.server.state;
-
-import org.apache.ambari.server.stack.StackManager;
-import org.junit.Test;
-import org.xml.sax.SAXException;
-
-import javax.xml.validation.Validator;
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-public class ServicePropertiesTest {
-
-  /**
-   * This unit test checks that all config xmls for all services pass validation.
-   * They should match xsd schema configuration-schema.xsd.
-   * Test checks real (production) configs like hdfs-site.xml. The reason why
-   * this test exists is to make sure that anybody who adds new properties to stack
-   * configs, explicitly defines whether they should be added/modified/deleted
-   * during ambari upgrade and/or stack upgrade.
-   *
-   * @throws SAXException
-   * @throws IOException
-   */
-  @Test
-  public void validatePropertySchemaOfServiceXMLs() throws SAXException,
-    IOException, URISyntaxException {
-    Validator validator = StackManager.getPropertySchemaValidator();
-    // TODO: make sure that test does not depend on mvn/junit working directory
-    StackManager.validateAllPropertyXmlsInFolderRecursively(
-      getDirectoryFromMainResources("common-services"), validator);
-    StackManager.validateAllPropertyXmlsInFolderRecursively(
-      getDirectoryFromMainResources("stacks"), validator);
-  }
-
-
-  /**
-   * Looks for directory under ambari-server/src/main/resources/ path.
-   * @param dir directory name
-   * @return File that points to a requested directory
-   */
-  private File getDirectoryFromMainResources(String dir) throws URISyntaxException, IOException {
-    File resourcesFolder = new File(resolveAbsolutePathToResourcesFolder(), "../../../src/main/resources");
-    File resultDir = new File(resourcesFolder, dir);
-    if (resultDir.exists()) {
-      return resultDir;
-    } else {
-      String msg = String.format("Directory %s does not exist", resultDir.getAbsolutePath());
-      throw new IOException(msg);
-    }
-  }
-
-  /**
-   * Resolves File of ambari-server/src/test/resources/ folder.
-   * Determines path based on TestAmbaryServer.samples folder in test resources
-   * Should not depend on how and from which location the ambari-server
-   * was started.
-   * @return File of ambari-server/src/test/resources/ folder.
-   */
-  private File resolveAbsolutePathToResourcesFolder() throws URISyntaxException {
-    URL dirURL = this.getClass().getClassLoader().getResource("TestAmbaryServer.samples");
-    if (dirURL != null && dirURL.getProtocol().equals("file")) {
-      return new File(dirURL.toURI());
-    } else {
-      throw new UnsupportedOperationException(
-        String.format("Dir uri %s does not seem to point to file. Maybe a jar?",
-          dirURL.toURI()));
-    }
-
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3148759f/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_common_services/HIVE/0.11.0.2.0.5.0/configuration/hive-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_common_services/HIVE/0.11.0.2.0.5.0/configuration/hive-site.xml b/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_common_services/HIVE/0.11.0.2.0.5.0/configuration/hive-site.xml
index ad9be21..5ce8508 100644
--- a/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_common_services/HIVE/0.11.0.2.0.5.0/configuration/hive-site.xml
+++ b/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_common_services/HIVE/0.11.0.2.0.5.0/configuration/hive-site.xml
@@ -16,211 +16,184 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
+
 <configuration>
+
   <property>
     <name>ambari.hive.db.schema.name</name>
     <value>hive</value>
     <description>Database name used as the Hive Metastore</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>javax.jdo.option.ConnectionURL</name>
     <value>jdbc</value>
     <description>JDBC connect string for a JDBC metastore</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
-    <name>javax.jdo.option.ConnectionDriverName</name>
+      <name>javax.jdo.option.ConnectionDriverName</name>
     <value>com.mysql.jdbc.Driver</value>
     <description>Driver class name for a JDBC metastore</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>javax.jdo.option.ConnectionUserName</name>
     <value>hive</value>
     <description>username to use against metastore database</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>javax.jdo.option.ConnectionPassword</name>
     <value> </value>
     <description>password to use against metastore database</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.metastore.warehouse.dir</name>
     <value>/apps/hive/warehouse</value>
     <description>location of default database for the warehouse</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.metastore.sasl.enabled</name>
-    <value/>
+    <value></value>
     <description>If true, the metastore thrift interface will be secured with SASL.
      Clients must authenticate with Kerberos.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.metastore.kerberos.keytab.file</name>
-    <value/>
+    <value></value>
     <description>The path to the Kerberos Keytab file containing the metastore
      thrift server's service principal.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.metastore.kerberos.principal</name>
-    <value/>
+    <value></value>
     <description>The service principal for the metastore thrift server. The special
     string _HOST will be replaced automatically with the correct host name.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.metastore.cache.pinobjtypes</name>
     <value>Table,Database,Type,FieldSchema,Order</value>
     <description>List of comma separated metastore object types that should be pinned in the cache</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.metastore.uris</name>
     <value>thrift://localhost:9083</value>
     <description>URI for client to contact metastore server</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.metastore.client.socket.timeout</name>
     <value>60</value>
     <description>MetaStore Client socket timeout in seconds</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.metastore.execute.setugi</name>
     <value>true</value>
     <description>In unsecure mode, setting this property to true will cause the metastore to execute DFS operations using the client's reported user and group permissions. Note that this property must be set on both the client and     server sides. Further note that its best effort. If client sets its to true and server sets it to false, client setting will be ignored.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.security.authorization.enabled</name>
     <value>false</value>
     <description>enable or disable the hive client authorization</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.security.authorization.manager</name>
     <value>org.apache.hadoop.hive.ql.security.authorization.StorageBasedAuthorizationProvider</value>
     <description>the hive client authorization manager class name.
     The user defined authorization class should implement interface org.apache.hadoop.hive.ql.security.authorization.HiveAuthorizationProvider.  </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.security.metastore.authorization.manager</name>
     <value>org.apache.hadoop.hive.ql.security.authorization.StorageBasedAuthorizationProvider</value>
     <description>The authorization manager class name to be used in the metastore for authorization. The user-defined authorization class should implement interface org.apache.hadoop.hive.ql.security.authorization.HiveMetastoreAuthorizationProvider.  </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.security.authenticator.manager</name>
     <value>org.apache.hadoop.hive.ql.security.ProxyUserAuthenticator</value>
     <description>Hive client authenticator manager class name. The user-defined authenticator class should implement interface org.apache.hadoop.hive.ql.security.HiveAuthenticationProvider.  </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.server2.enable.doAs</name>
     <value>true</value>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>fs.hdfs.impl.disable.cache</name>
     <value>true</value>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>fs.file.impl.disable.cache</name>
     <value>true</value>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.enforce.bucketing</name>
     <value>true</value>
     <description>Whether bucketing is enforced. If true, while inserting into the table, bucketing is enforced.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.enforce.sorting</name>
     <value>true</value>
     <description>Whether sorting is enforced. If true, while inserting into the table, sorting is enforced.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.map.aggr</name>
     <value>true</value>
     <description>Whether to use map-side aggregation in Hive Group By queries.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.optimize.bucketmapjoin</name>
     <value>true</value>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.optimize.bucketmapjoin.sortedmerge</name>
     <value>true</value>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.mapred.reduce.tasks.speculative.execution</name>
     <value>false</value>
     <description>Whether speculative execution for reducers should be turned on.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.auto.convert.join</name>
     <value>true</value>
     <description>Whether Hive enable the optimization about converting common
       join into mapjoin based on the input file size.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.auto.convert.sortmerge.join</name>
     <value>true</value>
     <description>Will the join be automatically converted to a sort-merge join, if the joined tables pass
       the criteria for sort-merge join.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.auto.convert.sortmerge.join.noconditionaltask</name>
     <value>true</value>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.auto.convert.join.noconditionaltask</name>
     <value>true</value>
@@ -228,9 +201,8 @@ limitations under the License.
       size. If this paramater is on, and the sum of size for n-1 of the tables/partitions for a n-way join is smaller than the
       specified size, the join is directly converted to a mapjoin (there is no conditional task).
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.auto.convert.join.noconditionaltask.size</name>
     <value>1000000000</value>
@@ -238,9 +210,8 @@ limitations under the License.
       is on, and the sum of size for n-1 of the tables/partitions for a n-way join is smaller than this size, the join is directly
       converted to a mapjoin(there is no conditional task). The default is 10MB.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.optimize.reducededuplication.min.reducer</name>
     <value>1</value>
@@ -248,9 +219,8 @@ limitations under the License.
       That means if reducer-num of the child RS is fixed (order by or forced bucketing) and small, it can make very slow, single MR.
       The optimization will be disabled if number of reducers is less than specified value.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.optimize.mapjoin.mapreduce</name>
     <value>true</value>
@@ -259,9 +229,8 @@ limitations under the License.
       job (for e.g a group by), each map-only job is merged with the following
       map-reduce job.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.mapjoin.bucket.cache.size</name>
     <value>10000</value>
@@ -269,28 +238,24 @@ limitations under the License.
       Size per reducer.The default is 1G, i.e if the input size is 10G, it
       will use 10 reducers.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.vectorized.execution.enabled</name>
     <value>false</value>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.optimize.reducededuplication</name>
     <value>true</value>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.optimize.index.filter</name>
     <value>true</value>
     <description>
     Whether to enable automatic use of indexes
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
 </configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3148759f/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_stack/HIVE/configuration/hive-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_stack/HIVE/configuration/hive-site.xml b/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_stack/HIVE/configuration/hive-site.xml
index ad9be21..5ce8508 100644
--- a/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_stack/HIVE/configuration/hive-site.xml
+++ b/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_stack/HIVE/configuration/hive-site.xml
@@ -16,211 +16,184 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
+
 <configuration>
+
   <property>
     <name>ambari.hive.db.schema.name</name>
     <value>hive</value>
     <description>Database name used as the Hive Metastore</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>javax.jdo.option.ConnectionURL</name>
     <value>jdbc</value>
     <description>JDBC connect string for a JDBC metastore</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
-    <name>javax.jdo.option.ConnectionDriverName</name>
+      <name>javax.jdo.option.ConnectionDriverName</name>
     <value>com.mysql.jdbc.Driver</value>
     <description>Driver class name for a JDBC metastore</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>javax.jdo.option.ConnectionUserName</name>
     <value>hive</value>
     <description>username to use against metastore database</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>javax.jdo.option.ConnectionPassword</name>
     <value> </value>
     <description>password to use against metastore database</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.metastore.warehouse.dir</name>
     <value>/apps/hive/warehouse</value>
     <description>location of default database for the warehouse</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.metastore.sasl.enabled</name>
-    <value/>
+    <value></value>
     <description>If true, the metastore thrift interface will be secured with SASL.
      Clients must authenticate with Kerberos.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.metastore.kerberos.keytab.file</name>
-    <value/>
+    <value></value>
     <description>The path to the Kerberos Keytab file containing the metastore
      thrift server's service principal.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.metastore.kerberos.principal</name>
-    <value/>
+    <value></value>
     <description>The service principal for the metastore thrift server. The special
     string _HOST will be replaced automatically with the correct host name.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.metastore.cache.pinobjtypes</name>
     <value>Table,Database,Type,FieldSchema,Order</value>
     <description>List of comma separated metastore object types that should be pinned in the cache</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.metastore.uris</name>
     <value>thrift://localhost:9083</value>
     <description>URI for client to contact metastore server</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.metastore.client.socket.timeout</name>
     <value>60</value>
     <description>MetaStore Client socket timeout in seconds</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.metastore.execute.setugi</name>
     <value>true</value>
     <description>In unsecure mode, setting this property to true will cause the metastore to execute DFS operations using the client's reported user and group permissions. Note that this property must be set on both the client and     server sides. Further note that its best effort. If client sets its to true and server sets it to false, client setting will be ignored.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.security.authorization.enabled</name>
     <value>false</value>
     <description>enable or disable the hive client authorization</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.security.authorization.manager</name>
     <value>org.apache.hadoop.hive.ql.security.authorization.StorageBasedAuthorizationProvider</value>
     <description>the hive client authorization manager class name.
     The user defined authorization class should implement interface org.apache.hadoop.hive.ql.security.authorization.HiveAuthorizationProvider.  </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.security.metastore.authorization.manager</name>
     <value>org.apache.hadoop.hive.ql.security.authorization.StorageBasedAuthorizationProvider</value>
     <description>The authorization manager class name to be used in the metastore for authorization. The user-defined authorization class should implement interface org.apache.hadoop.hive.ql.security.authorization.HiveMetastoreAuthorizationProvider.  </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.security.authenticator.manager</name>
     <value>org.apache.hadoop.hive.ql.security.ProxyUserAuthenticator</value>
     <description>Hive client authenticator manager class name. The user-defined authenticator class should implement interface org.apache.hadoop.hive.ql.security.HiveAuthenticationProvider.  </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.server2.enable.doAs</name>
     <value>true</value>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>fs.hdfs.impl.disable.cache</name>
     <value>true</value>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>fs.file.impl.disable.cache</name>
     <value>true</value>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.enforce.bucketing</name>
     <value>true</value>
     <description>Whether bucketing is enforced. If true, while inserting into the table, bucketing is enforced.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.enforce.sorting</name>
     <value>true</value>
     <description>Whether sorting is enforced. If true, while inserting into the table, sorting is enforced.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.map.aggr</name>
     <value>true</value>
     <description>Whether to use map-side aggregation in Hive Group By queries.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.optimize.bucketmapjoin</name>
     <value>true</value>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.optimize.bucketmapjoin.sortedmerge</name>
     <value>true</value>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.mapred.reduce.tasks.speculative.execution</name>
     <value>false</value>
     <description>Whether speculative execution for reducers should be turned on.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.auto.convert.join</name>
     <value>true</value>
     <description>Whether Hive enable the optimization about converting common
       join into mapjoin based on the input file size.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.auto.convert.sortmerge.join</name>
     <value>true</value>
     <description>Will the join be automatically converted to a sort-merge join, if the joined tables pass
       the criteria for sort-merge join.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.auto.convert.sortmerge.join.noconditionaltask</name>
     <value>true</value>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.auto.convert.join.noconditionaltask</name>
     <value>true</value>
@@ -228,9 +201,8 @@ limitations under the License.
       size. If this paramater is on, and the sum of size for n-1 of the tables/partitions for a n-way join is smaller than the
       specified size, the join is directly converted to a mapjoin (there is no conditional task).
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.auto.convert.join.noconditionaltask.size</name>
     <value>1000000000</value>
@@ -238,9 +210,8 @@ limitations under the License.
       is on, and the sum of size for n-1 of the tables/partitions for a n-way join is smaller than this size, the join is directly
       converted to a mapjoin(there is no conditional task). The default is 10MB.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.optimize.reducededuplication.min.reducer</name>
     <value>1</value>
@@ -248,9 +219,8 @@ limitations under the License.
       That means if reducer-num of the child RS is fixed (order by or forced bucketing) and small, it can make very slow, single MR.
       The optimization will be disabled if number of reducers is less than specified value.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.optimize.mapjoin.mapreduce</name>
     <value>true</value>
@@ -259,9 +229,8 @@ limitations under the License.
       job (for e.g a group by), each map-only job is merged with the following
       map-reduce job.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.mapjoin.bucket.cache.size</name>
     <value>10000</value>
@@ -269,28 +238,24 @@ limitations under the License.
       Size per reducer.The default is 1G, i.e if the input size is 10G, it
       will use 10 reducers.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.vectorized.execution.enabled</name>
     <value>false</value>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.optimize.reducededuplication</name>
     <value>true</value>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>hive.optimize.index.filter</name>
     <value>true</value>
     <description>
     Whether to enable automatic use of indexes
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
 </configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3148759f/ambari-server/src/test/resources/bad-stacks/HDP/0.1/services/HDFS/configuration/hbase-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/bad-stacks/HDP/0.1/services/HDFS/configuration/hbase-site.xml b/ambari-server/src/test/resources/bad-stacks/HDP/0.1/services/HDFS/configuration/hbase-site.xml
index ff77447..5024e85 100644
--- a/ambari-server/src/test/resources/bad-stacks/HDP/0.1/services/HDFS/configuration/hbase-site.xml
+++ b/ambari-server/src/test/resources/bad-stacks/HDP/0.1/services/HDFS/configuration/hbase-site.xml
@@ -29,16 +29,12 @@
     in milliseconds.  Default is 15. Set this value low if you want unit
     tests to be responsive.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hbase.client.pause</name>
     <value>5000</value>
     <description>General client pause value.  Used mostly as value to wait
     before running a retry of a failed get, region lookup, etc.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hbase.master.meta.thread.rescanfrequency</name>
@@ -46,8 +42,6 @@
     <description>How long the HMaster sleeps (in milliseconds) between scans of
     the root and meta tables.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hbase.server.thread.wakefrequency</name>
@@ -55,8 +49,6 @@
     <description>Time to sleep in between searches for work (in milliseconds).
     Used as sleep interval by service threads such as META scanner and log roller.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hbase.regionserver.handler.count</name>
@@ -65,8 +57,6 @@
     Same property is used by the HMaster for count of master handlers.
     Default is 10.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hbase.master.lease.period</name>
@@ -76,8 +66,6 @@
     value has been reduced so that the master will notice a dead region server
     sooner. The default is 30 seconds.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hbase.master.info.port</name>
@@ -85,8 +73,6 @@
     <description>The port for the hbase master web UI
     Set to -1 if you do not want the info server to run.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hbase.regionserver.info.port</name>
@@ -94,8 +80,6 @@
     <description>The port for the hbase regionserver web UI
     Set to -1 if you do not want the info server to run.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hbase.regionserver.info.port.auto</name>
@@ -104,8 +88,6 @@
     search if hbase.regionserver.info.port is already in use.
     Enabled for testing to run multiple tests on one machine.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hbase.master.lease.thread.wakefrequency</name>
@@ -114,8 +96,6 @@
     This value has been reduced due to the other reduced values above so that
     the master will notice a dead region server sooner. The default is 15 seconds.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hbase.regionserver.optionalcacheflushinterval</name>
@@ -124,8 +104,6 @@
     Amount of time to wait since the last time a region was flushed before
     invoking an optional cache flush. Default 60,000.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hbase.regionserver.safemode</name>
@@ -134,8 +112,6 @@
     Turn on/off safe mode in region server. Always on for production, always off
     for tests.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hbase.hregion.max.filesize</name>
@@ -146,14 +122,10 @@
 
     Keep the maximum filesize small so we split more often in tests.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hadoop.log.dir</name>
     <value>${user.dir}/../logs</value>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hbase.zookeeper.property.clientPort</name>
@@ -161,7 +133,5 @@
     <description>Property from ZooKeeper's config zoo.cfg.
     The port at which the clients will connect.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
 </configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3148759f/ambari-server/src/test/resources/bad-stacks/HDP/0.1/services/HDFS/configuration/hdfs-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/bad-stacks/HDP/0.1/services/HDFS/configuration/hdfs-site.xml b/ambari-server/src/test/resources/bad-stacks/HDP/0.1/services/HDFS/configuration/hdfs-site.xml
index 759cbcb..995f6c1 100644
--- a/ambari-server/src/test/resources/bad-stacks/HDP/0.1/services/HDFS/configuration/hdfs-site.xml
+++ b/ambari-server/src/test/resources/bad-stacks/HDP/0.1/services/HDFS/configuration/hdfs-site.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0"?>
 <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+
 <!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -16,9 +17,13 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
+
 <!-- Put site-specific property overrides in this file. -->
+
 <configuration>
-  <!-- file system properties -->
+
+<!-- file system properties -->
+
   <property>
     <name>dfs.name.dir</name>
     <!-- cluster variant -->
@@ -28,33 +33,29 @@
       of directories then the name table is replicated in all of the
       directories, for redundancy. </description>
     <final>true</final>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>dfs.support.append</name>
     <value>true</value>
     <description>to enable dfs append</description>
     <final>true</final>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>dfs.webhdfs.enabled</name>
     <value>false</value>
     <description>to enable webhdfs</description>
     <final>true</final>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>dfs.datanode.failed.volumes.tolerated</name>
     <value>0</value>
     <description>#of failed disks dn would tolerate</description>
     <final>true</final>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>dfs.block.local-path-access.user</name>
     <value>hbase</value>
@@ -62,9 +63,8 @@
     circuit reads.
     </description>
     <final>true</final>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>dfs.data.dir</name>
     <value>/mnt/hmc/hadoop/hdfs/data</value>
@@ -75,9 +75,8 @@
   Directories that do not exist are ignored.
   </description>
     <final>true</final>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>dfs.hosts.exclude</name>
     <value>/etc/hadoop/conf/dfs.exclude</value>
@@ -85,9 +84,8 @@
     not permitted to connect to the namenode.  The full pathname of the
     file must be specified.  If the value is empty, no hosts are
     excluded.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>dfs.hosts</name>
     <value>/etc/hadoop/conf/dfs.include</value>
@@ -95,32 +93,28 @@
     permitted to connect to the namenode. The full pathname of the file
     must be specified.  If the value is empty, all hosts are
     permitted.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>dfs.replication.max</name>
     <value>50</value>
     <description>Maximal block replication.
   </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>dfs.replication</name>
     <value>3</value>
     <description>Default block replication.
   </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>dfs.heartbeat.interval</name>
     <value>3</value>
     <description>Determines datanode heartbeat interval in seconds.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>dfs.safemode.threshold.pct</name>
     <value>1.0f</value>
@@ -130,9 +124,8 @@
         Values less than or equal to 0 mean not to start in safe mode.
         Values greater than 1 will make safe mode permanent.
         </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>dfs.balance.bandwidthPerSec</name>
     <value>6250000</value>
@@ -141,190 +134,170 @@
         can utilize for the balancing purpose in term of
         the number of bytes per second.
   </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>dfs.datanode.address</name>
     <value>0.0.0.0:50010</value>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>dfs.datanode.http.address</name>
     <value>0.0.0.0:50075</value>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>dfs.block.size</name>
     <value>134217728</value>
     <description>The default block size for new files.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>dfs.http.address</name>
     <value>hdp1.cybervisiontech.com.ua:50070</value>
-    <description>The name of the default file system.  Either the
+<description>The name of the default file system.  Either the
 literal string "local" or a host:port for HDFS.</description>
-    <final>true</final>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
-  </property>
-  <property>
-    <name>dfs.datanode.du.reserved</name>
-    <!-- cluster variant -->
-    <value>1073741824</value>
-    <description>Reserved space in bytes per volume. Always leave this much space free for non dfs use.
+<final>true</final>
+</property>
+
+<property>
+<name>dfs.datanode.du.reserved</name>
+<!-- cluster variant -->
+<value>1073741824</value>
+<description>Reserved space in bytes per volume. Always leave this much space free for non dfs use.
 </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
-  </property>
-  <property>
-    <name>dfs.datanode.ipc.address</name>
-    <value>0.0.0.0:8010</value>
-    <description>
+</property>
+
+<property>
+<name>dfs.datanode.ipc.address</name>
+<value>0.0.0.0:8010</value>
+<description>
 The datanode ipc server address and port.
 If the port is 0 then the server will start on a free port.
 </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
-  </property>
-  <property>
-    <name>dfs.blockreport.initialDelay</name>
-    <value>120</value>
-    <description>Delay for first block report in seconds.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
-  </property>
-  <property>
-    <name>dfs.namenode.handler.count</name>
-    <value>40</value>
-    <description>The number of server threads for the namenode.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
-  </property>
-  <property>
-    <name>dfs.datanode.max.xcievers</name>
-    <value>1024</value>
-    <description>PRIVATE CONFIG VARIABLE</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
-  </property>
-  <!-- Permissions configuration -->
-  <property>
-    <name>dfs.umaskmode</name>
-    <value>077</value>
-    <description>
+</property>
+
+<property>
+<name>dfs.blockreport.initialDelay</name>
+<value>120</value>
+<description>Delay for first block report in seconds.</description>
+</property>
+
+<property>
+<name>dfs.namenode.handler.count</name>
+<value>40</value>
+<description>The number of server threads for the namenode.</description>
+</property>
+
+<property>
+<name>dfs.datanode.max.xcievers</name>
+<value>1024</value>
+<description>PRIVATE CONFIG VARIABLE</description>
+</property>
+
+<!-- Permissions configuration -->
+
+<property>
+<name>dfs.umaskmode</name>
+<value>077</value>
+<description>
 The octal umask used when creating files and directories.
 </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
-  </property>
-  <property>
-    <name>dfs.web.ugi</name>
-    <!-- cluster variant -->
-    <value>gopher,gopher</value>
-    <description>The user account used by the web interface.
+</property>
+
+<property>
+<name>dfs.web.ugi</name>
+<!-- cluster variant -->
+<value>gopher,gopher</value>
+<description>The user account used by the web interface.
 Syntax: USERNAME,GROUP1,GROUP2, ...
 </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
-  </property>
-  <property>
-    <name>dfs.permissions</name>
-    <value>true</value>
-    <description>
+</property>
+
+<property>
+<name>dfs.permissions</name>
+<value>true</value>
+<description>
 If "true", enable permission checking in HDFS.
 If "false", permission checking is turned off,
 but all other behavior is unchanged.
 Switching from one parameter value to the other does not change the mode,
 owner or group of files or directories.
 </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
-  </property>
-  <property>
-    <name>dfs.permissions.supergroup</name>
-    <value>hdfs</value>
-    <description>The name of the group of super-users.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
-  </property>
-  <property>
-    <name>dfs.namenode.handler.count</name>
-    <value>100</value>
-    <description>Added to grow Queue size so that more client connections are allowed</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
-  </property>
-  <property>
-    <name>ipc.server.max.response.size</name>
-    <value>5242880</value>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
-  </property>
-  <property>
-    <name>dfs.block.access.token.enable</name>
-    <value>true</value>
-    <description>
+</property>
+
+<property>
+<name>dfs.permissions.supergroup</name>
+<value>hdfs</value>
+<description>The name of the group of super-users.</description>
+</property>
+
+<property>
+<name>dfs.namenode.handler.count</name>
+<value>100</value>
+<description>Added to grow Queue size so that more client connections are allowed</description>
+</property>
+
+<property>
+<name>ipc.server.max.response.size</name>
+<value>5242880</value>
+</property>
+<property>
+<name>dfs.block.access.token.enable</name>
+<value>true</value>
+<description>
 If "true", access tokens are used as capabilities for accessing datanodes.
 If "false", no access tokens are checked on accessing datanodes.
 </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
-  </property>
-  <property>
-    <name>dfs.namenode.kerberos.principal</name>
-    <value>nn/_HOST@</value>
-    <description>
+</property>
+
+<property>
+<name>dfs.namenode.kerberos.principal</name>
+<value>nn/_HOST@</value>
+<description>
 Kerberos principal name for the NameNode
 </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
-  </property>
-  <property>
-    <name>dfs.secondary.namenode.kerberos.principal</name>
-    <value>nn/_HOST@</value>
+</property>
+
+<property>
+<name>dfs.secondary.namenode.kerberos.principal</name>
+<value>nn/_HOST@</value>
     <description>
         Kerberos principal name for the secondary NameNode.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
-  <!--
+
+
+<!--
   This is KRB DOMAIN specific. The FQDN of the namenode has to be mentioned.
 -->
   <property>
     <name>dfs.namenode.kerberos.https.principal</name>
     <value>host/_HOST@</value>
-    <description>The Kerberos principal for the host that the NameNode runs on.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
+     <description>The Kerberos principal for the host that the NameNode runs on.</description>
+
   </property>
+
   <property>
     <name>dfs.secondary.namenode.kerberos.https.principal</name>
     <value>host/_HOST@</value>
     <description>The Kerberos principal for the hostthat the secondary NameNode runs on.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
+
   </property>
+
   <property>
     <!-- cluster variant -->
     <name>dfs.secondary.http.address</name>
     <value>hdp2.cybervisiontech.com.ua:50090</value>
     <description>Address of secondary namenode web server</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>dfs.secondary.https.port</name>
     <value>50490</value>
     <description>The https port where secondary-namenode binds</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>dfs.web.authentication.kerberos.principal</name>
     <value>HTTP/_HOST@</value>
@@ -333,9 +306,8 @@ Kerberos principal name for the NameNode
       The HTTP Kerberos principal MUST start with 'HTTP/' per Kerberos
       HTTP SPENGO specification.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>dfs.web.authentication.kerberos.keytab</name>
     <value>/nn.service.keytab</value>
@@ -343,91 +315,82 @@ Kerberos principal name for the NameNode
       The Kerberos keytab file with the credentials for the
       HTTP Kerberos principal used by Hadoop-Auth in the HTTP endpoint.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>dfs.datanode.kerberos.principal</name>
     <value>dn/_HOST@</value>
-    <description>
+ <description>
         The Kerberos principal that the DataNode runs as. "_HOST" is replaced by the real host name.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>dfs.namenode.keytab.file</name>
     <value>/nn.service.keytab</value>
-    <description>
+ <description>
         Combined keytab file containing the namenode service and host principals.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>dfs.secondary.namenode.keytab.file</name>
     <value>/nn.service.keytab</value>
-    <description>
+  <description>
         Combined keytab file containing the namenode service and host principals.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>dfs.datanode.keytab.file</name>
     <value>/dn.service.keytab</value>
-    <description>
+ <description>
         The filename of the keytab file for the DataNode.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
     <name>dfs.https.port</name>
     <value>50470</value>
-    <description>The https port where namenode binds</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
+ <description>The https port where namenode binds</description>
+
   </property>
+
   <property>
     <name>dfs.https.address</name>
     <value>hdp1.cybervisiontech.com.ua:50470</value>
-    <description>The https address where namenode binds</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
+  <description>The https address where namenode binds</description>
+
   </property>
+
   <property>
     <name>dfs.datanode.data.dir.perm</name>
     <value>750</value>
-    <description>The permissions that should be there on dfs.data.dir
+<description>The permissions that should be there on dfs.data.dir
 directories. The datanode will not come up if the permissions are
 different on existing dfs.data.dir directories. If the directories
 don't exist, they will be created with this permission.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
+
   <property>
-    <name>dfs.access.time.precision</name>
-    <value>0</value>
-    <description>The access time for HDFS file is precise up to this value.
+  <name>dfs.access.time.precision</name>
+  <value>0</value>
+  <description>The access time for HDFS file is precise up to this value.
                The default value is 1 hour. Setting a value of 0 disables
                access times for HDFS.
   </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
-  </property>
-  <property>
-    <name>dfs.cluster.administrators</name>
-    <value> hdfs</value>
-    <description>ACL for who all can view the default servlets in the HDFS</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
-  </property>
-  <property>
-    <name>ipc.server.read.threadpool.size</name>
-    <value>5</value>
-    <description/>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
-  </property>
+</property>
+
+<property>
+ <name>dfs.cluster.administrators</name>
+ <value> hdfs</value>
+ <description>ACL for who all can view the default servlets in the HDFS</description>
+</property>
+
+<property>
+  <name>ipc.server.read.threadpool.size</name>
+  <value>5</value>
+  <description></description>
+</property>
+
 </configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3148759f/ambari-server/src/test/resources/bad-stacks/HDP/0.1/services/MAPREDUCE/configuration/hbase-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/bad-stacks/HDP/0.1/services/MAPREDUCE/configuration/hbase-site.xml b/ambari-server/src/test/resources/bad-stacks/HDP/0.1/services/MAPREDUCE/configuration/hbase-site.xml
index ff77447..5024e85 100644
--- a/ambari-server/src/test/resources/bad-stacks/HDP/0.1/services/MAPREDUCE/configuration/hbase-site.xml
+++ b/ambari-server/src/test/resources/bad-stacks/HDP/0.1/services/MAPREDUCE/configuration/hbase-site.xml
@@ -29,16 +29,12 @@
     in milliseconds.  Default is 15. Set this value low if you want unit
     tests to be responsive.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hbase.client.pause</name>
     <value>5000</value>
     <description>General client pause value.  Used mostly as value to wait
     before running a retry of a failed get, region lookup, etc.</description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hbase.master.meta.thread.rescanfrequency</name>
@@ -46,8 +42,6 @@
     <description>How long the HMaster sleeps (in milliseconds) between scans of
     the root and meta tables.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hbase.server.thread.wakefrequency</name>
@@ -55,8 +49,6 @@
     <description>Time to sleep in between searches for work (in milliseconds).
     Used as sleep interval by service threads such as META scanner and log roller.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hbase.regionserver.handler.count</name>
@@ -65,8 +57,6 @@
     Same property is used by the HMaster for count of master handlers.
     Default is 10.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hbase.master.lease.period</name>
@@ -76,8 +66,6 @@
     value has been reduced so that the master will notice a dead region server
     sooner. The default is 30 seconds.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hbase.master.info.port</name>
@@ -85,8 +73,6 @@
     <description>The port for the hbase master web UI
     Set to -1 if you do not want the info server to run.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hbase.regionserver.info.port</name>
@@ -94,8 +80,6 @@
     <description>The port for the hbase regionserver web UI
     Set to -1 if you do not want the info server to run.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hbase.regionserver.info.port.auto</name>
@@ -104,8 +88,6 @@
     search if hbase.regionserver.info.port is already in use.
     Enabled for testing to run multiple tests on one machine.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hbase.master.lease.thread.wakefrequency</name>
@@ -114,8 +96,6 @@
     This value has been reduced due to the other reduced values above so that
     the master will notice a dead region server sooner. The default is 15 seconds.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hbase.regionserver.optionalcacheflushinterval</name>
@@ -124,8 +104,6 @@
     Amount of time to wait since the last time a region was flushed before
     invoking an optional cache flush. Default 60,000.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hbase.regionserver.safemode</name>
@@ -134,8 +112,6 @@
     Turn on/off safe mode in region server. Always on for production, always off
     for tests.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hbase.hregion.max.filesize</name>
@@ -146,14 +122,10 @@
 
     Keep the maximum filesize small so we split more often in tests.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hadoop.log.dir</name>
     <value>${user.dir}/../logs</value>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
   <property>
     <name>hbase.zookeeper.property.clientPort</name>
@@ -161,7 +133,5 @@
     <description>Property from ZooKeeper's config zoo.cfg.
     The port at which the clients will connect.
     </description>
-    <on-ambari-upgrade add="true" change="false" delete="false"/>
-    <on-stack-upgrade add="true" change="false" delete="false"/>
   </property>
 </configuration>


Mime
View raw message