Repository: ambari Updated Branches: refs/heads/trunk 23905571a -> 08ca96e32
http://git-wip-us.apache.org/repos/asf/ambari/blob/08ca96e3/ambari-server/src/main/resources/stacks/PERF/1.0/services/YARN/themes/theme.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/PERF/1.0/services/YARN/themes/theme.json b/ambari-server/src/main/resources/stacks/PERF/1.0/services/YARN/themes/theme.json new file mode 100644 index 0000000..758cf0c --- /dev/null +++ b/ambari-server/src/main/resources/stacks/PERF/1.0/services/YARN/themes/theme.json @@ -0,0 +1,250 @@ +{ + "name": "default", + "description": "Default theme for YARN service", + "configuration": { + "layouts": [ + { + "name": "default", + "tabs": [ + { + "name": "settings", + "display-name": "Settings", + "layout": { + "tab-columns": "3", + "tab-rows": "2", + "sections": [ + { + "name": "section-nm-sizing", + "display-name": "Memory", + "row-index": "0", + "column-index": "0", + "row-span": "1", + "column-span": "2", + "section-columns": "2", + "section-rows": "1", + "subsections": [ + { + "name": "subsection-nm-sizing-col1", + "display-name": "Node", + "row-index": "0", + "column-index": "0", + "row-span": "1", + "column-span": "1" + }, + { + "name": "subsection-nm-sizing-col2", + "display-name": "Container", + "row-index": "0", + "column-index": "1", + "row-span": "1", + "column-span": "1" + } + ] + }, + { + "name": "section-yarn-platform-features", + "display-name": "YARN Features", + "row-index": "0", + "column-index": "2", + "row-span": "1", + "column-span": "1", + "section-columns": "1", + "section-rows": "1", + "subsections": [ + { + "name": "subsection-yarn-platform-features-col1", + "row-index": "0", + "column-index": "0", + "row-span": "1", + "column-span": "1" + } + ] + }, + { + "name": "section-container-sizing", + "display-name": "CPU", + "row-index": "1", + "column-index": "0", + "row-span": "1", + "column-span": "2", + "section-columns": "2", + "section-rows": "1", + "subsections": [ + { + "name": "subsection-container-sizing-col1", + "display-name": "Node", + "row-index": "0", + "column-index": "0", + "row-span": "1", + "column-span": "1" + }, + { + "name": "subsection-container-sizing-col2", + "display-name": "Container", + "row-index": "0", + "column-index": "1", + "row-span": "1", + "column-span": "1" + } + ] + } + ] + } + } + ] + } + ], + "placement": { + "configuration-layout": "default", + "configs": [ + { + "config": "yarn-site/yarn.nodemanager.resource.memory-mb", + "subsection-name": "subsection-nm-sizing-col1" + }, + { + "config": "yarn-site/yarn.scheduler.minimum-allocation-mb", + "subsection-name": "subsection-nm-sizing-col2" + }, + { + "config": "yarn-site/yarn.scheduler.maximum-allocation-mb", + "subsection-name": "subsection-nm-sizing-col2" + }, + { + "config": "yarn-site/yarn.node-labels.enabled", + "subsection-name": "subsection-yarn-platform-features-col1" + }, + { + "config": "yarn-site/yarn.resourcemanager.scheduler.monitor.enable", + "subsection-name": "subsection-yarn-platform-features-col1" + }, + { + "config": "capacity-scheduler/yarn.scheduler.capacity.resource-calculator", + "subsection-name": "subsection-container-sizing-col1" + }, + { + "config": "yarn-env/yarn_cgroups_enabled", + "subsection-name": "subsection-container-sizing-col1" + }, + { + "config": "yarn-site/yarn.nodemanager.resource.percentage-physical-cpu-limit", + "subsection-name": "subsection-container-sizing-col1" + }, + { + "config": "yarn-site/yarn.nodemanager.resource.cpu-vcores", + "subsection-name": "subsection-container-sizing-col1" + }, + { + "config": "yarn-site/yarn.scheduler.minimum-allocation-vcores", + "subsection-name": "subsection-container-sizing-col2" + }, + { + "config": "yarn-site/yarn.scheduler.maximum-allocation-vcores", + "subsection-name": "subsection-container-sizing-col2" + } + ] + }, + "widgets": [ + { + "config": "yarn-site/yarn.nodemanager.resource.memory-mb", + "widget": { + "type": "slider", + "units": [ + { + "unit-name": "MB" + } + ] + } + }, + { + "config": "yarn-site/yarn.nodemanager.resource.percentage-physical-cpu-limit", + "widget": { + "type": "slider", + "units": [ + { + "unit-name": "percent" + } + ] + } + }, + { + "config": "yarn-site/yarn.nodemanager.resource.cpu-vcores", + "widget": { + "type": "slider", + "units": [ + { + "unit-name": "int" + } + ] + } + }, + { + "config": "yarn-site/yarn.scheduler.minimum-allocation-mb", + "widget": { + "type": "slider", + "units": [ + { + "unit-name": "MB" + } + ] + } + }, + { + "config": "yarn-site/yarn.scheduler.maximum-allocation-mb", + "widget": { + "type": "slider", + "units": [ + { + "unit-name": "MB" + } + ] + } + }, + { + "config": "yarn-site/yarn.scheduler.minimum-allocation-vcores", + "widget": { + "type": "slider", + "units": [ + { + "unit-name": "int" + } + ] + } + }, + { + "config": "yarn-site/yarn.scheduler.maximum-allocation-vcores", + "widget": { + "type": "slider", + "units": [ + { + "unit-name": "int" + } + ] + } + }, + { + "config": "yarn-site/yarn.node-labels.enabled", + "widget": { + "type": "toggle" + } + }, + { + "config": "yarn-env/yarn_cgroups_enabled", + "widget": { + "type": "toggle" + } + }, + { + "config": "yarn-site/yarn.resourcemanager.scheduler.monitor.enable", + "widget": { + "type": "toggle" + } + }, + { + "config": "capacity-scheduler/yarn.scheduler.capacity.resource-calculator", + "widget": { + "type": "toggle" + } + } + ] + } +} http://git-wip-us.apache.org/repos/asf/ambari/blob/08ca96e3/ambari-server/src/main/resources/stacks/PERF/1.0/services/ZOOKEEPER/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/PERF/1.0/services/ZOOKEEPER/metainfo.xml b/ambari-server/src/main/resources/stacks/PERF/1.0/services/ZOOKEEPER/metainfo.xml new file mode 100644 index 0000000..62ea041 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/PERF/1.0/services/ZOOKEEPER/metainfo.xml @@ -0,0 +1,50 @@ +<?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> + <version>3.4.6.2.3</version> + <extends>common-services/ZOOKEEPER/3.4.6</extends> + + <!-- Overwrite the commandScript for each of the components. --> + <components> + <component> + <name>ZOOKEEPER_SERVER</name> + <commandScript> + <script>scripts/zookeeper_server.py</script> + <scriptType>PYTHON</scriptType> + <timeout>1200</timeout> + </commandScript> + </component> + + <component> + <name>ZOOKEEPER_CLIENT</name> + <commandScript> + <script>scripts/zookeeper_client.py</script> + <scriptType>PYTHON</scriptType> + </commandScript> + </component> + </components> + + <!-- No packages to install. --> + <osSpecifics></osSpecifics> + </service> + </services> +</metainfo> http://git-wip-us.apache.org/repos/asf/ambari/blob/08ca96e3/ambari-server/src/main/resources/stacks/PERF/1.0/services/ZOOKEEPER/package/scripts/service_check.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/PERF/1.0/services/ZOOKEEPER/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/PERF/1.0/services/ZOOKEEPER/package/scripts/service_check.py new file mode 100644 index 0000000..270b082 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/PERF/1.0/services/ZOOKEEPER/package/scripts/service_check.py @@ -0,0 +1,30 @@ +""" +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 + +""" + +from resource_management.libraries.script.script import Script + +class ServiceCheck(Script): + + def service_check(self, env): + print "Service Check" + +if __name__ == "__main__": + ServiceCheck().execute() http://git-wip-us.apache.org/repos/asf/ambari/blob/08ca96e3/ambari-server/src/main/resources/stacks/PERF/1.0/services/ZOOKEEPER/package/scripts/zookeeper_client.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/PERF/1.0/services/ZOOKEEPER/package/scripts/zookeeper_client.py b/ambari-server/src/main/resources/stacks/PERF/1.0/services/ZOOKEEPER/package/scripts/zookeeper_client.py new file mode 100644 index 0000000..25b2409 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/PERF/1.0/services/ZOOKEEPER/package/scripts/zookeeper_client.py @@ -0,0 +1,38 @@ +""" +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 + +""" + +# Python Imports + +# Local Imports +from resource_management.libraries.script.dummy import Dummy + + +class ZookeeperClient(Dummy): + """ + Dummy script that simulates a master component. + """ + + def __init__(self): + super(ZookeeperClient, self).__init__() + self.component_name = "ZOOKEEPER_CLIENT" + +if __name__ == "__main__": + ZookeeperClient().execute() http://git-wip-us.apache.org/repos/asf/ambari/blob/08ca96e3/ambari-server/src/main/resources/stacks/PERF/1.0/services/ZOOKEEPER/package/scripts/zookeeper_server.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/PERF/1.0/services/ZOOKEEPER/package/scripts/zookeeper_server.py b/ambari-server/src/main/resources/stacks/PERF/1.0/services/ZOOKEEPER/package/scripts/zookeeper_server.py new file mode 100644 index 0000000..92519ba --- /dev/null +++ b/ambari-server/src/main/resources/stacks/PERF/1.0/services/ZOOKEEPER/package/scripts/zookeeper_server.py @@ -0,0 +1,38 @@ +""" +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 + +""" + +# Python Imports + +# Local Imports +from resource_management.libraries.script.dummy import Dummy + + +class ZookeeperServer(Dummy): + """ + Dummy script that simulates a master component. + """ + + def __init__(self): + super(ZookeeperServer, self).__init__() + self.component_name = "ZOOKEEPER_SERVER" + +if __name__ == "__main__": + ZookeeperServer().execute()
