ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From avija...@apache.org
Subject [1/7] ambari git commit: AMBARI-22717 : Remove Anomaly Detection code from branch-3.0-ams. (avijayan)
Date Tue, 02 Jan 2018 21:59:39 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-3.0-ams 8329f46b9 -> 25c181210


http://git-wip-us.apache.org/repos/asf/ambari/blob/25c18121/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-admanager-log4j.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-admanager-log4j.xml b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-admanager-log4j.xml
deleted file mode 100644
index ad28dcd..0000000
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-admanager-log4j.xml
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one
-  ~ or more contributor license agreements.  See the NOTICE file
-  ~ distributed with this work for additional information
-  ~ regarding copyright ownership.  The ASF licenses this file
-  ~ to you under the Apache License, Version 2.0 (the
-  ~ "License"); you may not use this file except in compliance
-  ~ with the License.  You may obtain a copy of the License at
-  ~
-  ~     http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-<configuration supports_final="false" supports_adding_forbidden="true">
-    <property>
-        <name>ams_ad_log_max_backup_size</name>
-        <value>80</value>
-        <description>The maximum size of backup file before the log is rotated</description>
-        <display-name>AMS AD Manager Log: backup file size</display-name>
-        <value-attributes>
-            <unit>MB</unit>
-        </value-attributes>
-        <on-ambari-upgrade add="true"/>
-    </property>
-    <property>
-        <name>ams_ad_log_number_of_backup_files</name>
-        <value>60</value>
-        <description>The number of backup files</description>
-        <display-name>AMS AD Manager Log: # of backup files</display-name>
-        <value-attributes>
-            <type>int</type>
-            <minimum>0</minimum>
-        </value-attributes>
-        <on-ambari-upgrade add="true"/>
-    </property>
-    <property>
-        <name>content</name>
-        <display-name>ams-ad-log4j template</display-name>
-        <description>Custom log4j.properties</description>
-        <value>
-            #
-            # 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.
-            #
-
-            # Define some default values that can be overridden by system properties
-            ams.ad.log.dir={{ams_ad_log_dir}}
-            ams.ad.log.file=ambari-metrics-admanager.log
-
-            # Root logger option
-            log4j.rootLogger=INFO,file
-
-            # Direct log messages to a log file
-            log4j.appender.file=org.apache.log4j.RollingFileAppender
-            log4j.appender.file.File=${ams.ad.log.dir}/${ams.ad.log.file}
-            log4j.appender.file.MaxFileSize={{ams_ad_log_max_backup_size}}MB
-            log4j.appender.file.MaxBackupIndex={{ams_ad_log_number_of_backup_files}}
-            log4j.appender.file.layout=org.apache.log4j.PatternLayout
-            log4j.appender.file.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
-        </value>
-        <value-attributes>
-            <type>content</type>
-            <show-property-name>false</show-property-name>
-        </value-attributes>
-        <on-ambari-upgrade add="true"/>
-    </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/25c18121/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-admanager-spark-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-admanager-spark-env.xml b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-admanager-spark-env.xml
deleted file mode 100644
index 3c2fb89..0000000
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/configuration/ams-admanager-spark-env.xml
+++ /dev/null
@@ -1,129 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
-<!--
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-<configuration supports_adding_forbidden="true">
-  <property>
-    <name>spark_daemon_memory</name>
-    <value>512</value>
-    <description>Memory for Master, Worker and history server (default: 1G)</description>
-    <value-attributes>
-      <type>int</type>
-      <unit>MB</unit>
-    </value-attributes>
-    <on-ambari-upgrade add="true"/>
-  </property>
-  <property>
-    <name>spark_master_port</name>
-    <value>6190</value>
-    <description>Start the master on this port</description>
-    <on-ambari-upgrade add="true"/>
-  </property>
-  <property>
-    <name>spark_master_webui_port</name>
-    <value>6180</value>
-    <description>Port for the master web UI</description>
-    <on-ambari-upgrade add="true"/>
-  </property>
-  <property>
-    <name>spark_worker_cores</name>
-    <value>4</value>
-    <description>Total number of cores to allow Spark applications to use on the machine</description>
-    <on-ambari-upgrade add="true"/>
-  </property>
-  <property>
-    <name>spark_worker_memory</name>
-    <value>2048</value>
-    <description>Total amount of memory to allow Spark applications to use on the machine</description>
-    <on-ambari-upgrade add="true"/>
-  </property>
-  <property>
-    <name>spark_worker_webui_port</name>
-    <value>6181</value>
-    <description>Port for the worker web UI</description>
-    <on-ambari-upgrade add="true"/>
-  </property>
-  <property>
-    <name>content</name>
-    <description>This is the jinja template for spark-env.sh file</description>
-    <value>
-      #!/usr/bin/env bash
-
-      # This file is sourced when running various Spark programs.
-      # Copy it as spark-env.sh and edit that to configure Spark for your site.
-
-      # Generic options for the daemons used in the standalone deploy mode
-
-      export SPARK_MASTER_HOST={{hostname}}
-      export SPARK_MASTER_PORT={{spark_master_port}}
-      export SPARK_MASTER_WEBUI_PORT={{spark_master_webui_port}}
-      export SPARK_WORKER_CORES={{spark_worker_cores}}
-      export SPARK_WORKER_MEMORY={{spark_worker_memory}}m
-      export SPARK_WORKER_WEBUI_PORT={{spark_worker_webui_port}}
-      export SPARK_WORKER_DIR={{ams_ad_log_dir}}
-
-      export SPARK_MASTER_OPTS=$SPARK_MASTER_OPTS
-      export SPARK_WORKER_OPTS=$SPARK_WORKER_OPTS
-
-      export SPARK_MASTER_PORT={{spark_master_port}}
-      # Alternate conf dir. (Default: ${SPARK_HOME}/conf)
-      export SPARK_CONF_DIR={{ams_ad_conf_dir}}
-
-      # Where log files are stored.(Default:${SPARK_HOME}/logs)
-      export SPARK_LOG_DIR={{ams_ad_log_dir}}
-
-      # Where the pid file is stored. (Default: /tmp)
-      export SPARK_PID_DIR={{ams_ad_pid_dir}}
-
-      #Memory for Master, Worker and history server (default: 1024MB)
-      export SPARK_DAEMON_MEMORY={{spark_daemon_memory}}m
-
-      # A string representing this instance of spark.(Default: $USER)
-      SPARK_IDENT_STRING=$USER
-
-      # The scheduling priority for daemons. (Default: 0)
-      SPARK_NICENESS=0
-
-      # Options read in YARN client mode
-      #SPARK_EXECUTOR_INSTANCES="2" #Number of workers to start (Default: 2)
-      #SPARK_EXECUTOR_CORES="1" #Number of cores for the workers (Default: 1).
-      #SPARK_EXECUTOR_MEMORY="1G" #Memory per Worker (e.g. 1000M, 2G) (Default: 1G)
-      #SPARK_DRIVER_MEMORY="512M" #Memory for Master (e.g. 1000M, 2G) (Default: 512 Mb)
-      #SPARK_YARN_APP_NAME="spark" #The name of your application (Default: Spark)
-      #SPARK_YARN_QUEUE="default" #The hadoop queue to use for allocation requests (Default: default)
-      #SPARK_YARN_DIST_FILES="" #Comma separated list of files to be distributed with the job.
-      #SPARK_YARN_DIST_ARCHIVES="" #Comma separated list of archives to be distributed with the job.
-
-      #export HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}
-      #export HADOOP_CONF_DIR=${HADOOP_CONF_DIR:-{{hadoop_conf_dir}}}
-
-      # The java implementation to use.
-      export JAVA_HOME={{java_home}}
-
-      #HDP Version
-      export HDP_VERSION=3.0.0
-
-    </value>
-    <value-attributes>
-      <type>content</type>
-    </value-attributes>
-    <on-ambari-upgrade add="false"/>
-  </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/25c18121/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metainfo.xml b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metainfo.xml
index 9238103..30a1105 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metainfo.xml
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/metainfo.xml
@@ -122,31 +122,6 @@
           </logs>
         </component>
 
-        <component>
-          <name>AD_MANAGER</name>
-          <displayName>AD Manager</displayName>
-          <category>MASTER</category>
-          <cardinality>0-1</cardinality>
-          <versionAdvertised>false</versionAdvertised>
-          <commandScript>
-            <script>scripts/ams_admanager.py</script>
-            <scriptType>PYTHON</scriptType>
-            <timeout>1200</timeout>
-          </commandScript>
-          <configuration-dependencies>
-            <config-type>ams-hbase-site</config-type>
-            <config-type>ams-admanager-config</config-type>
-            <config-type>ams-admanager-env</config-type>
-            <config-type>ams-admanager-log4j</config-type>
-            <config-type>ams-admanager-spark-env</config-type>
-          </configuration-dependencies>
-          <logs>
-            <log>
-              <logId>ams_anomaly_detection</logId>
-              <primary>true</primary>
-            </log>
-          </logs>
-        </component>
       </components>
 
       <themes>
@@ -179,11 +154,6 @@
               <condition>should_install_ams_grafana</condition>
             </package>
             <package>
-              <name>ambari-metrics-admanager</name>
-              <skipUpgrade>true</skipUpgrade>
-              <condition>should_install_ams_admanager</condition>
-            </package>
-            <package>
               <name>gcc</name>
             </package>
           </packages>

http://git-wip-us.apache.org/repos/asf/ambari/blob/25c18121/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/alerts/alert_point_in_time_metric_anomalies.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/alerts/alert_point_in_time_metric_anomalies.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/alerts/alert_point_in_time_metric_anomalies.py
deleted file mode 100644
index 154ce1c..0000000
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/alerts/alert_point_in_time_metric_anomalies.py
+++ /dev/null
@@ -1,185 +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 json
-import urllib
-import time
-import os
-import ambari_commons.network as network
-import logging
-
-from ambari_agent.AmbariConfig import AmbariConfig
-
-RESULT_STATE_OK = 'OK'
-RESULT_STATE_CRITICAL = 'CRITICAL'
-RESULT_STATE_WARNING = 'WARNING'
-RESULT_STATE_UNKNOWN = 'UNKNOWN'
-RESULT_STATE_SKIPPED = 'SKIPPED'
-
-AMS_HTTP_POLICY = '{{ams-site/timeline.metrics.service.http.policy}}'
-METRICS_COLLECTOR_WEBAPP_ADDRESS_KEY = '{{ams-site/timeline.metrics.service.webapp.address}}'
-METRICS_COLLECTOR_VIP_HOST_KEY = '{{cluster-env/metrics_collector_vip_host}}'
-METRICS_COLLECTOR_VIP_PORT_KEY = '{{cluster-env/metrics_collector_vip_port}}'
-
-INTERVAL_PARAM_KEY = 'interval'
-INTERVAL_PARAM_DEFAULT = 10
-
-NUM_ANOMALIES_KEY = 'num_anomalies'
-NUM_ANOMALIES_DEFAULT = 5
-
-SENSITIVITY_KEY = 'sensitivity'
-SENSITIVITY_DEFAULT = 5
-
-AMS_METRICS_GET_URL = "/ws/v1/timeline/metrics/anomalies?%s"
-
-logger = logging.getLogger()
-
-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 (METRICS_COLLECTOR_VIP_HOST_KEY, METRICS_COLLECTOR_VIP_PORT_KEY,
-          METRICS_COLLECTOR_WEBAPP_ADDRESS_KEY, AMS_HTTP_POLICY)
-
-
-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
-  """
-
-  """
-  Get ready with AMS GET url.
-  Query AMS for point in time anomalies in the last 30mins. 
-  Generate a message with anomalies.
-  """
-  if configurations is None:
-    return (RESULT_STATE_UNKNOWN, ['There were no configurations supplied to the script.'])
-
-  collector_host = host_name
-  current_time = int(time.time()) * 1000
-
-  interval = INTERVAL_PARAM_DEFAULT
-  if INTERVAL_PARAM_KEY in parameters:
-    interval = _coerce_to_integer(parameters[INTERVAL_PARAM_KEY])
-
-  num_anomalies = NUM_ANOMALIES_DEFAULT
-  if NUM_ANOMALIES_KEY in parameters:
-    num_anomalies = _coerce_to_integer(parameters[NUM_ANOMALIES_KEY])
-
-  sensitivity = SENSITIVITY_DEFAULT
-  if SENSITIVITY_KEY in parameters:
-    sensitivity = _coerce_to_integer(parameters[SENSITIVITY_KEY])
-
-  if METRICS_COLLECTOR_VIP_HOST_KEY in configurations and METRICS_COLLECTOR_VIP_PORT_KEY in configurations:
-    collector_host = configurations[METRICS_COLLECTOR_VIP_HOST_KEY]
-    collector_port = int(configurations[METRICS_COLLECTOR_VIP_PORT_KEY])
-  else:
-    # ams-site/timeline.metrics.service.webapp.address is required
-    if not METRICS_COLLECTOR_WEBAPP_ADDRESS_KEY in configurations:
-      return (RESULT_STATE_UNKNOWN,
-              ['{0} is a required parameter for the script'.format(METRICS_COLLECTOR_WEBAPP_ADDRESS_KEY)])
-    else:
-      collector_webapp_address = configurations[METRICS_COLLECTOR_WEBAPP_ADDRESS_KEY].split(":")
-      if valid_collector_webapp_address(collector_webapp_address):
-        collector_port = int(collector_webapp_address[1])
-      else:
-        return (RESULT_STATE_UNKNOWN, ['{0} value should be set as "fqdn_hostname:port", but set to {1}'.format(
-          METRICS_COLLECTOR_WEBAPP_ADDRESS_KEY, configurations[METRICS_COLLECTOR_WEBAPP_ADDRESS_KEY])])
-
-  get_ema_anomalies_parameters = {
-    "method": "ema",
-    "startTime": current_time - interval * 60 * 1000,
-    "endTime": current_time,
-    "limit": num_anomalies + 1
-  }
-
-  encoded_get_metrics_parameters = urllib.urlencode(get_ema_anomalies_parameters)
-
-  ams_collector_conf_dir = "/etc/ambari-metrics-collector/conf"
-  metric_truststore_ca_certs = 'ca.pem'
-  ca_certs = os.path.join(ams_collector_conf_dir,
-                          metric_truststore_ca_certs)
-  metric_collector_https_enabled = str(configurations[AMS_HTTP_POLICY]) == "HTTPS_ONLY"
-
-  try:
-    conn = network.get_http_connection(
-      collector_host,
-      int(collector_port),
-      metric_collector_https_enabled,
-      ca_certs,
-      ssl_version=AmbariConfig.get_resolved_config().get_force_https_protocol_value()
-    )
-    conn.request("GET", AMS_METRICS_GET_URL % encoded_get_metrics_parameters)
-    response = conn.getresponse()
-    data = response.read()
-    logger.info("Data read from metric anomaly endpoint")
-    logger.info(data)
-    conn.close()
-  except Exception:
-    return (RESULT_STATE_UNKNOWN, ["Unable to retrieve anomaly metrics from the Ambari Metrics service."])
-
-  if response.status != 200:
-    return (RESULT_STATE_UNKNOWN, ["Unable to retrieve anomaly metrics from the Ambari Metrics service."])
-
-  data_json = json.loads(data)
-  length = len(data_json["metrics"])
-  logger.info("Number of anomalies returned : {0}".format(length))
-
-  if length == 0:
-    alert_state = RESULT_STATE_OK
-    alert_label = 'No point in time anomalies in the last {0} minutes.'.format(interval)
-    logger.info(alert_label)
-  elif length <= 5:
-    alert_state = RESULT_STATE_WARNING
-    alert_label = "http://avijayan-ad-1.openstacklocal:3000/dashboard/script/scripted.js?anomalies=" + data
-  else:
-    alert_state = RESULT_STATE_CRITICAL
-    alert_label = "http://avijayan-ad-1.openstacklocal:3000/dashboard/script/scripted.js?anomalies=" + data
-
-  return (alert_state, [alert_label])
-
-
-def valid_collector_webapp_address(webapp_address):
-  if len(webapp_address) == 2 \
-    and webapp_address[0] != '127.0.0.1' \
-    and webapp_address[1].isdigit():
-    return True
-
-  return False
-
-
-def _coerce_to_integer(value):
-  """
-  Attempts to correctly coerce a value to an integer. For the case of an integer or a float,
-  this will essentially either NOOP or return a truncated value. If the parameter is a string,
-  then it will first attempt to be coerced from a integer, and failing that, a float.
-  :param value: the value to coerce
-  :return: the coerced value as an integer
-  """
-  try:
-    return int(value)
-  except ValueError:
-    return int(float(value))

http://git-wip-us.apache.org/repos/asf/ambari/blob/25c18121/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/alerts/alert_trend_metric_anomalies.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/alerts/alert_trend_metric_anomalies.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/alerts/alert_trend_metric_anomalies.py
deleted file mode 100644
index 8813d8e..0000000
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/alerts/alert_trend_metric_anomalies.py
+++ /dev/null
@@ -1,185 +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 json
-import urllib
-import time
-import os
-import ambari_commons.network as network
-import logging
-
-from ambari_agent.AmbariConfig import AmbariConfig
-
-RESULT_STATE_OK = 'OK'
-RESULT_STATE_CRITICAL = 'CRITICAL'
-RESULT_STATE_WARNING = 'WARNING'
-RESULT_STATE_UNKNOWN = 'UNKNOWN'
-RESULT_STATE_SKIPPED = 'SKIPPED'
-
-AMS_HTTP_POLICY = '{{ams-site/timeline.metrics.service.http.policy}}'
-METRICS_COLLECTOR_WEBAPP_ADDRESS_KEY = '{{ams-site/timeline.metrics.service.webapp.address}}'
-METRICS_COLLECTOR_VIP_HOST_KEY = '{{cluster-env/metrics_collector_vip_host}}'
-METRICS_COLLECTOR_VIP_PORT_KEY = '{{cluster-env/metrics_collector_vip_port}}'
-
-INTERVAL_PARAM_KEY = 'interval'
-INTERVAL_PARAM_DEFAULT = 10
-
-NUM_ANOMALIES_KEY = 'num_anomalies'
-NUM_ANOMALIES_DEFAULT = 5
-
-SENSITIVITY_KEY = 'sensitivity'
-SENSITIVITY_DEFAULT = 5
-
-AMS_METRICS_GET_URL = "/ws/v1/timeline/metrics/anomalies?%s"
-
-logger = logging.getLogger()
-
-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 (METRICS_COLLECTOR_VIP_HOST_KEY, METRICS_COLLECTOR_VIP_PORT_KEY,
-          METRICS_COLLECTOR_WEBAPP_ADDRESS_KEY, AMS_HTTP_POLICY)
-
-
-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
-  """
-
-  """
-  Get ready with AMS GET url.
-  Query AMS for point in time anomalies in the last 30mins. 
-  Generate a message with anomalies.
-  """
-  if configurations is None:
-    return (RESULT_STATE_UNKNOWN, ['There were no configurations supplied to the script.'])
-
-  collector_host = host_name
-  current_time = int(time.time()) * 1000
-
-  interval = INTERVAL_PARAM_DEFAULT
-  if INTERVAL_PARAM_KEY in parameters:
-    interval = _coerce_to_integer(parameters[INTERVAL_PARAM_KEY])
-
-  num_anomalies = NUM_ANOMALIES_DEFAULT
-  if NUM_ANOMALIES_KEY in parameters:
-    num_anomalies = _coerce_to_integer(parameters[NUM_ANOMALIES_KEY])
-
-  sensitivity = SENSITIVITY_DEFAULT
-  if SENSITIVITY_KEY in parameters:
-    sensitivity = _coerce_to_integer(parameters[SENSITIVITY_KEY])
-
-  if METRICS_COLLECTOR_VIP_HOST_KEY in configurations and METRICS_COLLECTOR_VIP_PORT_KEY in configurations:
-    collector_host = configurations[METRICS_COLLECTOR_VIP_HOST_KEY]
-    collector_port = int(configurations[METRICS_COLLECTOR_VIP_PORT_KEY])
-  else:
-    # ams-site/timeline.metrics.service.webapp.address is required
-    if not METRICS_COLLECTOR_WEBAPP_ADDRESS_KEY in configurations:
-      return (RESULT_STATE_UNKNOWN,
-              ['{0} is a required parameter for the script'.format(METRICS_COLLECTOR_WEBAPP_ADDRESS_KEY)])
-    else:
-      collector_webapp_address = configurations[METRICS_COLLECTOR_WEBAPP_ADDRESS_KEY].split(":")
-      if valid_collector_webapp_address(collector_webapp_address):
-        collector_port = int(collector_webapp_address[1])
-      else:
-        return (RESULT_STATE_UNKNOWN, ['{0} value should be set as "fqdn_hostname:port", but set to {1}'.format(
-          METRICS_COLLECTOR_WEBAPP_ADDRESS_KEY, configurations[METRICS_COLLECTOR_WEBAPP_ADDRESS_KEY])])
-
-  get_ema_anomalies_parameters = {
-    "method": "ks",
-    "startTime": current_time - interval * 60 * 1000,
-    "endTime": current_time,
-    "limit": num_anomalies + 1
-  }
-
-  encoded_get_metrics_parameters = urllib.urlencode(get_ema_anomalies_parameters)
-
-  ams_collector_conf_dir = "/etc/ambari-metrics-collector/conf"
-  metric_truststore_ca_certs = 'ca.pem'
-  ca_certs = os.path.join(ams_collector_conf_dir,
-                          metric_truststore_ca_certs)
-  metric_collector_https_enabled = str(configurations[AMS_HTTP_POLICY]) == "HTTPS_ONLY"
-
-  try:
-    conn = network.get_http_connection(
-      collector_host,
-      int(collector_port),
-      metric_collector_https_enabled,
-      ca_certs,
-      ssl_version=AmbariConfig.get_resolved_config().get_force_https_protocol_value()
-    )
-    conn.request("GET", AMS_METRICS_GET_URL % encoded_get_metrics_parameters)
-    response = conn.getresponse()
-    data = response.read()
-    logger.info("Data read from metric anomaly endpoint")
-    logger.info(data)
-    conn.close()
-  except Exception:
-    return (RESULT_STATE_UNKNOWN, ["Unable to retrieve anomaly metrics from the Ambari Metrics service."])
-
-  if response.status != 200:
-    return (RESULT_STATE_UNKNOWN, ["Unable to retrieve anomaly metrics from the Ambari Metrics service."])
-
-  data_json = json.loads(data)
-  length = len(data_json["metrics"])
-  logger.info("Number of anomalies returned : {0}".format(length))
-
-  if length == 0:
-    alert_state = RESULT_STATE_OK
-    alert_label = 'No trend anomalies in the last {0} minutes.'.format(interval)
-    logger.info(alert_label)
-  elif length <= 5:
-    alert_state = RESULT_STATE_WARNING
-    alert_label = "http://avijayan-ad-1.openstacklocal:3000/dashboard/script/scripted.js?anomalies=" + data
-  else:
-    alert_state = RESULT_STATE_CRITICAL
-    alert_label = "http://avijayan-ad-1.openstacklocal:3000/dashboard/script/scripted.js?anomalies=" + data
-
-  return (alert_state, [alert_label])
-
-
-def valid_collector_webapp_address(webapp_address):
-  if len(webapp_address) == 2 \
-    and webapp_address[0] != '127.0.0.1' \
-    and webapp_address[1].isdigit():
-    return True
-
-  return False
-
-
-def _coerce_to_integer(value):
-  """
-  Attempts to correctly coerce a value to an integer. For the case of an integer or a float,
-  this will essentially either NOOP or return a truncated value. If the parameter is a string,
-  then it will first attempt to be coerced from a integer, and failing that, a float.
-  :param value: the value to coerce
-  :return: the coerced value as an integer
-  """
-  try:
-    return int(value)
-  except ValueError:
-    return int(float(value))

http://git-wip-us.apache.org/repos/asf/ambari/blob/25c18121/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py
index 2204eeb..2d81bf7 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams.py
@@ -507,70 +507,6 @@ def ams(name=None, action=None):
 
     pass
 
-  elif name == 'admanager':
-    ams_ad_directories = [
-      params.ams_ad_conf_dir,
-      params.ams_ad_log_dir,
-      params.ams_ad_data_dir,
-      params.ams_ad_pid_dir
-    ]
-
-    for ams_ad_dir in ams_ad_directories:
-      Directory(ams_ad_dir,
-                owner=params.ams_user,
-                group=params.user_group,
-                mode=0755,
-                create_parents=True,
-                recursive_ownership=True
-                )
-
-    File(format("{ams_ad_conf_dir}/ams-admanager-env.sh"),
-         owner=params.ams_user,
-         group=params.user_group,
-         content=InlineTemplate(params.ams_admanager_env_sh_template)
-         )
-
-    File(format("{ams_ad_conf_dir}/config.yaml"),
-         content=InlineTemplate(params.ams_admanager_config_template),
-         owner=params.ams_user,
-         group=params.user_group
-         )
-    merged_ams_hbase_site = {}
-    merged_ams_hbase_site.update(params.config['configurations']['ams-hbase-site'])
-    if params.security_enabled:
-      merged_ams_hbase_site.update(params.config['configurations']['ams-hbase-security-site'])
-
-    XmlConfig( "hbase-site.xml",
-             conf_dir = params.ams_ad_conf_dir,
-             configurations = merged_ams_hbase_site,
-             configuration_attributes=params.config['configuration_attributes']['ams-hbase-site'],
-             owner = params.ams_user,
-             )
-
-    if (params.ams_ad_log4j_props != None):
-      File(os.path.join(params.ams_ad_conf_dir, "log4j.properties"),
-         owner=params.ams_user,
-         content=InlineTemplate(params.ams_ad_log4j_props)
-         )
-
-    File(format("{ams_ad_conf_dir}/ams-admanager-spark-env.sh"),
-          owner=params.ams_user,
-          group=params.user_group,
-          content=InlineTemplate(params.ams_ad_spark_env_sh_template)
-        )
-
-    if action != 'stop':
-      for dir in ams_ad_directories:
-        Execute(('chown', '-R', params.ams_user, dir),
-                sudo=True
-                )
-      Execute(('chmod', '-R', '755', format("{ams_admanager_lib_dir}/spark/bin")),
-                sudo = True,
-                )
-      Execute(('chmod', '-R', '755', format("{ams_admanager_lib_dir}/spark/sbin")),
-              sudo = True,
-              )
-
 def is_spnego_enabled(params):
   if 'core-site' in params.config['configurations'] \
       and 'hadoop.http.authentication.type' in params.config['configurations']['core-site'] \

http://git-wip-us.apache.org/repos/asf/ambari/blob/25c18121/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams_admanager.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams_admanager.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams_admanager.py
deleted file mode 100644
index 33c8832..0000000
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams_admanager.py
+++ /dev/null
@@ -1,73 +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 Script, Execute
-from resource_management.libraries.functions import format
-from status import check_service_status
-from ams import ams
-from resource_management.core.logger import Logger
-from resource_management.core import sudo
-
-class AmsADManager(Script):
-  def install(self, env):
-    import params
-    env.set_params(params)
-    self.install_packages(env)
-    self.configure(env) # for security
-
-  def configure(self, env, action = None):
-    import params
-    env.set_params(params)
-    ams(name='admanager', action=action)
-
-  def start(self, env):
-    import params
-    env.set_params(params)
-    self.configure(env, action = 'start')
-
-    start_cmd = format("{ams_admanager_script} start")
-    Execute(start_cmd,
-            user=params.ams_user
-            )
-    pidfile = format("{ams_ad_pid_dir}/ambari-metrics-admanager.pid")
-    if not sudo.path_exists(pidfile):
-      Logger.warning("Pid file doesn't exist after starting of the component.")
-    else:
-      Logger.info("AD Manager Server has started with pid: {0}".format(sudo.read_file(pidfile).strip()))
-
-
-  def stop(self, env):
-    import params
-    env.set_params(params)
-    self.configure(env, action = 'stop')
-    Execute((format("{ams_admanager_script}"), 'stop'),
-            user=params.ams_user
-            )
-
-  def status(self, env):
-    import status_params
-    env.set_params(status_params)
-    check_service_status(env, name='admanager')
-
-  def get_pid_files(self):
-    import status_params
-    return [status_params.ams_ad_pid_file]
-
-if __name__ == "__main__":
-  AmsADManager().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/25c18121/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
index a18b8f6..f92d387 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params.py
@@ -188,44 +188,6 @@ ams_hbase_home_dir = "/usr/lib/ams-hbase/"
 
 ams_hbase_init_check_enabled = default("/configurations/ams-site/timeline.metrics.hbase.init.check.enabled", True)
 
-# AD Manager settings
-ams_ad_conf_dir = '/etc/ambari-metrics-anomaly-detection/conf'
-ams_ad_log_dir = default("/configurations/ams-admanager-env/ams_ad_log_dir", '/var/log/ambari-metrics-anomaly-detection')
-ams_ad_pid_dir = status_params.ams_ad_pid_dir
-ams_ad_data_dir = default("/configurations/ams-admanager-env/ams_ad_data_dir", '/var/lib/ambari-metrics-anomaly-detection')
-ams_ad_input_definition_directory = config['configurations']['ams-admanager-config']['ambari.metrics.admanager.input.definition.directory']
-
-ams_admanager_env_sh_template = config['configurations']['ams-admanager-env']['content']
-ams_admanager_config_template = config['configurations']['ams-admanager-config']['content']
-ams_admanager_script = "/usr/sbin/ambari-metrics-admanager"
-ams_admanager_port = config['configurations']['ams-admanager-config']['ambari.metrics.admanager.application.port']
-ams_admanager_heapsize = config['configurations']['ams-admanager-env']['ams_admanager_heapsize']
-ams_admanager_lib_dir = "/usr/lib/ambari-metrics-anomaly-detection"
-ams_admanager_jar = format("{ams_admanager_lib_dir}/ambari-metrics-anomaly-detection-service-*.jar")
-ams_ad_log_max_backup_size = default('configurations/ams-admanager-log4j/ams_ad_log_max_backup_size',80)
-ams_ad_log_number_of_backup_files = default('configurations/ams-admanager-log4j/ams_ad_log_number_of_backup_files',60)
-
-admanager_spark_op_mode = config['configurations']['ams-admanager-config']['ambari.metrics.admanager.spark.operation.mode']
-ams_ad_spark_env_sh_template = config['configurations']['ams-admanager-spark-env']['content']
-spark_master_port = default("/configurations/ams-admanager-spark-env/spark_master_port", 6190)
-spark_master_webui_port = default("/configurations/ams-admanager-spark-env/spark_master_webui_port", 6180)
-spark_worker_cores = default("/configurations/ams-admanager-spark-env/spark_worker_cores", 4)
-spark_worker_memory = default("/configurations/ams-admanager-spark-env/spark_worker_memory", 2048)
-spark_worker_webui_port = default("/configurations/ams-admanager-spark-env/spark_worker_webui_port", 6181)
-spark_daemon_memory = default("/configurations/ams-admanager-spark-env/spark_daemon_memory", 1024)
-
-if admanager_spark_op_mode == 'spark-on-yarn':
-  admanager_spark_hostport = hostname + ":" + spark_master_port #TODO : Fix for spark on yarn mode.
-  ams_ad_standalone_spark_enabled = False
-else:
-  admanager_spark_hostport = hostname + ":" + spark_master_port
-  ams_ad_standalone_spark_enabled = True
-
-if (('ams-admanager-log4j' in config['configurations']) and ('content' in config['configurations']['ams-admanager-log4j'])):
-  ams_ad_log4j_props = config['configurations']['ams-admanager-log4j']['content']
-else:
-  ams_ad_log4j_props = None
-
 #hadoop params
 
 hbase_excluded_hosts = config['commandParams']['excluded_hosts']

http://git-wip-us.apache.org/repos/asf/ambari/blob/25c18121/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status.py
index e2af793..0b24ac0 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status.py
@@ -43,8 +43,6 @@ def check_service_status(env, name):
     check_process_status(status_params.monitor_pid_file)
   elif name == 'grafana':
     check_process_status(status_params.grafana_pid_file)
-  elif name == 'admanager':
-    check_process_status(status_params.ams_ad_pid_file)
 
 @OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY)
 def check_service_status(name):

http://git-wip-us.apache.org/repos/asf/ambari/blob/25c18121/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status_params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status_params.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status_params.py
index 334403c..6057a8b 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status_params.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/status_params.py
@@ -33,11 +33,9 @@ hbase_user = ams_user
 ams_collector_pid_dir = config['configurations']['ams-env']['metrics_collector_pid_dir']
 ams_monitor_pid_dir = config['configurations']['ams-env']['metrics_monitor_pid_dir']
 ams_grafana_pid_dir = config['configurations']['ams-grafana-env']['metrics_grafana_pid_dir']
-ams_ad_pid_dir = config['configurations']['ams-admanager-env']['ams_ad_pid_dir']
 
 monitor_pid_file = format("{ams_monitor_pid_dir}/ambari-metrics-monitor.pid")
 grafana_pid_file = format("{ams_grafana_pid_dir}/grafana-server.pid")
-ams_ad_pid_file = format("{ams_ad_pid_dir}/ambari-metrics-admanager.pid")
 
 security_enabled = config['configurations']['cluster-env']['security_enabled']
 ams_hbase_conf_dir = format("{hbase_conf_dir}")

http://git-wip-us.apache.org/repos/asf/ambari/blob/25c18121/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/admanager_config.yaml.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/admanager_config.yaml.j2 b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/admanager_config.yaml.j2
deleted file mode 100644
index a403978..0000000
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/admanager_config.yaml.j2
+++ /dev/null
@@ -1,44 +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.
-
-server:
-  applicationConnectors:
-   - type: http
-     port: {{ams_admanager_port}}
-  requestLog:
-    type: external
-
-logging:
-  type: external
-
-metricDefinitionService:
-  inputDefinitionDirectory: {{ams_ad_input_definition_directory}}
-
-metricsCollector:
-  hosts: {{ams_collector_hosts}}
-  port: {{metric_collector_port}}
-  protocol: {{metric_collector_protocol}}
-  metadataEndpoint: /v1/timeline/metrics/metadata/keys
-
-adQueryService:
-  anomalyDataTtl: 604800
-
-metricDefinitionDB:
-  # force checksum verification of all data that is read from the file system on behalf of a particular read
-  verifyChecksums: true
-  # raise an error as soon as it detects an internal corruption
-  performParanoidChecks: false
-  # Path to Level DB directory
-  dbDirPath: {{ams_ad_data_dir}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/25c18121/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_admanager.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_admanager.py b/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_admanager.py
deleted file mode 100644
index dc2f4b0..0000000
--- a/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_admanager.py
+++ /dev/null
@@ -1,106 +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 mock.mock import MagicMock, patch
-from stacks.utils.RMFTestCase import *
-import os, sys
-
-@patch("tempfile.mkdtemp", new = MagicMock(return_value='/some_tmp_dir'))
-@patch("os.path.exists", new = MagicMock(return_value=True))
-@patch("platform.linux_distribution", new = MagicMock(return_value="Linux"))
-class TestADManager(RMFTestCase):
-  COMMON_SERVICES_PACKAGE_DIR = "AMBARI_METRICS/0.1.0/package/scripts"
-  STACK_VERSION = "2.0.6"
-
-  file_path = os.path.dirname(os.path.abspath(__file__))
-  file_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(file_path)))))
-  file_path = os.path.join(file_path, "main", "resources", "common-services", COMMON_SERVICES_PACKAGE_DIR)
-
-  sys.path.append(file_path)
-  def test_start(self):
-    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/ams_admanager.py",
-                       classname = "AmsADManager",
-                       command = "start",
-                       config_file="default.json",
-                       stack_version = self.STACK_VERSION,
-                       target = RMFTestCase.TARGET_COMMON_SERVICES
-                       )
-    self.maxDiff=None
-    self.assert_configure()
-    self.assertResourceCalled('Execute', ('chown', u'-R', u'ams', '/etc/ambari-metrics-anomaly-detection/conf'),
-                              sudo = True
-                              )
-    self.assertResourceCalled('Execute', ('chown', u'-R', u'ams', '/var/log/ambari-metrics-anomaly-detection'),
-                              sudo = True
-                              )
-    self.assertResourceCalled('Execute', ('chown', u'-R', u'ams', '/var/lib/ambari-metrics-anomaly-detection'),
-                              sudo = True
-                              )
-    self.assertResourceCalled('Execute', ('chown', u'-R', u'ams', '/var/run/ambari-metrics-anomaly-detection'),
-                              sudo = True
-                              )
-    self.assertResourceCalled('Execute', '/usr/sbin/ambari-metrics-admanager start',
-                              user = 'ams'
-                              )
-    self.assertNoMoreResources()
-
-  def assert_configure(self):
-
-    ams_admanager_directories = [
-      '/etc/ambari-metrics-anomaly-detection/conf',
-      '/var/log/ambari-metrics-anomaly-detection',
-      '/var/lib/ambari-metrics-anomaly-detection',
-      '/var/run/ambari-metrics-anomaly-detection'
-    ]
-
-    for ams_admanager_directory in ams_admanager_directories:
-      self.assertResourceCalled('Directory', ams_admanager_directory,
-                                owner = 'ams',
-                                group = 'hadoop',
-                                mode=0755,
-                                create_parents = True,
-                                recursive_ownership = True
-                                )
-
-    self.assertResourceCalled('File', '/etc/ambari-metrics-anomaly-detection/conf/ams-admanager-env.sh',
-                              owner = 'ams',
-                              group = 'hadoop',
-                              content = InlineTemplate(self.getConfig()['configurations']['ams-admanager-env']['content'])
-                              )
-
-    self.assertResourceCalled('File', '/etc/ambari-metrics-anomaly-detection/conf/config.yaml',
-                              owner = 'ams',
-                              group = 'hadoop',
-                              content = InlineTemplate(self.getConfig()['configurations']['ams-admanager-config']['content']),
-                              )
-
-    merged_ams_hbase_site = {}
-    merged_ams_hbase_site.update(self.getConfig()['configurations']['ams-hbase-site'])
-
-    self.assertResourceCalled('XmlConfig', 'hbase-site.xml',
-                              owner = 'ams',
-                              conf_dir = '/etc/ambari-metrics-anomaly-detection/conf',
-                              configurations = merged_ams_hbase_site,
-                              configuration_attributes = self.getConfig()['configuration_attributes']['ams-hbase-site']
-                              )
-    self.assertResourceCalled('File', '/etc/ambari-metrics-anomaly-detection/conf/log4j.properties',
-                              owner = 'ams',
-                              content = ''
-                              )

http://git-wip-us.apache.org/repos/asf/ambari/blob/25c18121/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/default.json b/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
index 4244377..158a9f9 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
@@ -972,19 +972,6 @@
         },
         "hadoop-metrics2.properties": {
             "content": "# Licensed to the Apache Software Foundation (ASF) under one or more\r\n# contributor license agreements. See the NOTICE file distributed with\r\n# this work for additional information regarding copyright ownership.\r\n# The ASF licenses this file to You under the Apache License, Version 2.0\r\n# (the \"License\"); you may not use this file except in compliance with\r\n# the License. You may obtain a copy of the License at\r\n#\r\n# http:\/\/www.apache.org\/licenses\/LICENSE-2.0\r\n#\r\n# Unless required by applicable law or agreed to in writing, software\r\n# distributed under the License is distributed on an \"AS IS\" BASIS,\r\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n# See the License for the specific language governing permissions and\r\n# limitations under the License.\r\n\r\n# syntax: [prefix].[source|sink|jmx].[instance].[options]\r\n# See package.html for org.apache.hadoop.metrics2 for details\r\n\r\n{% if has_gang
 lia_server %}\r\n*.period=60\r\n\r\n*.sink.ganglia.class=org.apache.hadoop.metrics2.sink.ganglia.GangliaSink31\r\n*.sink.ganglia.period=10\r\n\r\n# default for supportsparse is false\r\n*.sink.ganglia.supportsparse=true\r\n\r\n.sink.ganglia.slope=jvm.metrics.gcCount=zero,jvm.metrics.memHeapUsedM=both\r\n.sink.ganglia.dmax=jvm.metrics.threadsBlocked=70,jvm.metrics.memHeapUsedM=40\r\n\r\n# Hook up to the server\r\nnamenode.sink.ganglia.servers={{ganglia_server_host}}:8661\r\ndatanode.sink.ganglia.servers={{ganglia_server_host}}:8659\r\njobtracker.sink.ganglia.servers={{ganglia_server_host}}:8662\r\ntasktracker.sink.ganglia.servers={{ganglia_server_host}}:8658\r\nmaptask.sink.ganglia.servers={{ganglia_server_host}}:8660\r\nreducetask.sink.ganglia.servers={{ganglia_server_host}}:8660\r\nresourcemanager.sink.ganglia.servers={{ganglia_server_host}}:8664\r\nnodemanager.sink.ganglia.servers={{ganglia_server_host}}:8657\r\nhistoryserver.sink.ganglia.servers={{ganglia_server_host}}:8666\r\njo
 urnalnode.sink.ganglia.servers={{ganglia_server_host}}:8654\r\nnimbus.sink.ganglia.servers={{ganglia_server_host}}:8649\r\nsupervisor.sink.ganglia.servers={{ganglia_server_host}}:8650\r\n\r\nresourcemanager.sink.ganglia.tagsForPrefix.yarn=Queue\r\n\r\n{% endif %}\r\n\r\n{% if has_metric_collector %}\r\n\r\n*.period={{metrics_collection_period}}\r\n*.sink.timeline.plugin.urls=file:\/\/\/usr\/lib\/ambari-metrics-hadoop-sink\/ambari-metrics-hadoop-sink.jar\r\n*.sink.timeline.class=org.apache.hadoop.metrics2.sink.timeline.HadoopTimelineMetricsSink\r\n*.sink.timeline.period={{metrics_collection_period}}\r\n*.sink.timeline.sendInterval={{metrics_report_interval}}000\r\n*.sink.timeline.slave.host.name={{hostname}}\r\n*.sink.timeline.zookeeper.quorum={{zookeeper_quorum}}\r\n*.sink.timeline.protocol={{metric_collector_protocol}}\r\n*.sink.timeline.port={{metric_collector_port}}\r\n\r\n# HTTPS properties\r\n*.sink.timeline.truststore.path = {{metric_truststore_path}}\r\n*.sink.timeline.trusts
 tore.type = {{metric_truststore_type}}\r\n*.sink.timeline.truststore.password = {{metric_truststore_password}}\r\n\r\ndatanode.sink.timeline.collector={{metric_collector_hosts}}\r\nnamenode.sink.timeline.collector={{metric_collector_hosts}}\r\nresourcemanager.sink.timeline.collector={{metric_collector_hosts}}\r\nnodemanager.sink.timeline.collector={{metric_collector_hosts}}\r\njobhistoryserver.sink.timeline.collector={{metric_collector_hosts}}\r\njournalnode.sink.timeline.collector={{metric_collector_hosts}}\r\nmaptask.sink.timeline.collector={{metric_collector_hosts}}\r\nreducetask.sink.timeline.collector={{metric_collector_hosts}}\r\napplicationhistoryserver.sink.timeline.collector={{metric_collector_hosts}}\r\n\r\nresourcemanager.sink.timeline.tagsForPrefix.yarn=Queue\r\n\r\n{% if is_nn_client_port_configured %}\r\n# Namenode rpc ports customization\r\nnamenode.sink.timeline.metric.rpc.client.port={{nn_rpc_client_port}}\r\n{% endif %}\r\n{% if is_nn_dn_port_configured %}\r\nnamen
 ode.sink.timeline.metric.rpc.datanode.port={{nn_rpc_dn_port}}\r\n{% endif %}\r\n{% if is_nn_healthcheck_port_configured %}\r\nnamenode.sink.timeline.metric.rpc.healthcheck.port={{nn_rpc_healthcheck_port}}\r\n{% endif %}\r\n\r\n{% endif %}"
-        },
-        "ams-admanager-env": {
-            "ams_ad_pid_dir": "/var/run/ambari-metrics-anomaly-detection",
-            "content": "\n"
-        },
-        "ams-admanager-config": {
-            "content": "",
-            "ambari.metrics.admanager.input.definition.directory": "",
-            "ambari.metrics.admanager.spark.operation.mode": "stand-alone",
-            "ambari.metrics.admanager.application.port": "9090"
-        },
-        "ams-admanager-log4j": {
-            "content": ""
         }
     },
     "configuration_attributes": {

http://git-wip-us.apache.org/repos/asf/ambari/blob/25c18121/ambari-server/src/test/python/stacks/2.0.6/configs/default_ams_embedded.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/default_ams_embedded.json b/ambari-server/src/test/python/stacks/2.0.6/configs/default_ams_embedded.json
index ec9ff2b..eaaeeb5 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/configs/default_ams_embedded.json
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/default_ams_embedded.json
@@ -865,19 +865,6 @@
             "timeline.metrics.daily.aggregator.minute.interval": "86400",
             "timeline.metrics.cluster.aggregator.minute.interval": "120",
             "timeline.metrics.host.aggregator.hourly.interval": "3600"
-        },
-        "ams-admanager-env": {
-            "ams_ad_pid_dir": "/var/run/ambari-metrics-anomaly-detection",
-            "content": "\n"
-        },
-        "ams-admanager-config": {
-            "content": "",
-            "ambari.metrics.admanager.input.definition.directory": "",
-            "ambari.metrics.admanager.spark.operation.mode": "stand-alone",
-            "ambari.metrics.admanager.application.port": "9090"
-        },
-        "ams-admanager-log4j": {
-            "content": ""
         }
     },
     "configuration_attributes": {


Mime
View raw message