Repository: ambari Updated Branches: refs/heads/trunk 8113f04a0 -> 25bfb9ec6
AMBARI-20546 EU/RU service check should skip services that do not have config types (dili) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/25bfb9ec Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/25bfb9ec Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/25bfb9ec Branch: refs/heads/trunk Commit: 25bfb9ec62a44d525a19340d25276f3358f672e5 Parents: 8113f04 Author: Di Li <[email protected]> Authored: Thu Mar 30 15:35:20 2017 -0400 Committer: Di Li <[email protected]> Committed: Thu Mar 30 15:35:20 2017 -0400 ---------------------------------------------------------------------- .../server/api/services/AmbariMetaInfo.java | 6 + .../checks/ServiceCheckValidityCheck.java | 13 +- .../ambari/server/stack/ServiceModule.java | 18 +- .../apache/ambari/server/stack/StackModule.java | 9 + .../apache/ambari/server/state/StackInfo.java | 13 ++ .../server/api/services/AmbariMetaInfoTest.java | 7 + .../checks/ServiceCheckValidityCheckTest.java | 20 ++- .../ambari/server/stack/StackManagerTest.java | 20 ++- .../ambari/server/stack/StackModuleTest.java | 11 ++ .../HDP/2.0.7/services/SYSTEMML/metainfo.xml | 39 +++++ .../stacks/HDP/2.0.8/services/HIVE/metainfo.xml | 174 +++++++++++++++++++ .../HDP/2.0.8/services/SYSTEMML/metainfo.xml | 39 +++++ 12 files changed, 361 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/25bfb9ec/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java index 9f1d988..c655c62 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java @@ -555,6 +555,12 @@ public class AmbariMetaInfo { return removedServices.contains(serviceName); } + public boolean isServiceWithNoConfigs(String stackName, String version, String serviceName) throws AmbariException{ + StackInfo stack = getStack(stackName, version); + List<String> servicesWithNoConfigs = stack.getServicesWithNoConfigs(); + return servicesWithNoConfigs.contains(serviceName); + } + public Collection<String> getMonitoringServiceNames(String stackName, String version) throws AmbariException{ http://git-wip-us.apache.org/repos/asf/ambari/blob/25bfb9ec/ambari-server/src/main/java/org/apache/ambari/server/checks/ServiceCheckValidityCheck.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/checks/ServiceCheckValidityCheck.java b/ambari-server/src/main/java/org/apache/ambari/server/checks/ServiceCheckValidityCheck.java index 34b45bd..4ccdc0a 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/checks/ServiceCheckValidityCheck.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/checks/ServiceCheckValidityCheck.java @@ -47,6 +47,7 @@ import org.apache.ambari.server.state.Cluster; import org.apache.ambari.server.state.MaintenanceState; import org.apache.ambari.server.state.Service; import org.apache.ambari.server.state.ServiceComponent; +import org.apache.ambari.server.state.StackId; import org.apache.ambari.server.state.stack.PrereqCheckStatus; import org.apache.ambari.server.state.stack.PrerequisiteCheck; import org.apache.ambari.server.state.stack.upgrade.UpgradeType; @@ -115,9 +116,15 @@ public class ServiceCheckValidityCheck extends AbstractCheckDescriptor { if (service.getMaintenanceState() != MaintenanceState.OFF || !hasAtLeastOneComponentVersionAdvertised(service)) { continue; } - - ServiceConfigEntity lastServiceConfig = serviceConfigDAO.getLastServiceConfig(clusterId, service.getName()); - lastServiceConfigUpdates.put(service.getName(), lastServiceConfig.getCreateTimestamp()); + StackId stackId = cluster.getCurrentStackVersion(); + boolean isServiceWitNoConfigs = ambariMetaInfo.get().isServiceWithNoConfigs(stackId.getStackName(), stackId.getStackVersion(), service.getName()); + if (isServiceWitNoConfigs){ + LOG.info(String.format("%s in %s version %s does not have customizable configurations. Skip checking service configuration history.", service.getName(), stackId.getStackName(), stackId.getStackVersion())); + } else { + LOG.info(String.format("%s in %s version %s has customizable configurations. Check service configuration history.", service.getName(), stackId.getStackName(), stackId.getStackVersion())); + ServiceConfigEntity lastServiceConfig = serviceConfigDAO.getLastServiceConfig(clusterId, service.getName()); + lastServiceConfigUpdates.put(service.getName(), lastServiceConfig.getCreateTimestamp()); + } } List<HostRoleCommandEntity> commands = hostRoleCommandDAO.findAll(REQUEST, PREDICATE); http://git-wip-us.apache.org/repos/asf/ambari/blob/25bfb9ec/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 1b89192..fd65268 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 @@ -110,6 +110,13 @@ public class ServiceModule extends BaseModule<ServiceModule, ServiceInfo> implem private final static Logger LOG = LoggerFactory.getLogger(ServiceModule.class); /** + * Most of the services contain at least one config type. + * However, there are special cases on third party stacks + * that certain services do not have any config types. + * */ + private boolean hasConfigs = true; + + /** * Constructor. * * @param stackContext stack context which provides module access to external functionality @@ -559,7 +566,6 @@ public class ServiceModule extends BaseModule<ServiceModule, ServiceInfo> implem Collection<ConfigurationModule> mergedModules = mergeChildModules( allStacks, commonServices, extensions, configurationModules, parent.configurationModules); - for (ConfigurationModule module : mergedModules) { configurationModules.put(module.getId(), module); if(!module.isDeleted()) { @@ -619,6 +625,10 @@ public class ServiceModule extends BaseModule<ServiceModule, ServiceInfo> implem * Ensure that all default type attributes are set. */ private void finalizeConfiguration() { + LOG.debug(String.format("Finalize config, number of configuration modules %s", configurationModules.size())); + hasConfigs = !(configurationModules.isEmpty()); + LOG.debug(String.format("Finalize config, hasConfigs %s", hasConfigs)); + for (ConfigurationModule config : configurationModules.values()) { ConfigurationInfo configInfo = config.getModuleInfo(); configInfo.ensureDefaultAttributes(); @@ -668,6 +678,12 @@ public class ServiceModule extends BaseModule<ServiceModule, ServiceInfo> implem } } + /** + * Whether the service is a special case where it does not include any config types + * */ + public boolean hasConfigs(){ + return hasConfigs; + } @Override public String toString() { http://git-wip-us.apache.org/repos/asf/ambari/blob/25bfb9ec/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 79e142a..dfe7072 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 @@ -238,6 +238,15 @@ public class StackModule extends BaseModule<StackModule, StackInfo> implements V for (ServiceModule module : serviceModules.values()) { mergeRoleCommandOrder(module); } + + // Generate list of services that have no config types + List<String> servicesWithNoConfigs = new ArrayList<String>(); + for(ServiceModule serviceModule: serviceModules.values()){ + if (!serviceModule.hasConfigs()){ + servicesWithNoConfigs.add(serviceModule.getId()); + } + } + stackInfo.setServicesWithNoConfigs(servicesWithNoConfigs); } /** http://git-wip-us.apache.org/repos/asf/ambari/blob/25bfb9ec/ambari-server/src/main/java/org/apache/ambari/server/state/StackInfo.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/StackInfo.java b/ambari-server/src/main/java/org/apache/ambari/server/state/StackInfo.java index 3ab1466..353dd86 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/state/StackInfo.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/state/StackInfo.java @@ -81,6 +81,11 @@ public class StackInfo implements Comparable<StackInfo>, Validable{ * */ private List<String> removedServices = new ArrayList<>(); + /** + * List of services withnot configurations + * */ + private List<String> servicesWithNoConfigs = new ArrayList<String>(); + public String getMinJdk() { return minJdk; } @@ -573,4 +578,12 @@ public class StackInfo implements Comparable<StackInfo>, Validable{ public void setRemovedServices(List<String> removedServices) { this.removedServices = removedServices; } + + public List<String> getServicesWithNoConfigs() { + return servicesWithNoConfigs; + } + + public void setServicesWithNoConfigs(List<String> servicesWithNoConfigs) { + this.servicesWithNoConfigs = servicesWithNoConfigs; + } } http://git-wip-us.apache.org/repos/asf/ambari/blob/25bfb9ec/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java index b80e39c..884777d 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java @@ -524,6 +524,13 @@ public class AmbariMetaInfoTest { } @Test + public void isServiceWithNoConfigs() throws AmbariException { + assertTrue(metaInfo.isServiceWithNoConfigs(STACK_NAME_HDP, "2.0.8", "SYSTEMML")); + assertTrue(metaInfo.isServiceWithNoConfigs(STACK_NAME_HDP, "2.0.7", "SYSTEMML")); + assertFalse(metaInfo.isServiceWithNoConfigs(STACK_NAME_HDP, "2.0.8", "HIVE")); + } + + @Test public void testServiceNameUsingComponentName() throws AmbariException { String serviceName = metaInfo.getComponentToService(STACK_NAME_HDP, STACK_VERSION_HDP, SERVICE_COMPONENT_NAME); http://git-wip-us.apache.org/repos/asf/ambari/blob/25bfb9ec/ambari-server/src/test/java/org/apache/ambari/server/checks/ServiceCheckValidityCheckTest.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/checks/ServiceCheckValidityCheckTest.java b/ambari-server/src/test/java/org/apache/ambari/server/checks/ServiceCheckValidityCheckTest.java index dd843a8..996f349 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/checks/ServiceCheckValidityCheckTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/checks/ServiceCheckValidityCheckTest.java @@ -29,6 +29,7 @@ import java.util.Collections; import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.Role; import org.apache.ambari.server.RoleCommand; +import org.apache.ambari.server.api.services.AmbariMetaInfo; import org.apache.ambari.server.controller.PrereqCheckRequest; import org.apache.ambari.server.controller.spi.Predicate; import org.apache.ambari.server.controller.spi.Request; @@ -41,11 +42,14 @@ import org.apache.ambari.server.state.Clusters; import org.apache.ambari.server.state.MaintenanceState; import org.apache.ambari.server.state.Service; import org.apache.ambari.server.state.ServiceComponent; +import org.apache.ambari.server.state.StackId; import org.apache.ambari.server.state.stack.PrereqCheckStatus; import org.apache.ambari.server.state.stack.PrerequisiteCheck; + import org.junit.Assert; import org.junit.Before; import org.junit.Test; +import org.mockito.Mockito; import com.google.common.collect.ImmutableMap; import com.google.inject.Provider; @@ -63,7 +67,7 @@ public class ServiceCheckValidityCheckTest { private ServiceConfigDAO serviceConfigDAO; private HostRoleCommandDAO hostRoleCommandDAO; private Service service; - + private AmbariMetaInfo ambariMetaInfo; @Before public void setUp() throws Exception { @@ -71,6 +75,7 @@ public class ServiceCheckValidityCheckTest { service = mock(Service.class); serviceConfigDAO = mock(ServiceConfigDAO.class); hostRoleCommandDAO = mock(HostRoleCommandDAO.class); + ambariMetaInfo = mock(AmbariMetaInfo.class); serviceCheckValidityCheck = new ServiceCheckValidityCheck(); serviceCheckValidityCheck.hostRoleCommandDAOProvider = new Provider<HostRoleCommandDAO>() { @@ -92,13 +97,24 @@ public class ServiceCheckValidityCheckTest { } }; + Cluster cluster = mock(Cluster.class); when(clusters.getCluster(CLUSTER_NAME)).thenReturn(cluster); when(cluster.getClusterId()).thenReturn(CLUSTER_ID); when(cluster.getServices()).thenReturn(ImmutableMap.of(SERVICE_NAME, service)); - + when(cluster.getCurrentStackVersion()).thenReturn(new StackId("HDP", "2.2")); when(service.getName()).thenReturn(SERVICE_NAME); + + serviceCheckValidityCheck.ambariMetaInfo = new Provider<AmbariMetaInfo>() { + @Override + public AmbariMetaInfo get() { + return ambariMetaInfo; + } + }; + + when(ambariMetaInfo.isServiceWithNoConfigs(Mockito.anyString(), Mockito.anyString(), + Mockito.anyString())).thenReturn(false); } @Test http://git-wip-us.apache.org/repos/asf/ambari/blob/25bfb9ec/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 ec41040..507c560 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 @@ -175,6 +175,21 @@ public class StackManagerTest { } @Test + public void testSerivcesWithNoConfigs(){ + StackInfo stack = stackManager.getStack("HDP", "2.0.8"); + List<String> servicesWithNoConfigs = stack.getServicesWithNoConfigs(); + //Via inheritance, Hive should have config types + //Via inheritance, SystemML should still have no config types + assertTrue((servicesWithNoConfigs.contains("SYSTEMML"))); + assertFalse((servicesWithNoConfigs.contains("HIVE"))); + + stack = stackManager.getStack("HDP", "2.0.7"); + //Directly from the stack, SystemML should have no config types + servicesWithNoConfigs = stack.getServicesWithNoConfigs(); + assertTrue((servicesWithNoConfigs.contains("SYSTEMML"))); + } + + @Test public void testGetStack() { StackInfo stack = stackManager.getStack("HDP", "0.1"); assertNotNull(stack); @@ -270,7 +285,7 @@ public class StackManagerTest { assertNotNull(si); //should include all stacks in hierarchy - assertEquals(17, services.size()); + assertEquals(18, services.size()); HashSet<String> expectedServices = new HashSet<>(); expectedServices.add("GANGLIA"); expectedServices.add("HBASE"); @@ -289,6 +304,7 @@ public class StackManagerTest { expectedServices.add("TEZ"); expectedServices.add("AMBARI_METRICS"); expectedServices.add("SPARK3"); + expectedServices.add("SYSTEMML"); ServiceInfo pigService = null; for (ServiceInfo service : services) { @@ -493,7 +509,7 @@ public class StackManagerTest { public void testMonitoringServicePropertyInheritance() throws Exception{ StackInfo stack = stackManager.getStack("HDP", "2.0.8"); Collection<ServiceInfo> allServices = stack.getServices(); - assertEquals(14, allServices.size()); + assertEquals(15, allServices.size()); boolean monitoringServiceFound = false; http://git-wip-us.apache.org/repos/asf/ambari/blob/25bfb9ec/ambari-server/src/test/java/org/apache/ambari/server/stack/StackModuleTest.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/stack/StackModuleTest.java b/ambari-server/src/test/java/org/apache/ambari/server/stack/StackModuleTest.java index c4ae9c7..69f8659 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/stack/StackModuleTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/stack/StackModuleTest.java @@ -131,6 +131,17 @@ public class StackModuleTest { assertEquals(removedServices.size(), 0); } + @Test + public void servicesWithNoConfigsInitialValue() throws Exception { + StackModule sm = createStackModule("FooBar", + "2.4", + Optional.<List<RepositoryInfo>>absent(), + Lists.newArrayList(repoInfo("bar", "2.0.1", "http://bar.org", "centos6")), + Lists.newArrayList(repoInfo("bar", "2.0.1", "http://bar.org", "centos7"))); + List<String> servicesWithNoConfigs = sm.getModuleInfo().getServicesWithNoConfigs(); + assertEquals(servicesWithNoConfigs.size(), 0); + } + @SafeVarargs private static StackModule createStackModule(String stackName, String stackVersion, Optional<? extends List<RepositoryInfo>> stackRepos, List<RepositoryInfo>... serviceRepoLists) throws AmbariException { http://git-wip-us.apache.org/repos/asf/ambari/blob/25bfb9ec/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/SYSTEMML/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/SYSTEMML/metainfo.xml b/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/SYSTEMML/metainfo.xml new file mode 100644 index 0000000..cffa185 --- /dev/null +++ b/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/SYSTEMML/metainfo.xml @@ -0,0 +1,39 @@ +<?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>SYSTEMML</name> + <displayName>SystemML</displayName> + <comment>Apache SystemML is a distributed and declarative machine learning platform.</comment> + <version>0.10.0</version> + <components> + <component> + <name>SYSTEMML</name> + <displayName>SystemML</displayName> + <category>CLIENT</category> + <cardinality>0+</cardinality> + <versionAdvertised>true</versionAdvertised> + <configFiles> + </configFiles> + </component> + </components> + </service> + </services> +</metainfo> http://git-wip-us.apache.org/repos/asf/ambari/blob/25bfb9ec/ambari-server/src/test/resources/stacks/HDP/2.0.8/services/HIVE/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.8/services/HIVE/metainfo.xml b/ambari-server/src/test/resources/stacks/HDP/2.0.8/services/HIVE/metainfo.xml new file mode 100644 index 0000000..35a4d05 --- /dev/null +++ b/ambari-server/src/test/resources/stacks/HDP/2.0.8/services/HIVE/metainfo.xml @@ -0,0 +1,174 @@ +<?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>HIVE</name> + <displayName>Hive</displayName> + <comment>Data warehouse system for ad-hoc queries & analysis of large datasets and table & storage management service</comment> + <version>0.11.0.2.0.5.0</version> + <components> + <component> + <name>HIVE_METASTORE</name> + <displayName>Hive Metastore</displayName> + <category>MASTER</category> + <cardinality>1</cardinality> + <clientsToUpdateConfigs></clientsToUpdateConfigs> + <auto-deploy> + <enabled>true</enabled> + <co-locate>HIVE/HIVE_SERVER</co-locate> + </auto-deploy> + <commandScript> + <script>scripts/hive_metastore.py</script> + <scriptType>PYTHON</scriptType> + <timeout>600</timeout> + </commandScript> + </component> + + <component> + <name>HIVE_SERVER</name> + <displayName>HiveServer2</displayName> + <category>MASTER</category> + <cardinality>1</cardinality> + <clientsToUpdateConfigs></clientsToUpdateConfigs> + <dependencies> + <dependency> + <name>ZOOKEEPER/ZOOKEEPER_SERVER</name> + <scope>cluster</scope> + <auto-deploy> + <enabled>true</enabled> + <co-locate>HIVE/HIVE_SERVER</co-locate> + </auto-deploy> + </dependency> + <dependency> + <name>TEZ/TEZ_CLIENT</name> + <scope>host</scope> + <auto-deploy> + <enabled>true</enabled> + </auto-deploy> + </dependency> + <dependency> + <name>YARN/YARN_CLIENT</name> + <scope>host</scope> + <auto-deploy> + <enabled>true</enabled> + </auto-deploy> + </dependency> + <dependency> + <name>MAPREDUCE2/MAPREDUCE2_CLIENT</name> + <scope>host</scope> + <auto-deploy> + <enabled>true</enabled> + </auto-deploy> + </dependency> + </dependencies> + <commandScript> + <script>scripts/hive_server.py</script> + <scriptType>PYTHON</scriptType> + </commandScript> + </component> + + <component> + <name>MYSQL_SERVER</name> + <displayName>MySQL Server</displayName> + <category>MASTER</category> + <cardinality>1</cardinality> + <clientsToUpdateConfigs></clientsToUpdateConfigs> + <commandScript> + <script>scripts/mysql_server.py</script> + <scriptType>PYTHON</scriptType> + </commandScript> + </component> + + <component> + <name>HIVE_CLIENT</name> + <displayName>Hive Client</displayName> + <category>CLIENT</category> + <cardinality>0+</cardinality> + <commandScript> + <script>scripts/hive_client222.py</script> + <scriptType>PYTHON</scriptType> + </commandScript> + <configFiles> + <configFile> + <type>xml</type> + <fileName>hive-site.xml</fileName> + <dictionaryName>hive-site</dictionaryName> + </configFile> + <configFile> + <type>env</type> + <fileName>hive-env.sh</fileName> + <dictionaryName>hive-env</dictionaryName> + </configFile> + </configFiles> + </component> + </components> + + <osSpecifics> + <osSpecific> + <osFamily>any</osFamily> + <packages> + <package> + <name>hive</name> + </package> + <package> + <name>mysql-connector-java</name> + </package> + </packages> + </osSpecific> + <osSpecific> + <osFamily>redhat5,redhat6,suse11</osFamily> + <packages> + <package> + <name>mysql</name> + </package> + </packages> + </osSpecific> + <osSpecific> + <osFamily>redhat5,redhat6,ubuntu12</osFamily> + <packages> + <package> + <name>mysql-server</name> + </package> + </packages> + </osSpecific> + <osSpecific> + <osFamily>suse11</osFamily> + <packages> + <package> + <name>mysql-client</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>hive-site</config-type> + </configuration-dependencies> + </service> + </services> +</metainfo> http://git-wip-us.apache.org/repos/asf/ambari/blob/25bfb9ec/ambari-server/src/test/resources/stacks/HDP/2.0.8/services/SYSTEMML/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.8/services/SYSTEMML/metainfo.xml b/ambari-server/src/test/resources/stacks/HDP/2.0.8/services/SYSTEMML/metainfo.xml new file mode 100644 index 0000000..cffa185 --- /dev/null +++ b/ambari-server/src/test/resources/stacks/HDP/2.0.8/services/SYSTEMML/metainfo.xml @@ -0,0 +1,39 @@ +<?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>SYSTEMML</name> + <displayName>SystemML</displayName> + <comment>Apache SystemML is a distributed and declarative machine learning platform.</comment> + <version>0.10.0</version> + <components> + <component> + <name>SYSTEMML</name> + <displayName>SystemML</displayName> + <category>CLIENT</category> + <cardinality>0+</cardinality> + <versionAdvertised>true</versionAdvertised> + <configFiles> + </configFiles> + </component> + </components> + </service> + </services> +</metainfo>
