You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2015/04/07 21:35:02 UTC

ambari git commit: AMBARI-10275. Configuration information not loaded in Review Page of Install Wizard (aonishuk)

Repository: ambari
Updated Branches:
  refs/heads/trunk 793e36148 -> e07c1e57f


AMBARI-10275. Configuration information not loaded in Review Page of Install Wizard (aonishuk)


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

Branch: refs/heads/trunk
Commit: e07c1e57f860217accd66d24716b1d5f72860e7f
Parents: 793e361
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Tue Apr 7 22:34:55 2015 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Tue Apr 7 22:34:55 2015 +0300

----------------------------------------------------------------------
 .../ambari/server/stack/ServiceModule.java      |   2 +-
 .../ambari/server/stack/StackManagerTest.java   |  17 +++
 .../resources/stacks/HDP/2.0.6.1/metainfo.xml   |   2 +-
 .../HDP/2.0.6.1/services/HBASE/metainfo.xml     |  27 +++++
 .../HDP/2.0.6/services/HBASE/metainfo.xml       | 113 +++++++++++++++++++
 5 files changed, 159 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e07c1e57/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 1e4a773..c79dda1 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
@@ -414,7 +414,7 @@ public class ServiceModule extends BaseModule<ServiceModule, ServiceInfo> implem
     serviceInfo.getComponents().clear();
     Collection<ComponentModule> mergedModules = mergeChildModules(
         allStacks, commonServices, componentModules, parent.componentModules);
-
+    componentModules.clear();
     for (ComponentModule module : mergedModules) {
       componentModules.put(module.getId(), module);
       serviceInfo.getComponents().add(module.getModuleInfo());

http://git-wip-us.apache.org/repos/asf/ambari/blob/e07c1e57/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 2b665f6..4fbd736 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
@@ -462,6 +462,23 @@ public class StackManagerTest {
     assertNotNull(yarnService.getComponentByName("YARN_CLIENT"));
   }
 
+
+  @Test
+  public void testInheritanceAfterComponentDeletion() {
+    StackInfo stack = stackManager.getStack("HDP", "2.0.6");
+    ServiceInfo yarnService = stack.getService("HBASE");
+    assertNull(yarnService.getComponentByName("HBASE_CLIENT"));
+
+    stack = stackManager.getStack("HDP", "2.0.6.1");
+    yarnService = stack.getService("HBASE");
+    assertNull(yarnService.getComponentByName("HBASE_CLIENT"));
+
+    stack = stackManager.getStack("HDP", "2.0.8");
+    yarnService = stack.getService("HBASE");
+    assertNotNull(yarnService.getComponentByName("HBASE_CLIENT"));
+  }
+
+
   @Test
   public void testPopulateConfigTypes() throws Exception {
     StackInfo stack = stackManager.getStack("HDP", "2.0.7");

http://git-wip-us.apache.org/repos/asf/ambari/blob/e07c1e57/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
index 07da411..10673b7 100644
--- 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
@@ -19,6 +19,6 @@
     <versions>
       <active>true</active>
     </versions>
-    <extends>2.0.5</extends>
+    <extends>2.0.6</extends>
 </metainfo>
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/e07c1e57/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/HBASE/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/HBASE/metainfo.xml b/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/HBASE/metainfo.xml
new file mode 100644
index 0000000..c789524
--- /dev/null
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/services/HBASE/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>HBASE</name>
+      <comment>Non-relational distributed database and centralized service for configuration management &amp; synchronization</comment>
+      <version>0.95.2.2.0.6.1</version>
+    </service>
+  </services>
+</metainfo>

http://git-wip-us.apache.org/repos/asf/ambari/blob/e07c1e57/ambari-server/src/test/resources/stacks/HDP/2.0.6/services/HBASE/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.6/services/HBASE/metainfo.xml b/ambari-server/src/test/resources/stacks/HDP/2.0.6/services/HBASE/metainfo.xml
new file mode 100644
index 0000000..3043b1e
--- /dev/null
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.6/services/HBASE/metainfo.xml
@@ -0,0 +1,113 @@
+<?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>HBASE</name>
+      <comment>Non-relational distributed database and centralized service for configuration management &amp; synchronization</comment>
+      <version>0.95.2.2.0.6.0</version>
+
+      <components>
+        <component>
+          <name>HBASE_MASTER</name>
+          <category>MASTER</category>
+          <cardinality>1</cardinality>
+          <dependencies>
+            <dependency>
+              <name>HDFS/HDFS_CLIENT</name>
+              <scope>host</scope>
+              <auto-deploy>
+                <enabled>true</enabled>
+              </auto-deploy>
+            </dependency>
+            <dependency>
+              <name>ZOOKEEPER/ZOOKEEPER_SERVER</name>
+              <scope>cluster</scope>
+              <auto-deploy>
+                <enabled>true</enabled>
+                <co-locate>HBASE/HBASE_MASTER</co-locate>
+              </auto-deploy>
+            </dependency>
+          </dependencies>
+          <commandScript>
+            <script>scripts/hbase_master.py</script>
+            <scriptType>PYTHON</scriptType>
+            <timeout>600</timeout>
+          </commandScript>
+          <customCommands>
+            <customCommand>
+              <name>DECOMMISSION</name>
+              <commandScript>
+                <script>scripts/hbase_master.py</script>
+                <scriptType>PYTHON</scriptType>
+                <timeout>600</timeout>
+              </commandScript>
+            </customCommand>
+          </customCommands>
+        </component>
+
+        <component>
+          <name>HBASE_REGIONSERVER</name>
+          <category>SLAVE</category>
+          <cardinality>1+</cardinality>
+          <commandScript>
+            <script>scripts/hbase_regionserver.py</script>
+            <scriptType>PYTHON</scriptType>
+          </commandScript>
+        </component>
+
+        <component>
+          <name>HBASE_CLIENT</name>
+          <category>CLIENT</category>
+          <cardinality>0+</cardinality>
+          <deleted>true</deleted>
+          <commandScript>
+            <script>scripts/hbase_client.py</script>
+            <scriptType>PYTHON</scriptType>
+          </commandScript>
+        </component>
+      </components>
+
+      <osSpecifics>
+        <osSpecific>
+          <osFamily>any</osFamily>
+          <packages>
+            <package>
+              <name>hbase</name>
+            </package>
+          </packages>
+        </osSpecific>
+      </osSpecifics>
+
+      <commandScript>
+        <script>scripts/service_check.py</script>
+        <scriptType>PYTHON</scriptType>
+        <timeout>300</timeout>
+      </commandScript>
+
+      <configuration-dependencies>
+        <config-type>global</config-type>
+        <config-type>hbase-policy</config-type>
+        <config-type>hbase-site</config-type>
+        <config-type>hbase-log4j</config-type>
+      </configuration-dependencies>
+
+    </service>
+  </services>
+</metainfo>