ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlun...@apache.org
Subject [4/4] ambari git commit: AMBARI-16248: Create KAFKA service versions in common-services (jluniya)
Date Fri, 06 May 2016 06:09:42 GMT
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/aaaa9884
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/aaaa9884
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/aaaa9884

Branch: refs/heads/trunk
Commit: aaaa9884e7f8ee71649c6e2a24eae7f9d64dd1d6
Parents: d216c12
Author: Jayush Luniya <jluniya@hortonworks.com>
Authored: Thu May 5 23:07:05 2016 -0700
Committer: Jayush Luniya <jluniya@hortonworks.com>
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/aaaa9884/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..0000000
--- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/alerts.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
-  "KAFKA": {
-    "service": [],
-    "KAFKA_BROKER": [
-      {
-        "name": "kafka_broker_process",
-        "label": "Kafka Broker Process",
-        "description": "This host-level alert is triggered if the Kafka Broker cannot be determined to be up.",
-        "interval": 1,
-        "scope": "HOST",
-        "source": {
-          "type": "PORT",
-          "uri": "{{kafka-broker/port}}",
-          "default_port": 6667,
-          "reporting": {
-            "ok": {
-              "text": "TCP OK - {0:.3f}s response on port {1}"
-            },
-            "warning": {
-              "text": "TCP OK - {0:.3f}s response on port {1}",
-              "value": 1.5
-            },
-            "critical": {
-              "text": "Connection failed: {0} to {1}:{2}",
-              "value": 5.0
-            }
-          }
-        }
-      }
-    ]
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/aaaa9884/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/configuration/kafka-broker.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/configuration/kafka-broker.xml b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/configuration/kafka-broker.xml
deleted file mode 100644
index 857f40e..0000000
--- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/configuration/kafka-broker.xml
+++ /dev/null
@@ -1,357 +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>
-  <property>
-    <name>log.dirs</name>
-    <value>/kafka-logs</value>
-    <description>
-      A comma-separated list of one or more directories in which Kafka data is stored.
-      Each new partition that is created will be placed in the directory which currently has the fewest partitions.
-    </description>
-    <value-attributes>
-      <type>directories</type>
-    </value-attributes>
-  </property>
-  <property>
-    <name>port</name>
-    <value>6667</value>
-    <description>
-      The port on which the server accepts client connections.
-    </description>
-    <value-attributes>
-      <type>int</type>
-    </value-attributes>
-  </property>
-  <property>
-    <name>zookeeper.connect</name>
-    <value>localhost:2181</value>
-    <property-type>DONT_ADD_ON_UPGRADE</property-type>
-    <description>
-      Zookeeper also allows you to add a "chroot" path which will make all kafka data for this cluster appear under a particular path.
-      This is a way to setup multiple Kafka clusters or other applications on the same zookeeper cluster. To do this give a connection
-     string in the form hostname1:port1,hostname2:port2,hostname3:port3/chroot/path which would put all this cluster's data under the
-      path /chroot/path. Note that you must create this path yourself prior to starting the broker and consumers must use the
-      same connection string.
-    </description>
-  </property>
-  <property>
-    <name>message.max.bytes</name>
-    <value>1000000</value>
-    <description>
-      The maximum size of a message that the server can receive.
-      It is important that this property be in sync with the maximum fetch size your consumers use or
-      else an unruly producer will be able to publish messages too large for consumers to consume.
-    </description>
-  </property>
-  <property>
-    <name>num.network.threads</name>
-    <value>3</value>
-    <description>
-      The number of network threads that the server uses for handling network requests.
-      You probably don't need to change this.
-    </description>
-  </property>
-  <property>
-    <name>num.io.threads</name>
-    <value>8</value>
-    <description>
-      The number of I/O threads that the server uses for executing requests. You should have at least as many threads as you have disks.
-    </description>
-  </property>
-  <property>
-    <name>queued.max.requests</name>
-    <value>500</value>
-    <description>The number of requests that can be queued up for processing by the I/O threads before the network threads stop reading in new requests.</description>
-  </property>
-  <property>
-    <name>socket.send.buffer.bytes</name>
-    <value>102400</value>
-    <description>
-      The SO_SNDBUFF buffer the server prefers for socket connections.
-    </description>
-  </property>
-  <property>
-    <name>socket.receive.buffer.bytes</name>
-    <value>102400</value>
-    <description>
-      The SO_RCVBUFF buffer the server prefers for socket connections.
-    </description>
-  </property>
-  <property>
-    <name>socket.request.max.bytes</name>
-    <value>104857600</value>
-    <description>
-      The maximum request size the server will allow. This prevents the server from running out of memory and should be smaller than the Java heap size.
-    </description>
-  </property>
-  <property>
-    <name>num.partitions</name>
-    <value>1</value>
-    <description>
-        The default number of partitions per topic.
-    </description>
-  </property>
-  <property>
-    <name>log.segment.bytes</name>
-    <value>1073741824</value>
-    <description>
-      The maximum request size the server will allow.
-      This prevents the server from running out of memory and should be smaller than the Java heap size.
-    </description>
-  </property>
-  <property>
-    <name>log.roll.hours</name>
-    <value>168</value>
-    <description>
-      This setting will force Kafka to roll a new log segment even if the log.segment.bytes size has not been reached.
-    </description>
-  </property>
-  <property>
-    <name>log.retention.bytes</name>
-    <value>-1</value>
-    <description>
-      The amount of data to retain in the log for each topic-partitions. Note that this is the limit per-partition so multiply by the number of partitions to get the total data retained for the topic. Also note that if both log.retention.hours and log.retention.bytes are both set we delete a segment when either limit is exceeded.
-    </description>
-  </property>
-  <property>
-    <name>log.retention.hours</name>
-    <value>168</value>
-    <description>
-      The number of hours to keep a log segment before it is deleted, i.e. the default data retention window for all topics. Note that if both log.retention.hours and log.retention.bytes are both set we delete a segment when either limit is exceeded.
-    </description>
-  </property>
-  <property>
-    <name>log.cleanup.interval.mins</name>
-    <value>10</value>
-    <description>The frequency in minutes that the log cleaner checks whether any log segment is eligible for deletion to meet the retention policies.
-    </description>
-  </property>
-  <property>
-    <name>log.index.size.max.bytes</name>
-    <value>10485760</value>
-    <description>
-      The maximum size in bytes we allow for the offset index for each log segment. Note that we will always pre-allocate a
-      sparse file with this much space and shrink it down when the log rolls. If the index fills up we will roll a new log segment
-      even if we haven't reached the log.segment.bytes limit.
-    </description>
-  </property>
-  <property>
-    <name>log.index.interval.bytes</name>
-    <value>4096</value>
-    <description>
-      The byte interval at which we add an entry to the offset index. When executing a fetch request the server must do a linear scan for up to this many bytes to find the correct position in the log to begin and end the fetch. So setting this value to be larger will mean larger index files (and a bit more memory usage) but less scanning. However the server will never add more than one index entry per log append (even if more than log.index.interval worth of messages are appended). In general you probably don't need to mess with this value.
-    </description>
-  </property>
-  <property>
-    <name>auto.create.topics.enable</name>
-    <value>true</value>
-    <description>
-      Enable auto creation of topic on the server. If this is set to true then attempts to produce, consume, or fetch metadata for a non-existent topic will automatically create it with the default replication factor and number of partitions.
-    </description>
-  </property>
-  <property>
-    <name>controller.socket.timeout.ms</name>
-    <value>30000</value>
-    <property>The socket timeout for commands from the partition management controller to the replicas.</property>
-  </property>
-  <property>
-    <name>controller.message.queue.size</name>
-    <value>10</value>
-    <description>The buffer size for controller-to-broker-channels</description>
-  </property>
-  <property>
-    <name>default.replication.factor</name>
-    <value>1</value>
-    <description>The default replication factor for automatically created topics.</description>
-  </property>
-  <property>
-    <name>replica.lag.time.max.ms</name>
-    <value>10000</value>
-    <description>If a follower hasn't sent any fetch requests for this window of time, the leader will remove the follower from ISR (in-sync replicas) and treat it as dead.</description>
-  </property>
-  <property>
-    <name>replica.lag.max.messages</name>
-    <value>4000</value>
-    <description>
-      If a replica falls more than this many messages behind the leader, the leader will remove the follower from ISR and treat it as dead.
-    </description>
-  </property>
-  <property>
-    <name>replica.socket.timeout.ms</name>
-    <value>30000</value>
-    <description>The socket timeout for network requests to the leader for replicating data.</description>
-  </property>
-  <property>
-    <name>replica.socket.receive.buffer.bytes</name>
-    <value>65536</value>
-    <description>The socket receive buffer for network requests to the leader for replicating data.</description>
-  </property>
-  <property>
-    <name>replica.fetch.max.bytes</name>
-    <value>1048576</value>
-    <description>The number of byes of messages to attempt to fetch for each partition in the fetch requests the replicas send to the leader.</description>
-  </property>
-  <property>
-    <name>replica.fetch.wait.max.ms</name>
-    <value>500</value>
-    <description>The maximum amount of time to wait time for data to arrive on the leader in the fetch requests sent by the replicas to the leader.</description>
-  </property>
-  <property>
-    <name>replica.fetch.min.bytes</name>
-    <value>1</value>
-    <description>Minimum bytes expected for each fetch response for the fetch requests from the replica to the leader. If not enough bytes, wait up to replica.fetch.wait.max.ms for this many bytes to arrive.
-    </description>
-  </property>
-  <property>
-    <name>num.replica.fetchers</name>
-    <value>1</value>
-    <description>
-      Number of threads used to replicate messages from leaders. Increasing this value can increase the degree of I/O parallelism in the follower broker.
-    </description>
-  </property>
-  <property>
-    <name>replica.high.watermark.checkpoint.interval.ms</name>
-    <value>5000</value>
-    <description>The frequency with which each replica saves its high watermark to disk to handle recovery.</description>
-  </property>
-  <property>
-    <name>fetch.purgatory.purge.interval.requests</name>
-    <value>10000</value>
-    <description>The purge interval (in number of requests) of the fetch request purgatory.</description>
-  </property>
-  <property>
-    <name>producer.purgatory.purge.interval.requests</name>
-    <value>10000</value>
-    <description>The purge interval (in number of requests) of the producer request purgatory.</description>
-  </property>
-  <property>
-    <name>zookeeper.session.timeout.ms</name>
-    <value>30000</value>
-    <description>Zookeeper session timeout. If the server fails to heartbeat to zookeeper within this period of time it is considered dead. If you set this too low the server may be falsely considered dead; if you set it too high it may take too long to recognize a truly dead server.</description>
-  </property>
-  <property>
-    <name>zookeeper.connection.timeout.ms</name>
-    <value>25000</value>
-    <description>The maximum amount of time that the client waits to establish a connection to zookeeper.</description>
-  </property>
-  <property>
-    <name>zookeeper.sync.time.ms</name>
-    <value>2000</value>
-    <description>How far a ZK follower can be behind a ZK leader.</description>
-  </property>
-  <property>
-    <name>controlled.shutdown.enable</name>
-    <value>false</value>
-    <description>Enable controlled shutdown of the broker. If enabled, the broker will move all leaders on it to some other brokers before shutting itself down. This reduces the unavailability window during shutdown.</description>
-  </property>
-  <property>
-    <name>controlled.shutdown.max.retries</name>
-    <value>3</value>
-    <description>Number of retries to complete the controlled shutdown successfully before executing an unclean shutdown.</description>
-  </property>
-  <property>
-    <name>controlled.shutdown.retry.backoff.ms</name>
-    <value>5000</value>
-    <description>
-      Backoff time between shutdown retries.
-    </description>
-  </property>
-  <property>
-    <name>kafka.metrics.reporters</name>
-    <value></value>
-    <description>
-      kafka ganglia metrics reporter and kafka timeline metrics reporter
-    </description>
-    <value-attributes>
-      <empty-value-valid>true</empty-value-valid>
-    </value-attributes>
-  </property>
-  <property>
-    <name>kafka.ganglia.metrics.reporter.enabled</name>
-    <value>true</value>
-    <description>
-      kafka ganglia metrics reporter enable
-    </description>
-  </property>
-  <property>
-    <name>kafka.ganglia.metrics.host</name>
-    <value>localhost</value>
-    <property-type>DONT_ADD_ON_UPGRADE</property-type>
-    <description> Ganglia host </description>
-  </property>
-  <property>
-    <name>kafka.ganglia.metrics.port</name>
-    <value>8671</value>
-    <description> Ganglia port </description>
-  </property>
-  <property>
-    <name>kafka.ganglia.metrics.group</name>
-    <value>kafka</value>
-    <description>Ganglia group name </description>
-  </property>
-  <property>
-    <name>kafka.timeline.metrics.reporter.enabled</name>
-    <value>true</value>
-    <description>Kafka timeline metrics reporter enable</description>
-  </property>
-  <property>
-    <name>kafka.timeline.metrics.host</name>
-    <value>{{metric_collector_host}}</value>
-    <description>Timeline host</description>
-  </property>
-  <property>
-    <name>kafka.timeline.metrics.port</name>
-    <value>{{metric_collector_port}}</value>
-    <description>Timeline port</description>
-  </property>
-  <property>
-    <name>kafka.timeline.metrics.protocol</name>
-    <value>{{metric_collector_protocol}}</value>
-    <description>Timeline protocol(http or https)</description>
-  </property>
-  <property>
-    <name>kafka.timeline.metrics.truststore.path</name>
-    <value>{{metric_truststore_path}}</value>
-    <description>Location of the trust store file.</description>
-  </property>
-  <property>
-    <name>kafka.timeline.metrics.truststore.type</name>
-    <value>{{metric_truststore_type}}</value>
-    <description>Optional. Default value is "jks".</description>
-  </property>
-  <property>
-    <name>kafka.timeline.metrics.truststore.password</name>
-    <value>{{metric_truststore_password}}</value>
-    <description>Password to open the trust store file.</description>
-  </property>
-  <property>
-    <name>kafka.timeline.metrics.reporter.sendInterval</name>
-    <value>5900</value>
-    <description>Timeline metrics reporter send interval</description>
-  </property>
-    <property>
-    <name>kafka.timeline.metrics.maxRowCacheSize</name>
-    <value>10000</value>
-    <description>Timeline metrics reporter send interval</description>
-  </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/aaaa9884/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/configuration/kafka-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/configuration/kafka-env.xml b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/configuration/kafka-env.xml
deleted file mode 100644
index 61fdc8c..0000000
--- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/configuration/kafka-env.xml
+++ /dev/null
@@ -1,102 +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>kafka_user</name>
-    <display-name>Kafka User</display-name>
-    <value>kafka</value>
-    <property-type>USER</property-type>
-    <description></description>
-    <value-attributes>
-      <type>user</type>
-      <overridable>false</overridable>
-    </value-attributes>
-  </property>
-  <property>
-    <name>kafka_keytab</name>
-    <description>Kafka keytab path</description>
-  </property>
-  <property>
-    <name>kafka_principal_name</name>
-    <description>Kafka principal name</description>
-  </property>
-  <property>
-    <name>kafka_log_dir</name>
-    <value>/var/log/kafka</value>
-    <description></description>
-  </property>
-  <property>
-    <name>kafka_pid_dir</name>
-    <value>/var/run/kafka</value>
-    <display-name>Kafka PID dir</display-name>
-    <description></description>
-    <value-attributes>
-      <type>directory</type>
-      <editable-only-at-install>true</editable-only-at-install>
-      <overridable>false</overridable>
-    </value-attributes>
-  </property>
-  <property>
-    <name>kafka_user_nofile_limit</name>
-    <value>128000</value>
-    <description>Max open files limit setting for KAFKA user.</description>
-  </property>
-  <property>
-    <name>kafka_user_nproc_limit</name>
-    <value>65536</value>
-    <description>Max number of processes limit setting for KAFKA user.</description>
-  </property>
-
-  <!-- kafka-env.sh -->
-  <property>
-    <name>content</name>
-    <description>This is the jinja template for kafka-env.sh file</description>
-    <value>
-#!/bin/bash
-
-# Set KAFKA specific environment variables here.
-
-# The java implementation to use.
-export JAVA_HOME={{java64_home}}
-export PATH=$PATH:$JAVA_HOME/bin
-export PID_DIR={{kafka_pid_dir}}
-export LOG_DIR={{kafka_log_dir}}
-export KAFKA_KERBEROS_PARAMS={{kafka_kerberos_params}}
-# Add kafka sink to classpath and related depenencies
-if [ -e "/usr/lib/ambari-metrics-kafka-sink/ambari-metrics-kafka-sink.jar" ]; then
-  export CLASSPATH=$CLASSPATH:/usr/lib/ambari-metrics-kafka-sink/ambari-metrics-kafka-sink.jar
-  export CLASSPATH=$CLASSPATH:/usr/lib/ambari-metrics-kafka-sink/lib/*
-fi
-if [ -f /etc/kafka/conf/kafka-ranger-env.sh ]; then
-. /etc/kafka/conf/kafka-ranger-env.sh
-fi
-    </value>
-    <value-attributes>
-      <type>content</type>
-    </value-attributes>
-  </property>
-  <property>
-    <name>is_supported_kafka_ranger</name>
-    <value>false</value>
-  </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/aaaa9884/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/configuration/kafka-log4j.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/configuration/kafka-log4j.xml b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/configuration/kafka-log4j.xml
deleted file mode 100644
index be604ed..0000000
--- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/configuration/kafka-log4j.xml
+++ /dev/null
@@ -1,126 +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>content</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.
-#
-#
-#
-kafka.logs.dir=logs
-
-log4j.rootLogger=INFO, stdout
-
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c)%n
-
-log4j.appender.kafkaAppender=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.kafkaAppender.DatePattern='.'yyyy-MM-dd-HH
-log4j.appender.kafkaAppender.File=${kafka.logs.dir}/server.log
-log4j.appender.kafkaAppender.layout=org.apache.log4j.PatternLayout
-log4j.appender.kafkaAppender.layout.ConversionPattern=[%d] %p %m (%c)%n
-
-log4j.appender.stateChangeAppender=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.stateChangeAppender.DatePattern='.'yyyy-MM-dd-HH
-log4j.appender.stateChangeAppender.File=${kafka.logs.dir}/state-change.log
-log4j.appender.stateChangeAppender.layout=org.apache.log4j.PatternLayout
-log4j.appender.stateChangeAppender.layout.ConversionPattern=[%d] %p %m (%c)%n
-
-log4j.appender.requestAppender=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.requestAppender.DatePattern='.'yyyy-MM-dd-HH
-log4j.appender.requestAppender.File=${kafka.logs.dir}/kafka-request.log
-log4j.appender.requestAppender.layout=org.apache.log4j.PatternLayout
-log4j.appender.requestAppender.layout.ConversionPattern=[%d] %p %m (%c)%n
-
-log4j.appender.cleanerAppender=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.cleanerAppender.DatePattern='.'yyyy-MM-dd-HH
-log4j.appender.cleanerAppender.File=${kafka.logs.dir}/log-cleaner.log
-log4j.appender.cleanerAppender.layout=org.apache.log4j.PatternLayout
-log4j.appender.cleanerAppender.layout.ConversionPattern=[%d] %p %m (%c)%n
-
-log4j.appender.controllerAppender=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.controllerAppender.DatePattern='.'yyyy-MM-dd-HH
-log4j.appender.controllerAppender.File=${kafka.logs.dir}/controller.log
-log4j.appender.controllerAppender.layout=org.apache.log4j.PatternLayout
-log4j.appender.controllerAppender.layout.ConversionPattern=[%d] %p %m (%c)%n
-
-# Turn on all our debugging info
-#log4j.logger.kafka.producer.async.DefaultEventHandler=DEBUG, kafkaAppender
-#log4j.logger.kafka.client.ClientUtils=DEBUG, kafkaAppender
-#log4j.logger.kafka.perf=DEBUG, kafkaAppender
-#log4j.logger.kafka.perf.ProducerPerformance$ProducerThread=DEBUG, kafkaAppender
-#log4j.logger.org.I0Itec.zkclient.ZkClient=DEBUG
-log4j.logger.kafka=INFO, kafkaAppender
-log4j.logger.kafka.network.RequestChannel$=WARN, requestAppender
-log4j.additivity.kafka.network.RequestChannel$=false
-
-#log4j.logger.kafka.network.Processor=TRACE, requestAppender
-#log4j.logger.kafka.server.KafkaApis=TRACE, requestAppender
-#log4j.additivity.kafka.server.KafkaApis=false
-log4j.logger.kafka.request.logger=WARN, requestAppender
-log4j.additivity.kafka.request.logger=false
-
-log4j.logger.kafka.controller=TRACE, controllerAppender
-log4j.additivity.kafka.controller=false
-
-log4j.logger.kafka.log.LogCleaner=INFO, cleanerAppender
-log4j.additivity.kafka.log.LogCleaner=false
-
-log4j.logger.state.change.logger=TRACE, stateChangeAppender
-log4j.additivity.state.change.logger=false
-
-   </value>
-   <value-attributes>
-      <type>content</type>
-      <show-property-name>false</show-property-name>
-   </value-attributes>
-   <depends-on>
-      <property>
-        <type>ranger-kafka-plugin-properties</type>
-        <name>ranger-kafka-plugin-enabled</name>
-      </property>
-   </depends-on>
-  </property>
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/aaaa9884/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/metainfo.xml b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/metainfo.xml
deleted file mode 100644
index 8dd050f..0000000
--- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/metainfo.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0"?>
-<!--
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
--->
-<metainfo>
-  <schemaVersion>2.0</schemaVersion>
-  <services>
-    <service>
-      <name>KAFKA</name>
-      <displayName>Kafka</displayName>
-      <comment>A high-throughput distributed messaging system</comment>
-      <version>0.8.1.2.2</version>
-      <components>
-        <component>
-          <name>KAFKA_BROKER</name>
-          <displayName>Kafka Broker</displayName>
-          <category>MASTER</category>
-          <cardinality>1+</cardinality>
-          <versionAdvertised>true</versionAdvertised>
-          <dependencies>
-            <dependency>
-              <name>ZOOKEEPER/ZOOKEEPER_SERVER</name>
-              <scope>cluster</scope>
-              <auto-deploy>
-                <enabled>true</enabled>
-              </auto-deploy>
-            </dependency>
-          </dependencies>
-          <commandScript>
-            <script>scripts/kafka_broker.py</script>
-            <scriptType>PYTHON</scriptType>
-            <timeout>1200</timeout>
-          </commandScript>
-          <logs>
-            <log>
-              <logId>kafka_server</logId>
-              <primary>true</primary>
-            </log>
-            <log>
-              <logId>kafka_controller</logId>
-            </log>
-            <log>
-              <logId>kafka_request</logId>
-            </log>
-            <log>
-              <logId>kafka_logcleaner</logId>
-            </log>
-            <log>
-              <logId>kafka_statechange</logId>
-            </log>
-          </logs>
-        </component>
-      </components>
-      <commandScript>
-        <script>scripts/service_check.py</script>
-        <scriptType>PYTHON</scriptType>
-        <timeout>300</timeout>
-      </commandScript>
-      <requiredServices>
-        <service>ZOOKEEPER</service>
-      </requiredServices>
-      <configuration-dependencies>
-        <config-type>kafka-broker</config-type>
-        <config-type>kafka-env</config-type>
-        <config-type>kafka-log4j</config-type>
-        <config-type>ranger-kafka-plugin-properties</config-type>
-        <config-type>ranger-kafka-audit</config-type>
-        <config-type>ranger-kafka-policymgr-ssl</config-type>
-        <config-type>ranger-kafka-security</config-type>
-        <config-type>zookeeper-env</config-type>
-        <config-type>zoo.cfg</config-type>
-        <config-type>ams-ssl-client</config-type>
-      </configuration-dependencies>
-      <restartRequiredAfterChange>true</restartRequiredAfterChange>
-    </service>
-  </services>
-</metainfo>

http://git-wip-us.apache.org/repos/asf/ambari/blob/aaaa9884/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/metrics.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/metrics.json b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/metrics.json
deleted file mode 100644
index 58e4ecb..0000000
--- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/metrics.json
+++ /dev/null
@@ -1,264 +0,0 @@
-{
-  "KAFKA_BROKER": {
-    "Component": [
-      {
-        "type": "ganglia",
-        "metrics": {
-          "default": {
-            "metrics/jvm/uptime": {
-              "metric": "jvm.uptime",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/jvm/heap_usage": {
-              "metric": "jvm.heap_usage",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/jvm/non_heap_usage": {
-              "metric": "jvm.non_heap_usage",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/jvm/thread-states/runnable": {
-              "metric": "jvm.thread-states.runnable",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/jvm/thread-states/blocked": {
-              "metric": "jvm.thread-states.blocked",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/jvm/thread-states/timed_waiting": {
-              "metric": "jvm.thread-states.timed_waiting",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/jvm/thread-states/terminated": {
-              "metric": "jvm.thread-states.terminated",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/jvm/thread_count": {
-              "metric": "jvm.thread_count",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/jvm/daemon_thread_count": {
-              "metric": "jvm.daemon_thread_count",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/server/BrokerTopicMetrics/AllTopicsMessagesInPerSec/1MinuteRate": {
-              "metric": "kafka.server.BrokerTopicMetrics.AllTopicsMessagesInPerSec.1MinuteRate",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/server/BrokerTopicMetrics/AllTopicsMessagesInPerSec/5MinuteRate": {
-              "metric": "kafka.server.BrokerTopicMetrics.AllTopicsMessagesInPerSec.5MinuteRate",
-              "pointInTime": false,
-              "temporal": true
-            },
-            "metrics/kafka/server/BrokerTopicMetrics/AllTopicsMessagesInPerSec/15MinuteRate": {
-              "metric": "kafka.server.BrokerTopicMetrics.AllTopicsMessagesInPerSec.15MinuteRate",
-              "pointInTime": false,
-              "temporal": true
-            },
-            "metrics/kafka/server/BrokerTopicMetrics/AllTopicsMessagesInPerSec/meanRate": {
-              "metric": "kafka.server.BrokerTopicMetrics/AllTopicsMessagesInPerSec/meanRate",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/server/BrokerTopicMetrics/AllTopicsMessagesInPerSec/count": {
-              "metric": "kafka.server.BrokerTopicMetrics/AllTopicsMessagesInPerSec.counte",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesInPerSec/1MinuteRate": {
-              "metric": "kafka.server.BrokerTopicMetrics.AllTopicsBytesInPerSec.1MinuteRate",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesInPerSec/5MinuteRate": {
-              "metric": "kafka.server.BrokerTopicMetrics.AllTopicsBytesInPerSec.5MinuteRate",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesInPerSec/15MinuteRate": {
-              "metric": "kafka.server.BrokerTopicMetrics.AllTopicsBytesInPerSec.15MinuteRate",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesInPerSec/meanRate": {
-              "metric": "kafka.server.BrokerTopicMetrics.AllTopicsBytesInPerSec.meanRate",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesInPerSec/count": {
-              "metric": "kafka.server.BrokerTopicMetrics.AllTopicsBytesInPerSec.count",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesOutPerSec/1MinuteRate": {
-              "metric": "kafka.server.BrokerTopicMetrics.AllTopicsBytesOutPerSec.1MinuteRate",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesOutPerSec/5MinuteRate": {
-              "metric": "kafka.server.BrokerTopicMetrics.AllTopicsBytesOutPerSec.5MinuteRate",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesOutPerSec/15MinuteRate": {
-              "metric": "kafka.server.BrokerTopicMetrics.AllTopicsBytesOutPerSec.15MinuteRate",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesOutPerSec/meanRate": {
-              "metric": "kafka.server.BrokerTopicMetrics.AllTopicsBytesOutPerSec.meanRate",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesOutPerSec/count": {
-              "metric": "kafka.server.BrokerTopicMetrics.AllTopicsBytesOutPerSec.count",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/controller/KafkaController/ActiveControllerCount": {
-              "metric": "kafka.controller.KafkaController.ActiveControllerCount",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/log/LogFlushStats/LogFlushRateAndTimeMs/meanRate": {
-              "metric": "kafka.log.LogFlushStats.LogFlushRateAndTimeMs.meanRate",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/log/LogFlushStats/LogFlushRateAndTimeMs/1MinuteRate": {
-              "metric": "kafka.log.LogFlushStats.LogFlushRateAndTimeMs.1MinuteRate",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/log/LogFlushStats/LogFlushRateAndTimeMs/5MinuteRate": {
-              "metric": "kafka.log.LogFlushStats.LogFlushRateAndTimeMs.1MinuteRate",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/log/LogFlushStats/LogFlushRateAndTimeMs/15MinuteRate": {
-              "metric": "kafka.log.LogFlushStats.LogFlushRateAndTimeMs.15MinuteRate",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/log/LogFlushStats/LogFlushRateAndTimeMs/count": {
-              "metric": "kafka.log.LogFlushStats.LogFlushRateAndTimeMs.count",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/controller/ControllerStats/LeaderElectionRateAndTimeMs/meanRate": {
-              "metric": "kafka.controller.ControllerStats.LeaderElectionRateAndTimeMs.meanRate",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/controller/ControllerStats/LeaderElectionRateAndTimeMs/1MinuteRate": {
-              "metric": "kafka.controller.ControllerStats.LeaderElectionRateAndTimeMs.1MinuteRate",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/controller/ControllerStats/LeaderElectionRateAndTimeMs/5MinuteRate": {
-              "metric": "kafka.controller.ControllerStats.LeaderElectionRateAndTimeMs.5MinuteRate",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/controller/ControllerStats/LeaderElectionRateAndTimeMs/15MinuteRate": {
-              "metric": "kafka.controller.ControllerStats.LeaderElectionRateAndTimeMs.15MinuteRate",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/controller/ControllerStats/LeaderElectionRateAndTimeMs/count": {
-              "metric": "kafka.controller.ControllerStats.LeaderElectionRateAndTimeMs.count",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/controller/ControllerStats/UncleanLeaderElectionsPerSec/1MinuteRate": {
-              "metric": "kafka.controller.ControllerStats.UncleanLeaderElectionsPerSec.1MinuteRate",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/controller/ControllerStats/UncleanLeaderElectionsPerSec/5MinuteRate": {
-              "metric": "kafka.controller.ControllerStats.UncleanLeaderElectionsPerSec.5MinuteRate",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/controller/ControllerStats/UncleanLeaderElectionsPerSec/15MinuteRate": {
-              "metric": "kafka.controller.ControllerStats.UncleanLeaderElectionsPerSec.15MinuteRate",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/controller/ControllerStats/OfflinePartitionsCount": {
-              "metric": "kafka.controller.ControllerStats.OfflinePartitionsCount",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/server/ReplicaManager/PartitionCount": {
-              "metric": "kafka.server.ReplicaManager.PartitionCount",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/server/ReplicaManager/LeaderCount": {
-              "metric": "kafka.server.ReplicaManager.LeaderCount",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/server/ReplicaManager/UnderReplicatedPartitions": {
-              "metric": "kafka.server.ReplicaManager.UnderReplicatedPartitions",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/server/ReplicaManager/ISRShrinksPerSec": {
-              "metric": "kafka.server.ReplicaManager.ISRShrinksPerSec",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/server/ReplicaManager/ISRExpandsPerSec": {
-              "metric": "kafka.server.ReplicaManager.ISRExpandsPerSec",
-              "pointInTime": true,
-              "temporal": true
-            },
-
-            "metrics/kafka/server/ReplicaFetcherManager/Replica-MaxLag": {
-              "metric": "kafka.server.ReplicaFetcherManager.Replica-MaxLag",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/server/ProducerRequestPurgatory/PurgatorySize": {
-              "metric": "kafka.server.ProducerRequestPurgatory.PurgatorySize",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/server/FetchRequestPurgatory/PurgatorySize": {
-              "metric": "kafka.server.FetchRequestPurgatory.PurgatorySize",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/cluster/Partition/$1-UnderReplicated": {
-              "metric": "kafka.cluster.Partition.(\\w+)-UnderReplicated",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/consumer/ConsumerFetcherManager/$1-MaxLag": {
-              "metric": "kafka.consumer.ConsumerFetcherManager.(\\w+)-MaxLag",
-              "pointInTime": true,
-              "temporal": true
-            },
-            "metrics/kafka/consumer/ConsumerFetcherManager/$1-MinFetch": {
-              "metric": "kafka.consumer.ConsumerFetcherManager.(\\w+)-MinFetch",
-              "pointInTime": true,
-              "temporal": true
-            }
-          }
-        }
-      }
-    ]
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/aaaa9884/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka.py b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka.py
deleted file mode 100644
index 33275f9..0000000
--- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka.py
+++ /dev/null
@@ -1,234 +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 collections
-import os
-
-from resource_management.libraries.functions.version import format_stack_version
-from resource_management.libraries.resources.properties_file import PropertiesFile
-from resource_management.libraries.resources.template_config import TemplateConfig
-from resource_management.core.resources.system import Directory, Execute, File, Link
-from resource_management.core.source import StaticFile, Template, InlineTemplate
-from resource_management.libraries.functions import format
-from resource_management.libraries.functions.stack_features import check_stack_feature
-from resource_management.libraries.functions import StackFeature
-
-
-from resource_management.core.logger import Logger
-
-
-def kafka(upgrade_type=None):
-    import params
-    ensure_base_directories()
-
-    kafka_server_config = mutable_config_dict(params.config['configurations']['kafka-broker'])
-    # This still has an issue of hostnames being alphabetically out-of-order for broker.id in HDP-2.2.
-    # Starting in HDP 2.3, Kafka handles the generation of broker.id so Ambari doesn't have to.
-
-    effective_version = params.stack_version_formatted if upgrade_type is None else format_stack_version(params.version)
-    Logger.info(format("Effective stack version: {effective_version}"))
-
-    if effective_version is not None and effective_version != "" and \
-      check_stack_feature(StackFeature.CREATE_KAFKA_BROKER_ID, effective_version):
-      if len(params.kafka_hosts) > 0 and params.hostname in params.kafka_hosts:
-        brokerid = str(sorted(params.kafka_hosts).index(params.hostname))
-        kafka_server_config['broker.id'] = brokerid
-        Logger.info(format("Calculating broker.id as {brokerid}"))
-
-    # listeners and advertised.listeners are only added in 2.3.0.0 onwards.
-    if effective_version is not None and effective_version != "" and \
-        check_stack_feature(StackFeature.KAFKA_LISTENERS, effective_version):
-      listeners = kafka_server_config['listeners'].replace("localhost", params.hostname)
-      Logger.info(format("Kafka listeners: {listeners}"))
-
-      if params.security_enabled and params.kafka_kerberos_enabled:
-        Logger.info("Kafka kerberos security is enabled.")
-        if "SASL" not in listeners:
-          listeners = listeners.replace("PLAINTEXT", "PLAINTEXTSASL")
-
-        kafka_server_config['listeners'] = listeners
-        kafka_server_config['advertised.listeners'] = listeners
-        Logger.info(format("Kafka advertised listeners: {listeners}"))
-      else:
-        kafka_server_config['listeners'] = listeners
-
-        if 'advertised.listeners' in kafka_server_config:
-          advertised_listeners = kafka_server_config['advertised.listeners'].replace("localhost", params.hostname)
-          kafka_server_config['advertised.listeners'] = advertised_listeners
-          Logger.info(format("Kafka advertised listeners: {advertised_listeners}"))
-    else:
-      kafka_server_config['host.name'] = params.hostname
-
-    if params.has_metric_collector:
-      kafka_server_config['kafka.timeline.metrics.host'] = params.metric_collector_host
-      kafka_server_config['kafka.timeline.metrics.port'] = params.metric_collector_port
-      kafka_server_config['kafka.timeline.metrics.protocol'] = params.metric_collector_protocol
-      kafka_server_config['kafka.timeline.metrics.truststore.path'] = params.metric_truststore_path
-      kafka_server_config['kafka.timeline.metrics.truststore.type'] = params.metric_truststore_type
-      kafka_server_config['kafka.timeline.metrics.truststore.password'] = params.metric_truststore_password
-
-    kafka_data_dir = kafka_server_config['log.dirs']
-    kafka_data_dirs = filter(None, kafka_data_dir.split(","))
-    Directory(kafka_data_dirs,
-              mode=0755,
-              cd_access='a',
-              owner=params.kafka_user,
-              group=params.user_group,
-              create_parents = True,
-              recursive_ownership = True,
-    )
-
-    PropertiesFile("server.properties",
-                      dir=params.conf_dir,
-                      properties=kafka_server_config,
-                      owner=params.kafka_user,
-                      group=params.user_group,
-    )
-
-    File(format("{conf_dir}/kafka-env.sh"),
-          owner=params.kafka_user,
-          content=InlineTemplate(params.kafka_env_sh_template)
-     )
-
-    if (params.log4j_props != None):
-        File(format("{conf_dir}/log4j.properties"),
-             mode=0644,
-             group=params.user_group,
-             owner=params.kafka_user,
-             content=params.log4j_props
-         )
-
-    if params.security_enabled and params.kafka_kerberos_enabled:
-        TemplateConfig(format("{conf_dir}/kafka_jaas.conf"),
-                         owner=params.kafka_user)
-
-        TemplateConfig(format("{conf_dir}/kafka_client_jaas.conf"),
-                       owner=params.kafka_user)
-
-    # On some OS this folder could be not exists, so we will create it before pushing there files
-    Directory(params.limits_conf_dir,
-              create_parents = True,
-              owner='root',
-              group='root'
-    )
-
-    File(os.path.join(params.limits_conf_dir, 'kafka.conf'),
-         owner='root',
-         group='root',
-         mode=0644,
-         content=Template("kafka.conf.j2")
-    )
-
-    File(os.path.join(params.conf_dir, 'tools-log4j.properties'),
-         owner='root',
-         group='root',
-         mode=0644,
-         content=Template("tools-log4j.properties.j2")
-         )
-
-    setup_symlink(params.kafka_managed_pid_dir, params.kafka_pid_dir)
-    setup_symlink(params.kafka_managed_log_dir, params.kafka_log_dir)
-
-
-def mutable_config_dict(kafka_broker_config):
-    kafka_server_config = {}
-    for key, value in kafka_broker_config.iteritems():
-        kafka_server_config[key] = value
-    return kafka_server_config
-
-
-# Used to workaround the hardcoded pid/log dir used on the kafka bash process launcher
-def setup_symlink(kafka_managed_dir, kafka_ambari_managed_dir):
-  import params
-  backup_folder_path = None
-  backup_folder_suffix = "_tmp"
-  if kafka_ambari_managed_dir != kafka_managed_dir:
-    if os.path.exists(kafka_managed_dir) and not os.path.islink(kafka_managed_dir):
-
-      # Backup existing data before delete if config is changed repeatedly to/from default location at any point in time time, as there may be relevant contents (historic logs)
-      backup_folder_path = backup_dir_contents(kafka_managed_dir, backup_folder_suffix)
-
-      Directory(kafka_managed_dir,
-                action="delete",
-                create_parents = True)
-
-    elif os.path.islink(kafka_managed_dir) and os.path.realpath(kafka_managed_dir) != kafka_ambari_managed_dir:
-      Link(kafka_managed_dir,
-           action="delete")
-
-    if not os.path.islink(kafka_managed_dir):
-      Link(kafka_managed_dir,
-           to=kafka_ambari_managed_dir)
-
-  elif os.path.islink(kafka_managed_dir): # If config is changed and coincides with the kafka managed dir, remove the symlink and physically create the folder
-    Link(kafka_managed_dir,
-         action="delete")
-
-    Directory(kafka_managed_dir,
-              mode=0755,
-              cd_access='a',
-              owner=params.kafka_user,
-              group=params.user_group,
-              create_parents = True,
-              recursive_ownership = True,
-    )
-
-  if backup_folder_path:
-    # Restore backed up files to current relevant dirs if needed - will be triggered only when changing to/from default path;
-    for file in os.listdir(backup_folder_path):
-      File(os.path.join(kafka_managed_dir,file),
-           owner=params.kafka_user,
-           content = StaticFile(os.path.join(backup_folder_path,file)))
-
-    # Clean up backed up folder
-    Directory(backup_folder_path,
-              action="delete",
-              create_parents = True)
-
-
-# Uses agent temp dir to store backup files
-def backup_dir_contents(dir_path, backup_folder_suffix):
-  import params
-  backup_destination_path = params.tmp_dir + os.path.normpath(dir_path)+backup_folder_suffix
-  Directory(backup_destination_path,
-            mode=0755,
-            cd_access='a',
-            owner=params.kafka_user,
-            group=params.user_group,
-            create_parents = True,
-            recursive_ownership = True,
-  )
-  # Safely copy top-level contents to backup folder
-  for file in os.listdir(dir_path):
-    File(os.path.join(backup_destination_path, file),
-         owner=params.kafka_user,
-         content = StaticFile(os.path.join(dir_path,file)))
-
-  return backup_destination_path
-
-def ensure_base_directories():
-  import params
-  Directory([params.kafka_log_dir, params.kafka_pid_dir, params.conf_dir],
-            mode=0755,
-            cd_access='a',
-            owner=params.kafka_user,
-            group=params.user_group,
-            create_parents = True,
-            recursive_ownership = True,
-            )

http://git-wip-us.apache.org/repos/asf/ambari/blob/aaaa9884/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka_broker.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka_broker.py b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka_broker.py
deleted file mode 100644
index 024da4a..0000000
--- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka_broker.py
+++ /dev/null
@@ -1,129 +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.
-
-"""
-from resource_management import Script
-from resource_management.core.logger import Logger
-from resource_management.core.resources.system import Execute, File, Directory
-from resource_management.libraries.functions import conf_select
-from resource_management.libraries.functions import stack_select
-from resource_management.libraries.functions import Direction
-from resource_management.libraries.functions.version import compare_versions, format_stack_version
-from resource_management.libraries.functions.format import format
-from resource_management.libraries.functions.check_process_status import check_process_status
-from resource_management.libraries.functions import StackFeature
-from resource_management.libraries.functions.stack_features import check_stack_feature
-from resource_management.libraries.functions.show_logs import show_logs
-from resource_management.libraries.functions.default import default
-from kafka import ensure_base_directories
-
-import upgrade
-from kafka import kafka
-from setup_ranger_kafka import setup_ranger_kafka
-
-class KafkaBroker(Script):
-
-  def get_component_name(self):
-    return "kafka-broker"
-
-  def install(self, env):
-    self.install_packages(env)
-
-  def configure(self, env, upgrade_type=None):
-    import params
-    env.set_params(params)
-    kafka(upgrade_type=upgrade_type)
-
-  def pre_upgrade_restart(self, env, upgrade_type=None):
-    import params
-    env.set_params(params)
-
-    if params.version and check_stack_feature(StackFeature.ROLLING_UPGRADE, params.version):
-      stack_select.select("kafka-broker", params.version)
-
-    if params.version and check_stack_feature(StackFeature.CONFIG_VERSIONING, params.version):
-      conf_select.select(params.stack_name, "kafka", params.version)
-
-    # This is extremely important since it should only be called if crossing the HDP 2.3.4.0 boundary. 
-    if params.current_version and params.version and params.upgrade_direction:
-      src_version = dst_version = None
-      if params.upgrade_direction == Direction.UPGRADE:
-        src_version = format_stack_version(params.current_version)
-        dst_version = format_stack_version(params.version)
-      else:
-        # These represent the original values during the UPGRADE direction
-        src_version = format_stack_version(params.version)
-        dst_version = format_stack_version(params.downgrade_from_version)
-
-      # TODO: How to handle the case of crossing stack version boundary in a stack agnostic way?
-      if compare_versions(src_version, '2.3.4.0') < 0 and compare_versions(dst_version, '2.3.4.0') >= 0:
-        # Calling the acl migration script requires the configs to be present.
-        self.configure(env, upgrade_type=upgrade_type)
-        upgrade.run_migration(env, upgrade_type)
-
-  def start(self, env, upgrade_type=None):
-    import params
-    env.set_params(params)
-    self.configure(env, upgrade_type=upgrade_type)
-    if params.is_supported_kafka_ranger:
-      setup_ranger_kafka() #Ranger Kafka Plugin related call 
-    daemon_cmd = format('source {params.conf_dir}/kafka-env.sh ; {params.kafka_bin} start')
-    no_op_test = format('ls {params.kafka_pid_file} >/dev/null 2>&1 && ps -p `cat {params.kafka_pid_file}` >/dev/null 2>&1')
-    try:
-      Execute(daemon_cmd,
-              user=params.kafka_user,
-              not_if=no_op_test
-      )
-    except:
-      show_logs(params.kafka_log_dir, params.kafka_user)
-      raise
-
-  def stop(self, env, upgrade_type=None):
-    import params
-    env.set_params(params)
-    # Kafka package scripts change permissions on folders, so we have to
-    # restore permissions after installing repo version bits
-    # before attempting to stop Kafka Broker
-    ensure_base_directories()
-    daemon_cmd = format('source {params.conf_dir}/kafka-env.sh; {params.kafka_bin} stop')
-    try:
-      Execute(daemon_cmd,
-              user=params.kafka_user,
-      )
-    except:
-      show_logs(params.kafka_log_dir, params.kafka_user)
-      raise
-    File(params.kafka_pid_file,
-          action = "delete"
-    )
-
-
-  def status(self, env):
-    import status_params
-    env.set_params(status_params)
-    check_process_status(status_params.kafka_pid_file)
-    
-  def get_log_folder(self):
-    import params
-    return params.kafka_log_dir
-  
-  def get_user(self):
-    import params
-    return params.kafka_user
-
-if __name__ == "__main__":
-  KafkaBroker().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/aaaa9884/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/params.py b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/params.py
deleted file mode 100644
index 12ccef6..0000000
--- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/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']
-java64_home = config['hostLevelParams']['java_home']
-kafka_env_sh_template = config['configurations']['kafka-env']['content']
-kafka_hosts = config['clusterHostInfo']['kafka_broker_hosts']
-kafka_hosts.sort()
-
-zookeeper_hosts = config['clusterHostInfo']['zookeeper_hosts']
-zookeeper_hosts.sort()
-
-if (('kafka-log4j' in config['configurations']) and ('content' in config['configurations']['kafka-log4j'])):
-    log4j_props = config['configurations']['kafka-log4j']['content']
-else:
-    log4j_props = None
-
-if 'ganglia_server_host' in config['clusterHostInfo'] and \
-    len(config['clusterHostInfo']['ganglia_server_host'])>0:
-  ganglia_installed = True
-  ganglia_server = config['clusterHostInfo']['ganglia_server_host'][0]
-  ganglia_report_interval = 60
-else:
-  ganglia_installed = False
-
-metric_collector_host = ""
-metric_collector_port = ""
-metric_collector_protocol = ""
-metric_truststore_path= default("/configurations/ams-ssl-client/ssl.client.truststore.location", "")
-metric_truststore_type= default("/configurations/ams-ssl-client/ssl.client.truststore.type", "")
-metric_truststore_password= default("/configurations/ams-ssl-client/ssl.client.truststore.password", "")
-
-ams_collector_hosts = default("/clusterHostInfo/metrics_collector_hosts", [])
-has_metric_collector = not len(ams_collector_hosts) == 0
-
-if has_metric_collector:
-  if 'cluster-env' in config['configurations'] and \
-      'metrics_collector_vip_host' in config['configurations']['cluster-env']:
-    metric_collector_host = config['configurations']['cluster-env']['metrics_collector_vip_host']
-  else:
-    metric_collector_host = ams_collector_hosts[0]
-  if 'cluster-env' in config['configurations'] and \
-      'metrics_collector_vip_port' in config['configurations']['cluster-env']:
-    metric_collector_port = config['configurations']['cluster-env']['metrics_collector_vip_port']
-  else:
-    metric_collector_web_address = default("/configurations/ams-site/timeline.metrics.service.webapp.address", "localhost:6188")
-    if metric_collector_web_address.find(':') != -1:
-      metric_collector_port = metric_collector_web_address.split(':')[1]
-    else:
-      metric_collector_port = '6188'
-  if default("/configurations/ams-site/timeline.metrics.service.http.policy", "HTTP_ONLY") == "HTTPS_ONLY":
-    metric_collector_protocol = 'https'
-  else:
-    metric_collector_protocol = 'http'
-  pass
-# Security-related params
-security_enabled = config['configurations']['cluster-env']['security_enabled']
-kafka_kerberos_enabled = (('security.inter.broker.protocol' in config['configurations']['kafka-broker']) and
-                         ((config['configurations']['kafka-broker']['security.inter.broker.protocol'] == "PLAINTEXTSASL") or
-                          (config['configurations']['kafka-broker']['security.inter.broker.protocol'] == "SASL_PLAINTEXT")))
-
-
-if security_enabled and stack_version_formatted != "" and 'kafka_principal_name' in config['configurations']['kafka-env'] \
-  and check_stack_feature(StackFeature.KAFKA_KERBEROS, stack_version_formatted):
-    _hostname_lowercase = config['hostname'].lower()
-    _kafka_principal_name = config['configurations']['kafka-env']['kafka_principal_name']
-    kafka_jaas_principal = _kafka_principal_name.replace('_HOST',_hostname_lowercase)
-    kafka_keytab_path = config['configurations']['kafka-env']['kafka_keytab']
-    kafka_bare_jaas_principal = get_bare_principal(_kafka_principal_name)
-    kafka_kerberos_params = "-Djava.security.auth.login.config="+ conf_dir +"/kafka_jaas.conf"
-else:
-    kafka_kerberos_params = ''
-
-# ***********************  RANGER PLUGIN CHANGES ***********************
-# ranger host
-# **********************************************************************
-stack_supports_ranger_audit_db = stack_version_formatted and check_stack_feature(StackFeature.RANGER_AUDIT_DB_SUPPORT, stack_version_formatted)
-ranger_admin_hosts = default("/clusterHostInfo/ranger_admin_hosts", [])
-has_ranger_admin = not len(ranger_admin_hosts) == 0
-xml_configurations_supported = config['configurations']['ranger-env']['xml_configurations_supported']
-ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0]
-
-ranger_admin_log_dir = default("/configurations/ranger-env/ranger_admin_log_dir","/var/log/ranger/admin")
-is_supported_kafka_ranger = config['configurations']['kafka-env']['is_supported_kafka_ranger']
-
-#ranger kafka properties
-if has_ranger_admin and is_supported_kafka_ranger:
-
-  enable_ranger_kafka = config['configurations']['ranger-kafka-plugin-properties']['ranger-kafka-plugin-enabled']
-  enable_ranger_kafka = not is_empty(enable_ranger_kafka) and enable_ranger_kafka.lower() == 'yes'
-  policymgr_mgr_url = config['configurations']['admin-properties']['policymgr_external_url']
-  xa_audit_db_flavor = config['configurations']['admin-properties']['DB_FLAVOR']
-  xa_audit_db_flavor = xa_audit_db_flavor.lower() if xa_audit_db_flavor else None
-  xa_audit_db_name = config['configurations']['admin-properties']['audit_db_name']
-  xa_audit_db_user = config['configurations']['admin-properties']['audit_db_user']
-  xa_audit_db_password = unicode(config['configurations']['admin-properties']['audit_db_password']) if stack_supports_ranger_audit_db else None
-  xa_db_host = config['configurations']['admin-properties']['db_host']
-  repo_name = str(config['clusterName']) + '_kafka'
-
-  ranger_env = config['configurations']['ranger-env']
-  ranger_plugin_properties = config['configurations']['ranger-kafka-plugin-properties']
-
-  ranger_kafka_audit = config['configurations']['ranger-kafka-audit']
-  ranger_kafka_audit_attrs = config['configuration_attributes']['ranger-kafka-audit']
-  ranger_kafka_security = config['configurations']['ranger-kafka-security']
-  ranger_kafka_security_attrs = config['configuration_attributes']['ranger-kafka-security']
-  ranger_kafka_policymgr_ssl = config['configurations']['ranger-kafka-policymgr-ssl']
-  ranger_kafka_policymgr_ssl_attrs = config['configuration_attributes']['ranger-kafka-policymgr-ssl']
-
-  policy_user = config['configurations']['ranger-kafka-plugin-properties']['policy_user']
-
-  ranger_plugin_config = {
-    'username' : config['configurations']['ranger-kafka-plugin-properties']['REPOSITORY_CONFIG_USERNAME'],
-    'password' : unicode(config['configurations']['ranger-kafka-plugin-properties']['REPOSITORY_CONFIG_PASSWORD']),
-    'zookeeper.connect' : config['configurations']['ranger-kafka-plugin-properties']['zookeeper.connect'],
-    'commonNameForCertificate' : config['configurations']['ranger-kafka-plugin-properties']['common.name.for.certificate']
-  }
-
-  kafka_ranger_plugin_repo = {
-    'isEnabled': 'true',
-    'configs': ranger_plugin_config,
-    'description': 'kafka repo',
-    'name': repo_name,
-    'repositoryType': 'kafka',
-    'type': 'kafka',
-    'assetType': '1'
-  }
-
-  if stack_supports_ranger_kerberos and security_enabled:
-    ranger_plugin_config['policy.download.auth.users'] = kafka_user
-    ranger_plugin_config['tag.download.auth.users'] = kafka_user
-
-
-  #For curl command in ranger plugin to get db connector
-  jdk_location = config['hostLevelParams']['jdk_location']
-  java_share_dir = '/usr/share/java'
-  if stack_supports_ranger_audit_db:
-    if xa_audit_db_flavor and xa_audit_db_flavor == 'mysql':
-      jdbc_jar_name = default("/hostLevelParams/custom_mysql_jdbc_name", None)
-      audit_jdbc_url = format('jdbc:mysql://{xa_db_host}/{xa_audit_db_name}')
-      jdbc_driver = "com.mysql.jdbc.Driver"
-    elif xa_audit_db_flavor and xa_audit_db_flavor == 'oracle':
-      jdbc_jar_name = default("/hostLevelParams/custom_oracle_jdbc_name", None)
-      colon_count = xa_db_host.count(':')
-      if colon_count == 2 or colon_count == 0:
-        audit_jdbc_url = format('jdbc:oracle:thin:@{xa_db_host}')
-      else:
-        audit_jdbc_url = format('jdbc:oracle:thin:@//{xa_db_host}')
-      jdbc_driver = "oracle.jdbc.OracleDriver"
-    elif xa_audit_db_flavor and xa_audit_db_flavor == 'postgres':
-      jdbc_jar_name = default("/hostLevelParams/custom_postgres_jdbc_name", None)
-      audit_jdbc_url = format('jdbc:postgresql://{xa_db_host}/{xa_audit_db_name}')
-      jdbc_driver = "org.postgresql.Driver"
-    elif xa_audit_db_flavor and xa_audit_db_flavor == 'mssql':
-      jdbc_jar_name = default("/hostLevelParams/custom_mssql_jdbc_name", None)
-      audit_jdbc_url = format('jdbc:sqlserver://{xa_db_host};databaseName={xa_audit_db_name}')
-      jdbc_driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
-    elif xa_audit_db_flavor and xa_audit_db_flavor == 'sqla':
-      jdbc_jar_name = default("/hostLevelParams/custom_sqlanywhere_jdbc_name", None)
-      audit_jdbc_url = format('jdbc:sqlanywhere:database={xa_audit_db_name};host={xa_db_host}')
-      jdbc_driver = "sap.jdbc4.sqlanywhere.IDriver"
-
-  downloaded_custom_connector = format("{tmp_dir}/{jdbc_jar_name}") if stack_supports_ranger_audit_db else None
-  driver_curl_source = format("{jdk_location}/{jdbc_jar_name}") if stack_supports_ranger_audit_db else None
-  driver_curl_target = format("{kafka_home}/libs/{jdbc_jar_name}") if stack_supports_ranger_audit_db else None
-
-  xa_audit_db_is_enabled = False
-  ranger_audit_solr_urls = config['configurations']['ranger-admin-site']['ranger.audit.solr.urls']
-  if xml_configurations_supported and stack_supports_ranger_audit_db:
-    xa_audit_db_is_enabled = config['configurations']['ranger-kafka-audit']['xasecure.audit.destination.db']
-  xa_audit_hdfs_is_enabled = config['configurations']['ranger-kafka-audit']['xasecure.audit.destination.hdfs'] if xml_configurations_supported else None
-  ssl_keystore_password = unicode(config['configurations']['ranger-kafka-policymgr-ssl']['xasecure.policymgr.clientssl.keystore.password']) if xml_configurations_supported else None
-  ssl_truststore_password = unicode(config['configurations']['ranger-kafka-policymgr-ssl']['xasecure.policymgr.clientssl.truststore.password']) if xml_configurations_supported else None
-  credential_file = format('/etc/ranger/{repo_name}/cred.jceks') if xml_configurations_supported else None
-
-  stack_version = get_stack_version('kafka-broker')
-  setup_ranger_env_sh_source = format('{stack_root}/{stack_version}/ranger-kafka-plugin/install/conf.templates/enable/kafka-ranger-env.sh')
-  setup_ranger_env_sh_target = format("{conf_dir}/kafka-ranger-env.sh")
-
-  #For SQLA explicitly disable audit to DB for Ranger
-  if xa_audit_db_flavor == 'sqla':
-    xa_audit_db_is_enabled = False
-
-namenode_hosts = default("/clusterHostInfo/namenode_host", [])
-has_namenode = not len(namenode_hosts) == 0
-
-hdfs_user = config['configurations']['hadoop-env']['hdfs_user'] if has_namenode else None
-hdfs_user_keytab = config['configurations']['hadoop-env']['hdfs_user_keytab'] if has_namenode else None
-hdfs_principal_name = config['configurations']['hadoop-env']['hdfs_principal_name'] if has_namenode else None
-hdfs_site = config['configurations']['hdfs-site'] if has_namenode else None
-default_fs = config['configurations']['core-site']['fs.defaultFS'] if has_namenode else None
-hadoop_bin_dir = stack_select.get_hadoop_dir("bin") if has_namenode else None
-hadoop_conf_dir = conf_select.get_hadoop_conf_dir() if has_namenode else None
-kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None))
-
-import functools
-#create partial functions with common arguments for every HdfsResource call
-#to create/delete hdfs directory/file/copyfromlocal we need to call params.HdfsResource in code
-HdfsResource = functools.partial(
-  HdfsResource,
-  user=hdfs_user,
-  hdfs_resource_ignore_file = "/var/lib/ambari-agent/data/.hdfs_resource_ignore",
-  security_enabled = security_enabled,
-  keytab = hdfs_user_keytab,
-  kinit_path_local = kinit_path_local,
-  hadoop_bin_dir = hadoop_bin_dir,
-  hadoop_conf_dir = hadoop_conf_dir,
-  principal_name = hdfs_principal_name,
-  hdfs_site = hdfs_site,
-  default_fs = default_fs,
-  immutable_paths = get_not_managed_resources()
-)

http://git-wip-us.apache.org/repos/asf/ambari/blob/aaaa9884/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/service_check.py
deleted file mode 100644
index 0f3a417..0000000
--- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/service_check.py
+++ /dev/null
@@ -1,65 +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.script.script import Script
-from resource_management.libraries.functions.validate import call_and_match_output
-from resource_management.libraries.functions.format import format
-from resource_management.core.logger import Logger
-from resource_management.core import sudo
-import subprocess
-
-class ServiceCheck(Script):
-  def service_check(self, env):
-    import params
-    env.set_params(params)
-
-    # TODO, Kafka Service check should be more robust , It should get all the broker_hosts
-    # Produce some messages and check if consumer reads same no.of messages.
-    
-    kafka_config = self.read_kafka_config()
-    topic = "ambari_kafka_service_check"
-    create_topic_cmd_created_output = "Created topic \"ambari_kafka_service_check\"."
-    create_topic_cmd_exists_output = "Topic \"ambari_kafka_service_check\" already exists."
-    source_cmd = format("source {conf_dir}/kafka-env.sh")
-    topic_exists_cmd = format("{kafka_home}/bin/kafka-topics.sh --zookeeper {kafka_config[zookeeper.connect]} --topic {topic} --list")
-    topic_exists_cmd_p = subprocess.Popen(topic_exists_cmd.split(" "), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-    topic_exists_cmd_out, topic_exists_cmd_err = topic_exists_cmd_p.communicate()
-    # run create topic command only if the topic doesn't exists
-    if topic not in topic_exists_cmd_out:
-      create_topic_cmd = format("{kafka_home}/bin/kafka-topics.sh --zookeeper {kafka_config[zookeeper.connect]} --create --topic {topic} --partitions 1 --replication-factor 1")
-      command = source_cmd + " ; " + create_topic_cmd
-      Logger.info("Running kafka create topic command: %s" % command)
-      call_and_match_output(command, format("({create_topic_cmd_created_output})|({create_topic_cmd_exists_output})"), "Failed to check that topic exists", user=params.kafka_user)
-
-  def read_kafka_config(self):
-    import params
-    
-    kafka_config = {}
-    content = sudo.read_file(params.conf_dir + "/server.properties")
-    for line in content.splitlines():
-      if line.startswith("#") or not line.strip():
-        continue
-
-      key, value = line.split("=")
-      kafka_config[key] = value.replace("\n", "")
-    
-    return kafka_config
-
-if __name__ == "__main__":
-    ServiceCheck().execute()


Mime
View raw message