ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jspei...@apache.org
Subject ambari git commit: AMBARI-8600. Fix Stack Inheritence where explicitly inherited service has deleted components
Date Thu, 11 Dec 2014 17:26:35 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 24bb34444 -> 4772593c5


AMBARI-8600. Fix Stack Inheritence where explicitly inherited service has deleted components


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

Branch: refs/heads/trunk
Commit: 4772593c58ff84809215d55f65867c392ef67693
Parents: 24bb344
Author: Jayush Luniya <jluniya@hortonworks.com>
Authored: Thu Dec 11 12:23:30 2014 -0500
Committer: John Speidel <jspeidel@hortonworks.com>
Committed: Thu Dec 11 12:26:05 2014 -0500

----------------------------------------------------------------------
 .../ambari/server/stack/ServiceModule.java      |  6 +-
 .../ambari/server/stack/StackManager.java       | 13 ++-
 .../apache/ambari/server/stack/StackModule.java |  4 +-
 .../AmbariManagementControllerTest.java         |  2 +-
 .../ambari/server/stack/StackManagerTest.java   |  9 +-
 .../stacks/HDP/2.0.6.1/hooks/dummy-script.py    | 20 +++++
 .../resources/stacks/HDP/2.0.6.1/metainfo.xml   | 24 +++++
 .../stacks/HDP/2.0.6.1/repos/repoinfo.xml       | 61 +++++++++++++
 .../stacks/HDP/2.0.6.1/role_command_order.json  | 92 ++++++++++++++++++++
 .../services/FLUME/configuration/flume-conf.xml | 31 +++++++
 .../services/FLUME/configuration/flume-env.xml  | 40 +++++++++
 .../FLUME/configuration/flume-log4j.xml         | 31 +++++++
 .../HDP/2.0.6.1/services/FLUME/metainfo.xml     | 69 +++++++++++++++
 .../HDP/2.0.6.1/services/SQOOP/metainfo.xml     | 34 ++++++++
 .../HDP/2.0.6.1/services/YARN/metainfo.xml      | 27 ++++++
 15 files changed, 454 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4772593c/ambari-server/src/main/java/org/apache/ambari/server/stack/ServiceModule.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/stack/ServiceModule.java
b/ambari-server/src/main/java/org/apache/ambari/server/stack/ServiceModule.java
index d025946..ae7dd28 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/stack/ServiceModule.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/stack/ServiceModule.java
@@ -295,8 +295,10 @@ public class ServiceModule extends BaseModule<ServiceModule, ServiceInfo>
{
 
     for (ConfigurationModule module : mergedModules) {
       configurationModules.put(module.getId(), module);
-      serviceInfo.getProperties().addAll(module.getModuleInfo().getProperties());
-      serviceInfo.setTypeAttributes(module.getConfigType(), module.getModuleInfo().getAttributes());
+      if(!module.isDeleted()) {
+        serviceInfo.getProperties().addAll(module.getModuleInfo().getProperties());
+        serviceInfo.setTypeAttributes(module.getConfigType(), module.getModuleInfo().getAttributes());
+      }
     }
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/4772593c/ambari-server/src/main/java/org/apache/ambari/server/stack/StackManager.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/stack/StackManager.java
b/ambari-server/src/main/java/org/apache/ambari/server/stack/StackManager.java
index 62a1987..0179abb 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/stack/StackManager.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/stack/StackManager.java
@@ -149,12 +149,23 @@ public class StackManager {
   private void fullyResolveStacks(
       Map<String, StackModule> stackModules, Map<String, ServiceModule> commonServiceModules)
       throws AmbariException {
+    // Resolve all stacks without finalizing the stacks.
     for (StackModule stack : stackModules.values()) {
       if (stack.getModuleState() == ModuleState.INIT) {
         stack.resolve(null, stackModules, commonServiceModules);
       }
     }
-    // execute all of the repo tasks in a single thread executor
+    // Finalize the common services and stacks to remove sub-modules marked for deletion.
+    // Finalizing the stacks AFTER all stacks are resolved ensures that the sub-modules marked
for deletion are
+    // inherited into the child module when explicit parent is defined and thereby ensuring
all modules from parent module
+    // are inlined into the child module even if the module is marked for deletion.
+    for(ServiceModule commonService : commonServiceModules.values()) {
+      commonService.finalizeModule();
+    }
+    for (StackModule stack : stackModules.values()) {
+      stack.finalizeModule();
+    }
+    // Execute all of the repo tasks in a single thread executor
     stackContext.executeRepoTasks();
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/4772593c/ambari-server/src/main/java/org/apache/ambari/server/stack/StackModule.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/stack/StackModule.java b/ambari-server/src/main/java/org/apache/ambari/server/stack/StackModule.java
index 0fd8728..6f6577a 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/stack/StackModule.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/stack/StackModule.java
@@ -140,15 +140,13 @@ public class StackModule extends BaseModule<StackModule, StackInfo>
{
       throws AmbariException {
     moduleState = ModuleState.VISITED;
     String parentVersion = stackInfo.getParentStackVersion();
+    mergeServicesWithExplicitParent(allStacks, commonServices);
     // merge with parent version of same stack definition
     if (parentVersion != null) {
       mergeStackWithParent(parentVersion, allStacks, commonServices);
     }
-    mergeServicesWithExplicitParent(allStacks, commonServices);
     processRepositories();
     moduleState = ModuleState.RESOLVED;
-
-    finalizeModule();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/4772593c/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 4db6738..665d983 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
@@ -159,7 +159,7 @@ public class AmbariManagementControllerTest {
   private static final String PROPERTY_NAME = "hbase.regionserver.msginterval";
   private static final String SERVICE_NAME = "HDFS";
   private static final String FAKE_SERVICE_NAME = "FAKENAGIOS";
-  private static final int STACK_VERSIONS_CNT = 12;
+  private static final int STACK_VERSIONS_CNT = 13;
   private static final int REPOS_CNT = 3;
   private static final int STACKS_CNT = 3;
   private static final int STACK_PROPERTIES_CNT = 103;

http://git-wip-us.apache.org/repos/asf/ambari/blob/4772593c/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 f5c2938..c1d8ebf 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
@@ -91,13 +91,13 @@ public class StackManagerTest {
   @Test
   public void testGetStacks_count() throws Exception {
     Collection<StackInfo> stacks = stackManager.getStacks();
-    assertEquals(16, stacks.size());
+    assertEquals(17, stacks.size());
   }
 
   @Test
   public void testGetStack_name__count() {
     Collection<StackInfo> stacks = stackManager.getStacks("HDP");
-    assertEquals(12, stacks.size());
+    assertEquals(13, stacks.size());
 
     stacks = stackManager.getStacks("OTHER");
     assertEquals(2, stacks.size());
@@ -446,6 +446,10 @@ public class StackManagerTest {
     ServiceInfo yarnService = stack.getService("YARN");
     assertNull(yarnService.getComponentByName("YARN_CLIENT"));
 
+    stack = stackManager.getStack("HDP", "2.0.6.1");
+    yarnService = stack.getService("YARN");
+    assertNull(yarnService.getComponentByName("YARN_CLIENT"));
+
     stack = stackManager.getStack("HDP", "2.0.7");
     yarnService = stack.getService("YARN");
     assertNotNull(yarnService.getComponentByName("YARN_CLIENT"));
@@ -538,6 +542,7 @@ public class StackManagerTest {
     // the new version also excludes hbase-policy
     stack = stackManager.getStack("OTHER", "2.0");
     service = stack.getService("HBASE");
+    assertFalse(service.hasConfigType("hbase-policy"));
     assertFalse(service.hasConfigType("global"));
     configTypes = service.getConfigTypeAttributes();
     assertEquals(1, configTypes.size());

http://git-wip-us.apache.org/repos/asf/ambari/blob/4772593c/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/hooks/dummy-script.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/hooks/dummy-script.py b/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/hooks/dummy-script.py
new file mode 100644
index 0000000..35de4bb
--- /dev/null
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/hooks/dummy-script.py
@@ -0,0 +1,20 @@
+"""
+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.
+
+Ambari Agent
+
+"""

http://git-wip-us.apache.org/repos/asf/ambari/blob/4772593c/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/metainfo.xml b/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/metainfo.xml
new file mode 100644
index 0000000..07da411
--- /dev/null
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/metainfo.xml
@@ -0,0 +1,24 @@
+<?xml version="1.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.
+-->
+<metainfo>
+    <versions>
+      <active>true</active>
+    </versions>
+    <extends>2.0.5</extends>
+</metainfo>
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/4772593c/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/repos/repoinfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/repos/repoinfo.xml b/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/repos/repoinfo.xml
new file mode 100644
index 0000000..2739c5c
--- /dev/null
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/repos/repoinfo.xml
@@ -0,0 +1,61 @@
+<?xml version="1.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.
+-->
+<reposinfo>
+  <os family="centos6">
+    <repo>
+      <baseurl>http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.0.6.0</baseurl>
+      <repoid>HDP-2.0.6</repoid>
+      <reponame>HDP</reponame>
+    </repo>
+  </os>
+  <os family="centos5">
+    <repo>
+      <baseurl>http://public-repo-1.hortonworks.com/HDP/centos5/2.x/updates/2.0.6.0</baseurl>
+      <repoid>HDP-2.0.6</repoid>
+      <reponame>HDP</reponame>
+    </repo>
+  </os>
+  <os family="redhat6">
+    <repo>
+      <baseurl>http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.0.6.0</baseurl>
+      <repoid>HDP-2.0.6</repoid>
+      <reponame>HDP</reponame>
+    </repo>
+  </os>
+  <os family="redhat5">
+    <repo>
+      <baseurl>http://public-repo-1.hortonworks.com/HDP/centos5/2.x/updates/2.0.6.0</baseurl>
+      <repoid>HDP-2.0.6</repoid>
+      <reponame>HDP</reponame>
+    </repo>
+  </os>
+  <os family="suse11">
+    <repo>
+      <baseurl>http://public-repo-1.hortonworks.com/HDP/suse11/2.x/updates/2.0.6.0</baseurl>
+      <repoid>HDP-2.0.6</repoid>
+      <reponame>HDP</reponame>
+    </repo>
+  </os>
+  <os family="sles11">
+    <repo>
+      <baseurl>http://public-repo-1.hortonworks.com/HDP/suse11/2.x/updates/2.0.6.0</baseurl>
+      <repoid>HDP-2.0.6</repoid>
+      <reponame>HDP</reponame>
+    </repo>
+  </os>
+</reposinfo>

http://git-wip-us.apache.org/repos/asf/ambari/blob/4772593c/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/role_command_order.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/role_command_order.json b/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/role_command_order.json
new file mode 100644
index 0000000..6154004
--- /dev/null
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/role_command_order.json
@@ -0,0 +1,92 @@
+{
+  "_comment" : "Record format:",
+  "_comment" : "blockedRole-blockedCommand: [blockerRole1-blockerCommand1, blockerRole2-blockerCommand2,
...]",
+  "general_deps" : {
+    "_comment" : "dependencies for all cases",
+    "HBASE_MASTER-START": ["ZOOKEEPER_SERVER-START"],
+    "HBASE_REGIONSERVER-START": ["HBASE_MASTER-START"],
+    "OOZIE_SERVER-START": ["JOBTRACKER-START", "TASKTRACKER-START"],
+    "WEBHCAT_SERVER-START": ["TASKTRACKER-START", "HIVE_SERVER-START"],
+    "HIVE_METASTORE-START": ["MYSQL_SERVER-START"],
+    "HIVE_SERVER-START": ["TASKTRACKER-START", "MYSQL_SERVER-START"],
+    "HUE_SERVER-START": ["HIVE_SERVER-START", "HCAT-START", "OOZIE_SERVER-START"],
+    "FLUME_HANDLER-START": ["OOZIE_SERVER-START"],
+    "MAPREDUCE_SERVICE_CHECK-SERVICE_CHECK": ["JOBTRACKER-START", "TASKTRACKER-START"],
+    "OOZIE_SERVICE_CHECK-SERVICE_CHECK": ["OOZIE_SERVER-START", "MAPREDUCE2_SERVICE_CHECK-SERVICE_CHECK"],
+    "WEBHCAT_SERVICE_CHECK-SERVICE_CHECK": ["WEBHCAT_SERVER-START"],
+    "HBASE_SERVICE_CHECK-SERVICE_CHECK": ["HBASE_MASTER-START", "HBASE_REGIONSERVER-START"],
+    "HIVE_SERVICE_CHECK-SERVICE_CHECK": ["HIVE_SERVER-START", "HIVE_METASTORE-START"],
+    "HCAT_SERVICE_CHECK-SERVICE_CHECK": ["HIVE_SERVER-START"],
+    "PIG_SERVICE_CHECK-SERVICE_CHECK": ["JOBTRACKER-START", "TASKTRACKER-START"],
+    "SQOOP_SERVICE_CHECK-SERVICE_CHECK": ["JOBTRACKER-START", "TASKTRACKER-START"],
+    "ZOOKEEPER_SERVICE_CHECK-SERVICE_CHECK": ["ZOOKEEPER_SERVER-START"],
+    "ZOOKEEPER_QUORUM_SERVICE_CHECK-SERVICE_CHECK": ["ZOOKEEPER_SERVER-START"],
+    "ZOOKEEPER_SERVER-STOP" : ["HBASE_MASTER-STOP", "HBASE_REGIONSERVER-STOP"],
+    "HBASE_MASTER-STOP": ["HBASE_REGIONSERVER-STOP"],
+    "TASKTRACKER-UPGRADE": ["JOBTRACKER-UPGRADE"],
+    "MAPREDUCE_CLIENT-UPGRADE": ["TASKTRACKER-UPGRADE", "JOBTRACKER-UPGRADE"],
+    "ZOOKEEPER_SERVER-UPGRADE": ["MAPREDUCE_CLIENT-UPGRADE"],
+    "ZOOKEEPER_CLIENT-UPGRADE": ["ZOOKEEPER_SERVER-UPGRADE"],
+    "HBASE_MASTER-UPGRADE": ["ZOOKEEPER_CLIENT-UPGRADE"],
+    "HBASE_REGIONSERVER-UPGRADE": ["HBASE_MASTER-UPGRADE"],
+    "HBASE_CLIENT-UPGRADE": ["HBASE_REGIONSERVER-UPGRADE"],
+    "HIVE_SERVER-UPGRADE" : ["HBASE_CLIENT-UPGRADE"],
+    "HIVE_METASTORE-UPGRADE" : ["HIVE_SERVER-UPGRADE"],
+    "MYSQL_SERVER-UPGRADE": ["HIVE_METASTORE-UPGRADE"],
+    "HIVE_CLIENT-UPGRADE": ["MYSQL_SERVER-UPGRADE"],
+    "HCAT-UPGRADE": ["HIVE_CLIENT-UPGRADE"],
+    "OOZIE_SERVER-UPGRADE" : ["HCAT-UPGRADE"],
+    "OOZIE_CLIENT-UPGRADE" : ["OOZIE_SERVER-UPGRADE"],
+    "WEBHCAT_SERVER-UPGRADE" : ["OOZIE_CLIENT-UPGRADE"],
+    "PIG-UPGRADE" : ["WEBHCAT_SERVER-UPGRADE"],
+    "SQOOP-UPGRADE" : ["PIG-UPGRADE"],
+    "GANGLIA_SERVER-UPGRADE" : ["SQOOP-UPGRADE"],
+    "GANGLIA_MONITOR-UPGRADE" : ["GANGLIA_SERVER-UPGRADE"]
+  },
+  "_comment" : "GLUSTERFS-specific dependencies",
+  "optional_glusterfs": {
+    "HBASE_MASTER-START": ["PEERSTATUS-START"],
+    "JOBTRACKER-START": ["PEERSTATUS-START"],
+    "TASKTRACKER-START": ["PEERSTATUS-START"],
+    "GLUSTERFS_SERVICE_CHECK-SERVICE_CHECK": ["PEERSTATUS-START"],
+    "JOBTRACKER-UPGRADE": ["GLUSTERFS_CLIENT-UPGRADE"]
+  },
+  "_comment" : "Dependencies that are used when GLUSTERFS is not present in cluster",
+  "optional_no_glusterfs": {
+    "SECONDARY_NAMENODE-START": ["NAMENODE-START"],
+    "RESOURCEMANAGER-START": ["NAMENODE-START", "DATANODE-START"],
+    "NODEMANAGER-START": ["NAMENODE-START", "DATANODE-START", "RESOURCEMANAGER-START"],
+    "HISTORYSERVER-START": ["NAMENODE-START", "DATANODE-START"],
+    "HBASE_MASTER-START": ["NAMENODE-START", "DATANODE-START"],
+    "JOBTRACKER-START": ["NAMENODE-START", "DATANODE-START"],
+    "TASKTRACKER-START": ["NAMENODE-START", "DATANODE-START"],
+    "HIVE_SERVER-START": ["DATANODE-START"],
+    "WEBHCAT_SERVER-START": ["DATANODE-START"],
+    "HDFS_SERVICE_CHECK-SERVICE_CHECK": ["NAMENODE-START", "DATANODE-START",
+        "SECONDARY_NAMENODE-START"],
+    "MAPREDUCE2_SERVICE_CHECK-SERVICE_CHECK": ["NODEMANAGER-START",
+        "RESOURCEMANAGER-START", "HISTORYSERVER-START", "YARN_SERVICE_CHECK-SERVICE_CHECK"],
+    "YARN_SERVICE_CHECK-SERVICE_CHECK": ["NODEMANAGER-START", "RESOURCEMANAGER-START"],
+    "RESOURCEMANAGER_SERVICE_CHECK-SERVICE_CHECK": ["RESOURCEMANAGER-START"],
+    "PIG_SERVICE_CHECK-SERVICE_CHECK": ["RESOURCEMANAGER-START", "NODEMANAGER-START"],
+    "NAMENODE-STOP": ["JOBTRACKER-STOP", "TASKTRACKER-STOP", "RESOURCEMANAGER-STOP",
+        "NODEMANAGER-STOP", "HISTORYSERVER-STOP", "HBASE_MASTER-STOP"],
+    "DATANODE-STOP": ["JOBTRACKER-STOP", "TASKTRACKER-STOP", "RESOURCEMANAGER-STOP",
+        "NODEMANAGER-STOP", "HISTORYSERVER-STOP", "HBASE_MASTER-STOP"],
+    "SECONDARY_NAMENODE-UPGRADE": ["NAMENODE-UPGRADE"],
+    "DATANODE-UPGRADE": ["SECONDARY_NAMENODE-UPGRADE"],
+    "HDFS_CLIENT-UPGRADE": ["DATANODE-UPGRADE"],
+    "JOBTRACKER-UPGRADE": ["HDFS_CLIENT-UPGRADE"]
+  },
+  "_comment" : "Dependencies that are used in HA NameNode cluster",
+  "namenode_optional_ha": {
+    "NAMENODE-START": ["JOURNALNODE-START", "ZOOKEEPER_SERVER-START"],
+    "ZKFC-START": ["NAMENODE-START"],
+    "HDFS_SERVICE_CHECK-SERVICE_CHECK": ["ZKFC-START"]
+  },
+  "_comment" : "Dependencies that are used in ResourceManager HA cluster",
+  "resourcemanager_optional_ha" : {
+    "RESOURCEMANAGER-START": ["ZOOKEEPER_SERVER-START"]
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/4772593c/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/FLUME/configuration/flume-conf.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/FLUME/configuration/flume-conf.xml
b/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/FLUME/configuration/flume-conf.xml
new file mode 100644
index 0000000..74a4c15
--- /dev/null
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/FLUME/configuration/flume-conf.xml
@@ -0,0 +1,31 @@
+<?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 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.
+ */
+-->
+
+<configuration supports_final="false">
+  <property>
+    <name>content</name>
+    <description>Describe all the Flume agent configurations</description>
+    <value>
+# Flume agent config
+    </value>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/4772593c/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/FLUME/configuration/flume-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/FLUME/configuration/flume-env.xml
b/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/FLUME/configuration/flume-env.xml
new file mode 100644
index 0000000..7b11bde
--- /dev/null
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/FLUME/configuration/flume-env.xml
@@ -0,0 +1,40 @@
+<?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 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.
+ */
+-->
+
+<configuration>
+  <property>
+    <name>flume_conf_dir</name>
+    <value>/etc/flume/conf</value>
+    <description>Location to save configuration files</description>
+  </property>
+  <property>
+    <name>flume_log_dir</name>
+    <value>/var/log/flume</value>
+    <description>Location to save log files</description>
+  </property>
+  <property>
+    <name>flume_user</name>
+    <value>flume</value>
+    <property-type>USER</property-type>
+    <description>Flume User</description>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/4772593c/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/FLUME/configuration/flume-log4j.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/FLUME/configuration/flume-log4j.xml
b/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/FLUME/configuration/flume-log4j.xml
new file mode 100644
index 0000000..8c6ac27
--- /dev/null
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/FLUME/configuration/flume-log4j.xml
@@ -0,0 +1,31 @@
+<?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 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.
+ */
+-->
+
+<configuration supports_final="false">
+  <property>
+    <name>content</name>
+    <description>Custom log4j.properties</description>
+    <value>
+# Flume log4j config
+    </value>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/4772593c/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/FLUME/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/FLUME/metainfo.xml
b/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/FLUME/metainfo.xml
new file mode 100644
index 0000000..4f6bbd9
--- /dev/null
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/FLUME/metainfo.xml
@@ -0,0 +1,69 @@
+<?xml version="1.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.
+-->
+<metainfo>
+  <schemaVersion>2.0</schemaVersion>
+  <services>
+    <service>
+      <name>FLUME</name>
+      <displayName>Flume</displayName>
+      <comment>Data management and processing platform</comment>
+      <version>1.4.0.2.0</version>
+      <components>
+        <component>
+          <name>FLUME_HANDLER</name>
+          <displayName>Flume</displayName>
+          <category>SLAVE</category>
+          <cardinality>1+</cardinality>
+          <commandScript>
+            <script>scripts/flume_handler.py</script>
+            <scriptType>PYTHON</scriptType>
+            <timeout>600</timeout>
+          </commandScript>
+        </component>
+      </components>
+
+      <osSpecifics>
+        <osSpecific>
+          <osFamily>any</osFamily>
+          <packages>
+            <package>
+              <name>flume</name>
+            </package>
+          </packages>
+        </osSpecific>
+      </osSpecifics>
+
+      <commandScript>
+        <script>scripts/flume_check.py</script>
+        <scriptType>PYTHON</scriptType>
+        <timeout>300</timeout>
+      </commandScript>
+      
+      <requiredServices>
+        <service>HDFS</service>
+      </requiredServices>
+
+      <configuration-dependencies>
+        <config-type>flume-env</config-type>
+        <config-type>flume-conf</config-type>
+        <config-type>flume-log4j</config-type>
+      </configuration-dependencies>
+
+    </service>
+  </services>
+</metainfo>

http://git-wip-us.apache.org/repos/asf/ambari/blob/4772593c/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/SQOOP/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/SQOOP/metainfo.xml
b/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/SQOOP/metainfo.xml
new file mode 100644
index 0000000..fc083d6
--- /dev/null
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/SQOOP/metainfo.xml
@@ -0,0 +1,34 @@
+<?xml version="1.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.
+-->
+<metainfo>
+  <schemaVersion>2.0</schemaVersion>
+  <services>
+    <service>
+      <name>SQOOP</name>
+      <comment>Tool for transferring bulk data between Apache Hadoop and structured
data stores such as relational databases</comment>
+      <version></version>
+      <deleted>true</deleted>
+      <components>
+        <component>
+          <name>SQOOP</name>
+          <category>CLIENT</category>
+        </component>
+      </components>
+    </service>
+  </services>
+</metainfo>

http://git-wip-us.apache.org/repos/asf/ambari/blob/4772593c/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/YARN/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/YARN/metainfo.xml
b/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/YARN/metainfo.xml
new file mode 100644
index 0000000..ac5662e
--- /dev/null
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/YARN/metainfo.xml
@@ -0,0 +1,27 @@
+<?xml version="1.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.
+-->
+
+<metainfo>
+  <schemaVersion>2.0</schemaVersion>
+  <services>
+    <service>
+      <name>YARN</name>
+      <extends>HDP/2.0.6/YARN</extends>
+    </service>
+  </services>
+</metainfo>


Mime
View raw message