http://git-wip-us.apache.org/repos/asf/ambari/blob/ffb4d3b8/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/role_command_order.json ---------------------------------------------------------------------- diff --git a/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/role_command_order.json b/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/role_command_order.json new file mode 100644 index 0000000..faaee6e --- /dev/null +++ b/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/role_command_order.json @@ -0,0 +1,81 @@ +{ + "_comment" : "Record format:", + "_comment" : "blockedRole-blockedCommand: [blockerRole1-blockerCommand1, blockerRole2-blockerCommand2, ...]", + "general_deps" : { + "_comment" : "dependencies for all cases", + "HBASE_MASTER-START": ["ZOOKEEPER_SERVER-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"], + "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"] + } +} +
http://git-wip-us.apache.org/repos/asf/ambari/blob/ffb4d3b8/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/services/GANGLIA/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/services/GANGLIA/metainfo.xml b/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/services/GANGLIA/metainfo.xml new file mode 100644 index 0000000..1fe4aec --- /dev/null +++ b/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/services/GANGLIA/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>GANGLIA</name> + <comment>Ganglia Metrics Collection system (<a href="http://oss.oetiker.ch/rrdtool/" target="_blank">RRDTool</a> will be installed too)</comment> + <version>3.5.0</version> + + <components> + <component> + <name>GANGLIA_SERVER</name> + <versionAdvertised>false</versionAdvertised> + </component> + + <component> + <name>GANGLIA_MONITOR</name> + <versionAdvertised>false</versionAdvertised> + </component> + </components> + </service> + </services> +</metainfo> http://git-wip-us.apache.org/repos/asf/ambari/blob/ffb4d3b8/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/services/HDFS/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/services/HDFS/metainfo.xml b/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/services/HDFS/metainfo.xml new file mode 100644 index 0000000..2bd1f99 --- /dev/null +++ b/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/services/HDFS/metainfo.xml @@ -0,0 +1,59 @@ +<?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>HDFS</name> + <comment>Apache Hadoop Distributed File System</comment> + <version>2.1.0.2.0.6.0</version> + + <components> + <component> + <name>NAMENODE</name> + <versionAdvertised>true</versionAdvertised> + </component> + + <component> + <name>DATANODE</name> + <versionAdvertised>false</versionAdvertised> + </component> + + <component> + <name>SECONDARY_NAMENODE</name> + <versionAdvertised>false</versionAdvertised> + </component> + + <component> + <name>HDFS_CLIENT</name> + <versionAdvertised>true</versionAdvertised> + </component> + + <component> + <name>JOURNALNODE</name> + <versionAdvertised>true</versionAdvertised> + </component> + + <component> + <name>ZKFC</name> + <versionAdvertised>false</versionAdvertised> + </component> + </components> + </service> + </services> +</metainfo> http://git-wip-us.apache.org/repos/asf/ambari/blob/ffb4d3b8/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/services/ZOOKEEPER/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/services/ZOOKEEPER/metainfo.xml b/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/services/ZOOKEEPER/metainfo.xml new file mode 100644 index 0000000..ed0a132 --- /dev/null +++ b/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/services/ZOOKEEPER/metainfo.xml @@ -0,0 +1,40 @@ +<?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>ZOOKEEPER</name> + <displayName>ZooKeeper</displayName> + <comment>Centralized service which provides highly reliable distributed coordination</comment> + <version>3.4.5.2.0</version> + + <components> + <component> + <name>ZOOKEEPER_SERVER</name> + <versionAdvertised>true</versionAdvertised> + </component> + + <component> + <name>ZOOKEEPER_CLIENT</name> + <versionAdvertised>true</versionAdvertised> + </component> + </components> + </service> + </services> +</metainfo> http://git-wip-us.apache.org/repos/asf/ambari/blob/ffb4d3b8/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/upgrades/config-upgrade.xml ---------------------------------------------------------------------- diff --git a/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/upgrades/config-upgrade.xml b/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/upgrades/config-upgrade.xml new file mode 100644 index 0000000..90d64b4 --- /dev/null +++ b/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/upgrades/config-upgrade.xml @@ -0,0 +1,101 @@ +<?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. +--> + +<upgrade-config-changes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + + <services> + <service name="ZOOKEEPER"> + <component name="ZOOKEEPER_SERVER"> + <changes> + <definition xsi:type="configure" id="hdp_2_2_0_zk_post_upgrade"> + </definition> + </changes> + </component> + </service> + + <service name="HDFS"> + <component name="NAMENODE"> + <changes> + <definition xsi:type="configure" id="hdp_2_2_0_nn_pre_upgrade"> + <type>hdfs-site</type> + <set key="myproperty" value="mynewvalue"/> + </definition> + </changes> + </component> + </service> + + <service name="YARN"> + <component name="NODEMANAGER"> + <changes> + <definition xsi:type="configure" id="hdp_2_2_0_nm_pre_upgrade"> + <type>core-site</type> + <transfer operation="copy" from-key="copy-key" + to-key="copy-key-to"/> + <transfer operation="copy" from-type="my-site" + from-key="my-copy-key" + to-key="my-copy-key-to"/> + <transfer operation="move" from-key="move-key" + to-key="move-key-to"/> + <transfer operation="delete" delete-key="delete-key" + preserve-edits="true"> + <keep-key>important-key</keep-key> + </transfer> + </definition> + </changes> + </component> + </service> + + <service name="HIVE"> + <component name="HIVE_SERVER"> + <changes> + <definition xsi:type="configure" id="hdp_2_2_0_set_transport_mode"> + <condition type="hive-site" key="hive.server2.transport.mode" value="binary"> + <type>hive-site</type> + <key>hive.server2.thrift.port</key> + <value>10010</value> + </condition> + <condition type="hive-site" key="hive.server2.transport.mode" value="http"> + <type>hive-site</type> + <key>hive.server2.http.port</key> + <value>10011</value> + </condition> + </definition> + + <definition xsi:type="configure" id="hdp_2_2_0_hive_server_foo"> + <type>hive-site</type> + <set key="fooKey" value="fooValue"/> + <set key="fooKey2" value="fooValue2"/> + <set key="fooKey3" value="fooValue3"/> + <transfer operation="copy" from-key="copy-key" to-key="copy-key-to" /> + <transfer operation="move" from-key="move-key" to-key="move-key-to" /> + <transfer operation="delete" delete-key="delete-key" /> + <transfer operation="delete" delete-key="delete-http" if-key="hive.server2.transport.mode" if-type="hive-site" if-value="http" /> + <transfer operation="delete" delete-key="delete-https-fail" if-key="hive.server2.transport.mode" if-type="hive-site" if-value="https" /> + <transfer operation="delete" delete-key="delete-prop-fail" if-key="non.existent" if-type="hive-site" if-value="https" /> + <transfer operation="delete" delete-key="delete-type-fail" if-key="non.existent" if-type="non.existent" if-value="" /> + <transfer operation="delete" delete-key="delete-null-if-value" if-key="non.existent" if-type="non.existent" /> + <transfer operation="delete" delete-key="delete-blank-if-key" if-key="" if-type="non.existent" /> + <transfer operation="delete" delete-key="delete-blank-if-type" if-key="non.existent" if-type="" /> + <transfer operation="delete" delete-key="delete-thrift" if-key="hive.server2.thrift.port" if-type="hive-site" if-value="10001" /> + </definition> + </changes> + </component> + </service> + </services> + +</upgrade-config-changes> http://git-wip-us.apache.org/repos/asf/ambari/blob/ffb4d3b8/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test.xml ---------------------------------------------------------------------- diff --git a/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test.xml b/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test.xml new file mode 100644 index 0000000..5d41754 --- /dev/null +++ b/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test.xml @@ -0,0 +1,221 @@ +<?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. +--> +<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <target>2.2.*</target> + <target-stack>HDP-2.2.0</target-stack> + <type>ROLLING</type> + <prerequisite-checks> + <check>org.apache.ambari.server.checks.HiveMultipleMetastoreCheck</check> + <check>org.apache.ambari.server.checks.MapReduce2JobHistoryStatePreservingCheck</check> + <check>org.apache.ambari.server.checks.SecondaryNamenodeDeletedCheck</check> + <check>org.apache.ambari.server.checks.ServicesMapReduceDistributedCacheCheck</check> + <check>org.apache.ambari.server.checks.ServicesNamenodeHighAvailabilityCheck</check> + <check>org.apache.ambari.server.checks.ServicesNamenodeTruncateCheck</check> + <check>org.apache.ambari.server.checks.ServicesTezDistributedCacheCheck</check> + <check>org.apache.ambari.server.checks.ServicesYarnWorkPreservingCheck</check> + <check>org.apache.ambari.server.checks.YarnRMHighAvailabilityCheck</check> + <check>org.apache.ambari.server.checks.YarnTimelineServerStatePreservingCheck</check> + </prerequisite-checks> + <order> + <group xsi:type="cluster" name="PRE_CLUSTER" title="Pre {{direction.text.proper}}"> + <execute-stage title="Confirm 1"> + <task xsi:type="manual"> + <message>Foo</message> + </task> + </execute-stage> + <execute-stage service="HDFS" component="NAMENODE" title="Pre Upgrade HIVE"> + <task xsi:type="manual"> + <message>Back stuff up.</message> + </task> + </execute-stage> + <execute-stage service="HDFS" component="NAMENODE" title="Finalize HDFS"> + <task xsi:type="execute"> + <command>ls</command> + </task> + </execute-stage> + <execute-stage title="Confirm 2"> + <task xsi:type="manual"> + <message>Goo</message> + </task> + </execute-stage> + </group> + + <group name="ZOOKEEPER" title="Zookeeper"> + <skippable>true</skippable> + <allow-retry>false</allow-retry> + <service name="ZOOKEEPER"> + <component>ZOOKEEPER_SERVER</component> + <component>ZOOKEEPER_CLIENT</component> + </service> + </group> + + <group name="CORE_MASTER" title="Core Masters"> + <service name="HDFS"> + <component>JOURNALNODE</component> + <component>NAMENODE</component> + </service> + <service name="YARN"> + <component>RESOURCEMANAGER</component> + </service> + </group> + + <group name="CORE_SLAVES" title="Core Slaves" xsi:type="colocated"> + <skippable>true</skippable> <!-- set skippable for test --> + <allow-retry>false</allow-retry> <!-- set no retry for test --> + <service name="HDFS"> + <component>DATANODE</component> + </service> + <service name="HBASE"> + <component>REGIONSERVER</component> + </service> + <service name="YARN"> + <component>NODEMANAGER</component> + </service> + + <batch> + <percent>20</percent> + <message>Please run additional tests on {{components}}</message> + </batch> + </group> + + <group name="HIVE" title="Hive"> + <skippable>true</skippable> + <service name="HIVE"> + <component>HIVE_METASTORE</component> + <component>HIVE_SERVER</component> + <component>WEBHCAT_SERVER</component> + </service> + </group> + + <group xsi:type="cluster" name="POST_CLUSTER" title="Finalize {{direction.text.proper}}"> + <execute-stage title="Confirm Finalize"> + <task xsi:type="manual"> + <message>Please confirm you are ready to finalize</message> + </task> + </execute-stage> + <execute-stage title="Update remaining HDP stack to {{version}}"> + <task xsi:type="execute"> + <script>scripts/ru_set_all.py</script> + <function>actionexecute</function> + </task> + </execute-stage> + <execute-stage title="Save Cluster State" service="" component=""> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.FinalizeUpgradeAction"> + </task> + </execute-stage> + </group> + + </order> + + + <processing> + <service name="ZOOKEEPER"> + <component name="ZOOKEEPER_SERVER"> + <pre-upgrade> + <task xsi:type="manual"> + <summary>SUMMARY OF PREPARE</summary> + <message>This is a manual task with a placeholder of {{foo/bar}}</message> + </task> + </pre-upgrade> + <upgrade> + <task xsi:type="restart-task" /> + </upgrade> + <post-upgrade> + <task xsi:type="configure" /> + </post-upgrade> + </component> + </service> + + <service name="HDFS"> + <component name="NAMENODE"> + <pre-upgrade> + <task xsi:type="execute" hosts="master"> + <command>su - {hdfs-user} -c 'dosomething'</command> + </task> + <task xsi:type="configure"> + <type>hdfs-site</type> + <set key="myproperty" value="mynewvalue"/> + </task> + <task xsi:type="manual"> + <message>{{direction.verb.proper}} your database</message> + </task> + </pre-upgrade> + <upgrade> + <task xsi:type="restart-task" /> + </upgrade> + <post-upgrade> + <task xsi:type="execute"> + <command>ls</command> + </task> + </post-upgrade> + </component> + <component name="DATANODE"> + <pre-downgrade /> + <upgrade> + <task xsi:type="restart-task" /> + </upgrade> + <post-downgrade> + <task xsi:type="manual"> + <message>Manual Downgrade</message> + </task> + </post-downgrade> + </component> + </service> + + <service name="YARN"> + <component name="RESOURCEMANAGER"> + <pre-upgrade> + <task xsi:type="execute"> + <command>ls</command> + </task> + </pre-upgrade> + </component> + <component name="NODEMANAGER"> + <pre-upgrade> + <task xsi:type="execute"> + <command>ls</command> + </task> + </pre-upgrade> + </component> + </service> + + <service name="HIVE"> + <component name="HIVE_SERVER"> + <pre-upgrade> + <task xsi:type="manual"> + <summary>HiveServer Port Availability</summary> + <message>The HiveServer port will now change to 10010 if hive is using a binary transfer mode or 10011 if hive is using an http transport mode. You can use "netstat -anp | grep 1001[01]" to determine if the port is available on each of following HiveServer host(s): {{hosts.all}}. If the port is not available, the process using it must be terminated.</message> + </task> + + <task xsi:type="configure"> + <condition type="hive-site" key="hive.server2.transport.mode" value="binary"> + <type>hive-site</type> + <key>hive.server2.thrift.port</key> + <value>10010</value> + </condition> + <condition type="hive-site" key="hive.server2.transport.mode" value="http"> + <type>hive-site</type> + <key>hive.server2.http.port</key> + <value>10011</value> + </condition> + </task> + </pre-upgrade> + </component> + </service> + </processing> +</upgrade> http://git-wip-us.apache.org/repos/asf/ambari/blob/ffb4d3b8/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_checks.xml ---------------------------------------------------------------------- diff --git a/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_checks.xml b/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_checks.xml new file mode 100644 index 0000000..fb03cb3 --- /dev/null +++ b/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_checks.xml @@ -0,0 +1,208 @@ +<?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. +--> +<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <target>2.2.*.*</target> + <target-stack>HDP-2.2.1</target-stack> + <type>ROLLING</type> + <prerequisite-checks> + <check>org.apache.ambari.server.checks.HiveMultipleMetastoreCheck</check> + <check>org.apache.ambari.server.checks.MapReduce2JobHistoryStatePreservingCheck</check> + <check>org.apache.ambari.server.checks.SecondaryNamenodeDeletedCheck</check> + <check>org.apache.ambari.server.checks.ServicesMapReduceDistributedCacheCheck</check> + <check>org.apache.ambari.server.checks.ServicesNamenodeHighAvailabilityCheck</check> + <check>org.apache.ambari.server.checks.ServicesNamenodeTruncateCheck</check> + <check>org.apache.ambari.server.checks.ServicesTezDistributedCacheCheck</check> + <check>org.apache.ambari.server.checks.ServicesYarnWorkPreservingCheck</check> + <check>org.apache.ambari.server.checks.YarnRMHighAvailabilityCheck</check> + <check>org.apache.ambari.server.checks.YarnTimelineServerStatePreservingCheck</check> + + <configuration> + <property name="global-property-1">global-value-1</property> + <check-properties name="org.apache.ambari.server.checks.ServicesMapReduceDistributedCacheCheck"> + <property name="dfs-protocols-regex">^([^:]*dfs|wasb|ecs):.*</property> + </check-properties> + <check-properties name="org.apache.ambari.server.checks.ServicesTezDistributedCacheCheck"> + <property name="dfs-protocols-regex">^([^:]*dfs|wasb|ecs):.*</property> + </check-properties> + </configuration> + </prerequisite-checks> + + <order> + <group xsi:type="cluster" name="PRE_CLUSTER" title="Pre Upgrade" stage="pre"> + <execute-stage title="Confirm 1"> + <task xsi:type="manual"> + <message>Foo</message> + </task> + </execute-stage> + <execute-stage service="HDFS" component="NAMENODE" title="Finalize HDFS"> + <task xsi:type="execute"> + <command>ls</command> + </task> + </execute-stage> + <execute-stage title="Confirm 2"> + <task xsi:type="manual"> + <message>Foo</message> + </task> + </execute-stage> + </group> + + <group name="ZOOKEEPER" title="Zookeeper"> + <service name="ZOOKEEPER"> + <component>ZOOKEEPER_SERVER</component> + <component>ZOOKEEPER_CLIENT</component> + </service> + </group> + <group name="CORE_MASTER" title="Core Masters"> + <service name="HDFS"> + <component>JOURNALNODE</component> + <component>NAMENODE</component> + </service> + <service name="YARN"> + <component>RESOURCEMANAGER</component> + </service> + <service-check>false</service-check> + </group> + + <group name="SERVICE_CHECK_1" title="Post-Master Service Checks" xsi:type="service-check"> + <priority> + <service>HDFS</service> + <service>YARN</service> + </priority> + <exclude> + <service>AMBARI_METRICS</service> + </exclude> + </group> + + <group name="CORE_SLAVES" title="Core Slaves" xsi:type="colocated"> + <skippable>true</skippable> <!-- set skippable for test --> + <allow-retry>false</allow-retry> <!-- set no retry for test --> + <service name="HDFS"> + <component>DATANODE</component> + </service> + <service name="HBASE"> + <component>REGIONSERVER</component> + </service> + <service name="YARN"> + <component>NODEMANAGER</component> + </service> + + <batch> + <percent>20</percent> + <message>Please run additional tests</message> + </batch> + </group> + + <group name="SERVICE_CHECK_2" title="Post-Slave Service Checks" xsi:type="service-check"> + <priority> + <service>HDFS</service> + <service>YARN</service> + </priority> + <exclude> + <service>AMBARI_METRICSS</service> + </exclude> + </group> + + + <group xsi:type="cluster" name="POST_CLUSTER" title="Finalize Upgrade" stage="post"> + <execute-stage title="Confirm Finalize"> + <task xsi:type="manual"> + <message>Please confirm you are ready to finalize</message> + </task> + </execute-stage> + <execute-stage service="HDFS" component="NAMENODE" title="Execute HDFS Finalize"> + <task xsi:type="execute"> + <command>ls</command> + </task> + </execute-stage> + <execute-stage title="Save Cluster State" service="" component=""> + <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.FinalizeUpgradeAction"> + </task> + </execute-stage> + </group> + + </order> + + + <processing> + + <service name="ZOOKEEPER"> + <component name="ZOOKEEPER_SERVER"> + <pre-upgrade> + <task xsi:type="manual"> + <summary>SUMMARY OF PREPARE</summary> + <message>This is a manual task with a placeholder of {{foo/bar}}</message> + </task> + </pre-upgrade> + <upgrade> + <task xsi:type="restart-task" /> + </upgrade> + <post-upgrade> + <task xsi:type="configure" id="hdp_2_2_0_zk_post_upgrade"/> + </post-upgrade> + </component> + </service> + <service name="HDFS"> + <component name="NAMENODE"> + <pre-upgrade> + <task xsi:type="execute" hosts="master"> + <command>su - {hdfs-user} -c 'dosomething'</command> + </task> + <task xsi:type="configure" id="hdp_2_2_0_nn_pre_upgrade"/> + <task xsi:type="manual"> + <message>Update your database</message> + </task> + </pre-upgrade> + <upgrade> + <task xsi:type="restart-task" /> + </upgrade> + <post-upgrade> + <task xsi:type="execute"> + <command>ls</command> + </task> + </post-upgrade> + </component> + <component name="DATANODE"> + <pre-downgrade /> + <upgrade> + <task xsi:type="restart-task" /> + </upgrade> + <post-downgrade> + <task xsi:type="manual"> + <message>Manual Downgrade</message> + </task> + </post-downgrade> + </component> + </service> + <service name="YARN"> + <component name="RESOURCEMANAGER"> + <pre-upgrade> + <task xsi:type="execute"> + <command>ls</command> + </task> + </pre-upgrade> + </component> + <component name="NODEMANAGER"> + <pre-upgrade> + <task xsi:type="execute"> + <command>ls</command> + </task> + </pre-upgrade> + </component> + </service> + </processing> +</upgrade> http://git-wip-us.apache.org/repos/asf/ambari/blob/ffb4d3b8/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_skip_failures.xml ---------------------------------------------------------------------- diff --git a/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_skip_failures.xml b/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_skip_failures.xml new file mode 100644 index 0000000..597270e --- /dev/null +++ b/ambari-funtest/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_skip_failures.xml @@ -0,0 +1,74 @@ +<?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. +--> +<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <target>2.2.*</target> + <skip-failures>true</skip-failures> + <skip-service-check-failures>true</skip-service-check-failures> + <prerequisite-checks> + <check>org.apache.ambari.server.checks.HiveMultipleMetastoreCheck</check> + <check>org.apache.ambari.server.checks.MapReduce2JobHistoryStatePreservingCheck</check> + <check>org.apache.ambari.server.checks.SecondaryNamenodeDeletedCheck</check> + <check>org.apache.ambari.server.checks.ServicesMapReduceDistributedCacheCheck</check> + <check>org.apache.ambari.server.checks.ServicesNamenodeHighAvailabilityCheck</check> + <check>org.apache.ambari.server.checks.ServicesNamenodeTruncateCheck</check> + <check>org.apache.ambari.server.checks.ServicesTezDistributedCacheCheck</check> + <check>org.apache.ambari.server.checks.ServicesYarnWorkPreservingCheck</check> + <check>org.apache.ambari.server.checks.YarnRMHighAvailabilityCheck</check> + <check>org.apache.ambari.server.checks.YarnTimelineServerStatePreservingCheck</check> + </prerequisite-checks> + <order> + <group name="ZOOKEEPER" title="Zookeeper"> + <skippable>true</skippable> + <allow-retry>false</allow-retry> + <service name="ZOOKEEPER"> + <component>ZOOKEEPER_SERVER</component> + <component>ZOOKEEPER_CLIENT</component> + </service> + </group> + + <group name="SKIPPABLE_BUT_NOT_AUTO_SKIPPABLE" title="Skippable But Not Auto Skippable"> + <skippable>true</skippable> + <supports-auto-skip-failure>false</supports-auto-skip-failure> + + <allow-retry>false</allow-retry> + <service name="ZOOKEEPER"> + <component>ZOOKEEPER_SERVER</component> + <component>ZOOKEEPER_CLIENT</component> + </service> + </group> + </order> + + <processing> + <service name="ZOOKEEPER"> + <component name="ZOOKEEPER_SERVER"> + <pre-upgrade> + <task xsi:type="manual"> + <summary>SUMMARY OF PREPARE</summary> + <message>This is a manual task with a placeholder of {{foo/bar}}</message> + </task> + </pre-upgrade> + <upgrade> + <task xsi:type="restart-task"/> + </upgrade> + <post-upgrade> + <task xsi:type="configure"/> + </post-upgrade> + </component> + </service> + </processing> +</upgrade> http://git-wip-us.apache.org/repos/asf/ambari/blob/ffb4d3b8/ambari-funtest/src/test/resources/stacks/OTHER/1.0/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-funtest/src/test/resources/stacks/OTHER/1.0/metainfo.xml b/ambari-funtest/src/test/resources/stacks/OTHER/1.0/metainfo.xml new file mode 100644 index 0000000..31716d2 --- /dev/null +++ b/ambari-funtest/src/test/resources/stacks/OTHER/1.0/metainfo.xml @@ -0,0 +1,23 @@ +<?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> +</metainfo> + http://git-wip-us.apache.org/repos/asf/ambari/blob/ffb4d3b8/ambari-funtest/src/test/resources/stacks/OTHER/1.0/repos/hdp.json ---------------------------------------------------------------------- diff --git a/ambari-funtest/src/test/resources/stacks/OTHER/1.0/repos/hdp.json b/ambari-funtest/src/test/resources/stacks/OTHER/1.0/repos/hdp.json new file mode 100644 index 0000000..fc51627 --- /dev/null +++ b/ambari-funtest/src/test/resources/stacks/OTHER/1.0/repos/hdp.json @@ -0,0 +1,10 @@ +{ + "HDP-2.1.1": { + "latest": { + "centos6": "http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.1.1.0-118", + "redhat6": "http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.1.1.0-118", + "oraclelinux6": "http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.1.1.0-118", + "suse11": "http://s3.amazonaws.com/dev.hortonworks.com/HDP/suse11/2.x/BUILDS/2.1.1.0-118/hdp.repo" + } + } +} http://git-wip-us.apache.org/repos/asf/ambari/blob/ffb4d3b8/ambari-funtest/src/test/resources/stacks/OTHER/1.0/repos/repoinfo.xml ---------------------------------------------------------------------- diff --git a/ambari-funtest/src/test/resources/stacks/OTHER/1.0/repos/repoinfo.xml b/ambari-funtest/src/test/resources/stacks/OTHER/1.0/repos/repoinfo.xml new file mode 100644 index 0000000..9d8a232 --- /dev/null +++ b/ambari-funtest/src/test/resources/stacks/OTHER/1.0/repos/repoinfo.xml @@ -0,0 +1,62 @@ +<?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> + <latest>./hdp.json</latest> + <os family="centos6"> + <repo> + <baseurl>http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.0.6.0</baseurl> + <repoid>HDP-2.1.1</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.1.1</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.1.1</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.1.1</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.1.1</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.1.1</repoid> + <reponame>HDP</reponame> + </repo> + </os> +</reposinfo> http://git-wip-us.apache.org/repos/asf/ambari/blob/ffb4d3b8/ambari-funtest/src/test/resources/stacks/OTHER/1.0/role_command_order.json ---------------------------------------------------------------------- diff --git a/ambari-funtest/src/test/resources/stacks/OTHER/1.0/role_command_order.json b/ambari-funtest/src/test/resources/stacks/OTHER/1.0/role_command_order.json new file mode 100644 index 0000000..1404ef6 --- /dev/null +++ b/ambari-funtest/src/test/resources/stacks/OTHER/1.0/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"], + "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/ffb4d3b8/ambari-funtest/src/test/resources/stacks/OTHER/1.0/services/HDFS/configuration/hdfs-site.xml ---------------------------------------------------------------------- diff --git a/ambari-funtest/src/test/resources/stacks/OTHER/1.0/services/HDFS/configuration/hdfs-site.xml b/ambari-funtest/src/test/resources/stacks/OTHER/1.0/services/HDFS/configuration/hdfs-site.xml new file mode 100644 index 0000000..c40fbd0 --- /dev/null +++ b/ambari-funtest/src/test/resources/stacks/OTHER/1.0/services/HDFS/configuration/hdfs-site.xml @@ -0,0 +1,45 @@ +<?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>dfs.name.dir</name> + <value></value> + <description>Determines where on the local filesystem the DFS name node + should store the name table.</description> + <final>true</final> + </property> + + <property> + <name>dfs.support.append</name> + <value>true</value> + <description>to enable dfs append</description> + <final>true</final> + <deletable>false</deletable> + </property> + + <property> + <name>dfs.webhdfs.enabled</name> + <value>true</value> + <description>to enable webhdfs</description> + </property> + +</configuration> http://git-wip-us.apache.org/repos/asf/ambari/blob/ffb4d3b8/ambari-funtest/src/test/resources/stacks/OTHER/1.0/services/HDFS/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-funtest/src/test/resources/stacks/OTHER/1.0/services/HDFS/metainfo.xml b/ambari-funtest/src/test/resources/stacks/OTHER/1.0/services/HDFS/metainfo.xml new file mode 100644 index 0000000..d3bef74 --- /dev/null +++ b/ambari-funtest/src/test/resources/stacks/OTHER/1.0/services/HDFS/metainfo.xml @@ -0,0 +1,146 @@ +<?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>HDFS</name> + <comment>Apache Hadoop Distributed File System</comment> + <version>2.1.0.2.0.6.0</version> + + <components> + <component> + <name>NAMENODE</name> + <category>MASTER</category> + <commandScript> + <script>scripts/namenode.py</script> + <scriptType>PYTHON</scriptType> + <timeout>600</timeout> + </commandScript> + <customCommands> + <customCommand> + <name>DECOMMISSION</name> + <commandScript> + <script>scripts/namenode_dec_overr.py</script> + <scriptType>PYTHON</scriptType> + <timeout>600</timeout> + </commandScript> + </customCommand> + <customCommand> + <name>YET_ANOTHER_CHILD_COMMAND</name> + <commandScript> + <script>scripts/yet_another_child_command.py</script> + <scriptType>PYTHON</scriptType> + <timeout>600</timeout> + </commandScript> + </customCommand> + </customCommands> + </component> + + <component> + <name>DATANODE</name> + <category>SLAVE</category> + <commandScript> + <script>scripts/datanode.py</script> + <scriptType>PYTHON</scriptType> + <timeout>600</timeout> + </commandScript> + </component> + + <component> + <name>SECONDARY_NAMENODE</name> + <category>MASTER</category> + <commandScript> + <script>scripts/snamenode.py</script> + <scriptType>PYTHON</scriptType> + <timeout>600</timeout> + </commandScript> + </component> + + <component> + <name>HDFS_CLIENT</name> + <category>CLIENT</category> + <commandScript> + <script>scripts/hdfs_client_overridden.py</script> + <scriptType>PYTHON</scriptType> + <timeout>600</timeout> + </commandScript> + </component> + + <component> + <name>JOURNALNODE</name> + <category>MASTER</category> + <commandScript> + <script>scripts/journalnode.py</script> + <scriptType>PYTHON</scriptType> + <timeout>600</timeout> + </commandScript> + </component> + + <component> + <name>ZKFC</name> + <category>SLAVE</category> + <commandScript> + <script>scripts/zkfc_slave.py</script> + <scriptType>PYTHON</scriptType> + <timeout>600</timeout> + </commandScript> + </component> + </components> + + <osSpecifics> + <osSpecific> + <osFamily>any</osFamily> + <packages> + <package> + <name>child-package-def</name> + </package> + </packages> + </osSpecific> + </osSpecifics> + + <commandScript> + <script>scripts/service_check_2.py</script> + <scriptType>PYTHON</scriptType> + <timeout>300</timeout> + </commandScript> + + <customCommands> + <customCommand> + <name>RESTART</name> + <commandScript> + <script>scripts/restart_child.py</script> + <scriptType>PYTHON</scriptType> + <timeout>600</timeout> + </commandScript> + </customCommand> + <customCommand> + <name>YET_ANOTHER_CHILD_SRV_COMMAND</name> + <commandScript> + <script>scripts/yet_another_child_srv_command.py</script> + <scriptType>PYTHON</scriptType> + <timeout>600</timeout> + </commandScript> + </customCommand> + </customCommands> + + <configuration-dependencies> + </configuration-dependencies> + </service> + </services> +</metainfo>
