[9/9] ambari git commit: AMBARI-16250: Create STORM service versions in common-services (jluniya)
AMBARI-16250: Create STORM service versions in common-services (jluniya) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8e5eeb4d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8e5eeb4d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8e5eeb4d Branch: refs/heads/trunk Commit: 8e5eeb4dea099249d616a243d96f6cb2ffcf01c8 Parents: 988 Author: Jayush Luniya Authored: Thu May 5 23:51:52 2016 -0700 Committer: Jayush Luniya Committed: Thu May 5 23:51:52 2016 -0700 -- .../ambari/server/stack/ServiceModule.java | 24 +- .../apache/ambari/server/stack/StackModule.java |4 +- .../0.10.0/configuration/ranger-storm-audit.xml | 178 +++ .../ranger-storm-plugin-properties.xml | 148 +++ .../ranger-storm-policymgr-ssl.xml | 67 ++ .../configuration/ranger-storm-security.xml | 59 + .../configuration/storm-cluster-log4j.xml | 113 ++ .../STORM/0.10.0/configuration/storm-env.xml| 55 + .../STORM/0.10.0/configuration/storm-site.xml | 60 + .../0.10.0/configuration/storm-worker-log4j.xml | 114 ++ .../common-services/STORM/0.10.0/metainfo.xml | 57 + .../common-services/STORM/0.10.0/metrics.json | 1088 ++ .../common-services/STORM/0.10.0/widgets.json | 127 ++ .../common-services/STORM/0.9.1.2.1/alerts.json | 194 .../STORM/0.9.1.2.1/configuration/storm-env.xml | 139 --- .../0.9.1.2.1/configuration/storm-site.xml | 740 .../STORM/0.9.1.2.1/kerberos.json | 120 -- .../STORM/0.9.1.2.1/metainfo.xml| 181 --- .../STORM/0.9.1.2.1/metrics.json| 829 - .../alerts/check_supervisor_process_win.py | 50 - .../STORM/0.9.1.2.1/package/files/wordCount.jar | Bin 690588 -> 0 bytes .../0.9.1.2.1/package/scripts/drpc_server.py| 139 --- .../STORM/0.9.1.2.1/package/scripts/nimbus.py | 157 --- .../0.9.1.2.1/package/scripts/nimbus_prod.py| 81 -- .../0.9.1.2.1/package/scripts/pacemaker.py | 138 --- .../STORM/0.9.1.2.1/package/scripts/params.py | 29 - .../0.9.1.2.1/package/scripts/params_linux.py | 351 -- .../0.9.1.2.1/package/scripts/params_windows.py | 60 - .../STORM/0.9.1.2.1/package/scripts/rest_api.py | 81 -- .../STORM/0.9.1.2.1/package/scripts/service.py | 97 -- .../0.9.1.2.1/package/scripts/service_check.py | 79 -- .../package/scripts/setup_atlas_storm.py| 45 - .../package/scripts/setup_ranger_storm.py | 101 -- .../0.9.1.2.1/package/scripts/status_params.py | 83 -- .../STORM/0.9.1.2.1/package/scripts/storm.py| 162 --- .../0.9.1.2.1/package/scripts/storm_upgrade.py | 177 --- .../package/scripts/storm_yaml_utils.py | 53 - .../0.9.1.2.1/package/scripts/supervisor.py | 113 -- .../package/scripts/supervisor_prod.py | 84 -- .../package/scripts/supervisord_service.py | 33 - .../0.9.1.2.1/package/scripts/ui_server.py | 180 --- .../package/templates/client_jaas.conf.j2 | 24 - .../0.9.1.2.1/package/templates/config.yaml.j2 | 68 -- .../templates/storm-metrics2.properties.j2 | 26 - .../0.9.1.2.1/package/templates/storm.conf.j2 | 35 - .../package/templates/storm_jaas.conf.j2| 57 - .../package/templates/worker-launcher.cfg.j2| 19 - .../STORM/0.9.1.2.1/quicklinks/quicklinks.json | 28 - .../common-services/STORM/0.9.1/alerts.json | 194 .../STORM/0.9.1/configuration/storm-env.xml | 139 +++ .../STORM/0.9.1/configuration/storm-site.xml| 740 .../common-services/STORM/0.9.1/kerberos.json | 120 ++ .../common-services/STORM/0.9.1/metainfo.xml| 181 +++ .../common-services/STORM/0.9.1/metrics.json| 829 + .../alerts/check_supervisor_process_win.py | 50 + .../STORM/0.9.1/package/files/wordCount.jar | Bin 0 -> 690588 bytes .../STORM/0.9.1/package/scripts/drpc_server.py | 139 +++ .../STORM/0.9.1/package/scripts/nimbus.py | 157 +++ .../STORM/0.9.1/package/scripts/nimbus_prod.py | 81 ++ .../STORM/0.9.1/package/scripts/pacemaker.py| 138 +++ .../STORM/0.9.1/package/scripts/params.py | 29 + .../STORM/0.9.1/package/scripts/params_linux.py | 351 ++ .../0.9.1/package/scripts/params_windows.py | 60 + .../STORM/0.9.1/package/scripts/rest_api.py | 81 ++ .../STORM/0.9.1/package/scripts/service.py | 97 ++ .../0.9.1/package/scripts/service_check.py | 79 ++ .../0.9.1/package/scripts/setup_atlas_storm.py | 45 + .../0.9.1/package/scripts/setup_ranger_storm.py | 101 ++ .../0.9.1/package/scripts/status_params.py | 83 ++ .../STORM/0.9.1/package/scripts/storm.py| 162 +++ .../0.9.1/package/scripts/storm_upgrade.py | 177 +++ .../0.9.1/package/scripts/storm_yaml_utils.py | 53 + .../STORM/0.9.1/package
[1/9] ambari git commit: AMBARI-16250: Create STORM service versions in common-services (jluniya)
Repository: ambari Updated Branches: refs/heads/trunk 9884e -> 8e5eeb4de http://git-wip-us.apache.org/repos/asf/ambari/blob/8e5eeb4d/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/metrics.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/metrics.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/metrics.json deleted file mode 100644 index 3d0fdd3..000 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/metrics.json +++ /dev/null @@ -1,1088 +0,0 @@ -{ - "STORM_UI_SERVER": { -"Component": [ - { -"type": "org.apache.ambari.server.controller.metrics.RestMetricsPropertyProvider", -"properties": { - "default_port": "8744", - "port_config_type": "storm-site", - "port_property_name": "storm.port", - "protocol": "http" -}, -"metrics": { - "default": { -"metrics/api/v1/cluster/summary/tasksTotal": { - "metric": "/api/v1/cluster/summary##tasksTotal", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/topology/summary": { - "metric": "/api/v1/topology/summary?field=topologies##topologies", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/slotsTotal": { - "metric": "/api/v1/cluster/summary##slotsTotal", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/slotsFree": { - "metric": "/api/v1/cluster/summary##slotsFree", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/supervisors": { - "metric": "/api/v1/cluster/summary##supervisors", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/executorsTotal": { - "metric": "/api/v1/cluster/summary##executorsTotal", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/slotsUsed": { - "metric": "/api/v1/cluster/summary##slotsUsed", - "pointInTime": true, - "temporal": false -}, - "metrics/api/v1/nimbus/summary": { - "metric": "/api/v1/nimbus/summary?field=nimbuses##nimbuses", - "pointInTime": true, - "temporal": false - } - - } -} - } -], -"HostComponent": [ - { -"type": "org.apache.ambari.server.controller.metrics.RestMetricsPropertyProvider", -"properties": { - "default_port": "8744", - "port_config_type": "storm-site", - "port_property_name": "storm.port", - "protocol": "http" -}, -"metrics": { - "default": { -"metrics/api/v1/cluster/summary/tasksTotal": { - "metric": "/api/v1/cluster/summary##tasksTotal", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/topology/summary": { - "metric": "/api/v1/topology/summary?field=topologies##topologies", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/slotsTotal": { - "metric": "/api/v1/cluster/summary##slotsTotal", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/slotsFree": { - "metric": "/api/v1/cluster/summary##slotsFree", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/supervisors": { - "metric": "/api/v1/cluster/summary##supervisors", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/executorsTotal": { - "metric": "/api/v1/cluster/summary##executorsTotal", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/slotsUsed": { - "metric": "/api/v1/cluster/summary##slotsUsed", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/nimbusUptime": { - "metric": "/api/v1/cluster/summary##nimbusUptime", - "pointInTime": true, - "temporal": false -} - } -} - } -] - }, - "NIMBUS": { -"Component": [ - { -"type": "ganglia", -"metrics": { - "default": { -"metrics/boottime": { -
[7/9] ambari git commit: AMBARI-16250: Create STORM service versions in common-services (jluniya)
http://git-wip-us.apache.org/repos/asf/ambari/blob/8e5eeb4d/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/alerts/check_supervisor_process_win.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/alerts/check_supervisor_process_win.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/alerts/check_supervisor_process_win.py deleted file mode 100644 index a698415..000 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/alerts/check_supervisor_process_win.py +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env python - -""" -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. -""" - -from resource_management.libraries.functions import check_windows_service_status - - -RESULT_CODE_OK = 'OK' -RESULT_CODE_CRITICAL = 'CRITICAL' -RESULT_CODE_UNKNOWN = 'UNKNOWN' - - -def get_tokens(): - """ - Returns a tuple of tokens in the format {{site/property}} that will be used - to build the dictionary passed into execute - """ - return () - -def execute(configurations={}, parameters={}, host_name=None): - """ - Returns a tuple containing the result code and a pre-formatted result label - - Keyword arguments: - configurations (dictionary): a mapping of configuration key to value - parameters (dictionary): a mapping of script parameter key to value - host_name (string): the name of this host where the alert is running - """ - - try: -check_windows_service_status("supervisor") -return (RESULT_CODE_OK, ["Supervisor is running"]) - except: -return (RESULT_CODE_CRITICAL, ["Supervisor is stopped"]) http://git-wip-us.apache.org/repos/asf/ambari/blob/8e5eeb4d/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/files/wordCount.jar -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/files/wordCount.jar b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/files/wordCount.jar deleted file mode 100644 index aed64be..000 Binary files a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/files/wordCount.jar and /dev/null differ http://git-wip-us.apache.org/repos/asf/ambari/blob/8e5eeb4d/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/drpc_server.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/drpc_server.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/drpc_server.py deleted file mode 100644 index b156578..000 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/drpc_server.py +++ /dev/null @@ -1,139 +0,0 @@ -#!/usr/bin/env python -""" -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. - -""" - -import sys -from resource_management.libraries.functions import check_process_status -from resource_management.libraries.script import Script -from resource_management.libraries.functions import conf_select -from resource_management.libraries.functions import stack_select -from resource_management.libraries.functions import format -from resource_management.core.resources.system import Execute -from resource_management.libraries.functions.stack_features import check_stack_feature -from resource_management.libraries.functions
[6/9] ambari git commit: AMBARI-16250: Create STORM service versions in common-services (jluniya)
http://git-wip-us.apache.org/repos/asf/ambari/blob/8e5eeb4d/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/storm_upgrade.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/storm_upgrade.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/storm_upgrade.py deleted file mode 100644 index bc245c4..000 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/storm_upgrade.py +++ /dev/null @@ -1,177 +0,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. - -""" -import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set. -import os - -from ambari_commons import yaml_utils -from resource_management.core.logger import Logger -from resource_management.core.exceptions import Fail -from resource_management.core.resources.system import Directory -from resource_management.core.resources.system import File -from resource_management.core.resources.system import Execute -from resource_management.libraries.script.script import Script -from resource_management.libraries.functions.default import default -from resource_management.libraries.functions.format import format - -class StormUpgrade(Script): - """ - Applies to Rolling/Express Upgrade from HDP 2.1 or 2.2 to 2.3 or higher. - - Requirements: Needs to run from a host with ZooKeeper Client. - - This class helps perform some of the upgrade tasks needed for Storm during - a Rolling or Express upgrade. Storm writes data to disk locally and to ZooKeeper. - If any HDP 2.1 or 2.2 bits exist in these directories when an HDP 2.3 instance - starts up, it will fail to start properly. Because the upgrade framework in - Ambari doesn't yet have a mechanism to say "stop all" before starting to - upgrade each component, we need to rely on a Storm trick to bring down - running daemons. By removing the ZooKeeper data with running daemons, those - daemons will die. - """ - - def delete_storm_zookeeper_data(self, env): -""" -Deletes the Storm data from ZooKeeper, effectively bringing down all -Storm daemons. -:return: -""" -import params - -Logger.info('Clearing Storm data from ZooKeeper') - -storm_zookeeper_root_dir = params.storm_zookeeper_root_dir -if storm_zookeeper_root_dir is None: - raise Fail("The storm ZooKeeper directory specified by storm-site/storm.zookeeper.root must be specified") - -# The zookeeper client must be given a zookeeper host to contact. Guaranteed to have at least one host. -storm_zookeeper_server_list = yaml_utils.get_values_from_yaml_array(params.storm_zookeeper_servers) -if storm_zookeeper_server_list is None: - Logger.info("Unable to extract ZooKeeper hosts from '{0}', assuming localhost").format(params.storm_zookeeper_servers) - storm_zookeeper_server_list = ["localhost"] - -# For every zk server, try to remove /storm -zookeeper_data_cleared = False -for storm_zookeeper_server in storm_zookeeper_server_list: - # Determine where the zkCli.sh shell script is - zk_command_location = os.path.join(params.stack_root, "current", "zookeeper-client", "bin", "zkCli.sh") - if params.version is not None: -zk_command_location = os.path.join(params.stack_root, params.version, "zookeeper", "bin", "zkCli.sh") - - # create the ZooKeeper delete command - command = "{0} -server {1}:{2} rmr /storm".format( -zk_command_location, storm_zookeeper_server, params.storm_zookeeper_port) - - # clean out ZK - try: -# the ZK client requires Java to run; ensure it's on the path -env_map = { - 'JAVA_HOME': params.java64_home -} - -# AMBARI-12094: if security is enabled, then we need to tell zookeeper where the -# JAAS file is located since we don't use kinit directly with STORM -if params.security_enabled: - env_map['JVMFLAGS'] = "-Djava.security.auth.login.config={0}".format(params.storm_jaas_file) - -Execute(command, user=params.storm_user, environment=env_map, -
[5/9] ambari git commit: AMBARI-16250: Create STORM service versions in common-services (jluniya)
http://git-wip-us.apache.org/repos/asf/ambari/blob/8e5eeb4d/ambari-server/src/main/resources/common-services/STORM/0.9.1/kerberos.json -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/kerberos.json b/ambari-server/src/main/resources/common-services/STORM/0.9.1/kerberos.json new file mode 100644 index 000..fcfe524 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1/kerberos.json @@ -0,0 +1,120 @@ +{ + "services": [ +{ + "name": "STORM", + "identities": [ +{ + "name": "/spnego" +}, +{ + "name": "/smokeuser" +}, +{ + "name": "storm_components", + "principal": { +"value": "${storm-env/storm_user}-${cluster_name|toLower()}@${realm}", +"type": "user", +"configuration": "storm-env/storm_principal_name" + }, + "keytab": { +"file": "${keytab_dir}/storm.headless.keytab", +"owner": { + "name": "${storm-env/storm_user}", + "access": "r" +}, +"group": { + "name": "${cluster-env/user_group}", + "access": "" +}, +"configuration": "storm-env/storm_keytab" + } +} + ], + "configurations": [ +{ + "storm-site": { +"nimbus.authorizer": "backtype.storm.security.auth.authorizer.SimpleACLAuthorizer", +"drpc.authorizer": "backtype.storm.security.auth.authorizer.DRPCSimpleACLAuthorizer", +"ui.filter": "org.apache.hadoop.security.authentication.server.AuthenticationFilter", +"storm.principal.tolocal": "backtype.storm.security.auth.KerberosPrincipalToLocal", +"supervisor.enable": "true", +"storm.zookeeper.superACL": "sasl:{{storm_bare_jaas_principal}}", +"java.security.auth.login.config": "{{conf_dir}}/storm_jaas.conf", +"nimbus.admins": "['{{storm_bare_jaas_principal}}']", +"nimbus.supervisor.users": "['{{storm_bare_jaas_principal}}']", +"ui.filter.params": "{'type': 'kerberos', 'kerberos.principal': '{{storm_ui_jaas_principal}}', 'kerberos.keytab': '{{storm_ui_keytab_path}}', 'kerberos.name.rules': 'DEFAULT'}" + } +} + ], + "components": [ +{ + "name": "STORM_UI_SERVER", + "identities": [ +{ + "name": "/spnego", + "principal": { +"configuration": "storm-env/storm_ui_principal_name" + }, + "keytab": { +"configuration": "storm-env/storm_ui_keytab" + } +} + ] +}, +{ + "name": "NIMBUS", + "identities": [ +{ + "name": "nimbus_server", + "principal": { +"value": "nimbus/_HOST@${realm}", +"type": "service", +"configuration": "storm-env/nimbus_principal_name" + }, + "keytab": { +"file": "${keytab_dir}/nimbus.service.keytab", +"owner": { + "name": "${storm-env/storm_user}", + "access": "r" +}, +"group": { + "name": "${cluster-env/user_group}", + "access": "" +}, +"configuration": "storm-env/nimbus_keytab" + } +} + ] +}, +{ + "name": "DRPC_SERVER", + "identities": [ +{ + "name": "nimbus_server", + "principal": { +"value": "nimbus/_HOST@${realm}", +"type": "service", +"configuration": "storm-env/nimbus_principal_name" + }, + "keytab": { +"file": "${keytab_dir}/nimbus.service.keytab", +"owner": { + "name": "${storm-env/storm_user}", + "access": "r" +}, +"group": { + "name": "${cluster-env/user_group}", + "access": "" +}, +"configuration": "storm-env/nimbus_keytab" + } +} + ] +}, +{ + "name" : "SUPERVISOR" +} + ] +} + ] +} http://git-wip-us.apache.org/repos/asf/ambari/blob/8e5eeb4d/ambari-server/src/main/resources/common-services/STORM/0.9.1/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/metainfo.xml b/ambari-server/src/main/resources/common-services/STORM/0.9.1/metainfo.xml new file mode 100644 index 000..0f4d520 --- /dev/null +++ b/ambari-server/src/main/resources/common
[2/9] ambari git commit: AMBARI-16250: Create STORM service versions in common-services (jluniya)
http://git-wip-us.apache.org/repos/asf/ambari/blob/8e5eeb4d/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/metrics.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/metrics.json b/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/metrics.json deleted file mode 100644 index 2b46faf..000 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/metrics.json +++ /dev/null @@ -1,1087 +0,0 @@ -{ - "STORM_UI_SERVER": { -"Component": [ - { -"type": "org.apache.ambari.server.controller.metrics.RestMetricsPropertyProvider", -"properties": { - "default_port": "8744", - "port_config_type": "storm-site", - "port_property_name": "storm.port", - "protocol": "http" -}, -"metrics": { - "default": { -"metrics/api/v1/cluster/summary/tasksTotal": { - "metric": "/api/v1/cluster/summary##tasksTotal", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/topology/summary": { - "metric": "/api/v1/topology/summary?field=topologies##topologies", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/slotsTotal": { - "metric": "/api/v1/cluster/summary##slotsTotal", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/slotsFree": { - "metric": "/api/v1/cluster/summary##slotsFree", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/supervisors": { - "metric": "/api/v1/cluster/summary##supervisors", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/executorsTotal": { - "metric": "/api/v1/cluster/summary##executorsTotal", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/slotsUsed": { - "metric": "/api/v1/cluster/summary##slotsUsed", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/nimbusUptime": { - "metric": "/api/v1/cluster/summary##nimbusUptime", - "pointInTime": true, - "temporal": false -} - } -} - } -], -"HostComponent": [ - { -"type": "org.apache.ambari.server.controller.metrics.RestMetricsPropertyProvider", -"properties": { - "default_port": "8744", - "port_config_type": "storm-site", - "port_property_name": "storm.port", - "protocol": "http" -}, -"metrics": { - "default": { -"metrics/api/v1/cluster/summary/tasksTotal": { - "metric": "/api/v1/cluster/summary##tasksTotal", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/topology/summary": { - "metric": "/api/v1/topology/summary?field=topologies##topologies", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/slotsTotal": { - "metric": "/api/v1/cluster/summary##slotsTotal", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/slotsFree": { - "metric": "/api/v1/cluster/summary##slotsFree", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/supervisors": { - "metric": "/api/v1/cluster/summary##supervisors", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/executorsTotal": { - "metric": "/api/v1/cluster/summary##executorsTotal", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/slotsUsed": { - "metric": "/api/v1/cluster/summary##slotsUsed", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/nimbusUptime": { - "metric": "/api/v1/cluster/summary##nimbusUptime", - "pointInTime": true, - "temporal": false -} - } -} - } -] - }, - "NIMBUS": { -"Component": [ - { -"type": "ganglia", -"metrics": { - "default": { -"metrics/boottime": { - "metric": "boottime", - "pointInTime": true, -
[4/9] ambari git commit: AMBARI-16250: Create STORM service versions in common-services (jluniya)
http://git-wip-us.apache.org/repos/asf/ambari/blob/8e5eeb4d/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_windows.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_windows.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_windows.py new file mode 100644 index 000..88e6246 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_windows.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python +""" +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. + +""" + +from resource_management import * +from status_params import * +from resource_management.libraries.functions.default import default + +# server configurations +config = Script.get_config() + +stack_is_hdp23_or_further = Script.is_stack_greater_or_equal("2.3") + +stack_root = os.path.abspath(os.path.join(os.environ["HADOOP_HOME"],"..")) +conf_dir = os.environ["STORM_CONF_DIR"] +hadoop_user = config["configurations"]["cluster-env"]["hadoop.user.name"] +storm_user = hadoop_user + +security_enabled = config['configurations']['cluster-env']['security_enabled'] +default_topology_max_replication_wait_time_sec = default('/configurations/storm-site/topology.max.replication.wait.time.sec.default', -1) +nimbus_hosts = default("/clusterHostInfo/nimbus_hosts", []) +default_topology_min_replication_count = default('/configurations/storm-site/topology.min.replication.count.default', 1) + +#Calculate topology.max.replication.wait.time.sec and topology.min.replication.count +if len(nimbus_hosts) > 1: + # for HA Nimbus + actual_topology_max_replication_wait_time_sec = -1 + actual_topology_min_replication_count = len(nimbus_hosts) / 2 + 1 +else: + # for non-HA Nimbus + actual_topology_max_replication_wait_time_sec = default_topology_max_replication_wait_time_sec + actual_topology_min_replication_count = default_topology_min_replication_count + +if stack_is_hdp23_or_further: + if security_enabled: +storm_thrift_transport = config['configurations']['storm-site']['_storm.thrift.secure.transport'] + else: +storm_thrift_transport = config['configurations']['storm-site']['_storm.thrift.nonsecure.transport'] + +service_map = { + "nimbus" : nimbus_win_service_name, + "supervisor" : supervisor_win_service_name, + "ui" : ui_win_service_name +} http://git-wip-us.apache.org/repos/asf/ambari/blob/8e5eeb4d/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/rest_api.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/rest_api.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/rest_api.py new file mode 100644 index 000..26fdb27 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/rest_api.py @@ -0,0 +1,81 @@ +#!/usr/bin/env python +""" +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. + +""" + +import sys +from resource_management.libraries.functions import check_process_status +from resource_management.libraries.script import Script +from resource_management.libraries.functions import conf_select +from resource_management.libraries.functions import stack_select +from resource_management.libraries.functions import format +from resource_management.core.resources.system import Execute + +from storm
[3/9] ambari git commit: AMBARI-16250: Create STORM service versions in common-services (jluniya)
http://git-wip-us.apache.org/repos/asf/ambari/blob/8e5eeb4d/ambari-server/src/main/resources/common-services/STORM/0.9.3/configuration/storm-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.3/configuration/storm-site.xml b/ambari-server/src/main/resources/common-services/STORM/0.9.3/configuration/storm-site.xml new file mode 100644 index 000..62cd3db --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.3/configuration/storm-site.xml @@ -0,0 +1,123 @@ + + + + + + + +storm.thrift.transport +{{storm_thrift_transport}} +The transport plug-in that used for Thrift client/server communication. + + +_storm.thrift.nonsecure.transport +backtype.storm.security.auth.SimpleTransportPlugin +The transport plug-in that used for non-secure mode for for Thrift client/server communication. + + +_storm.thrift.secure.transport + backtype.storm.security.auth.kerberos.KerberosSaslTransportPlugin +The transport plug-in that used for secure mode for Thrift client/server communication. + + + +java.library.path +/usr/local/lib:/opt/local/lib:/usr/lib +This value is passed to spawned JVMs (e.g., Nimbus, Supervisor, and Workers) + for the java.library.path value. java.library.path tells the JVM where + to look for native libraries. It is necessary to set this config correctly since + Storm uses the ZeroMQ and JZMQ native libs. + + + +nimbus.childopts +-Xmx1024m +This parameter is used by the storm-deploy project to configure the jvm options for the nimbus daemon. + + false + + + + +worker.childopts +-Xmx768m +The jvm opts provided to workers launched by this supervisor. All \"%ID%\" substrings are replaced with an identifier for this worker. + + multiLine + + + + +ui.childopts +-Xmx768m _JAAS_PLACEHOLDER +Childopts for Storm UI Java process. + + + +ui.filter +null +Class for Storm UI authentication + + + +supervisor.childopts +-Xmx256m +This parameter is used by the storm-deploy project to configure the jvm options for the supervisor daemon. + + false + + + + +logviewer.childopts +-Xmx128m _JAAS_PLACEHOLDER +Childopts for log viewer java process. + + + +drpc.childopts +-Xmx768m _JAAS_PLACEHOLDER +Childopts for Storm DRPC Java process. + + + +_storm.min.ruid +null +min.user.id is set to the first real user id on the system. If value is 'null' than default value will be taken from key UID_MIN of /etc/login.defs otherwise the specified value will be used for all hosts. + + + +storm.log.dir +{{log_dir}} +Log directory for Storm. + + + +nimbus.authorizer +Log directory for Storm. + + +ranger-storm-plugin-properties +ranger-storm-plugin-enabled + + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/8e5eeb4d/ambari-server/src/main/resources/common-services/STORM/0.9.3/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.3/metainfo.xml b/ambari-server/src/main/resources/common-services/STORM/0.9.3/metainfo.xml new file mode 100644 index 000..ed4337c --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.3/metainfo.xml @@ -0,0 +1,53 @@ + + + + + 2.0 + + + STORM + Storm + 0.9.3 + common-services/STORM/0.9.1 + + + STORM_REST_API + true + + + + + redhat7,amazon2015,redhat6,suse11,suse12 + + + storm_${stack_version} + + + + + debian7,ubuntu12,ubuntu14 + + + storm-${stack_version} + + + + + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/8e5eeb4d/ambari-server/src/main/resources/common-services/STORM/0.9.3/metrics.json -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.3/metrics.json b/ambari-server/src/main/resources/common-services/STORM/0.9.3/metrics.json new file mode 100644 index 000..2b46faf --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.3/metrics.json @@ -0,0 +1,1087 @@ +{ + "STORM_UI_SERVER": { +"Component": [ + { +"type": "org.apache.ambari.server.controller.metrics.RestMetricsPropertyProvider", +"properties": { + "default_port": "8744", + "port_config_type": "storm-site", + "port_property_name": "storm.port", + "protocol": "http" +}, +"metrics": { + "default": { +
[8/9] ambari git commit: AMBARI-16250: Create STORM service versions in common-services (jluniya)
http://git-wip-us.apache.org/repos/asf/ambari/blob/8e5eeb4d/ambari-server/src/main/resources/common-services/STORM/0.10.0/widgets.json -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.10.0/widgets.json b/ambari-server/src/main/resources/common-services/STORM/0.10.0/widgets.json new file mode 100644 index 000..d22a1ed --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/0.10.0/widgets.json @@ -0,0 +1,127 @@ +{ + "layouts": [ +{ + "layout_name": "default_storm_dashboard", + "display_name": "Standard Storm Dashboard", + "section_name": "STORM_SUMMARY", + "widgetLayoutInfo": [ +{ + "widget_name": "Number of Slots", + "description": "Number of Slots", + "widget_type": "GRAPH", + "is_visible": true, + "metrics": [ +{ + "name": "Used Slots", + "metric_path": "metrics/storm/nimbus/usedslots", + "service_name": "STORM", + "component_name": "NIMBUS" +}, +{ + "name": "Free Slots", + "metric_path": "metrics/storm/nimbus/freeslots", + "service_name": "STORM", + "component_name": "NIMBUS" +}, +{ + "name": "Total Slots", + "metric_path": "metrics/storm/nimbus/totalslots", + "service_name": "STORM", + "component_name": "NIMBUS" +} + ], + "values": [ +{ + "name": "Used slots", + "value": "${Used Slots}" +}, +{ + "name": "Free slots", + "value": "${Free Slots}" +}, +{ + "name": "Total slots", + "value": "${Total Slots}" +} + ], + "properties": { +"graph_type": "LINE", +"time_range": "1" + } +}, +{ + "widget_name": "Number of executors", + "description": "Number of executors", + "widget_type": "GRAPH", + "is_visible": true, + "metrics": [ +{ + "name": "Total Executors", + "metric_path": "metrics/storm/nimbus/totalexecutors", + "service_name": "STORM", + "component_name": "NIMBUS" +} + ], + "values": [ +{ + "name": "Total executors", + "value": "${Total Executors}" +} + ], + "properties": { +"graph_type": "LINE", +"time_range": "1" + } +}, +{ + "widget_name": "Number of topologies", + "description": "Number of topologies", + "widget_type": "GRAPH", + "is_visible": true, + "metrics": [ +{ + "name": "Topologies", + "metric_path": "metrics/storm/nimbus/topologies", + "service_name": "STORM", + "component_name": "NIMBUS" +} + ], + "values": [ +{ + "name": "Total topologies", + "value": "${Topologies}" +} + ], + "properties": { +"graph_type": "LINE", +"time_range": "1" + } +}, +{ + "widget_name": "Number of tasks", + "description": "Number of tasks", + "widget_type": "GRAPH", + "is_visible": true, + "metrics": [ +{ + "name": "Total Tasks", + "metric_path": "metrics/storm/nimbus/totaltasks", + "service_name": "STORM", + "component_name": "NIMBUS" +} + ], + "values": [ +{ + "name": "Total tasks", + "value": "${Total Tasks}" +} + ], + "properties": { +"graph_type": "LINE", +"time_range": "1" + } +} + ] +} + ] +} http://git-wip-us.apache.org/repos/asf/ambari/blob/8e5eeb4d/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/alerts.json -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/alerts.json b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/alerts.json deleted file mode 100644 index ae03617..000 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/alerts.json +++ /dev/null @@ -1,194 +0,0 @@ -{ - "STORM": { -"service": [ - { -"name": "storm_supervisor_process_percent", -"label": "Percent Supervisors Available", -"interval": 1, -"scope": "SERVICE", -"enabled": true, -"source": { - "type": "AGGREGATE", -
[4/4] ambari git commit: AMBARI-16248: Create KAFKA service versions in common-services (jluniya)
AMBARI-16248: Create KAFKA service versions in common-services (jluniya) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9884 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9884 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9884 Branch: refs/heads/trunk Commit: 9884e7f8ee71649c6e2a24eae7f9d64dd1d6 Parents: d216c12 Author: Jayush Luniya Authored: Thu May 5 23:07:05 2016 -0700 Committer: Jayush Luniya Committed: Thu May 5 23:07:05 2016 -0700 -- .../common-services/KAFKA/0.8.1.2.2/alerts.json | 32 -- .../0.8.1.2.2/configuration/kafka-broker.xml| 357 --- .../KAFKA/0.8.1.2.2/configuration/kafka-env.xml | 102 -- .../0.8.1.2.2/configuration/kafka-log4j.xml | 126 --- .../KAFKA/0.8.1.2.2/metainfo.xml| 90 - .../KAFKA/0.8.1.2.2/metrics.json| 264 -- .../KAFKA/0.8.1.2.2/package/scripts/kafka.py| 234 .../0.8.1.2.2/package/scripts/kafka_broker.py | 129 --- .../KAFKA/0.8.1.2.2/package/scripts/params.py | 297 --- .../0.8.1.2.2/package/scripts/service_check.py | 65 .../package/scripts/setup_ranger_kafka.py | 84 - .../0.8.1.2.2/package/scripts/status_params.py | 26 -- .../KAFKA/0.8.1.2.2/package/scripts/upgrade.py | 78 .../KAFKA/0.8.1.2.2/package/scripts/utils.py| 38 -- .../0.8.1.2.2/package/templates/kafka.conf.j2 | 35 -- .../package/templates/kafka_client_jaas.conf.j2 | 29 -- .../package/templates/kafka_jaas.conf.j2| 41 --- .../package/templates/tools-log4j.properties.j2 | 21 -- .../common-services/KAFKA/0.8.1/alerts.json | 32 ++ .../KAFKA/0.8.1/configuration/kafka-broker.xml | 357 +++ .../KAFKA/0.8.1/configuration/kafka-env.xml | 102 ++ .../KAFKA/0.8.1/configuration/kafka-log4j.xml | 126 +++ .../common-services/KAFKA/0.8.1/metainfo.xml| 108 ++ .../common-services/KAFKA/0.8.1/metrics.json| 264 ++ .../KAFKA/0.8.1/package/scripts/kafka.py| 234 .../KAFKA/0.8.1/package/scripts/kafka_broker.py | 129 +++ .../KAFKA/0.8.1/package/scripts/params.py | 297 +++ .../0.8.1/package/scripts/service_check.py | 65 .../0.8.1/package/scripts/setup_ranger_kafka.py | 84 + .../0.8.1/package/scripts/status_params.py | 26 ++ .../KAFKA/0.8.1/package/scripts/upgrade.py | 78 .../KAFKA/0.8.1/package/scripts/utils.py| 38 ++ .../KAFKA/0.8.1/package/templates/kafka.conf.j2 | 35 ++ .../package/templates/kafka_client_jaas.conf.j2 | 29 ++ .../0.8.1/package/templates/kafka_jaas.conf.j2 | 41 +++ .../package/templates/tools-log4j.properties.j2 | 21 ++ .../common-services/KAFKA/0.9.0/alerts.json | 32 ++ .../KAFKA/0.9.0/configuration/kafka-broker.xml | 154 .../KAFKA/0.9.0/configuration/kafka-env.xml | 28 ++ .../0.9.0/configuration/ranger-kafka-audit.xml | 178 + .../ranger-kafka-plugin-properties.xml | 90 + .../ranger-kafka-policymgr-ssl.xml | 67 .../configuration/ranger-kafka-security.xml | 59 +++ .../common-services/KAFKA/0.9.0/kerberos.json | 49 +++ .../common-services/KAFKA/0.9.0/metainfo.xml| 30 ++ .../common-services/KAFKA/0.9.0/metrics.json| 239 + .../common-services/KAFKA/0.9.0/widgets.json| 182 ++ .../stacks/HDP/2.2/services/KAFKA/metainfo.xml | 21 +- .../stacks/HDP/2.3/services/KAFKA/alerts.json | 32 -- .../KAFKA/configuration/kafka-broker.xml| 154 .../services/KAFKA/configuration/kafka-env.xml | 28 -- .../KAFKA/configuration/ranger-kafka-audit.xml | 178 - .../ranger-kafka-plugin-properties.xml | 90 - .../ranger-kafka-policymgr-ssl.xml | 32 -- .../configuration/ranger-kafka-security.xml | 59 --- .../stacks/HDP/2.3/services/KAFKA/kerberos.json | 49 --- .../stacks/HDP/2.3/services/KAFKA/metainfo.xml | 4 +- .../stacks/HDP/2.3/services/KAFKA/metrics.json | 239 - .../stacks/HDP/2.3/services/KAFKA/widgets.json | 182 -- .../stacks/2.2/KAFKA/test_kafka_broker.py | 2 +- 60 files changed, 3178 insertions(+), 3114 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9884/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/alerts.json -- diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/alerts.json b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/alerts.json deleted file mode 100644 index 4c9884c..000 --- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/alerts.json +++ /dev/null @@
[3/4] ambari git commit: AMBARI-16248: Create KAFKA service versions in common-services (jluniya)
http://git-wip-us.apache.org/repos/asf/ambari/blob/9884/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/setup_ranger_kafka.py -- diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/setup_ranger_kafka.py b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/setup_ranger_kafka.py deleted file mode 100644 index 3a3ecfe..000 --- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/setup_ranger_kafka.py +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/env python -""" -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. -""" -from resource_management.core.logger import Logger -from resource_management.core.resources import File, Execute -from resource_management.libraries.functions.format import format - -def setup_ranger_kafka(): - import params - - if params.has_ranger_admin: - -from resource_management.libraries.functions.setup_ranger_plugin_xml import setup_ranger_plugin - -if params.retryAble: - Logger.info("Kafka: Setup ranger: command retry enables thus retrying if ranger admin is down !") -else: - Logger.info("Kafka: Setup ranger: command retry not enabled thus skipping if ranger admin is down !") - -if params.xml_configurations_supported and params.enable_ranger_kafka and params.xa_audit_hdfs_is_enabled: - if params.has_namenode: -params.HdfsResource("/ranger/audit", - type="directory", - action="create_on_execute", - owner=params.hdfs_user, - group=params.hdfs_user, - mode=0755, - recursive_chmod=True -) -params.HdfsResource("/ranger/audit/kafka", - type="directory", - action="create_on_execute", - owner=params.kafka_user, - group=params.kafka_user, - mode=0700, - recursive_chmod=True -) -params.HdfsResource(None, action="execute") - -setup_ranger_plugin('kafka-broker', 'kafka', -params.downloaded_custom_connector, params.driver_curl_source, -params.driver_curl_target, params.java64_home, -params.repo_name, params.kafka_ranger_plugin_repo, -params.ranger_env, params.ranger_plugin_properties, -params.policy_user, params.policymgr_mgr_url, -params.enable_ranger_kafka, conf_dict=params.conf_dir, -component_user=params.kafka_user, component_group=params.user_group, cache_service_list=['kafka'], -plugin_audit_properties=params.ranger_kafka_audit, plugin_audit_attributes=params.ranger_kafka_audit_attrs, - plugin_security_properties=params.ranger_kafka_security, plugin_security_attributes=params.ranger_kafka_security_attrs, - plugin_policymgr_ssl_properties=params.ranger_kafka_policymgr_ssl, plugin_policymgr_ssl_attributes=params.ranger_kafka_policymgr_ssl_attrs, -component_list=['kafka-broker'], audit_db_is_enabled=params.xa_audit_db_is_enabled, -credential_file=params.credential_file, xa_audit_db_password=params.xa_audit_db_password, - ssl_truststore_password=params.ssl_truststore_password, ssl_keystore_password=params.ssl_keystore_password, -api_version = 'v2', skip_if_rangeradmin_down= not params.retryAble, -is_security_enabled = params.security_enabled, -is_stack_supports_ranger_kerberos = params.stack_supports_ranger_kerberos, -component_user_principal=params.kafka_jaas_principal if params.security_enabled else None, -component_user_keytab=params.kafka_keytab_path if params.security_enabled else None) - -if params.enable_ranger_kafka: - Execute(('cp', '--remove-de
[2/4] ambari git commit: AMBARI-16248: Create KAFKA service versions in common-services (jluniya)
http://git-wip-us.apache.org/repos/asf/ambari/blob/9884/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py new file mode 100644 index 000..12ccef6 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py @@ -0,0 +1,297 @@ +#!/usr/bin/env python +""" +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. + +""" +import os +from resource_management.libraries.functions import format +from resource_management.libraries.script.script import Script +from resource_management.libraries.functions.version import format_stack_version +from resource_management.libraries.functions import StackFeature +from resource_management.libraries.functions.stack_features import check_stack_feature +from resource_management.libraries.functions.default import default +from utils import get_bare_principal +from resource_management.libraries.functions.get_stack_version import get_stack_version +from resource_management.libraries.functions.is_empty import is_empty +import status_params +from resource_management.core.logger import Logger +from resource_management.libraries.resources.hdfs_resource import HdfsResource +from resource_management.libraries.functions import stack_select +from resource_management.libraries.functions import conf_select +from resource_management.libraries.functions import get_kinit_path +from resource_management.libraries.functions.get_not_managed_resources import get_not_managed_resources + +# server configurations +config = Script.get_config() +tmp_dir = Script.get_tmp_dir() +stack_root = Script.get_stack_root() +stack_name = default("/hostLevelParams/stack_name", None) +retryAble = default("/commandParams/command_retry_enabled", False) + +# Version being upgraded/downgraded to +version = default("/commandParams/version", None) + +# Version that is CURRENT. +current_version = default("/hostLevelParams/current_version", None) + +host_sys_prepped = default("/hostLevelParams/host_sys_prepped", False) + +stack_version_unformatted = config['hostLevelParams']['stack_version'] +stack_version_formatted = format_stack_version(stack_version_unformatted) +upgrade_direction = default("/commandParams/upgrade_direction", None) +stack_supports_ranger_kerberos = stack_version_formatted and check_stack_feature(StackFeature.RANGER_KERBEROS_SUPPORT, stack_version_formatted) + +# When downgrading the 'version' and 'current_version' are both pointing to the downgrade-target version +# downgrade_from_version provides the source-version the downgrade is happening from +downgrade_from_version = default("/commandParams/downgrade_from_version", None) + +hostname = config['hostname'] + +# default kafka parameters +kafka_home = '/usr/lib/kafka' +kafka_bin = kafka_home+'/bin/kafka' +conf_dir = "/etc/kafka/conf" +limits_conf_dir = "/etc/security/limits.d" + +# Used while upgrading the stack in a kerberized cluster and running kafka-acls.sh +zookeeper_connect = default("/configurations/kafka-broker/zookeeper.connect", None) + +kafka_user_nofile_limit = config['configurations']['kafka-env']['kafka_user_nofile_limit'] +kafka_user_nproc_limit = config['configurations']['kafka-env']['kafka_user_nproc_limit'] + +# parameters for 2.2+ +if stack_version_formatted and check_stack_feature(StackFeature.ROLLING_UPGRADE, stack_version_formatted): + kafka_home = os.path.join(stack_root, "current", "kafka-broker") + kafka_bin = os.path.join(kafka_home, "bin", "kafka") + conf_dir = os.path.join(kafka_home, "config") + +kafka_user = config['configurations']['kafka-env']['kafka_user'] +kafka_log_dir = config['configurations']['kafka-env']['kafka_log_dir'] +kafka_pid_dir = status_params.kafka_pid_dir +kafka_pid_file = kafka_pid_dir+"/kafka.pid" +# This is hardcoded on the kafka bash process lifecycle on which we have no control over +kafka_managed_pid_dir = "/var/run/kafka" +kafka_managed_log_dir = "/var/log/kafka" +user_group = config['configurations']['cluster-env']['user_group'] +jav
[1/4] ambari git commit: AMBARI-16248: Create KAFKA service versions in common-services (jluniya)
Repository: ambari Updated Branches: refs/heads/trunk d216c1283 -> 9884e http://git-wip-us.apache.org/repos/asf/ambari/blob/9884/ambari-server/src/main/resources/common-services/KAFKA/0.9.0/widgets.json -- diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.9.0/widgets.json b/ambari-server/src/main/resources/common-services/KAFKA/0.9.0/widgets.json new file mode 100644 index 000..7237236 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/KAFKA/0.9.0/widgets.json @@ -0,0 +1,182 @@ +{ + "layouts": [ +{ + "layout_name": "default_kafka_dashboard", + "display_name": "Standard Kafka Dashboard", + "section_name": "KAFKA_SUMMARY", + "widgetLayoutInfo": [ +{ + "widget_name": "Broker Topics", + "description": "Broker Topics", + "widget_type": "GRAPH", + "is_visible": true, + "metrics": [ +{ + "name": "kafka.server.BrokerTopicMetrics.BytesInPerSec.1MinuteRate", + "metric_path": "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesInPerSec/1MinuteRate", + "service_name": "KAFKA", + "component_name": "KAFKA_BROKER" +}, +{ + "name": "kafka.server.BrokerTopicMetrics.BytesOutPerSec.1MinuteRate", + "metric_path": "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesOutPerSec/1MinuteRate", + "service_name": "KAFKA", + "component_name": "KAFKA_BROKER" +}, +{ + "name": "kafka.server.BrokerTopicMetrics.MessagesInPerSec.1MinuteRate", + "metric_path": "metrics/kafka/server/BrokerTopicMetrics/AllTopicsMessagesInPerSec/1MinuteRate", + "service_name": "KAFKA", + "component_name": "KAFKA_BROKER" +} + ], + "values": [ +{ + "name": "Bytes In", + "value": "${kafka.server.BrokerTopicMetrics.BytesInPerSec.1MinuteRate}" +}, +{ + "name": "Bytes Out", + "value": "${kafka.server.BrokerTopicMetrics.BytesOutPerSec.1MinuteRate}" +}, +{ + "name": "Messages In", + "value": "${kafka.server.BrokerTopicMetrics.MessagesInPerSec.1MinuteRate}" +} + ], + "properties": { +"graph_type": "LINE", +"time_range": "1" + } +}, +{ + "widget_name": "Active Controller Count", + "description": "Active Controller Count", + "widget_type": "GRAPH", + "is_visible": true, + "metrics": [ +{ + "name": "kafka.controller.KafkaController.ActiveControllerCount", + "metric_path": "metrics/kafka/controller/KafkaController/ActiveControllerCount", + "service_name": "KAFKA", + "component_name": "KAFKA_BROKER" +} + ], + "values": [ +{ + "name": "Active Controller Count", + "value": "${kafka.controller.KafkaController.ActiveControllerCount}" +} + ], + "properties": { +"graph_type": "LINE", +"time_range": "1" + } +}, +{ + "widget_name": "Controller Status", + "description": "Controller Status", + "widget_type": "GRAPH", + "is_visible": true, + "metrics": [ +{ + "name": "kafka.controller.ControllerStats.LeaderElectionRateAndTimeMs.1MinuteRate", + "metric_path": "metrics/kafka/controller/ControllerStats/LeaderElectionRateAndTimeMs/1MinuteRate", + "service_name": "KAFKA", + "component_name": "KAFKA_BROKER" +}, +{ + "name": "kafka.controller.ControllerStats.UncleanLeaderElectionsPerSec.1MinuteRate", + "metric_path": "metrics/kafka/controller/ControllerStats/UncleanLeaderElectionsPerSec/1MinuteRate", + "service_name": "KAFKA", + "component_name": "KAFKA_BROKER" +} + ], + "values": [ +{ + "name": "Leader Election Rate And Time", + "value": "${kafka.controller.ControllerStats.LeaderElectionRateAndTimeMs.1MinuteRate}" +}, +{ + "name": "Unclean Leader Election", + "value": "${kafka.controller.ControllerStats.UncleanLeaderElectionsPerSec.1MinuteRate}" +} + ], + "properties": { +"graph_type": "LINE", +"time_range": "1" + } +}, +{ + "widget_name": "Replica MaxLag", + "description": "Replica MaxLag", + "widget_type": "GRAPH", + "is_visible": true, + "metri
[05/13] ambari git commit: Revert "AMBARI-16250: Create STORM service versions in common-services (jluniya)"
http://git-wip-us.apache.org/repos/asf/ambari/blob/d216c128/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/metrics.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/metrics.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/metrics.json new file mode 100644 index 000..3d0fdd3 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/metrics.json @@ -0,0 +1,1088 @@ +{ + "STORM_UI_SERVER": { +"Component": [ + { +"type": "org.apache.ambari.server.controller.metrics.RestMetricsPropertyProvider", +"properties": { + "default_port": "8744", + "port_config_type": "storm-site", + "port_property_name": "storm.port", + "protocol": "http" +}, +"metrics": { + "default": { +"metrics/api/v1/cluster/summary/tasksTotal": { + "metric": "/api/v1/cluster/summary##tasksTotal", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/topology/summary": { + "metric": "/api/v1/topology/summary?field=topologies##topologies", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/cluster/summary/slotsTotal": { + "metric": "/api/v1/cluster/summary##slotsTotal", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/cluster/summary/slotsFree": { + "metric": "/api/v1/cluster/summary##slotsFree", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/cluster/summary/supervisors": { + "metric": "/api/v1/cluster/summary##supervisors", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/cluster/summary/executorsTotal": { + "metric": "/api/v1/cluster/summary##executorsTotal", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/cluster/summary/slotsUsed": { + "metric": "/api/v1/cluster/summary##slotsUsed", + "pointInTime": true, + "temporal": false +}, + "metrics/api/v1/nimbus/summary": { + "metric": "/api/v1/nimbus/summary?field=nimbuses##nimbuses", + "pointInTime": true, + "temporal": false + } + + } +} + } +], +"HostComponent": [ + { +"type": "org.apache.ambari.server.controller.metrics.RestMetricsPropertyProvider", +"properties": { + "default_port": "8744", + "port_config_type": "storm-site", + "port_property_name": "storm.port", + "protocol": "http" +}, +"metrics": { + "default": { +"metrics/api/v1/cluster/summary/tasksTotal": { + "metric": "/api/v1/cluster/summary##tasksTotal", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/topology/summary": { + "metric": "/api/v1/topology/summary?field=topologies##topologies", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/cluster/summary/slotsTotal": { + "metric": "/api/v1/cluster/summary##slotsTotal", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/cluster/summary/slotsFree": { + "metric": "/api/v1/cluster/summary##slotsFree", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/cluster/summary/supervisors": { + "metric": "/api/v1/cluster/summary##supervisors", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/cluster/summary/executorsTotal": { + "metric": "/api/v1/cluster/summary##executorsTotal", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/cluster/summary/slotsUsed": { + "metric": "/api/v1/cluster/summary##slotsUsed", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/cluster/summary/nimbusUptime": { + "metric": "/api/v1/cluster/summary##nimbusUptime", + "pointInTime": true, + "temporal": false +} + } +} + } +] + }, + "NIMBUS": { +"Component": [ + { +"type": "ganglia", +"metrics": { + "default": { +"metrics/boottime": { + "metric": "boottime", + "pointInTime": true, + "t
[04/13] ambari git commit: Revert "AMBARI-16248: Create KAFKA service versions in common-services (jluniya)"
Revert "AMBARI-16248: Create KAFKA service versions in common-services (jluniya)" This reverts commit 10e4d1cd5123c02c34bc342b4d2a4e064623f789. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fdd16f3c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fdd16f3c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fdd16f3c Branch: refs/heads/trunk Commit: fdd16f3c32cd7cbc2e86bb631569ba013623eb97 Parents: 2337a0b Author: Jayush Luniya Authored: Thu May 5 23:02:05 2016 -0700 Committer: Jayush Luniya Committed: Thu May 5 23:02:05 2016 -0700 -- .../common-services/KAFKA/0.8.1.2.2/alerts.json | 32 ++ .../0.8.1.2.2/configuration/kafka-broker.xml| 357 +++ .../KAFKA/0.8.1.2.2/configuration/kafka-env.xml | 102 ++ .../0.8.1.2.2/configuration/kafka-log4j.xml | 126 +++ .../KAFKA/0.8.1.2.2/metainfo.xml| 90 + .../KAFKA/0.8.1.2.2/metrics.json| 264 ++ .../KAFKA/0.8.1.2.2/package/scripts/kafka.py| 234 .../0.8.1.2.2/package/scripts/kafka_broker.py | 129 +++ .../KAFKA/0.8.1.2.2/package/scripts/params.py | 297 +++ .../0.8.1.2.2/package/scripts/service_check.py | 65 .../package/scripts/setup_ranger_kafka.py | 84 + .../0.8.1.2.2/package/scripts/status_params.py | 26 ++ .../KAFKA/0.8.1.2.2/package/scripts/upgrade.py | 78 .../KAFKA/0.8.1.2.2/package/scripts/utils.py| 38 ++ .../0.8.1.2.2/package/templates/kafka.conf.j2 | 35 ++ .../package/templates/kafka_client_jaas.conf.j2 | 29 ++ .../package/templates/kafka_jaas.conf.j2| 41 +++ .../package/templates/tools-log4j.properties.j2 | 21 ++ .../common-services/KAFKA/0.8.1/alerts.json | 32 -- .../KAFKA/0.8.1/configuration/kafka-broker.xml | 357 --- .../KAFKA/0.8.1/configuration/kafka-env.xml | 102 -- .../KAFKA/0.8.1/configuration/kafka-log4j.xml | 126 --- .../common-services/KAFKA/0.8.1/metainfo.xml| 108 -- .../common-services/KAFKA/0.8.1/metrics.json| 264 -- .../KAFKA/0.8.1/package/scripts/kafka.py| 234 .../KAFKA/0.8.1/package/scripts/kafka_broker.py | 129 --- .../KAFKA/0.8.1/package/scripts/params.py | 297 --- .../0.8.1/package/scripts/service_check.py | 65 .../0.8.1/package/scripts/setup_ranger_kafka.py | 84 - .../0.8.1/package/scripts/status_params.py | 26 -- .../KAFKA/0.8.1/package/scripts/upgrade.py | 78 .../KAFKA/0.8.1/package/scripts/utils.py| 38 -- .../KAFKA/0.8.1/package/templates/kafka.conf.j2 | 35 -- .../package/templates/kafka_client_jaas.conf.j2 | 29 -- .../0.8.1/package/templates/kafka_jaas.conf.j2 | 41 --- .../package/templates/tools-log4j.properties.j2 | 21 -- .../common-services/KAFKA/0.9.0/alerts.json | 32 -- .../KAFKA/0.9.0/configuration/kafka-broker.xml | 154 .../KAFKA/0.9.0/configuration/kafka-env.xml | 28 -- .../0.9.0/configuration/ranger-kafka-audit.xml | 178 - .../ranger-kafka-plugin-properties.xml | 90 - .../ranger-kafka-policymgr-ssl.xml | 67 .../configuration/ranger-kafka-security.xml | 59 --- .../common-services/KAFKA/0.9.0/kerberos.json | 49 --- .../common-services/KAFKA/0.9.0/metainfo.xml| 30 -- .../common-services/KAFKA/0.9.0/metrics.json| 239 - .../common-services/KAFKA/0.9.0/widgets.json| 182 -- .../stacks/HDP/2.2/services/KAFKA/metainfo.xml | 21 +- .../stacks/HDP/2.3/services/KAFKA/alerts.json | 32 ++ .../KAFKA/configuration/kafka-broker.xml| 154 .../services/KAFKA/configuration/kafka-env.xml | 28 ++ .../KAFKA/configuration/ranger-kafka-audit.xml | 178 + .../ranger-kafka-plugin-properties.xml | 90 + .../ranger-kafka-policymgr-ssl.xml | 32 ++ .../configuration/ranger-kafka-security.xml | 59 +++ .../stacks/HDP/2.3/services/KAFKA/kerberos.json | 49 +++ .../stacks/HDP/2.3/services/KAFKA/metainfo.xml | 4 +- .../stacks/HDP/2.3/services/KAFKA/metrics.json | 239 + .../stacks/HDP/2.3/services/KAFKA/widgets.json | 182 ++ .../stacks/2.2/KAFKA/test_kafka_broker.py | 2 +- 60 files changed, 3114 insertions(+), 3178 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fdd16f3c/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/alerts.json -- diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/alerts.json b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/alerts.json new file mode 100644 index 000..4c9884c --- /dev/null +++ b/ambari-ser
[09/13] ambari git commit: Revert "AMBARI-16250: Create STORM service versions in common-services (jluniya)"
http://git-wip-us.apache.org/repos/asf/ambari/blob/d216c128/ambari-server/src/main/resources/common-services/STORM/0.9.1/kerberos.json -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/kerberos.json b/ambari-server/src/main/resources/common-services/STORM/0.9.1/kerberos.json deleted file mode 100644 index fcfe524..000 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1/kerberos.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "services": [ -{ - "name": "STORM", - "identities": [ -{ - "name": "/spnego" -}, -{ - "name": "/smokeuser" -}, -{ - "name": "storm_components", - "principal": { -"value": "${storm-env/storm_user}-${cluster_name|toLower()}@${realm}", -"type": "user", -"configuration": "storm-env/storm_principal_name" - }, - "keytab": { -"file": "${keytab_dir}/storm.headless.keytab", -"owner": { - "name": "${storm-env/storm_user}", - "access": "r" -}, -"group": { - "name": "${cluster-env/user_group}", - "access": "" -}, -"configuration": "storm-env/storm_keytab" - } -} - ], - "configurations": [ -{ - "storm-site": { -"nimbus.authorizer": "backtype.storm.security.auth.authorizer.SimpleACLAuthorizer", -"drpc.authorizer": "backtype.storm.security.auth.authorizer.DRPCSimpleACLAuthorizer", -"ui.filter": "org.apache.hadoop.security.authentication.server.AuthenticationFilter", -"storm.principal.tolocal": "backtype.storm.security.auth.KerberosPrincipalToLocal", -"supervisor.enable": "true", -"storm.zookeeper.superACL": "sasl:{{storm_bare_jaas_principal}}", -"java.security.auth.login.config": "{{conf_dir}}/storm_jaas.conf", -"nimbus.admins": "['{{storm_bare_jaas_principal}}']", -"nimbus.supervisor.users": "['{{storm_bare_jaas_principal}}']", -"ui.filter.params": "{'type': 'kerberos', 'kerberos.principal': '{{storm_ui_jaas_principal}}', 'kerberos.keytab': '{{storm_ui_keytab_path}}', 'kerberos.name.rules': 'DEFAULT'}" - } -} - ], - "components": [ -{ - "name": "STORM_UI_SERVER", - "identities": [ -{ - "name": "/spnego", - "principal": { -"configuration": "storm-env/storm_ui_principal_name" - }, - "keytab": { -"configuration": "storm-env/storm_ui_keytab" - } -} - ] -}, -{ - "name": "NIMBUS", - "identities": [ -{ - "name": "nimbus_server", - "principal": { -"value": "nimbus/_HOST@${realm}", -"type": "service", -"configuration": "storm-env/nimbus_principal_name" - }, - "keytab": { -"file": "${keytab_dir}/nimbus.service.keytab", -"owner": { - "name": "${storm-env/storm_user}", - "access": "r" -}, -"group": { - "name": "${cluster-env/user_group}", - "access": "" -}, -"configuration": "storm-env/nimbus_keytab" - } -} - ] -}, -{ - "name": "DRPC_SERVER", - "identities": [ -{ - "name": "nimbus_server", - "principal": { -"value": "nimbus/_HOST@${realm}", -"type": "service", -"configuration": "storm-env/nimbus_principal_name" - }, - "keytab": { -"file": "${keytab_dir}/nimbus.service.keytab", -"owner": { - "name": "${storm-env/storm_user}", - "access": "r" -}, -"group": { - "name": "${cluster-env/user_group}", - "access": "" -}, -"configuration": "storm-env/nimbus_keytab" - } -} - ] -}, -{ - "name" : "SUPERVISOR" -} - ] -} - ] -} http://git-wip-us.apache.org/repos/asf/ambari/blob/d216c128/ambari-server/src/main/resources/common-services/STORM/0.9.1/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/metainfo.xml b/ambari-server/src/main/resources/common-services/STORM/0.9.1/metainfo.xml deleted file mode 100644 index 0f4d520..000 --- a/ambari-server/src/main/resources/common-servi
[12/13] ambari git commit: Revert "AMBARI-16250: Create STORM service versions in common-services (jluniya)"
http://git-wip-us.apache.org/repos/asf/ambari/blob/d216c128/ambari-server/src/main/resources/common-services/STORM/0.10.0/widgets.json -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.10.0/widgets.json b/ambari-server/src/main/resources/common-services/STORM/0.10.0/widgets.json deleted file mode 100644 index d22a1ed..000 --- a/ambari-server/src/main/resources/common-services/STORM/0.10.0/widgets.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "layouts": [ -{ - "layout_name": "default_storm_dashboard", - "display_name": "Standard Storm Dashboard", - "section_name": "STORM_SUMMARY", - "widgetLayoutInfo": [ -{ - "widget_name": "Number of Slots", - "description": "Number of Slots", - "widget_type": "GRAPH", - "is_visible": true, - "metrics": [ -{ - "name": "Used Slots", - "metric_path": "metrics/storm/nimbus/usedslots", - "service_name": "STORM", - "component_name": "NIMBUS" -}, -{ - "name": "Free Slots", - "metric_path": "metrics/storm/nimbus/freeslots", - "service_name": "STORM", - "component_name": "NIMBUS" -}, -{ - "name": "Total Slots", - "metric_path": "metrics/storm/nimbus/totalslots", - "service_name": "STORM", - "component_name": "NIMBUS" -} - ], - "values": [ -{ - "name": "Used slots", - "value": "${Used Slots}" -}, -{ - "name": "Free slots", - "value": "${Free Slots}" -}, -{ - "name": "Total slots", - "value": "${Total Slots}" -} - ], - "properties": { -"graph_type": "LINE", -"time_range": "1" - } -}, -{ - "widget_name": "Number of executors", - "description": "Number of executors", - "widget_type": "GRAPH", - "is_visible": true, - "metrics": [ -{ - "name": "Total Executors", - "metric_path": "metrics/storm/nimbus/totalexecutors", - "service_name": "STORM", - "component_name": "NIMBUS" -} - ], - "values": [ -{ - "name": "Total executors", - "value": "${Total Executors}" -} - ], - "properties": { -"graph_type": "LINE", -"time_range": "1" - } -}, -{ - "widget_name": "Number of topologies", - "description": "Number of topologies", - "widget_type": "GRAPH", - "is_visible": true, - "metrics": [ -{ - "name": "Topologies", - "metric_path": "metrics/storm/nimbus/topologies", - "service_name": "STORM", - "component_name": "NIMBUS" -} - ], - "values": [ -{ - "name": "Total topologies", - "value": "${Topologies}" -} - ], - "properties": { -"graph_type": "LINE", -"time_range": "1" - } -}, -{ - "widget_name": "Number of tasks", - "description": "Number of tasks", - "widget_type": "GRAPH", - "is_visible": true, - "metrics": [ -{ - "name": "Total Tasks", - "metric_path": "metrics/storm/nimbus/totaltasks", - "service_name": "STORM", - "component_name": "NIMBUS" -} - ], - "values": [ -{ - "name": "Total tasks", - "value": "${Total Tasks}" -} - ], - "properties": { -"graph_type": "LINE", -"time_range": "1" - } -} - ] -} - ] -} http://git-wip-us.apache.org/repos/asf/ambari/blob/d216c128/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/alerts.json -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/alerts.json b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/alerts.json new file mode 100644 index 000..ae03617 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/alerts.json @@ -0,0 +1,194 @@ +{ + "STORM": { +"service": [ + { +"name": "storm_supervisor_process_percent", +"label": "Percent Supervisors Available", +"interval": 1, +"scope": "SERVICE", +"enabled": true, +"source": { + "type": "AGGREGATE", +
[11/13] ambari git commit: Revert "AMBARI-16250: Create STORM service versions in common-services (jluniya)"
http://git-wip-us.apache.org/repos/asf/ambari/blob/d216c128/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/alerts/check_supervisor_process_win.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/alerts/check_supervisor_process_win.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/alerts/check_supervisor_process_win.py new file mode 100644 index 000..a698415 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/alerts/check_supervisor_process_win.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python + +""" +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. +""" + +from resource_management.libraries.functions import check_windows_service_status + + +RESULT_CODE_OK = 'OK' +RESULT_CODE_CRITICAL = 'CRITICAL' +RESULT_CODE_UNKNOWN = 'UNKNOWN' + + +def get_tokens(): + """ + Returns a tuple of tokens in the format {{site/property}} that will be used + to build the dictionary passed into execute + """ + return () + +def execute(configurations={}, parameters={}, host_name=None): + """ + Returns a tuple containing the result code and a pre-formatted result label + + Keyword arguments: + configurations (dictionary): a mapping of configuration key to value + parameters (dictionary): a mapping of script parameter key to value + host_name (string): the name of this host where the alert is running + """ + + try: +check_windows_service_status("supervisor") +return (RESULT_CODE_OK, ["Supervisor is running"]) + except: +return (RESULT_CODE_CRITICAL, ["Supervisor is stopped"]) http://git-wip-us.apache.org/repos/asf/ambari/blob/d216c128/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/files/wordCount.jar -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/files/wordCount.jar b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/files/wordCount.jar new file mode 100644 index 000..aed64be Binary files /dev/null and b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/files/wordCount.jar differ http://git-wip-us.apache.org/repos/asf/ambari/blob/d216c128/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/drpc_server.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/drpc_server.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/drpc_server.py new file mode 100644 index 000..b156578 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/drpc_server.py @@ -0,0 +1,139 @@ +#!/usr/bin/env python +""" +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. + +""" + +import sys +from resource_management.libraries.functions import check_process_status +from resource_management.libraries.script import Script +from resource_management.libraries.functions import conf_select +from resource_management.libraries.functions import stack_select +from resource_management.libraries.functions import format +from resource_management.core.resources.system import Execute +from resource_management.libraries.functions.stack_features import check_stack_feature +from resource_management.libraries.functions import Stack
[10/13] ambari git commit: Revert "AMBARI-16250: Create STORM service versions in common-services (jluniya)"
http://git-wip-us.apache.org/repos/asf/ambari/blob/d216c128/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/storm_upgrade.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/storm_upgrade.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/storm_upgrade.py new file mode 100644 index 000..bc245c4 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/storm_upgrade.py @@ -0,0 +1,177 @@ +""" +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. + +""" +import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set. +import os + +from ambari_commons import yaml_utils +from resource_management.core.logger import Logger +from resource_management.core.exceptions import Fail +from resource_management.core.resources.system import Directory +from resource_management.core.resources.system import File +from resource_management.core.resources.system import Execute +from resource_management.libraries.script.script import Script +from resource_management.libraries.functions.default import default +from resource_management.libraries.functions.format import format + +class StormUpgrade(Script): + """ + Applies to Rolling/Express Upgrade from HDP 2.1 or 2.2 to 2.3 or higher. + + Requirements: Needs to run from a host with ZooKeeper Client. + + This class helps perform some of the upgrade tasks needed for Storm during + a Rolling or Express upgrade. Storm writes data to disk locally and to ZooKeeper. + If any HDP 2.1 or 2.2 bits exist in these directories when an HDP 2.3 instance + starts up, it will fail to start properly. Because the upgrade framework in + Ambari doesn't yet have a mechanism to say "stop all" before starting to + upgrade each component, we need to rely on a Storm trick to bring down + running daemons. By removing the ZooKeeper data with running daemons, those + daemons will die. + """ + + def delete_storm_zookeeper_data(self, env): +""" +Deletes the Storm data from ZooKeeper, effectively bringing down all +Storm daemons. +:return: +""" +import params + +Logger.info('Clearing Storm data from ZooKeeper') + +storm_zookeeper_root_dir = params.storm_zookeeper_root_dir +if storm_zookeeper_root_dir is None: + raise Fail("The storm ZooKeeper directory specified by storm-site/storm.zookeeper.root must be specified") + +# The zookeeper client must be given a zookeeper host to contact. Guaranteed to have at least one host. +storm_zookeeper_server_list = yaml_utils.get_values_from_yaml_array(params.storm_zookeeper_servers) +if storm_zookeeper_server_list is None: + Logger.info("Unable to extract ZooKeeper hosts from '{0}', assuming localhost").format(params.storm_zookeeper_servers) + storm_zookeeper_server_list = ["localhost"] + +# For every zk server, try to remove /storm +zookeeper_data_cleared = False +for storm_zookeeper_server in storm_zookeeper_server_list: + # Determine where the zkCli.sh shell script is + zk_command_location = os.path.join(params.stack_root, "current", "zookeeper-client", "bin", "zkCli.sh") + if params.version is not None: +zk_command_location = os.path.join(params.stack_root, params.version, "zookeeper", "bin", "zkCli.sh") + + # create the ZooKeeper delete command + command = "{0} -server {1}:{2} rmr /storm".format( +zk_command_location, storm_zookeeper_server, params.storm_zookeeper_port) + + # clean out ZK + try: +# the ZK client requires Java to run; ensure it's on the path +env_map = { + 'JAVA_HOME': params.java64_home +} + +# AMBARI-12094: if security is enabled, then we need to tell zookeeper where the +# JAAS file is located since we don't use kinit directly with STORM +if params.security_enabled: + env_map['JVMFLAGS'] = "-Djava.security.auth.login.config={0}".format(params.storm_jaas_file) + +Execute(command, user=params.storm_user, environment=env_map, +
[02/13] ambari git commit: Revert "AMBARI-16248: Create KAFKA service versions in common-services (jluniya)"
http://git-wip-us.apache.org/repos/asf/ambari/blob/fdd16f3c/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py deleted file mode 100644 index 12ccef6..000 --- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py +++ /dev/null @@ -1,297 +0,0 @@ -#!/usr/bin/env python -""" -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. - -""" -import os -from resource_management.libraries.functions import format -from resource_management.libraries.script.script import Script -from resource_management.libraries.functions.version import format_stack_version -from resource_management.libraries.functions import StackFeature -from resource_management.libraries.functions.stack_features import check_stack_feature -from resource_management.libraries.functions.default import default -from utils import get_bare_principal -from resource_management.libraries.functions.get_stack_version import get_stack_version -from resource_management.libraries.functions.is_empty import is_empty -import status_params -from resource_management.core.logger import Logger -from resource_management.libraries.resources.hdfs_resource import HdfsResource -from resource_management.libraries.functions import stack_select -from resource_management.libraries.functions import conf_select -from resource_management.libraries.functions import get_kinit_path -from resource_management.libraries.functions.get_not_managed_resources import get_not_managed_resources - -# server configurations -config = Script.get_config() -tmp_dir = Script.get_tmp_dir() -stack_root = Script.get_stack_root() -stack_name = default("/hostLevelParams/stack_name", None) -retryAble = default("/commandParams/command_retry_enabled", False) - -# Version being upgraded/downgraded to -version = default("/commandParams/version", None) - -# Version that is CURRENT. -current_version = default("/hostLevelParams/current_version", None) - -host_sys_prepped = default("/hostLevelParams/host_sys_prepped", False) - -stack_version_unformatted = config['hostLevelParams']['stack_version'] -stack_version_formatted = format_stack_version(stack_version_unformatted) -upgrade_direction = default("/commandParams/upgrade_direction", None) -stack_supports_ranger_kerberos = stack_version_formatted and check_stack_feature(StackFeature.RANGER_KERBEROS_SUPPORT, stack_version_formatted) - -# When downgrading the 'version' and 'current_version' are both pointing to the downgrade-target version -# downgrade_from_version provides the source-version the downgrade is happening from -downgrade_from_version = default("/commandParams/downgrade_from_version", None) - -hostname = config['hostname'] - -# default kafka parameters -kafka_home = '/usr/lib/kafka' -kafka_bin = kafka_home+'/bin/kafka' -conf_dir = "/etc/kafka/conf" -limits_conf_dir = "/etc/security/limits.d" - -# Used while upgrading the stack in a kerberized cluster and running kafka-acls.sh -zookeeper_connect = default("/configurations/kafka-broker/zookeeper.connect", None) - -kafka_user_nofile_limit = config['configurations']['kafka-env']['kafka_user_nofile_limit'] -kafka_user_nproc_limit = config['configurations']['kafka-env']['kafka_user_nproc_limit'] - -# parameters for 2.2+ -if stack_version_formatted and check_stack_feature(StackFeature.ROLLING_UPGRADE, stack_version_formatted): - kafka_home = os.path.join(stack_root, "current", "kafka-broker") - kafka_bin = os.path.join(kafka_home, "bin", "kafka") - conf_dir = os.path.join(kafka_home, "config") - -kafka_user = config['configurations']['kafka-env']['kafka_user'] -kafka_log_dir = config['configurations']['kafka-env']['kafka_log_dir'] -kafka_pid_dir = status_params.kafka_pid_dir -kafka_pid_file = kafka_pid_dir+"/kafka.pid" -# This is hardcoded on the kafka bash process lifecycle on which we have no control over -kafka_managed_pid_dir = "/var/run/kafka" -kafka_managed_log_dir = "/var/log/kafka" -user_group = config['configurations']['cluster-env']['user_group']
[03/13] ambari git commit: Revert "AMBARI-16248: Create KAFKA service versions in common-services (jluniya)"
http://git-wip-us.apache.org/repos/asf/ambari/blob/fdd16f3c/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/setup_ranger_kafka.py -- diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/setup_ranger_kafka.py b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/setup_ranger_kafka.py new file mode 100644 index 000..3a3ecfe --- /dev/null +++ b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/setup_ranger_kafka.py @@ -0,0 +1,84 @@ +#!/usr/bin/env python +""" +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. +""" +from resource_management.core.logger import Logger +from resource_management.core.resources import File, Execute +from resource_management.libraries.functions.format import format + +def setup_ranger_kafka(): + import params + + if params.has_ranger_admin: + +from resource_management.libraries.functions.setup_ranger_plugin_xml import setup_ranger_plugin + +if params.retryAble: + Logger.info("Kafka: Setup ranger: command retry enables thus retrying if ranger admin is down !") +else: + Logger.info("Kafka: Setup ranger: command retry not enabled thus skipping if ranger admin is down !") + +if params.xml_configurations_supported and params.enable_ranger_kafka and params.xa_audit_hdfs_is_enabled: + if params.has_namenode: +params.HdfsResource("/ranger/audit", + type="directory", + action="create_on_execute", + owner=params.hdfs_user, + group=params.hdfs_user, + mode=0755, + recursive_chmod=True +) +params.HdfsResource("/ranger/audit/kafka", + type="directory", + action="create_on_execute", + owner=params.kafka_user, + group=params.kafka_user, + mode=0700, + recursive_chmod=True +) +params.HdfsResource(None, action="execute") + +setup_ranger_plugin('kafka-broker', 'kafka', +params.downloaded_custom_connector, params.driver_curl_source, +params.driver_curl_target, params.java64_home, +params.repo_name, params.kafka_ranger_plugin_repo, +params.ranger_env, params.ranger_plugin_properties, +params.policy_user, params.policymgr_mgr_url, +params.enable_ranger_kafka, conf_dict=params.conf_dir, +component_user=params.kafka_user, component_group=params.user_group, cache_service_list=['kafka'], +plugin_audit_properties=params.ranger_kafka_audit, plugin_audit_attributes=params.ranger_kafka_audit_attrs, + plugin_security_properties=params.ranger_kafka_security, plugin_security_attributes=params.ranger_kafka_security_attrs, + plugin_policymgr_ssl_properties=params.ranger_kafka_policymgr_ssl, plugin_policymgr_ssl_attributes=params.ranger_kafka_policymgr_ssl_attrs, +component_list=['kafka-broker'], audit_db_is_enabled=params.xa_audit_db_is_enabled, +credential_file=params.credential_file, xa_audit_db_password=params.xa_audit_db_password, + ssl_truststore_password=params.ssl_truststore_password, ssl_keystore_password=params.ssl_keystore_password, +api_version = 'v2', skip_if_rangeradmin_down= not params.retryAble, +is_security_enabled = params.security_enabled, +is_stack_supports_ranger_kerberos = params.stack_supports_ranger_kerberos, +component_user_principal=params.kafka_jaas_principal if params.security_enabled else None, +component_user_keytab=params.kafka_keytab_path if params.security_enabled else None) + +if params.enable_ranger_kafka: + Execute(('cp', '--remove-destin
[13/13] ambari git commit: Revert "AMBARI-16250: Create STORM service versions in common-services (jluniya)"
Revert "AMBARI-16250: Create STORM service versions in common-services (jluniya)" This reverts commit f1c7514d60cb5ea46647bc759343b20e1a1920e4. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d216c128 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d216c128 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d216c128 Branch: refs/heads/trunk Commit: d216c12832bf65e226cb482cec327dc91f1650d9 Parents: fdd16f3 Author: Jayush Luniya Authored: Thu May 5 23:03:29 2016 -0700 Committer: Jayush Luniya Committed: Thu May 5 23:03:29 2016 -0700 -- .../ambari/server/stack/ServiceModule.java | 24 +- .../apache/ambari/server/stack/StackModule.java |4 +- .../0.10.0/configuration/ranger-storm-audit.xml | 178 --- .../ranger-storm-plugin-properties.xml | 148 --- .../ranger-storm-policymgr-ssl.xml | 67 -- .../configuration/ranger-storm-security.xml | 59 - .../configuration/storm-cluster-log4j.xml | 113 -- .../STORM/0.10.0/configuration/storm-env.xml| 55 - .../STORM/0.10.0/configuration/storm-site.xml | 60 - .../0.10.0/configuration/storm-worker-log4j.xml | 114 -- .../common-services/STORM/0.10.0/metainfo.xml | 57 - .../common-services/STORM/0.10.0/metrics.json | 1088 -- .../common-services/STORM/0.10.0/widgets.json | 127 -- .../common-services/STORM/0.9.1.2.1/alerts.json | 194 .../STORM/0.9.1.2.1/configuration/storm-env.xml | 139 +++ .../0.9.1.2.1/configuration/storm-site.xml | 740 .../STORM/0.9.1.2.1/kerberos.json | 120 ++ .../STORM/0.9.1.2.1/metainfo.xml| 181 +++ .../STORM/0.9.1.2.1/metrics.json| 829 + .../alerts/check_supervisor_process_win.py | 50 + .../STORM/0.9.1.2.1/package/files/wordCount.jar | Bin 0 -> 690588 bytes .../0.9.1.2.1/package/scripts/drpc_server.py| 139 +++ .../STORM/0.9.1.2.1/package/scripts/nimbus.py | 157 +++ .../0.9.1.2.1/package/scripts/nimbus_prod.py| 81 ++ .../0.9.1.2.1/package/scripts/pacemaker.py | 138 +++ .../STORM/0.9.1.2.1/package/scripts/params.py | 29 + .../0.9.1.2.1/package/scripts/params_linux.py | 351 ++ .../0.9.1.2.1/package/scripts/params_windows.py | 60 + .../STORM/0.9.1.2.1/package/scripts/rest_api.py | 81 ++ .../STORM/0.9.1.2.1/package/scripts/service.py | 97 ++ .../0.9.1.2.1/package/scripts/service_check.py | 79 ++ .../package/scripts/setup_atlas_storm.py| 45 + .../package/scripts/setup_ranger_storm.py | 101 ++ .../0.9.1.2.1/package/scripts/status_params.py | 83 ++ .../STORM/0.9.1.2.1/package/scripts/storm.py| 162 +++ .../0.9.1.2.1/package/scripts/storm_upgrade.py | 177 +++ .../package/scripts/storm_yaml_utils.py | 53 + .../0.9.1.2.1/package/scripts/supervisor.py | 113 ++ .../package/scripts/supervisor_prod.py | 84 ++ .../package/scripts/supervisord_service.py | 33 + .../0.9.1.2.1/package/scripts/ui_server.py | 180 +++ .../package/templates/client_jaas.conf.j2 | 24 + .../0.9.1.2.1/package/templates/config.yaml.j2 | 68 ++ .../templates/storm-metrics2.properties.j2 | 26 + .../0.9.1.2.1/package/templates/storm.conf.j2 | 35 + .../package/templates/storm_jaas.conf.j2| 57 + .../package/templates/worker-launcher.cfg.j2| 19 + .../STORM/0.9.1.2.1/quicklinks/quicklinks.json | 28 + .../common-services/STORM/0.9.1/alerts.json | 194 .../STORM/0.9.1/configuration/storm-env.xml | 139 --- .../STORM/0.9.1/configuration/storm-site.xml| 740 .../common-services/STORM/0.9.1/kerberos.json | 120 -- .../common-services/STORM/0.9.1/metainfo.xml| 181 --- .../common-services/STORM/0.9.1/metrics.json| 829 - .../alerts/check_supervisor_process_win.py | 50 - .../STORM/0.9.1/package/files/wordCount.jar | Bin 690588 -> 0 bytes .../STORM/0.9.1/package/scripts/drpc_server.py | 139 --- .../STORM/0.9.1/package/scripts/nimbus.py | 157 --- .../STORM/0.9.1/package/scripts/nimbus_prod.py | 81 -- .../STORM/0.9.1/package/scripts/pacemaker.py| 138 --- .../STORM/0.9.1/package/scripts/params.py | 29 - .../STORM/0.9.1/package/scripts/params_linux.py | 351 -- .../0.9.1/package/scripts/params_windows.py | 60 - .../STORM/0.9.1/package/scripts/rest_api.py | 81 -- .../STORM/0.9.1/package/scripts/service.py | 97 -- .../0.9.1/package/scripts/service_check.py | 79 -- .../0.9.1/package/scripts/setup_atlas_storm.py | 45 - .../0.9.1/package/scripts/setup_ranger_storm.py | 101 -- .../0.9.1/package/scripts/status_params.py | 83 -- .../STORM/0.9.1/package/scripts/storm.py| 162 --- .../0.9.1/package/scripts/storm_upgrade.py | 177 --- .../0.9.
[08/13] ambari git commit: Revert "AMBARI-16250: Create STORM service versions in common-services (jluniya)"
http://git-wip-us.apache.org/repos/asf/ambari/blob/d216c128/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_windows.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_windows.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_windows.py deleted file mode 100644 index 88e6246..000 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_windows.py +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env python -""" -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. - -""" - -from resource_management import * -from status_params import * -from resource_management.libraries.functions.default import default - -# server configurations -config = Script.get_config() - -stack_is_hdp23_or_further = Script.is_stack_greater_or_equal("2.3") - -stack_root = os.path.abspath(os.path.join(os.environ["HADOOP_HOME"],"..")) -conf_dir = os.environ["STORM_CONF_DIR"] -hadoop_user = config["configurations"]["cluster-env"]["hadoop.user.name"] -storm_user = hadoop_user - -security_enabled = config['configurations']['cluster-env']['security_enabled'] -default_topology_max_replication_wait_time_sec = default('/configurations/storm-site/topology.max.replication.wait.time.sec.default', -1) -nimbus_hosts = default("/clusterHostInfo/nimbus_hosts", []) -default_topology_min_replication_count = default('/configurations/storm-site/topology.min.replication.count.default', 1) - -#Calculate topology.max.replication.wait.time.sec and topology.min.replication.count -if len(nimbus_hosts) > 1: - # for HA Nimbus - actual_topology_max_replication_wait_time_sec = -1 - actual_topology_min_replication_count = len(nimbus_hosts) / 2 + 1 -else: - # for non-HA Nimbus - actual_topology_max_replication_wait_time_sec = default_topology_max_replication_wait_time_sec - actual_topology_min_replication_count = default_topology_min_replication_count - -if stack_is_hdp23_or_further: - if security_enabled: -storm_thrift_transport = config['configurations']['storm-site']['_storm.thrift.secure.transport'] - else: -storm_thrift_transport = config['configurations']['storm-site']['_storm.thrift.nonsecure.transport'] - -service_map = { - "nimbus" : nimbus_win_service_name, - "supervisor" : supervisor_win_service_name, - "ui" : ui_win_service_name -} http://git-wip-us.apache.org/repos/asf/ambari/blob/d216c128/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/rest_api.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/rest_api.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/rest_api.py deleted file mode 100644 index 26fdb27..000 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/rest_api.py +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/env python -""" -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. - -""" - -import sys -from resource_management.libraries.functions import check_process_status -from resource_management.libraries.script import Script -from resource_management.libraries.functions import conf_select -from resource_management.libraries.functions import stack_select -from resource_management.libraries.functions import format -from resource_management.core.resources.system import Execute - -fro
[06/13] ambari git commit: Revert "AMBARI-16250: Create STORM service versions in common-services (jluniya)"
http://git-wip-us.apache.org/repos/asf/ambari/blob/d216c128/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/metrics.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/metrics.json b/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/metrics.json new file mode 100644 index 000..2b46faf --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/metrics.json @@ -0,0 +1,1087 @@ +{ + "STORM_UI_SERVER": { +"Component": [ + { +"type": "org.apache.ambari.server.controller.metrics.RestMetricsPropertyProvider", +"properties": { + "default_port": "8744", + "port_config_type": "storm-site", + "port_property_name": "storm.port", + "protocol": "http" +}, +"metrics": { + "default": { +"metrics/api/v1/cluster/summary/tasksTotal": { + "metric": "/api/v1/cluster/summary##tasksTotal", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/topology/summary": { + "metric": "/api/v1/topology/summary?field=topologies##topologies", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/cluster/summary/slotsTotal": { + "metric": "/api/v1/cluster/summary##slotsTotal", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/cluster/summary/slotsFree": { + "metric": "/api/v1/cluster/summary##slotsFree", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/cluster/summary/supervisors": { + "metric": "/api/v1/cluster/summary##supervisors", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/cluster/summary/executorsTotal": { + "metric": "/api/v1/cluster/summary##executorsTotal", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/cluster/summary/slotsUsed": { + "metric": "/api/v1/cluster/summary##slotsUsed", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/cluster/summary/nimbusUptime": { + "metric": "/api/v1/cluster/summary##nimbusUptime", + "pointInTime": true, + "temporal": false +} + } +} + } +], +"HostComponent": [ + { +"type": "org.apache.ambari.server.controller.metrics.RestMetricsPropertyProvider", +"properties": { + "default_port": "8744", + "port_config_type": "storm-site", + "port_property_name": "storm.port", + "protocol": "http" +}, +"metrics": { + "default": { +"metrics/api/v1/cluster/summary/tasksTotal": { + "metric": "/api/v1/cluster/summary##tasksTotal", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/topology/summary": { + "metric": "/api/v1/topology/summary?field=topologies##topologies", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/cluster/summary/slotsTotal": { + "metric": "/api/v1/cluster/summary##slotsTotal", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/cluster/summary/slotsFree": { + "metric": "/api/v1/cluster/summary##slotsFree", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/cluster/summary/supervisors": { + "metric": "/api/v1/cluster/summary##supervisors", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/cluster/summary/executorsTotal": { + "metric": "/api/v1/cluster/summary##executorsTotal", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/cluster/summary/slotsUsed": { + "metric": "/api/v1/cluster/summary##slotsUsed", + "pointInTime": true, + "temporal": false +}, +"metrics/api/v1/cluster/summary/nimbusUptime": { + "metric": "/api/v1/cluster/summary##nimbusUptime", + "pointInTime": true, + "temporal": false +} + } +} + } +] + }, + "NIMBUS": { +"Component": [ + { +"type": "ganglia", +"metrics": { + "default": { +"metrics/boottime": { + "metric": "boottime", + "pointInTime": true, +
[07/13] ambari git commit: Revert "AMBARI-16250: Create STORM service versions in common-services (jluniya)"
http://git-wip-us.apache.org/repos/asf/ambari/blob/d216c128/ambari-server/src/main/resources/common-services/STORM/0.9.3/configuration/storm-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.3/configuration/storm-site.xml b/ambari-server/src/main/resources/common-services/STORM/0.9.3/configuration/storm-site.xml deleted file mode 100644 index 62cd3db..000 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.3/configuration/storm-site.xml +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - -storm.thrift.transport -{{storm_thrift_transport}} -The transport plug-in that used for Thrift client/server communication. - - -_storm.thrift.nonsecure.transport -backtype.storm.security.auth.SimpleTransportPlugin -The transport plug-in that used for non-secure mode for for Thrift client/server communication. - - -_storm.thrift.secure.transport - backtype.storm.security.auth.kerberos.KerberosSaslTransportPlugin -The transport plug-in that used for secure mode for Thrift client/server communication. - - - -java.library.path -/usr/local/lib:/opt/local/lib:/usr/lib -This value is passed to spawned JVMs (e.g., Nimbus, Supervisor, and Workers) - for the java.library.path value. java.library.path tells the JVM where - to look for native libraries. It is necessary to set this config correctly since - Storm uses the ZeroMQ and JZMQ native libs. - - - -nimbus.childopts --Xmx1024m -This parameter is used by the storm-deploy project to configure the jvm options for the nimbus daemon. - - false - - - - -worker.childopts --Xmx768m -The jvm opts provided to workers launched by this supervisor. All \"%ID%\" substrings are replaced with an identifier for this worker. - - multiLine - - - - -ui.childopts --Xmx768m _JAAS_PLACEHOLDER -Childopts for Storm UI Java process. - - - -ui.filter -null -Class for Storm UI authentication - - - -supervisor.childopts --Xmx256m -This parameter is used by the storm-deploy project to configure the jvm options for the supervisor daemon. - - false - - - - -logviewer.childopts --Xmx128m _JAAS_PLACEHOLDER -Childopts for log viewer java process. - - - -drpc.childopts --Xmx768m _JAAS_PLACEHOLDER -Childopts for Storm DRPC Java process. - - - -_storm.min.ruid -null -min.user.id is set to the first real user id on the system. If value is 'null' than default value will be taken from key UID_MIN of /etc/login.defs otherwise the specified value will be used for all hosts. - - - -storm.log.dir -{{log_dir}} -Log directory for Storm. - - - -nimbus.authorizer -Log directory for Storm. - - -ranger-storm-plugin-properties -ranger-storm-plugin-enabled - - - - http://git-wip-us.apache.org/repos/asf/ambari/blob/d216c128/ambari-server/src/main/resources/common-services/STORM/0.9.3/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.3/metainfo.xml b/ambari-server/src/main/resources/common-services/STORM/0.9.3/metainfo.xml deleted file mode 100644 index ed4337c..000 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.3/metainfo.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - 2.0 - - - STORM - Storm - 0.9.3 - common-services/STORM/0.9.1 - - - STORM_REST_API - true - - - - - redhat7,amazon2015,redhat6,suse11,suse12 - - - storm_${stack_version} - - - - - debian7,ubuntu12,ubuntu14 - - - storm-${stack_version} - - - - - - - http://git-wip-us.apache.org/repos/asf/ambari/blob/d216c128/ambari-server/src/main/resources/common-services/STORM/0.9.3/metrics.json -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.3/metrics.json b/ambari-server/src/main/resources/common-services/STORM/0.9.3/metrics.json deleted file mode 100644 index 2b46faf..000 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.3/metrics.json +++ /dev/null @@ -1,1087 +0,0 @@ -{ - "STORM_UI_SERVER": { -"Component": [ - { -"type": "org.apache.ambari.server.controller.metrics.RestMetricsPropertyProvider", -"properties": { - "default_port": "8744", - "port_config_type": "storm-site", - "port_property_name": "storm.port", - "protocol": "http" -}, -"metrics": { - "default": { -
[01/13] ambari git commit: Revert "AMBARI-16248: Create KAFKA service versions in common-services (jluniya)"
Repository: ambari Updated Branches: refs/heads/trunk 2337a0bbd -> d216c1283 http://git-wip-us.apache.org/repos/asf/ambari/blob/fdd16f3c/ambari-server/src/main/resources/common-services/KAFKA/0.9.0/widgets.json -- diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.9.0/widgets.json b/ambari-server/src/main/resources/common-services/KAFKA/0.9.0/widgets.json deleted file mode 100644 index 7237236..000 --- a/ambari-server/src/main/resources/common-services/KAFKA/0.9.0/widgets.json +++ /dev/null @@ -1,182 +0,0 @@ -{ - "layouts": [ -{ - "layout_name": "default_kafka_dashboard", - "display_name": "Standard Kafka Dashboard", - "section_name": "KAFKA_SUMMARY", - "widgetLayoutInfo": [ -{ - "widget_name": "Broker Topics", - "description": "Broker Topics", - "widget_type": "GRAPH", - "is_visible": true, - "metrics": [ -{ - "name": "kafka.server.BrokerTopicMetrics.BytesInPerSec.1MinuteRate", - "metric_path": "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesInPerSec/1MinuteRate", - "service_name": "KAFKA", - "component_name": "KAFKA_BROKER" -}, -{ - "name": "kafka.server.BrokerTopicMetrics.BytesOutPerSec.1MinuteRate", - "metric_path": "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesOutPerSec/1MinuteRate", - "service_name": "KAFKA", - "component_name": "KAFKA_BROKER" -}, -{ - "name": "kafka.server.BrokerTopicMetrics.MessagesInPerSec.1MinuteRate", - "metric_path": "metrics/kafka/server/BrokerTopicMetrics/AllTopicsMessagesInPerSec/1MinuteRate", - "service_name": "KAFKA", - "component_name": "KAFKA_BROKER" -} - ], - "values": [ -{ - "name": "Bytes In", - "value": "${kafka.server.BrokerTopicMetrics.BytesInPerSec.1MinuteRate}" -}, -{ - "name": "Bytes Out", - "value": "${kafka.server.BrokerTopicMetrics.BytesOutPerSec.1MinuteRate}" -}, -{ - "name": "Messages In", - "value": "${kafka.server.BrokerTopicMetrics.MessagesInPerSec.1MinuteRate}" -} - ], - "properties": { -"graph_type": "LINE", -"time_range": "1" - } -}, -{ - "widget_name": "Active Controller Count", - "description": "Active Controller Count", - "widget_type": "GRAPH", - "is_visible": true, - "metrics": [ -{ - "name": "kafka.controller.KafkaController.ActiveControllerCount", - "metric_path": "metrics/kafka/controller/KafkaController/ActiveControllerCount", - "service_name": "KAFKA", - "component_name": "KAFKA_BROKER" -} - ], - "values": [ -{ - "name": "Active Controller Count", - "value": "${kafka.controller.KafkaController.ActiveControllerCount}" -} - ], - "properties": { -"graph_type": "LINE", -"time_range": "1" - } -}, -{ - "widget_name": "Controller Status", - "description": "Controller Status", - "widget_type": "GRAPH", - "is_visible": true, - "metrics": [ -{ - "name": "kafka.controller.ControllerStats.LeaderElectionRateAndTimeMs.1MinuteRate", - "metric_path": "metrics/kafka/controller/ControllerStats/LeaderElectionRateAndTimeMs/1MinuteRate", - "service_name": "KAFKA", - "component_name": "KAFKA_BROKER" -}, -{ - "name": "kafka.controller.ControllerStats.UncleanLeaderElectionsPerSec.1MinuteRate", - "metric_path": "metrics/kafka/controller/ControllerStats/UncleanLeaderElectionsPerSec/1MinuteRate", - "service_name": "KAFKA", - "component_name": "KAFKA_BROKER" -} - ], - "values": [ -{ - "name": "Leader Election Rate And Time", - "value": "${kafka.controller.ControllerStats.LeaderElectionRateAndTimeMs.1MinuteRate}" -}, -{ - "name": "Unclean Leader Election", - "value": "${kafka.controller.ControllerStats.UncleanLeaderElectionsPerSec.1MinuteRate}" -} - ], - "properties": { -"graph_type": "LINE", -"time_range": "1" - } -}, -{ - "widget_name": "Replica MaxLag", - "description": "Replica MaxLag", - "widget_type": "GRAPH", - "is_visible": true, - "m
ambari git commit: AMBARI-16280. 'hive.llap.zk.sm.connectionString' config is not set to ZK quorum value on installation of the hive service.
Repository: ambari Updated Branches: refs/heads/trunk f1c7514d6 -> 2337a0bbd AMBARI-16280. 'hive.llap.zk.sm.connectionString' config is not set to ZK quorum value on installation of the hive service. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2337a0bb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2337a0bb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2337a0bb Branch: refs/heads/trunk Commit: 2337a0bbd3138e55074118b64e898572277f7331 Parents: f1c7514 Author: Swapan Shridhar Authored: Thu May 5 14:48:48 2016 -0700 Committer: Swapan Shridhar Committed: Thu May 5 16:05:37 2016 -0700 -- .../stacks/HDP/2.5/services/stack_advisor.py | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/2337a0bb/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py index 4a4c868..37e6ef6 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py @@ -140,6 +140,7 @@ class HDP25StackAdvisor(HDP24StackAdvisor): def recommendHIVEConfigurations(self, configurations, clusterData, services, hosts): super(HDP25StackAdvisor, self).recommendHIVEConfigurations(configurations, clusterData, services, hosts) putHiveInteractiveEnvProperty = self.putProperty(configurations, "hive-interactive-env", services) +putHiveInteractiveSiteProperty = self.putProperty(configurations, self.HIVE_INTERACTIVE_SITE, services) # For 'Hive Server Interactive', if the component exists. hsi_hosts = self.__getHostsForComponent(services, "HIVE", "HIVE_SERVER_INTERACTIVE") @@ -148,13 +149,6 @@ class HDP25StackAdvisor(HDP24StackAdvisor): putHiveInteractiveEnvProperty('enable_hive_interactive', 'true') putHiveInteractiveEnvProperty('hive_server_interactive_host', hsi_host) - if 'hive.llap.zk.sm.connectionString' in services['configurations'][self.HIVE_INTERACTIVE_SITE]['properties']: -# Fill the property 'hive.llap.zk.sm.connectionString' required by Hive Server Interactive (HiveServer2) -zookeeper_host_port = self.getZKHostPortString(services) -if zookeeper_host_port: - putHiveInteractiveSiteProperty = self.putProperty(configurations, self.HIVE_INTERACTIVE_SITE, services) - putHiveInteractiveSiteProperty("hive.llap.zk.sm.connectionString", zookeeper_host_port) - # Update 'hive.llap.daemon.queue.name' if capacity scheduler is changed. if 'hive.llap.daemon.queue.name' in services['configurations'][self.HIVE_INTERACTIVE_SITE]['properties']: self.setLlapDaemonQueueName(services, configurations) @@ -174,6 +168,12 @@ class HDP25StackAdvisor(HDP24StackAdvisor): Logger.info("Updated 'Hive Server interactive' config 'hive.llap.io.enabled' to '{0}'.".format(llap_io_enabled)) else: putHiveInteractiveEnvProperty('enable_hive_interactive', 'false') + +if 'hive.llap.zk.sm.connectionString' in services['configurations'][self.HIVE_INTERACTIVE_SITE]['properties']: + # Fill the property 'hive.llap.zk.sm.connectionString' required by Hive Server Interactive (HiveServer2) + zookeeper_host_port = self.getZKHostPortString(services) + if zookeeper_host_port: +putHiveInteractiveSiteProperty("hive.llap.zk.sm.connectionString", zookeeper_host_port) pass
[8/9] ambari git commit: AMBARI-16250: Create STORM service versions in common-services (jluniya)
http://git-wip-us.apache.org/repos/asf/ambari/blob/f1c7514d/ambari-server/src/main/resources/common-services/STORM/0.10.0/widgets.json -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.10.0/widgets.json b/ambari-server/src/main/resources/common-services/STORM/0.10.0/widgets.json new file mode 100644 index 000..d22a1ed --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/0.10.0/widgets.json @@ -0,0 +1,127 @@ +{ + "layouts": [ +{ + "layout_name": "default_storm_dashboard", + "display_name": "Standard Storm Dashboard", + "section_name": "STORM_SUMMARY", + "widgetLayoutInfo": [ +{ + "widget_name": "Number of Slots", + "description": "Number of Slots", + "widget_type": "GRAPH", + "is_visible": true, + "metrics": [ +{ + "name": "Used Slots", + "metric_path": "metrics/storm/nimbus/usedslots", + "service_name": "STORM", + "component_name": "NIMBUS" +}, +{ + "name": "Free Slots", + "metric_path": "metrics/storm/nimbus/freeslots", + "service_name": "STORM", + "component_name": "NIMBUS" +}, +{ + "name": "Total Slots", + "metric_path": "metrics/storm/nimbus/totalslots", + "service_name": "STORM", + "component_name": "NIMBUS" +} + ], + "values": [ +{ + "name": "Used slots", + "value": "${Used Slots}" +}, +{ + "name": "Free slots", + "value": "${Free Slots}" +}, +{ + "name": "Total slots", + "value": "${Total Slots}" +} + ], + "properties": { +"graph_type": "LINE", +"time_range": "1" + } +}, +{ + "widget_name": "Number of executors", + "description": "Number of executors", + "widget_type": "GRAPH", + "is_visible": true, + "metrics": [ +{ + "name": "Total Executors", + "metric_path": "metrics/storm/nimbus/totalexecutors", + "service_name": "STORM", + "component_name": "NIMBUS" +} + ], + "values": [ +{ + "name": "Total executors", + "value": "${Total Executors}" +} + ], + "properties": { +"graph_type": "LINE", +"time_range": "1" + } +}, +{ + "widget_name": "Number of topologies", + "description": "Number of topologies", + "widget_type": "GRAPH", + "is_visible": true, + "metrics": [ +{ + "name": "Topologies", + "metric_path": "metrics/storm/nimbus/topologies", + "service_name": "STORM", + "component_name": "NIMBUS" +} + ], + "values": [ +{ + "name": "Total topologies", + "value": "${Topologies}" +} + ], + "properties": { +"graph_type": "LINE", +"time_range": "1" + } +}, +{ + "widget_name": "Number of tasks", + "description": "Number of tasks", + "widget_type": "GRAPH", + "is_visible": true, + "metrics": [ +{ + "name": "Total Tasks", + "metric_path": "metrics/storm/nimbus/totaltasks", + "service_name": "STORM", + "component_name": "NIMBUS" +} + ], + "values": [ +{ + "name": "Total tasks", + "value": "${Total Tasks}" +} + ], + "properties": { +"graph_type": "LINE", +"time_range": "1" + } +} + ] +} + ] +} http://git-wip-us.apache.org/repos/asf/ambari/blob/f1c7514d/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/alerts.json -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/alerts.json b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/alerts.json deleted file mode 100644 index ae03617..000 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/alerts.json +++ /dev/null @@ -1,194 +0,0 @@ -{ - "STORM": { -"service": [ - { -"name": "storm_supervisor_process_percent", -"label": "Percent Supervisors Available", -"interval": 1, -"scope": "SERVICE", -"enabled": true, -"source": { - "type": "AGGREGATE", -
[1/9] ambari git commit: AMBARI-16250: Create STORM service versions in common-services (jluniya)
Repository: ambari Updated Branches: refs/heads/trunk 10e4d1cd5 -> f1c7514d6 http://git-wip-us.apache.org/repos/asf/ambari/blob/f1c7514d/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/metrics.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/metrics.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/metrics.json deleted file mode 100644 index 3d0fdd3..000 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/metrics.json +++ /dev/null @@ -1,1088 +0,0 @@ -{ - "STORM_UI_SERVER": { -"Component": [ - { -"type": "org.apache.ambari.server.controller.metrics.RestMetricsPropertyProvider", -"properties": { - "default_port": "8744", - "port_config_type": "storm-site", - "port_property_name": "storm.port", - "protocol": "http" -}, -"metrics": { - "default": { -"metrics/api/v1/cluster/summary/tasksTotal": { - "metric": "/api/v1/cluster/summary##tasksTotal", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/topology/summary": { - "metric": "/api/v1/topology/summary?field=topologies##topologies", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/slotsTotal": { - "metric": "/api/v1/cluster/summary##slotsTotal", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/slotsFree": { - "metric": "/api/v1/cluster/summary##slotsFree", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/supervisors": { - "metric": "/api/v1/cluster/summary##supervisors", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/executorsTotal": { - "metric": "/api/v1/cluster/summary##executorsTotal", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/slotsUsed": { - "metric": "/api/v1/cluster/summary##slotsUsed", - "pointInTime": true, - "temporal": false -}, - "metrics/api/v1/nimbus/summary": { - "metric": "/api/v1/nimbus/summary?field=nimbuses##nimbuses", - "pointInTime": true, - "temporal": false - } - - } -} - } -], -"HostComponent": [ - { -"type": "org.apache.ambari.server.controller.metrics.RestMetricsPropertyProvider", -"properties": { - "default_port": "8744", - "port_config_type": "storm-site", - "port_property_name": "storm.port", - "protocol": "http" -}, -"metrics": { - "default": { -"metrics/api/v1/cluster/summary/tasksTotal": { - "metric": "/api/v1/cluster/summary##tasksTotal", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/topology/summary": { - "metric": "/api/v1/topology/summary?field=topologies##topologies", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/slotsTotal": { - "metric": "/api/v1/cluster/summary##slotsTotal", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/slotsFree": { - "metric": "/api/v1/cluster/summary##slotsFree", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/supervisors": { - "metric": "/api/v1/cluster/summary##supervisors", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/executorsTotal": { - "metric": "/api/v1/cluster/summary##executorsTotal", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/slotsUsed": { - "metric": "/api/v1/cluster/summary##slotsUsed", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/nimbusUptime": { - "metric": "/api/v1/cluster/summary##nimbusUptime", - "pointInTime": true, - "temporal": false -} - } -} - } -] - }, - "NIMBUS": { -"Component": [ - { -"type": "ganglia", -"metrics": { - "default": { -"metrics/boottime": { -
[6/9] ambari git commit: AMBARI-16250: Create STORM service versions in common-services (jluniya)
http://git-wip-us.apache.org/repos/asf/ambari/blob/f1c7514d/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/storm_upgrade.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/storm_upgrade.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/storm_upgrade.py deleted file mode 100644 index bc245c4..000 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/storm_upgrade.py +++ /dev/null @@ -1,177 +0,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. - -""" -import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set. -import os - -from ambari_commons import yaml_utils -from resource_management.core.logger import Logger -from resource_management.core.exceptions import Fail -from resource_management.core.resources.system import Directory -from resource_management.core.resources.system import File -from resource_management.core.resources.system import Execute -from resource_management.libraries.script.script import Script -from resource_management.libraries.functions.default import default -from resource_management.libraries.functions.format import format - -class StormUpgrade(Script): - """ - Applies to Rolling/Express Upgrade from HDP 2.1 or 2.2 to 2.3 or higher. - - Requirements: Needs to run from a host with ZooKeeper Client. - - This class helps perform some of the upgrade tasks needed for Storm during - a Rolling or Express upgrade. Storm writes data to disk locally and to ZooKeeper. - If any HDP 2.1 or 2.2 bits exist in these directories when an HDP 2.3 instance - starts up, it will fail to start properly. Because the upgrade framework in - Ambari doesn't yet have a mechanism to say "stop all" before starting to - upgrade each component, we need to rely on a Storm trick to bring down - running daemons. By removing the ZooKeeper data with running daemons, those - daemons will die. - """ - - def delete_storm_zookeeper_data(self, env): -""" -Deletes the Storm data from ZooKeeper, effectively bringing down all -Storm daemons. -:return: -""" -import params - -Logger.info('Clearing Storm data from ZooKeeper') - -storm_zookeeper_root_dir = params.storm_zookeeper_root_dir -if storm_zookeeper_root_dir is None: - raise Fail("The storm ZooKeeper directory specified by storm-site/storm.zookeeper.root must be specified") - -# The zookeeper client must be given a zookeeper host to contact. Guaranteed to have at least one host. -storm_zookeeper_server_list = yaml_utils.get_values_from_yaml_array(params.storm_zookeeper_servers) -if storm_zookeeper_server_list is None: - Logger.info("Unable to extract ZooKeeper hosts from '{0}', assuming localhost").format(params.storm_zookeeper_servers) - storm_zookeeper_server_list = ["localhost"] - -# For every zk server, try to remove /storm -zookeeper_data_cleared = False -for storm_zookeeper_server in storm_zookeeper_server_list: - # Determine where the zkCli.sh shell script is - zk_command_location = os.path.join(params.stack_root, "current", "zookeeper-client", "bin", "zkCli.sh") - if params.version is not None: -zk_command_location = os.path.join(params.stack_root, params.version, "zookeeper", "bin", "zkCli.sh") - - # create the ZooKeeper delete command - command = "{0} -server {1}:{2} rmr /storm".format( -zk_command_location, storm_zookeeper_server, params.storm_zookeeper_port) - - # clean out ZK - try: -# the ZK client requires Java to run; ensure it's on the path -env_map = { - 'JAVA_HOME': params.java64_home -} - -# AMBARI-12094: if security is enabled, then we need to tell zookeeper where the -# JAAS file is located since we don't use kinit directly with STORM -if params.security_enabled: - env_map['JVMFLAGS'] = "-Djava.security.auth.login.config={0}".format(params.storm_jaas_file) - -Execute(command, user=params.storm_user, environment=env_map, -
[2/9] ambari git commit: AMBARI-16250: Create STORM service versions in common-services (jluniya)
http://git-wip-us.apache.org/repos/asf/ambari/blob/f1c7514d/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/metrics.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/metrics.json b/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/metrics.json deleted file mode 100644 index 2b46faf..000 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/metrics.json +++ /dev/null @@ -1,1087 +0,0 @@ -{ - "STORM_UI_SERVER": { -"Component": [ - { -"type": "org.apache.ambari.server.controller.metrics.RestMetricsPropertyProvider", -"properties": { - "default_port": "8744", - "port_config_type": "storm-site", - "port_property_name": "storm.port", - "protocol": "http" -}, -"metrics": { - "default": { -"metrics/api/v1/cluster/summary/tasksTotal": { - "metric": "/api/v1/cluster/summary##tasksTotal", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/topology/summary": { - "metric": "/api/v1/topology/summary?field=topologies##topologies", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/slotsTotal": { - "metric": "/api/v1/cluster/summary##slotsTotal", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/slotsFree": { - "metric": "/api/v1/cluster/summary##slotsFree", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/supervisors": { - "metric": "/api/v1/cluster/summary##supervisors", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/executorsTotal": { - "metric": "/api/v1/cluster/summary##executorsTotal", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/slotsUsed": { - "metric": "/api/v1/cluster/summary##slotsUsed", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/nimbusUptime": { - "metric": "/api/v1/cluster/summary##nimbusUptime", - "pointInTime": true, - "temporal": false -} - } -} - } -], -"HostComponent": [ - { -"type": "org.apache.ambari.server.controller.metrics.RestMetricsPropertyProvider", -"properties": { - "default_port": "8744", - "port_config_type": "storm-site", - "port_property_name": "storm.port", - "protocol": "http" -}, -"metrics": { - "default": { -"metrics/api/v1/cluster/summary/tasksTotal": { - "metric": "/api/v1/cluster/summary##tasksTotal", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/topology/summary": { - "metric": "/api/v1/topology/summary?field=topologies##topologies", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/slotsTotal": { - "metric": "/api/v1/cluster/summary##slotsTotal", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/slotsFree": { - "metric": "/api/v1/cluster/summary##slotsFree", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/supervisors": { - "metric": "/api/v1/cluster/summary##supervisors", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/executorsTotal": { - "metric": "/api/v1/cluster/summary##executorsTotal", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/slotsUsed": { - "metric": "/api/v1/cluster/summary##slotsUsed", - "pointInTime": true, - "temporal": false -}, -"metrics/api/v1/cluster/summary/nimbusUptime": { - "metric": "/api/v1/cluster/summary##nimbusUptime", - "pointInTime": true, - "temporal": false -} - } -} - } -] - }, - "NIMBUS": { -"Component": [ - { -"type": "ganglia", -"metrics": { - "default": { -"metrics/boottime": { - "metric": "boottime", - "pointInTime": true, -
[7/9] ambari git commit: AMBARI-16250: Create STORM service versions in common-services (jluniya)
http://git-wip-us.apache.org/repos/asf/ambari/blob/f1c7514d/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/alerts/check_supervisor_process_win.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/alerts/check_supervisor_process_win.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/alerts/check_supervisor_process_win.py deleted file mode 100644 index a698415..000 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/alerts/check_supervisor_process_win.py +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env python - -""" -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. -""" - -from resource_management.libraries.functions import check_windows_service_status - - -RESULT_CODE_OK = 'OK' -RESULT_CODE_CRITICAL = 'CRITICAL' -RESULT_CODE_UNKNOWN = 'UNKNOWN' - - -def get_tokens(): - """ - Returns a tuple of tokens in the format {{site/property}} that will be used - to build the dictionary passed into execute - """ - return () - -def execute(configurations={}, parameters={}, host_name=None): - """ - Returns a tuple containing the result code and a pre-formatted result label - - Keyword arguments: - configurations (dictionary): a mapping of configuration key to value - parameters (dictionary): a mapping of script parameter key to value - host_name (string): the name of this host where the alert is running - """ - - try: -check_windows_service_status("supervisor") -return (RESULT_CODE_OK, ["Supervisor is running"]) - except: -return (RESULT_CODE_CRITICAL, ["Supervisor is stopped"]) http://git-wip-us.apache.org/repos/asf/ambari/blob/f1c7514d/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/files/wordCount.jar -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/files/wordCount.jar b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/files/wordCount.jar deleted file mode 100644 index aed64be..000 Binary files a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/files/wordCount.jar and /dev/null differ http://git-wip-us.apache.org/repos/asf/ambari/blob/f1c7514d/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/drpc_server.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/drpc_server.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/drpc_server.py deleted file mode 100644 index b156578..000 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/drpc_server.py +++ /dev/null @@ -1,139 +0,0 @@ -#!/usr/bin/env python -""" -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. - -""" - -import sys -from resource_management.libraries.functions import check_process_status -from resource_management.libraries.script import Script -from resource_management.libraries.functions import conf_select -from resource_management.libraries.functions import stack_select -from resource_management.libraries.functions import format -from resource_management.core.resources.system import Execute -from resource_management.libraries.functions.stack_features import check_stack_feature -from resource_management.libraries.functions
[3/9] ambari git commit: AMBARI-16250: Create STORM service versions in common-services (jluniya)
http://git-wip-us.apache.org/repos/asf/ambari/blob/f1c7514d/ambari-server/src/main/resources/common-services/STORM/0.9.3/configuration/storm-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.3/configuration/storm-site.xml b/ambari-server/src/main/resources/common-services/STORM/0.9.3/configuration/storm-site.xml new file mode 100644 index 000..62cd3db --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.3/configuration/storm-site.xml @@ -0,0 +1,123 @@ + + + + + + + +storm.thrift.transport +{{storm_thrift_transport}} +The transport plug-in that used for Thrift client/server communication. + + +_storm.thrift.nonsecure.transport +backtype.storm.security.auth.SimpleTransportPlugin +The transport plug-in that used for non-secure mode for for Thrift client/server communication. + + +_storm.thrift.secure.transport + backtype.storm.security.auth.kerberos.KerberosSaslTransportPlugin +The transport plug-in that used for secure mode for Thrift client/server communication. + + + +java.library.path +/usr/local/lib:/opt/local/lib:/usr/lib +This value is passed to spawned JVMs (e.g., Nimbus, Supervisor, and Workers) + for the java.library.path value. java.library.path tells the JVM where + to look for native libraries. It is necessary to set this config correctly since + Storm uses the ZeroMQ and JZMQ native libs. + + + +nimbus.childopts +-Xmx1024m +This parameter is used by the storm-deploy project to configure the jvm options for the nimbus daemon. + + false + + + + +worker.childopts +-Xmx768m +The jvm opts provided to workers launched by this supervisor. All \"%ID%\" substrings are replaced with an identifier for this worker. + + multiLine + + + + +ui.childopts +-Xmx768m _JAAS_PLACEHOLDER +Childopts for Storm UI Java process. + + + +ui.filter +null +Class for Storm UI authentication + + + +supervisor.childopts +-Xmx256m +This parameter is used by the storm-deploy project to configure the jvm options for the supervisor daemon. + + false + + + + +logviewer.childopts +-Xmx128m _JAAS_PLACEHOLDER +Childopts for log viewer java process. + + + +drpc.childopts +-Xmx768m _JAAS_PLACEHOLDER +Childopts for Storm DRPC Java process. + + + +_storm.min.ruid +null +min.user.id is set to the first real user id on the system. If value is 'null' than default value will be taken from key UID_MIN of /etc/login.defs otherwise the specified value will be used for all hosts. + + + +storm.log.dir +{{log_dir}} +Log directory for Storm. + + + +nimbus.authorizer +Log directory for Storm. + + +ranger-storm-plugin-properties +ranger-storm-plugin-enabled + + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/f1c7514d/ambari-server/src/main/resources/common-services/STORM/0.9.3/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.3/metainfo.xml b/ambari-server/src/main/resources/common-services/STORM/0.9.3/metainfo.xml new file mode 100644 index 000..ed4337c --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.3/metainfo.xml @@ -0,0 +1,53 @@ + + + + + 2.0 + + + STORM + Storm + 0.9.3 + common-services/STORM/0.9.1 + + + STORM_REST_API + true + + + + + redhat7,amazon2015,redhat6,suse11,suse12 + + + storm_${stack_version} + + + + + debian7,ubuntu12,ubuntu14 + + + storm-${stack_version} + + + + + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/f1c7514d/ambari-server/src/main/resources/common-services/STORM/0.9.3/metrics.json -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.3/metrics.json b/ambari-server/src/main/resources/common-services/STORM/0.9.3/metrics.json new file mode 100644 index 000..2b46faf --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.3/metrics.json @@ -0,0 +1,1087 @@ +{ + "STORM_UI_SERVER": { +"Component": [ + { +"type": "org.apache.ambari.server.controller.metrics.RestMetricsPropertyProvider", +"properties": { + "default_port": "8744", + "port_config_type": "storm-site", + "port_property_name": "storm.port", + "protocol": "http" +}, +"metrics": { + "default": { +
[4/9] ambari git commit: AMBARI-16250: Create STORM service versions in common-services (jluniya)
http://git-wip-us.apache.org/repos/asf/ambari/blob/f1c7514d/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_windows.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_windows.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_windows.py new file mode 100644 index 000..88e6246 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_windows.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python +""" +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. + +""" + +from resource_management import * +from status_params import * +from resource_management.libraries.functions.default import default + +# server configurations +config = Script.get_config() + +stack_is_hdp23_or_further = Script.is_stack_greater_or_equal("2.3") + +stack_root = os.path.abspath(os.path.join(os.environ["HADOOP_HOME"],"..")) +conf_dir = os.environ["STORM_CONF_DIR"] +hadoop_user = config["configurations"]["cluster-env"]["hadoop.user.name"] +storm_user = hadoop_user + +security_enabled = config['configurations']['cluster-env']['security_enabled'] +default_topology_max_replication_wait_time_sec = default('/configurations/storm-site/topology.max.replication.wait.time.sec.default', -1) +nimbus_hosts = default("/clusterHostInfo/nimbus_hosts", []) +default_topology_min_replication_count = default('/configurations/storm-site/topology.min.replication.count.default', 1) + +#Calculate topology.max.replication.wait.time.sec and topology.min.replication.count +if len(nimbus_hosts) > 1: + # for HA Nimbus + actual_topology_max_replication_wait_time_sec = -1 + actual_topology_min_replication_count = len(nimbus_hosts) / 2 + 1 +else: + # for non-HA Nimbus + actual_topology_max_replication_wait_time_sec = default_topology_max_replication_wait_time_sec + actual_topology_min_replication_count = default_topology_min_replication_count + +if stack_is_hdp23_or_further: + if security_enabled: +storm_thrift_transport = config['configurations']['storm-site']['_storm.thrift.secure.transport'] + else: +storm_thrift_transport = config['configurations']['storm-site']['_storm.thrift.nonsecure.transport'] + +service_map = { + "nimbus" : nimbus_win_service_name, + "supervisor" : supervisor_win_service_name, + "ui" : ui_win_service_name +} http://git-wip-us.apache.org/repos/asf/ambari/blob/f1c7514d/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/rest_api.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/rest_api.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/rest_api.py new file mode 100644 index 000..26fdb27 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/rest_api.py @@ -0,0 +1,81 @@ +#!/usr/bin/env python +""" +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. + +""" + +import sys +from resource_management.libraries.functions import check_process_status +from resource_management.libraries.script import Script +from resource_management.libraries.functions import conf_select +from resource_management.libraries.functions import stack_select +from resource_management.libraries.functions import format +from resource_management.core.resources.system import Execute + +from storm
[9/9] ambari git commit: AMBARI-16250: Create STORM service versions in common-services (jluniya)
AMBARI-16250: Create STORM service versions in common-services (jluniya) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f1c7514d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f1c7514d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f1c7514d Branch: refs/heads/trunk Commit: f1c7514d60cb5ea46647bc759343b20e1a1920e4 Parents: 10e4d1c Author: Jayush Luniya Authored: Thu May 5 15:04:40 2016 -0700 Committer: Jayush Luniya Committed: Thu May 5 15:04:40 2016 -0700 -- .../ambari/server/stack/ServiceModule.java | 24 +- .../apache/ambari/server/stack/StackModule.java |4 +- .../0.10.0/configuration/ranger-storm-audit.xml | 178 +++ .../ranger-storm-plugin-properties.xml | 148 +++ .../ranger-storm-policymgr-ssl.xml | 67 ++ .../configuration/ranger-storm-security.xml | 59 + .../configuration/storm-cluster-log4j.xml | 113 ++ .../STORM/0.10.0/configuration/storm-env.xml| 55 + .../STORM/0.10.0/configuration/storm-site.xml | 60 + .../0.10.0/configuration/storm-worker-log4j.xml | 114 ++ .../common-services/STORM/0.10.0/metainfo.xml | 57 + .../common-services/STORM/0.10.0/metrics.json | 1088 ++ .../common-services/STORM/0.10.0/widgets.json | 127 ++ .../common-services/STORM/0.9.1.2.1/alerts.json | 194 .../STORM/0.9.1.2.1/configuration/storm-env.xml | 139 --- .../0.9.1.2.1/configuration/storm-site.xml | 740 .../STORM/0.9.1.2.1/kerberos.json | 120 -- .../STORM/0.9.1.2.1/metainfo.xml| 181 --- .../STORM/0.9.1.2.1/metrics.json| 829 - .../alerts/check_supervisor_process_win.py | 50 - .../STORM/0.9.1.2.1/package/files/wordCount.jar | Bin 690588 -> 0 bytes .../0.9.1.2.1/package/scripts/drpc_server.py| 139 --- .../STORM/0.9.1.2.1/package/scripts/nimbus.py | 157 --- .../0.9.1.2.1/package/scripts/nimbus_prod.py| 81 -- .../0.9.1.2.1/package/scripts/pacemaker.py | 138 --- .../STORM/0.9.1.2.1/package/scripts/params.py | 29 - .../0.9.1.2.1/package/scripts/params_linux.py | 351 -- .../0.9.1.2.1/package/scripts/params_windows.py | 60 - .../STORM/0.9.1.2.1/package/scripts/rest_api.py | 81 -- .../STORM/0.9.1.2.1/package/scripts/service.py | 97 -- .../0.9.1.2.1/package/scripts/service_check.py | 79 -- .../package/scripts/setup_atlas_storm.py| 45 - .../package/scripts/setup_ranger_storm.py | 101 -- .../0.9.1.2.1/package/scripts/status_params.py | 83 -- .../STORM/0.9.1.2.1/package/scripts/storm.py| 162 --- .../0.9.1.2.1/package/scripts/storm_upgrade.py | 177 --- .../package/scripts/storm_yaml_utils.py | 53 - .../0.9.1.2.1/package/scripts/supervisor.py | 113 -- .../package/scripts/supervisor_prod.py | 84 -- .../package/scripts/supervisord_service.py | 33 - .../0.9.1.2.1/package/scripts/ui_server.py | 180 --- .../package/templates/client_jaas.conf.j2 | 24 - .../0.9.1.2.1/package/templates/config.yaml.j2 | 68 -- .../templates/storm-metrics2.properties.j2 | 26 - .../0.9.1.2.1/package/templates/storm.conf.j2 | 35 - .../package/templates/storm_jaas.conf.j2| 57 - .../package/templates/worker-launcher.cfg.j2| 19 - .../STORM/0.9.1.2.1/quicklinks/quicklinks.json | 28 - .../common-services/STORM/0.9.1/alerts.json | 194 .../STORM/0.9.1/configuration/storm-env.xml | 139 +++ .../STORM/0.9.1/configuration/storm-site.xml| 740 .../common-services/STORM/0.9.1/kerberos.json | 120 ++ .../common-services/STORM/0.9.1/metainfo.xml| 181 +++ .../common-services/STORM/0.9.1/metrics.json| 829 + .../alerts/check_supervisor_process_win.py | 50 + .../STORM/0.9.1/package/files/wordCount.jar | Bin 0 -> 690588 bytes .../STORM/0.9.1/package/scripts/drpc_server.py | 139 +++ .../STORM/0.9.1/package/scripts/nimbus.py | 157 +++ .../STORM/0.9.1/package/scripts/nimbus_prod.py | 81 ++ .../STORM/0.9.1/package/scripts/pacemaker.py| 138 +++ .../STORM/0.9.1/package/scripts/params.py | 29 + .../STORM/0.9.1/package/scripts/params_linux.py | 351 ++ .../0.9.1/package/scripts/params_windows.py | 60 + .../STORM/0.9.1/package/scripts/rest_api.py | 81 ++ .../STORM/0.9.1/package/scripts/service.py | 97 ++ .../0.9.1/package/scripts/service_check.py | 79 ++ .../0.9.1/package/scripts/setup_atlas_storm.py | 45 + .../0.9.1/package/scripts/setup_ranger_storm.py | 101 ++ .../0.9.1/package/scripts/status_params.py | 83 ++ .../STORM/0.9.1/package/scripts/storm.py| 162 +++ .../0.9.1/package/scripts/storm_upgrade.py | 177 +++ .../0.9.1/package/scripts/storm_yaml_utils.py | 53 + .../STORM/0.9.1/package
[5/9] ambari git commit: AMBARI-16250: Create STORM service versions in common-services (jluniya)
http://git-wip-us.apache.org/repos/asf/ambari/blob/f1c7514d/ambari-server/src/main/resources/common-services/STORM/0.9.1/kerberos.json -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/kerberos.json b/ambari-server/src/main/resources/common-services/STORM/0.9.1/kerberos.json new file mode 100644 index 000..fcfe524 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1/kerberos.json @@ -0,0 +1,120 @@ +{ + "services": [ +{ + "name": "STORM", + "identities": [ +{ + "name": "/spnego" +}, +{ + "name": "/smokeuser" +}, +{ + "name": "storm_components", + "principal": { +"value": "${storm-env/storm_user}-${cluster_name|toLower()}@${realm}", +"type": "user", +"configuration": "storm-env/storm_principal_name" + }, + "keytab": { +"file": "${keytab_dir}/storm.headless.keytab", +"owner": { + "name": "${storm-env/storm_user}", + "access": "r" +}, +"group": { + "name": "${cluster-env/user_group}", + "access": "" +}, +"configuration": "storm-env/storm_keytab" + } +} + ], + "configurations": [ +{ + "storm-site": { +"nimbus.authorizer": "backtype.storm.security.auth.authorizer.SimpleACLAuthorizer", +"drpc.authorizer": "backtype.storm.security.auth.authorizer.DRPCSimpleACLAuthorizer", +"ui.filter": "org.apache.hadoop.security.authentication.server.AuthenticationFilter", +"storm.principal.tolocal": "backtype.storm.security.auth.KerberosPrincipalToLocal", +"supervisor.enable": "true", +"storm.zookeeper.superACL": "sasl:{{storm_bare_jaas_principal}}", +"java.security.auth.login.config": "{{conf_dir}}/storm_jaas.conf", +"nimbus.admins": "['{{storm_bare_jaas_principal}}']", +"nimbus.supervisor.users": "['{{storm_bare_jaas_principal}}']", +"ui.filter.params": "{'type': 'kerberos', 'kerberos.principal': '{{storm_ui_jaas_principal}}', 'kerberos.keytab': '{{storm_ui_keytab_path}}', 'kerberos.name.rules': 'DEFAULT'}" + } +} + ], + "components": [ +{ + "name": "STORM_UI_SERVER", + "identities": [ +{ + "name": "/spnego", + "principal": { +"configuration": "storm-env/storm_ui_principal_name" + }, + "keytab": { +"configuration": "storm-env/storm_ui_keytab" + } +} + ] +}, +{ + "name": "NIMBUS", + "identities": [ +{ + "name": "nimbus_server", + "principal": { +"value": "nimbus/_HOST@${realm}", +"type": "service", +"configuration": "storm-env/nimbus_principal_name" + }, + "keytab": { +"file": "${keytab_dir}/nimbus.service.keytab", +"owner": { + "name": "${storm-env/storm_user}", + "access": "r" +}, +"group": { + "name": "${cluster-env/user_group}", + "access": "" +}, +"configuration": "storm-env/nimbus_keytab" + } +} + ] +}, +{ + "name": "DRPC_SERVER", + "identities": [ +{ + "name": "nimbus_server", + "principal": { +"value": "nimbus/_HOST@${realm}", +"type": "service", +"configuration": "storm-env/nimbus_principal_name" + }, + "keytab": { +"file": "${keytab_dir}/nimbus.service.keytab", +"owner": { + "name": "${storm-env/storm_user}", + "access": "r" +}, +"group": { + "name": "${cluster-env/user_group}", + "access": "" +}, +"configuration": "storm-env/nimbus_keytab" + } +} + ] +}, +{ + "name" : "SUPERVISOR" +} + ] +} + ] +} http://git-wip-us.apache.org/repos/asf/ambari/blob/f1c7514d/ambari-server/src/main/resources/common-services/STORM/0.9.1/metainfo.xml -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1/metainfo.xml b/ambari-server/src/main/resources/common-services/STORM/0.9.1/metainfo.xml new file mode 100644 index 000..0f4d520 --- /dev/null +++ b/ambari-server/src/main/resources/common
[2/4] ambari git commit: AMBARI-16248: Create KAFKA service versions in common-services (jluniya)
http://git-wip-us.apache.org/repos/asf/ambari/blob/10e4d1cd/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py -- diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py new file mode 100644 index 000..12ccef6 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py @@ -0,0 +1,297 @@ +#!/usr/bin/env python +""" +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. + +""" +import os +from resource_management.libraries.functions import format +from resource_management.libraries.script.script import Script +from resource_management.libraries.functions.version import format_stack_version +from resource_management.libraries.functions import StackFeature +from resource_management.libraries.functions.stack_features import check_stack_feature +from resource_management.libraries.functions.default import default +from utils import get_bare_principal +from resource_management.libraries.functions.get_stack_version import get_stack_version +from resource_management.libraries.functions.is_empty import is_empty +import status_params +from resource_management.core.logger import Logger +from resource_management.libraries.resources.hdfs_resource import HdfsResource +from resource_management.libraries.functions import stack_select +from resource_management.libraries.functions import conf_select +from resource_management.libraries.functions import get_kinit_path +from resource_management.libraries.functions.get_not_managed_resources import get_not_managed_resources + +# server configurations +config = Script.get_config() +tmp_dir = Script.get_tmp_dir() +stack_root = Script.get_stack_root() +stack_name = default("/hostLevelParams/stack_name", None) +retryAble = default("/commandParams/command_retry_enabled", False) + +# Version being upgraded/downgraded to +version = default("/commandParams/version", None) + +# Version that is CURRENT. +current_version = default("/hostLevelParams/current_version", None) + +host_sys_prepped = default("/hostLevelParams/host_sys_prepped", False) + +stack_version_unformatted = config['hostLevelParams']['stack_version'] +stack_version_formatted = format_stack_version(stack_version_unformatted) +upgrade_direction = default("/commandParams/upgrade_direction", None) +stack_supports_ranger_kerberos = stack_version_formatted and check_stack_feature(StackFeature.RANGER_KERBEROS_SUPPORT, stack_version_formatted) + +# When downgrading the 'version' and 'current_version' are both pointing to the downgrade-target version +# downgrade_from_version provides the source-version the downgrade is happening from +downgrade_from_version = default("/commandParams/downgrade_from_version", None) + +hostname = config['hostname'] + +# default kafka parameters +kafka_home = '/usr/lib/kafka' +kafka_bin = kafka_home+'/bin/kafka' +conf_dir = "/etc/kafka/conf" +limits_conf_dir = "/etc/security/limits.d" + +# Used while upgrading the stack in a kerberized cluster and running kafka-acls.sh +zookeeper_connect = default("/configurations/kafka-broker/zookeeper.connect", None) + +kafka_user_nofile_limit = config['configurations']['kafka-env']['kafka_user_nofile_limit'] +kafka_user_nproc_limit = config['configurations']['kafka-env']['kafka_user_nproc_limit'] + +# parameters for 2.2+ +if stack_version_formatted and check_stack_feature(StackFeature.ROLLING_UPGRADE, stack_version_formatted): + kafka_home = os.path.join(stack_root, "current", "kafka-broker") + kafka_bin = os.path.join(kafka_home, "bin", "kafka") + conf_dir = os.path.join(kafka_home, "config") + +kafka_user = config['configurations']['kafka-env']['kafka_user'] +kafka_log_dir = config['configurations']['kafka-env']['kafka_log_dir'] +kafka_pid_dir = status_params.kafka_pid_dir +kafka_pid_file = kafka_pid_dir+"/kafka.pid" +# This is hardcoded on the kafka bash process lifecycle on which we have no control over +kafka_managed_pid_dir = "/var/run/kafka" +kafka_managed_log_dir = "/var/log/kafka" +user_group = config['configurations']['cluster-env']['user_group'] +jav
[1/4] ambari git commit: AMBARI-16248: Create KAFKA service versions in common-services (jluniya)
Repository: ambari Updated Branches: refs/heads/trunk 96d3afe02 -> 10e4d1cd5 http://git-wip-us.apache.org/repos/asf/ambari/blob/10e4d1cd/ambari-server/src/main/resources/common-services/KAFKA/0.9.0/widgets.json -- diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.9.0/widgets.json b/ambari-server/src/main/resources/common-services/KAFKA/0.9.0/widgets.json new file mode 100644 index 000..7237236 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/KAFKA/0.9.0/widgets.json @@ -0,0 +1,182 @@ +{ + "layouts": [ +{ + "layout_name": "default_kafka_dashboard", + "display_name": "Standard Kafka Dashboard", + "section_name": "KAFKA_SUMMARY", + "widgetLayoutInfo": [ +{ + "widget_name": "Broker Topics", + "description": "Broker Topics", + "widget_type": "GRAPH", + "is_visible": true, + "metrics": [ +{ + "name": "kafka.server.BrokerTopicMetrics.BytesInPerSec.1MinuteRate", + "metric_path": "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesInPerSec/1MinuteRate", + "service_name": "KAFKA", + "component_name": "KAFKA_BROKER" +}, +{ + "name": "kafka.server.BrokerTopicMetrics.BytesOutPerSec.1MinuteRate", + "metric_path": "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesOutPerSec/1MinuteRate", + "service_name": "KAFKA", + "component_name": "KAFKA_BROKER" +}, +{ + "name": "kafka.server.BrokerTopicMetrics.MessagesInPerSec.1MinuteRate", + "metric_path": "metrics/kafka/server/BrokerTopicMetrics/AllTopicsMessagesInPerSec/1MinuteRate", + "service_name": "KAFKA", + "component_name": "KAFKA_BROKER" +} + ], + "values": [ +{ + "name": "Bytes In", + "value": "${kafka.server.BrokerTopicMetrics.BytesInPerSec.1MinuteRate}" +}, +{ + "name": "Bytes Out", + "value": "${kafka.server.BrokerTopicMetrics.BytesOutPerSec.1MinuteRate}" +}, +{ + "name": "Messages In", + "value": "${kafka.server.BrokerTopicMetrics.MessagesInPerSec.1MinuteRate}" +} + ], + "properties": { +"graph_type": "LINE", +"time_range": "1" + } +}, +{ + "widget_name": "Active Controller Count", + "description": "Active Controller Count", + "widget_type": "GRAPH", + "is_visible": true, + "metrics": [ +{ + "name": "kafka.controller.KafkaController.ActiveControllerCount", + "metric_path": "metrics/kafka/controller/KafkaController/ActiveControllerCount", + "service_name": "KAFKA", + "component_name": "KAFKA_BROKER" +} + ], + "values": [ +{ + "name": "Active Controller Count", + "value": "${kafka.controller.KafkaController.ActiveControllerCount}" +} + ], + "properties": { +"graph_type": "LINE", +"time_range": "1" + } +}, +{ + "widget_name": "Controller Status", + "description": "Controller Status", + "widget_type": "GRAPH", + "is_visible": true, + "metrics": [ +{ + "name": "kafka.controller.ControllerStats.LeaderElectionRateAndTimeMs.1MinuteRate", + "metric_path": "metrics/kafka/controller/ControllerStats/LeaderElectionRateAndTimeMs/1MinuteRate", + "service_name": "KAFKA", + "component_name": "KAFKA_BROKER" +}, +{ + "name": "kafka.controller.ControllerStats.UncleanLeaderElectionsPerSec.1MinuteRate", + "metric_path": "metrics/kafka/controller/ControllerStats/UncleanLeaderElectionsPerSec/1MinuteRate", + "service_name": "KAFKA", + "component_name": "KAFKA_BROKER" +} + ], + "values": [ +{ + "name": "Leader Election Rate And Time", + "value": "${kafka.controller.ControllerStats.LeaderElectionRateAndTimeMs.1MinuteRate}" +}, +{ + "name": "Unclean Leader Election", + "value": "${kafka.controller.ControllerStats.UncleanLeaderElectionsPerSec.1MinuteRate}" +} + ], + "properties": { +"graph_type": "LINE", +"time_range": "1" + } +}, +{ + "widget_name": "Replica MaxLag", + "description": "Replica MaxLag", + "widget_type": "GRAPH", + "is_visible": true, + "metri
[3/4] ambari git commit: AMBARI-16248: Create KAFKA service versions in common-services (jluniya)
http://git-wip-us.apache.org/repos/asf/ambari/blob/10e4d1cd/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/setup_ranger_kafka.py -- diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/setup_ranger_kafka.py b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/setup_ranger_kafka.py deleted file mode 100644 index 3a3ecfe..000 --- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/setup_ranger_kafka.py +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/env python -""" -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. -""" -from resource_management.core.logger import Logger -from resource_management.core.resources import File, Execute -from resource_management.libraries.functions.format import format - -def setup_ranger_kafka(): - import params - - if params.has_ranger_admin: - -from resource_management.libraries.functions.setup_ranger_plugin_xml import setup_ranger_plugin - -if params.retryAble: - Logger.info("Kafka: Setup ranger: command retry enables thus retrying if ranger admin is down !") -else: - Logger.info("Kafka: Setup ranger: command retry not enabled thus skipping if ranger admin is down !") - -if params.xml_configurations_supported and params.enable_ranger_kafka and params.xa_audit_hdfs_is_enabled: - if params.has_namenode: -params.HdfsResource("/ranger/audit", - type="directory", - action="create_on_execute", - owner=params.hdfs_user, - group=params.hdfs_user, - mode=0755, - recursive_chmod=True -) -params.HdfsResource("/ranger/audit/kafka", - type="directory", - action="create_on_execute", - owner=params.kafka_user, - group=params.kafka_user, - mode=0700, - recursive_chmod=True -) -params.HdfsResource(None, action="execute") - -setup_ranger_plugin('kafka-broker', 'kafka', -params.downloaded_custom_connector, params.driver_curl_source, -params.driver_curl_target, params.java64_home, -params.repo_name, params.kafka_ranger_plugin_repo, -params.ranger_env, params.ranger_plugin_properties, -params.policy_user, params.policymgr_mgr_url, -params.enable_ranger_kafka, conf_dict=params.conf_dir, -component_user=params.kafka_user, component_group=params.user_group, cache_service_list=['kafka'], -plugin_audit_properties=params.ranger_kafka_audit, plugin_audit_attributes=params.ranger_kafka_audit_attrs, - plugin_security_properties=params.ranger_kafka_security, plugin_security_attributes=params.ranger_kafka_security_attrs, - plugin_policymgr_ssl_properties=params.ranger_kafka_policymgr_ssl, plugin_policymgr_ssl_attributes=params.ranger_kafka_policymgr_ssl_attrs, -component_list=['kafka-broker'], audit_db_is_enabled=params.xa_audit_db_is_enabled, -credential_file=params.credential_file, xa_audit_db_password=params.xa_audit_db_password, - ssl_truststore_password=params.ssl_truststore_password, ssl_keystore_password=params.ssl_keystore_password, -api_version = 'v2', skip_if_rangeradmin_down= not params.retryAble, -is_security_enabled = params.security_enabled, -is_stack_supports_ranger_kerberos = params.stack_supports_ranger_kerberos, -component_user_principal=params.kafka_jaas_principal if params.security_enabled else None, -component_user_keytab=params.kafka_keytab_path if params.security_enabled else None) - -if params.enable_ranger_kafka: - Execute(('cp', '--remove-de
[4/4] ambari git commit: AMBARI-16248: Create KAFKA service versions in common-services (jluniya)
AMBARI-16248: Create KAFKA service versions in common-services (jluniya) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/10e4d1cd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/10e4d1cd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/10e4d1cd Branch: refs/heads/trunk Commit: 10e4d1cd5123c02c34bc342b4d2a4e064623f789 Parents: 96d3afe Author: Jayush Luniya Authored: Thu May 5 15:00:33 2016 -0700 Committer: Jayush Luniya Committed: Thu May 5 15:00:33 2016 -0700 -- .../common-services/KAFKA/0.8.1.2.2/alerts.json | 32 -- .../0.8.1.2.2/configuration/kafka-broker.xml| 357 --- .../KAFKA/0.8.1.2.2/configuration/kafka-env.xml | 102 -- .../0.8.1.2.2/configuration/kafka-log4j.xml | 126 --- .../KAFKA/0.8.1.2.2/metainfo.xml| 90 - .../KAFKA/0.8.1.2.2/metrics.json| 264 -- .../KAFKA/0.8.1.2.2/package/scripts/kafka.py| 234 .../0.8.1.2.2/package/scripts/kafka_broker.py | 129 --- .../KAFKA/0.8.1.2.2/package/scripts/params.py | 297 --- .../0.8.1.2.2/package/scripts/service_check.py | 65 .../package/scripts/setup_ranger_kafka.py | 84 - .../0.8.1.2.2/package/scripts/status_params.py | 26 -- .../KAFKA/0.8.1.2.2/package/scripts/upgrade.py | 78 .../KAFKA/0.8.1.2.2/package/scripts/utils.py| 38 -- .../0.8.1.2.2/package/templates/kafka.conf.j2 | 35 -- .../package/templates/kafka_client_jaas.conf.j2 | 29 -- .../package/templates/kafka_jaas.conf.j2| 41 --- .../package/templates/tools-log4j.properties.j2 | 21 -- .../common-services/KAFKA/0.8.1/alerts.json | 32 ++ .../KAFKA/0.8.1/configuration/kafka-broker.xml | 357 +++ .../KAFKA/0.8.1/configuration/kafka-env.xml | 102 ++ .../KAFKA/0.8.1/configuration/kafka-log4j.xml | 126 +++ .../common-services/KAFKA/0.8.1/metainfo.xml| 108 ++ .../common-services/KAFKA/0.8.1/metrics.json| 264 ++ .../KAFKA/0.8.1/package/scripts/kafka.py| 234 .../KAFKA/0.8.1/package/scripts/kafka_broker.py | 129 +++ .../KAFKA/0.8.1/package/scripts/params.py | 297 +++ .../0.8.1/package/scripts/service_check.py | 65 .../0.8.1/package/scripts/setup_ranger_kafka.py | 84 + .../0.8.1/package/scripts/status_params.py | 26 ++ .../KAFKA/0.8.1/package/scripts/upgrade.py | 78 .../KAFKA/0.8.1/package/scripts/utils.py| 38 ++ .../KAFKA/0.8.1/package/templates/kafka.conf.j2 | 35 ++ .../package/templates/kafka_client_jaas.conf.j2 | 29 ++ .../0.8.1/package/templates/kafka_jaas.conf.j2 | 41 +++ .../package/templates/tools-log4j.properties.j2 | 21 ++ .../common-services/KAFKA/0.9.0/alerts.json | 32 ++ .../KAFKA/0.9.0/configuration/kafka-broker.xml | 154 .../KAFKA/0.9.0/configuration/kafka-env.xml | 28 ++ .../0.9.0/configuration/ranger-kafka-audit.xml | 178 + .../ranger-kafka-plugin-properties.xml | 90 + .../ranger-kafka-policymgr-ssl.xml | 67 .../configuration/ranger-kafka-security.xml | 59 +++ .../common-services/KAFKA/0.9.0/kerberos.json | 49 +++ .../common-services/KAFKA/0.9.0/metainfo.xml| 30 ++ .../common-services/KAFKA/0.9.0/metrics.json| 239 + .../common-services/KAFKA/0.9.0/widgets.json| 182 ++ .../stacks/HDP/2.2/services/KAFKA/metainfo.xml | 21 +- .../stacks/HDP/2.3/services/KAFKA/alerts.json | 32 -- .../KAFKA/configuration/kafka-broker.xml| 154 .../services/KAFKA/configuration/kafka-env.xml | 28 -- .../KAFKA/configuration/ranger-kafka-audit.xml | 178 - .../ranger-kafka-plugin-properties.xml | 90 - .../ranger-kafka-policymgr-ssl.xml | 32 -- .../configuration/ranger-kafka-security.xml | 59 --- .../stacks/HDP/2.3/services/KAFKA/kerberos.json | 49 --- .../stacks/HDP/2.3/services/KAFKA/metainfo.xml | 4 +- .../stacks/HDP/2.3/services/KAFKA/metrics.json | 239 - .../stacks/HDP/2.3/services/KAFKA/widgets.json | 182 -- .../stacks/2.2/KAFKA/test_kafka_broker.py | 2 +- 60 files changed, 3178 insertions(+), 3114 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/10e4d1cd/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/alerts.json -- diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/alerts.json b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/alerts.json deleted file mode 100644 index 4c9884c..000 --- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/alerts.json +++ /dev/null @@
[1/3] ambari git commit: AMBARI-16243: Create ZOOKEEPER service versions in common-services (jluniya)
Repository: ambari Updated Branches: refs/heads/trunk 538a3f13a -> 96d3afe02 http://git-wip-us.apache.org/repos/asf/ambari/blob/96d3afe0/ambari-server/src/test/python/stacks/2.0.6/configs/zk-service_check_2.2.json -- diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/zk-service_check_2.2.json b/ambari-server/src/test/python/stacks/2.0.6/configs/zk-service_check_2.2.json index 33bcfb9..4fa7eab 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/configs/zk-service_check_2.2.json +++ b/ambari-server/src/test/python/stacks/2.0.6/configs/zk-service_check_2.2.json @@ -3,7 +3,7 @@ "command_timeout": "300", "script": "scripts/service_check.py", "script_type": "PYTHON", -"service_package_folder": "common-services/ZOOKEEPER/3.4.5.2.0/package", +"service_package_folder": "common-services/ZOOKEEPER/3.4.5/package", "hooks_folder": "HDP/2.0.6/hooks" }, "roleCommand": "SERVICE_CHECK",
[3/3] ambari git commit: AMBARI-16243: Create ZOOKEEPER service versions in common-services (jluniya)
AMBARI-16243: Create ZOOKEEPER service versions in common-services (jluniya) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/96d3afe0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/96d3afe0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/96d3afe0 Branch: refs/heads/trunk Commit: 96d3afe028891123b42034c8ecad761836e3b376 Parents: 538a3f1 Author: Jayush Luniya Authored: Thu May 5 14:54:44 2016 -0700 Committer: Jayush Luniya Committed: Thu May 5 14:54:44 2016 -0700 -- .../ZOOKEEPER/3.4.5.2.0/alerts.json | 60 -- .../3.4.5.2.0/configuration/zoo.cfg.xml | 87 - .../3.4.5.2.0/configuration/zookeeper-env.xml | 102 -- .../3.4.5.2.0/configuration/zookeeper-log4j.xml | 105 --- .../ZOOKEEPER/3.4.5.2.0/kerberos.json | 39 .../ZOOKEEPER/3.4.5.2.0/metainfo.xml| 97 -- .../ZOOKEEPER/3.4.5.2.0/package/files/zkEnv.sh | 96 -- .../3.4.5.2.0/package/files/zkServer.sh | 120 .../3.4.5.2.0/package/files/zkService.sh| 26 --- .../3.4.5.2.0/package/files/zkSmoke.sh | 93 - .../3.4.5.2.0/package/scripts/__init__.py | 20 -- .../3.4.5.2.0/package/scripts/params.py | 27 --- .../3.4.5.2.0/package/scripts/params_linux.py | 105 --- .../3.4.5.2.0/package/scripts/params_windows.py | 68 --- .../3.4.5.2.0/package/scripts/service_check.py | 73 --- .../3.4.5.2.0/package/scripts/status_params.py | 60 -- .../3.4.5.2.0/package/scripts/zookeeper.py | 164 .../package/scripts/zookeeper_client.py | 83 .../package/scripts/zookeeper_server.py | 189 --- .../package/scripts/zookeeper_service.py| 82 .../package/templates/configuration.xsl.j2 | 42 - .../3.4.5.2.0/package/templates/zoo.cfg.j2 | 53 -- .../templates/zookeeper_client_jaas.conf.j2 | 23 --- .../package/templates/zookeeper_jaas.conf.j2| 26 --- .../common-services/ZOOKEEPER/3.4.5/alerts.json | 60 ++ .../ZOOKEEPER/3.4.5/configuration/zoo.cfg.xml | 87 + .../3.4.5/configuration/zookeeper-env.xml | 102 ++ .../3.4.5/configuration/zookeeper-log4j.xml | 105 +++ .../ZOOKEEPER/3.4.5/kerberos.json | 39 .../ZOOKEEPER/3.4.5/metainfo.xml| 97 ++ .../ZOOKEEPER/3.4.5/package/files/zkEnv.sh | 96 ++ .../ZOOKEEPER/3.4.5/package/files/zkServer.sh | 120 .../ZOOKEEPER/3.4.5/package/files/zkService.sh | 26 +++ .../ZOOKEEPER/3.4.5/package/files/zkSmoke.sh| 93 + .../ZOOKEEPER/3.4.5/package/scripts/__init__.py | 20 ++ .../ZOOKEEPER/3.4.5/package/scripts/params.py | 27 +++ .../3.4.5/package/scripts/params_linux.py | 105 +++ .../3.4.5/package/scripts/params_windows.py | 68 +++ .../3.4.5/package/scripts/service_check.py | 73 +++ .../3.4.5/package/scripts/status_params.py | 60 ++ .../3.4.5/package/scripts/zookeeper.py | 164 .../3.4.5/package/scripts/zookeeper_client.py | 83 .../3.4.5/package/scripts/zookeeper_server.py | 189 +++ .../3.4.5/package/scripts/zookeeper_service.py | 82 .../package/templates/configuration.xsl.j2 | 42 + .../3.4.5/package/templates/zoo.cfg.j2 | 53 ++ .../templates/zookeeper_client_jaas.conf.j2 | 23 +++ .../package/templates/zookeeper_jaas.conf.j2| 26 +++ .../ZOOKEEPER/3.4.6/metainfo.xml| 51 + .../HDP/2.0.6/services/ZOOKEEPER/metainfo.xml | 3 +- .../HDP/2.3/services/ZOOKEEPER/metainfo.xml | 25 +-- .../HDPWIN/2.1/services/ZOOKEEPER/metainfo.xml | 2 +- .../server/stack/KerberosDescriptorTest.java| 2 +- .../2.0.6/ZOOKEEPER/test_zookeeper_client.py| 2 +- .../2.0.6/ZOOKEEPER/test_zookeeper_server.py| 2 +- .../ZOOKEEPER/test_zookeeper_service_check.py | 2 +- .../2.0.6/configs/zk-service_check_2.2.json | 2 +- 57 files changed, 1900 insertions(+), 1871 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/96d3afe0/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/alerts.json -- diff --git a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/alerts.json b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/alerts.json deleted file mode 100644 index 469036a..000 --- a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/alerts.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "ZOOKEEPER": { -"service": [ - { -"name": "zookeeper_server_pr
[2/3] ambari git commit: AMBARI-16243: Create ZOOKEEPER service versions in common-services (jluniya)
http://git-wip-us.apache.org/repos/asf/ambari/blob/96d3afe0/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/configuration/zoo.cfg.xml -- diff --git a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/configuration/zoo.cfg.xml b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/configuration/zoo.cfg.xml new file mode 100644 index 000..c3ba734 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/configuration/zoo.cfg.xml @@ -0,0 +1,87 @@ + + + + + + +tickTime +2000 +Length of single Tick +The length of a single tick in milliseconds, which is the basic time unit used by ZooKeeper + + int + false + ms + + + +initLimit +10 +Ticks to allow for sync at Init +Ticks to allow for sync at Init. + + int + false + + + +syncLimit +5 +Ticks to allow for sync at Runtime +Ticks to allow for sync at Runtime. + + int + false + + + +clientPort +2181 +Port for running ZK Server +Port for running ZK Server. + + int + false + + + +dataDir +/hadoop/zookeeper +ZooKeeper directory +Data directory for ZooKeeper. + + directory + + + +autopurge.snapRetainCount +30 +ZooKeeper purge feature retains the autopurge.snapRetainCount + most recent snapshots and the corresponding transaction + logs in the dataDir and dataLogDir respectively and deletes the rest. + + +autopurge.purgeInterval +24 +The time interval in hours for which the purge task has to be triggered. + Set to a positive integer (1 and above) to enable the auto purging. + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/96d3afe0/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/configuration/zookeeper-env.xml -- diff --git a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/configuration/zookeeper-env.xml b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/configuration/zookeeper-env.xml new file mode 100644 index 000..3b5141a --- /dev/null +++ b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/configuration/zookeeper-env.xml @@ -0,0 +1,102 @@ + + + + + + +zk_user +ZooKeeper User +zookeeper +USER +ZooKeeper User. + + user + false + + + +zk_log_dir +/var/log/zookeeper +ZooKeeper Log Dir +ZooKeeper Log Dir + + directory + false + + + +zk_pid_dir +/var/run/zookeeper +ZooKeeper PID Dir +ZooKeeper Pid Dir + + directory + false + true + + + +zk_server_heapsize +1024 +Maximum amount of memory each Zookeeper Server can use. +Zookeeper Server Maximum Memory + + int + 256 + 32768 + MB + 256 + + + +zookeeper_principal_name +ZooKeeper principal name + + + +zookeeper_keytab_path +ZooKeeper keytab path + + + + + +content +This is the jinja template for zookeeper-env.sh file + +export JAVA_HOME={{java64_home}} +export ZOOKEEPER_HOME={{zk_home}} +export ZOO_LOG_DIR={{zk_log_dir}} +export ZOOPIDFILE={{zk_pid_file}} +export SERVER_JVMFLAGS={{zk_server_heapsize}} +export JAVA=$JAVA_HOME/bin/java +export CLASSPATH=$CLASSPATH:/usr/share/zookeeper/* + +{% if security_enabled %} +export SERVER_JVMFLAGS="$SERVER_JVMFLAGS -Djava.security.auth.login.config={{zk_server_jaas_file}}" +export CLIENT_JVMFLAGS="$CLIENT_JVMFLAGS -Djava.security.auth.login.config={{zk_client_jaas_file}}" +{% endif %} + + + content + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/96d3afe0/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/configuration/zookeeper-log4j.xml -- diff --git a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/configuration/zookeeper-log4j.xml b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/configuration/zookeeper-log4j.xml new file mode 100644 index 000..ede4630 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5/configuration/zookeeper-log4j.xml @@ -0,0 +1,105 @@ + + + + + + + +content +Custom log4j.properties + +# +# +# 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
ambari git commit: AMBARI-16262. Change construct for llap quick link. (Jaimin)
Repository: ambari Updated Branches: refs/heads/trunk be7f69625 -> 538a3f13a AMBARI-16262. Change construct for llap quick link. (Jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/538a3f13 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/538a3f13 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/538a3f13 Branch: refs/heads/trunk Commit: 538a3f13adef72af4b3bf1c8ed140332cda65eaf Parents: be7f696 Author: Jaimin Jetly Authored: Thu May 5 11:57:41 2016 -0700 Committer: Jaimin Jetly Committed: Thu May 5 11:58:12 2016 -0700 -- .../stacks/HDP/2.5/services/HIVE/quicklinks/quicklinks.json| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/538a3f13/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/quicklinks/quicklinks.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/quicklinks/quicklinks.json b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/quicklinks/quicklinks.json index 3080685..e586d20 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/quicklinks/quicklinks.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/quicklinks/quicklinks.json @@ -37,7 +37,7 @@ "label": "HiveServer2 Interactive UI", "requires_user_name": "false", "component_name": "HIVE_SERVER_INTERACTIVE", -"url": "%@://%@:%@/llap/llap0", +"url": "%@://%@:%@/llap.html", "port":{ "http_property": "hive.server2.webui.port", "http_default_port": "10502",
ambari git commit: AMBARI-16237: PXF alert: change the message to make it more meaningful when both namenodes are down on Secured HA cluster.
Repository: ambari Updated Branches: refs/heads/trunk 1770820a7 -> be7f69625 AMBARI-16237: PXF alert: change the message to make it more meaningful when both namenodes are down on Secured HA cluster. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/be7f6962 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/be7f6962 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/be7f6962 Branch: refs/heads/trunk Commit: be7f69625e354123facf0df369a29a3da85462ec Parents: 1770820 Author: Jun Aoki Authored: Thu May 5 11:28:20 2016 -0700 Committer: Jun Aoki Committed: Thu May 5 11:28:20 2016 -0700 -- .../libraries/functions/namenode_ha_utils.py| 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/be7f6962/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py b/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py index ee16c9b..919ccb5 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/namenode_ha_utils.py @@ -17,7 +17,6 @@ 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. ''' -from resource_management.libraries.script import UnknownConfiguration from resource_management.libraries.functions.is_empty import is_empty from resource_management.libraries.functions.format import format from resource_management.libraries.functions.jmx import get_value_from_jmx @@ -140,8 +139,8 @@ def get_active_namenode(hdfs_site, security_enabled, run_user): active_namenodes = get_namenode_states(hdfs_site, security_enabled, run_user)[0] if active_namenodes: return active_namenodes[0] - else: -return UnknownConfiguration('fs_root') + + raise Fail('No active NameNode was found.') def get_property_for_active_namenode(hdfs_site, property_name, security_enabled, run_user): """
ambari git commit: AMBARI-16264 Clean up local DB when get back to step 0 of installer wizard (zhewang)
Repository: ambari Updated Branches: refs/heads/trunk e04bca9ba -> 1770820a7 AMBARI-16264 Clean up local DB when get back to step 0 of installer wizard (zhewang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1770820a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1770820a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1770820a Branch: refs/heads/trunk Commit: 1770820a7aa9aacca7a6352d70be7cde7b280556 Parents: e04bca9 Author: Zhe (Joe) Wang Authored: Thu May 5 10:29:40 2016 -0700 Committer: Zhe (Joe) Wang Committed: Thu May 5 10:29:40 2016 -0700 -- .../app/controllers/wizard/step1_controller.js | 3 ++ ambari-web/app/routes/installer.js | 31 2 files changed, 34 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1770820a/ambari-web/app/controllers/wizard/step1_controller.js -- diff --git a/ambari-web/app/controllers/wizard/step1_controller.js b/ambari-web/app/controllers/wizard/step1_controller.js index dc95a45..3eb5d1b 100644 --- a/ambari-web/app/controllers/wizard/step1_controller.js +++ b/ambari-web/app/controllers/wizard/step1_controller.js @@ -121,6 +121,9 @@ App.WizardStep1Controller = Em.Controller.extend({ }, changeUseRedhatSatellite: function () { +if (App.router.get('installerController.currentStep') !== "1") { + return; +} if (this.get('selectedStack.useRedhatSatellite')) { return App.ModalPopup.show({ header: Em.I18n.t('common.important'), http://git-wip-us.apache.org/repos/asf/ambari/blob/1770820a/ambari-web/app/routes/installer.js -- diff --git a/ambari-web/app/routes/installer.js b/ambari-web/app/routes/installer.js index f280049..eacf30f 100644 --- a/ambari-web/app/routes/installer.js +++ b/ambari-web/app/routes/installer.js @@ -104,9 +104,40 @@ module.exports = Em.Route.extend(App.RouterRedirections, { next: function (router) { console.time('step0 next'); var installerController = router.get('installerController'); + var wizardStep1Controller = router.get('wizardStep1Controller'); installerController.save('cluster'); App.db.setStacks(undefined); + App.db.setRepos(undefined); + App.db.setLocalRepoVDFData(undefined); + App.Stack.find().clear(); + installerController.set('content.stacks',undefined); + wizardStep1Controller.set('skipValidationChecked', false); + wizardStep1Controller.set('optionsToSelect', { +'usePublicRepo': { + index: 0, + isSelected: true +}, +'useLocalRepo': { + index: 1, + isSelected: false, + 'uploadFile': { +index: 0, +name: 'uploadFile', +file: '', +hasError: false, +isSelected: true + }, + 'enterUrl': { +index: 1, +name: 'enterUrl', +url: '', +placeholder: 'Enter URL to Version Definition File', +hasError: false, +isSelected: false + } +} + }); router.transitionTo('step1'); console.timeEnd('step0 next'); }
ambari git commit: AMBARI-16260. Hive View: Prevent multiple /database calls when the first call takes time or fails. (dipayanb)
Repository: ambari Updated Branches: refs/heads/branch-2.2 164c2f977 -> 1beedcf4a AMBARI-16260. Hive View: Prevent multiple /database calls when the first call takes time or fails. (dipayanb) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1beedcf4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1beedcf4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1beedcf4 Branch: refs/heads/branch-2.2 Commit: 1beedcf4a199913a83fbc9e87196e0ef3935694d Parents: 164c2f9 Author: Dipayan Bhowmick Authored: Thu May 5 19:52:40 2016 +0530 Committer: Dipayan Bhowmick Committed: Thu May 5 19:53:52 2016 +0530 -- .../ui/hive-web/app/controllers/databases.js| 25 +++- 1 file changed, 19 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1beedcf4/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/databases.js -- diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/databases.js b/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/databases.js index a841e3b..b76bca3 100644 --- a/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/databases.js +++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/databases.js @@ -32,6 +32,8 @@ export default Ember.Controller.extend({ tableSearchResults: Ember.Object.create(), + isDatabaseRefreshInProgress: false, + tableControls: [ { icon: 'fa-list', @@ -157,6 +159,8 @@ export default Ember.Controller.extend({ var self = this; var selectedDatabase = this.get('selectedDatabase.name') || 'default'; +this.set('isDatabaseRefreshInProgress', true); + this.set('isLoading', true); this.get('databaseService').getDatabases().then(function (databases) { @@ -168,12 +172,13 @@ export default Ember.Controller.extend({ if(error.status == 401) { self.send('passwordLDAPDB'); } - - +}).finally(function() { + self.set('isDatabaseRefreshInProgress', false); }); }.on('init'), syncDatabases: function() { +this.set('isDatabaseRefreshInProgress', true); var oldDatabaseNames = this.store.all('database').mapBy('name'); var self = this; return this.get('databaseService').getDatabasesFromServer().then(function(data) { @@ -194,6 +199,8 @@ export default Ember.Controller.extend({ }); } }); +}).finally(function() { + self.set('isDatabaseRefreshInProgress', false); }); }, @@ -201,8 +208,10 @@ export default Ember.Controller.extend({ // This was required so that the unit test would not stall if(ENV.environment !== "test") { Ember.run.later(this, function() { -this.syncDatabases(); -this.initiateDatabaseSync(); +if (this.get('isDatabaseRefreshInProgress') === false) { + this.syncDatabases(); + this.initiateDatabaseSync(); +} }, 15000); } }.on('init'), @@ -222,8 +231,12 @@ export default Ember.Controller.extend({ actions: { refreshDatabaseExplorer: function () { - this.getDatabases(); - this.resetSearch(); + if (this.get('isDatabaseRefreshInProgress') === false) { +this.getDatabases(); +this.resetSearch(); + } else { +console.log("Databases refresh is in progress. Skipping this request."); + } }, passwordLDAPDB: function(){
ambari git commit: AMBARI-16260. Hive View: Prevent multiple /database calls when the first call takes time or fails. (dipayanb)
Repository: ambari Updated Branches: refs/heads/trunk 5c782dd84 -> e04bca9ba AMBARI-16260. Hive View: Prevent multiple /database calls when the first call takes time or fails. (dipayanb) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e04bca9b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e04bca9b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e04bca9b Branch: refs/heads/trunk Commit: e04bca9ba04b86c93670b9333dbccd81f5eeb8a9 Parents: 5c782dd Author: Dipayan Bhowmick Authored: Thu May 5 19:52:40 2016 +0530 Committer: Dipayan Bhowmick Committed: Thu May 5 19:52:40 2016 +0530 -- .../ui/hive-web/app/controllers/databases.js| 25 +++- 1 file changed, 19 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e04bca9b/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/databases.js -- diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/databases.js b/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/databases.js index a841e3b..b76bca3 100644 --- a/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/databases.js +++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/databases.js @@ -32,6 +32,8 @@ export default Ember.Controller.extend({ tableSearchResults: Ember.Object.create(), + isDatabaseRefreshInProgress: false, + tableControls: [ { icon: 'fa-list', @@ -157,6 +159,8 @@ export default Ember.Controller.extend({ var self = this; var selectedDatabase = this.get('selectedDatabase.name') || 'default'; +this.set('isDatabaseRefreshInProgress', true); + this.set('isLoading', true); this.get('databaseService').getDatabases().then(function (databases) { @@ -168,12 +172,13 @@ export default Ember.Controller.extend({ if(error.status == 401) { self.send('passwordLDAPDB'); } - - +}).finally(function() { + self.set('isDatabaseRefreshInProgress', false); }); }.on('init'), syncDatabases: function() { +this.set('isDatabaseRefreshInProgress', true); var oldDatabaseNames = this.store.all('database').mapBy('name'); var self = this; return this.get('databaseService').getDatabasesFromServer().then(function(data) { @@ -194,6 +199,8 @@ export default Ember.Controller.extend({ }); } }); +}).finally(function() { + self.set('isDatabaseRefreshInProgress', false); }); }, @@ -201,8 +208,10 @@ export default Ember.Controller.extend({ // This was required so that the unit test would not stall if(ENV.environment !== "test") { Ember.run.later(this, function() { -this.syncDatabases(); -this.initiateDatabaseSync(); +if (this.get('isDatabaseRefreshInProgress') === false) { + this.syncDatabases(); + this.initiateDatabaseSync(); +} }, 15000); } }.on('init'), @@ -222,8 +231,12 @@ export default Ember.Controller.extend({ actions: { refreshDatabaseExplorer: function () { - this.getDatabases(); - this.resetSearch(); + if (this.get('isDatabaseRefreshInProgress') === false) { +this.getDatabases(); +this.resetSearch(); + } else { +console.log("Databases refresh is in progress. Skipping this request."); + } }, passwordLDAPDB: function(){
[2/2] ambari git commit: AMBARI-16257 Cover Kerberos wizard controllers with unit tests. (atkach)
AMBARI-16257 Cover Kerberos wizard controllers with unit tests. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5c782dd8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5c782dd8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5c782dd8 Branch: refs/heads/trunk Commit: 5c782dd843c3fca5891e8c937c1d93c9d0fdfaad Parents: 0a745f8 Author: Andrii Tkach Authored: Wed May 4 20:46:15 2016 +0300 Committer: Andrii Tkach Committed: Thu May 5 13:26:29 2016 +0300 -- ambari-web/app/assets/test/tests.js | 5 + .../main/admin/kerberos/step1_controller.js | 6 +- .../main/admin/kerberos/step2_controller.js | 108 ++- .../main/admin/kerberos/step3_controller.js | 6 +- .../main/admin/kerberos/step4_controller.js | 15 +- .../main/admin/kerberos/step5_controller.js | 65 +- .../main/admin/kerberos/step7_controller.js | 7 +- .../main/admin/kerberos/wizard_controller.js| 38 +- .../admin/kerberos/disable_controller_test.js | 122 +++ .../kerberos/kerberos_wizard_controler_test.js | 507 +++- .../admin/kerberos/step1_controller_test.js | 93 +++ .../admin/kerberos/step2_controller_test.js | 793 ++- .../admin/kerberos/step3_controller_test.js | 190 - .../admin/kerberos/step4_controller_test.js | 394 - .../admin/kerberos/step5_controller_test.js | 176 +++- .../admin/kerberos/step6_controller_test.js | 113 ++- .../admin/kerberos/step7_controller_test.js | 220 + .../admin/kerberos/step8_controller_test.js | 64 ++ 18 files changed, 2808 insertions(+), 114 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5c782dd8/ambari-web/app/assets/test/tests.js -- diff --git a/ambari-web/app/assets/test/tests.js b/ambari-web/app/assets/test/tests.js index 7226720..eb2edf1 100644 --- a/ambari-web/app/assets/test/tests.js +++ b/ambari-web/app/assets/test/tests.js @@ -58,11 +58,16 @@ var files = [ 'test/controllers/main/alerts/manage_alert_notifications_controller_test', 'test/controllers/main/admin/kerberos_test', 'test/controllers/main/admin/kerberos/kerberos_wizard_controler_test', + 'test/controllers/main/admin/kerberos/disable_controller_test', + 'test/controllers/main/admin/kerberos/step1_controller_test', 'test/controllers/main/admin/kerberos/step2_controller_test', 'test/controllers/main/admin/kerberos/step3_controller_test', 'test/controllers/main/admin/kerberos/step4_controller_test', 'test/controllers/main/admin/kerberos/step5_controller_test', 'test/controllers/main/admin/kerberos/step6_controller_test', + 'test/controllers/main/admin/kerberos/step7_controller_test', + 'test/controllers/main/admin/kerberos/step8_controller_test', + 'test/controllers/main/admin/stack_and_upgrade_controller_test', 'test/controllers/main/admin/serviceAccounts_controller_test', 'test/controllers/main/admin/highAvailability_controller_test', http://git-wip-us.apache.org/repos/asf/ambari/blob/5c782dd8/ambari-web/app/controllers/main/admin/kerberos/step1_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/kerberos/step1_controller.js b/ambari-web/app/controllers/main/admin/kerberos/step1_controller.js index 1b96b13..7f561dd 100644 --- a/ambari-web/app/controllers/main/admin/kerberos/step1_controller.js +++ b/ambari-web/app/controllers/main/admin/kerberos/step1_controller.js @@ -44,7 +44,7 @@ App.KerberosWizardStep1Controller = Em.Controller.extend({ Em.Object.create({ displayText: Em.I18n.t('admin.kerberos.wizard.step1.option.ipa.condition.4'), checked: false - }), + }) ] }), @@ -125,9 +125,7 @@ App.KerberosWizardStep1Controller = Em.Controller.extend({ * precondition for the selected KDC option */ selectedOption: function () { -var options = this.get('options'); -var selectedItem = this.get('selectedItem'); -return options.findProperty('value', selectedItem); +return this.get('options').findProperty('value', this.get('selectedItem')); }.property('selectedItem'), http://git-wip-us.apache.org/repos/asf/ambari/blob/5c782dd8/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js b/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js index 52177b7..ce622e4 100644 --- a/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js +++ b/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js @@ -36,6 +36,21 @@ App.Kerbe
[1/2] ambari git commit: AMBARI-16257 Cover Kerberos wizard controllers with unit tests. (atkach)
Repository: ambari Updated Branches: refs/heads/trunk 0a745f8ba -> 5c782dd84 http://git-wip-us.apache.org/repos/asf/ambari/blob/5c782dd8/ambari-web/test/controllers/main/admin/kerberos/step4_controller_test.js -- diff --git a/ambari-web/test/controllers/main/admin/kerberos/step4_controller_test.js b/ambari-web/test/controllers/main/admin/kerberos/step4_controller_test.js index 1d69a29..8ef0fe8 100644 --- a/ambari-web/test/controllers/main/admin/kerberos/step4_controller_test.js +++ b/ambari-web/test/controllers/main/admin/kerberos/step4_controller_test.js @@ -17,14 +17,43 @@ */ var App = require('app'); -var c = App.KerberosWizardStep4Controller.create({ - wizardController: Em.Object.create({ -name: '' - }) -}); +var testHelpers = require('test/helpers'); + +function getController() { + return App.KerberosWizardStep4Controller.create({ +wizardController: Em.Object.create({ + name: '' +}) + }); +} + describe('App.KerberosWizardStep4Controller', function() { + var c; + + beforeEach(function() { +c = getController(); + }); - App.TestAliases.testAsComputedEqual(c, 'isWithinAddService', 'wizardController.name', 'addServiceController'); + App.TestAliases.testAsComputedEqual(getController(), 'isWithinAddService', 'wizardController.name', 'addServiceController'); + + describe("#clearStep()", function () { + +beforeEach(function() { + c.clearStep(); +}); + +it("isRecommendedLoaded should be set to false", function() { + expect(c.get('isRecommendedLoaded')).to.be.false; +}); + +it("selectedService should be set to null", function() { + expect(c.get('selectedService')).to.be.null; +}); + +it("stepConfigs should be set to false", function() { + expect(c.get('stepConfigs')).to.be.empty; +}); + }); describe('#isSubmitDisabled', function() { var controller = App.KerberosWizardStep4Controller.create({}); @@ -537,4 +566,357 @@ describe('App.KerberosWizardStep4Controller', function() { }); }); }); + + describe("#getDescriptor()", function () { +var mock = { + then: Em.K +}; + +beforeEach(function() { + c.reopen({ +isWithinAddService: true + }); + sinon.stub(c, 'storeClusterDescriptorStatus'); + sinon.stub(c, 'loadClusterDescriptorConfigs').returns(mock); + sinon.stub(c, 'loadStackDescriptorConfigs').returns(mock); + sinon.stub(mock, 'then'); +}); + +afterEach(function() { + c.loadClusterDescriptorConfigs.restore(); + c.storeClusterDescriptorStatus.restore(); + c.loadStackDescriptorConfigs.restore(); + mock.then.restore(); +}); + +it("App.ajax.send should be called", function() { + c.getDescriptor(); + var args = testHelpers.findAjaxRequest('name', 'admin.kerberize.cluster_descriptor_artifact'); + expect(args[0]).to.be.eql({ +sender: c, +name: 'admin.kerberize.cluster_descriptor_artifact' + }); +}); + +it("storeClusterDescriptorStatus should be called", function() { + c.getDescriptor(); + expect(c.storeClusterDescriptorStatus.calledOnce).to.be.true; +}); + +it("loadClusterDescriptorConfigs should be called", function() { + c.getDescriptor(); + expect(c.loadClusterDescriptorConfigs.calledOnce).to.be.true; +}); + +it("then should be called", function() { + c.getDescriptor(); + expect(mock.then.calledOnce).to.be.true; +}); + +it("loadStackDescriptorConfigs should be called", function() { + c.set('isWithinAddService', false); + c.getDescriptor(); + expect(c.loadStackDescriptorConfigs.calledOnce).to.be.true; +}); + +it("then should be called, isWithinAddService is false", function() { + c.set('isWithinAddService', false); + c.getDescriptor(); + expect(mock.then.calledOnce).to.be.true; +}); + }); + + describe("#tweakConfigProperty()", function () { + +beforeEach(function() { + this.mock = sinon.stub(App.HostComponent, 'find'); +}); + +afterEach(function() { + this.mock.restore(); +}); + +it("config value should not be set", function() { + this.mock.returns([ +Em.Object.create({ + componentName: 'HIVE_METASTORE', + hostName: 'host1' +}) + ]); + var config = Em.Object.create({ +name: 'templeton.hive.properties', +value: 'thrift://host1:9000\,,', +recommendedValue: '' + }); + c.tweakConfigProperty(config); + expect(config.get('value')).to.be.equal('thrift://host1:9000\,,'); + expect(config.get('recommendedValue')).to.be.equal(''); +}); + +it("config value should be set", function() { + this.mock.returns([ +Em.Object.create({ + componentName: 'HIVE_METASTORE', + hostName: 'host1' +}), +Em.Object.create({ + componentName: 'HIVE_META
ambari git commit: AMBARI-16265. Storm python tests are brocken.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/trunk 8a49b60f6 -> 0a745f8ba AMBARI-16265. Storm python tests are brocken.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0a745f8b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0a745f8b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0a745f8b Branch: refs/heads/trunk Commit: 0a745f8bacf924b13cb4ba5d444dec45fd492830 Parents: 8a49b60 Author: Vitaly Brodetskyi Authored: Thu May 5 12:01:50 2016 +0300 Committer: Vitaly Brodetskyi Committed: Thu May 5 12:01:50 2016 +0300 -- .../src/test/python/stacks/2.1/STORM/test_storm_ui_server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0a745f8b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py -- diff --git a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py index a61f5ed..101fbe6 100644 --- a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py +++ b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py @@ -69,7 +69,7 @@ class TestStormUiServer(TestStormBase): user = 'storm', not_if = "ambari-sudo.sh su storm -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]ls /var/run/storm/ui.pid >/dev/null 2>&1 && ps -p `cat /var/run/storm/ui.pid` >/dev/null 2>&1'", ) -self.assertResourceCalled('Execute', "/usr/jdk64/jdk1.7.0_45/bin/jps -l | grep backtype.storm.ui.core$ && /usr/jdk64/jdk1.7.0_45/bin/jps -l | grep backtype.storm.ui.core$ | awk {'print $1'} > /var/run/storm/ui.pid", +self.assertResourceCalled('Execute', "/usr/jdk64/jdk1.7.0_45/bin/jps -l | grep storm.ui.core$ && /usr/jdk64/jdk1.7.0_45/bin/jps -l | grep storm.ui.core$ | awk {'print $1'} > /var/run/storm/ui.pid", logoutput = True, path = ['/usr/bin'], tries = 12, @@ -144,7 +144,7 @@ class TestStormUiServer(TestStormBase): user = 'storm', not_if = "ambari-sudo.sh su storm -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]ls /var/run/storm/ui.pid >/dev/null 2>&1 && ps -p `cat /var/run/storm/ui.pid` >/dev/null 2>&1'", ) -self.assertResourceCalled('Execute', "/usr/jdk64/jdk1.7.0_45/bin/jps -l | grep backtype.storm.ui.core$ && /usr/jdk64/jdk1.7.0_45/bin/jps -l | grep backtype.storm.ui.core$ | awk {'print $1'} > /var/run/storm/ui.pid", +self.assertResourceCalled('Execute', "/usr/jdk64/jdk1.7.0_45/bin/jps -l | grep storm.ui.core$ && /usr/jdk64/jdk1.7.0_45/bin/jps -l | grep storm.ui.core$ | awk {'print $1'} > /var/run/storm/ui.pid", logoutput = True, path = ['/usr/bin'], tries = 12,