You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ji...@apache.org on 2024/09/07 09:44:51 UTC
(ambari) branch eee created (now 427156fff2)
This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a change to branch eee
in repository https://gitbox.apache.org/repos/asf/ambari.git
at 427156fff2 fix
This branch includes the following new commits:
new fb7a970199 AMBARI-26118: Fix the default SSL Ciphers of port 8440/8441 are too weak issue #3815
new 6fde041701 AMBARI-26119: Add dependency python3-distro for ambari-server #3816
new ad410e6f4d AMBARI-26120:When selecting all hosts in install wizard step 6 page, the disabled host should be excluded (#3817)
new db4d38fc57 AMBARI-26121: Fix Python3 compilation error when packaging Ambari on CentOS 7
new 3d717078ec AMBARI-26107: Migrate away from DOMNodeInserted to MutationObserver (ambari-admin) (#3819)
new b50997d50e merge trunk
new bca67d67a6 move ranger to 3.3
new c1669f3037 add router
new 03c1c2d0b0 add livy
new 9ca07921d3 ranger py3
new 00cd43bb4a add alluxio
new 973d2cce68 add celeborn
new 41b63c327b add knox
new 830b4d47f3 add kyuubi
new 5e7a34b4cd add trino
new e30687f875 add dinky
new 84c43a8bba system support il8n kerberos fix hive load data owner remove hive mysql8 support
new c5e3ab675b add mpack add stack packages
new 71de78c2b0 fix ranger
new 55de9c388e add kafka 3.6
new 0760696708 fix
new 427156fff2 fix
The 22 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org
(ambari) 12/22: add celeborn
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch eee
in repository https://gitbox.apache.org/repos/asf/ambari.git
commit 973d2cce68c16416929c64d6e3bd773a75c0dd05
Author: jialiang <ji...@gmail.com>
AuthorDate: Sat Sep 7 10:56:27 2024 +0800
add celeborn
---
.../BIGTOP/3.2.0/services/CELEBORN/alerts.json | 59 ++++++
.../CELEBORN/configuration/celeborn-defaults.xml | 193 ++++++++++++++++++
.../CELEBORN/configuration/celeborn-env.xml | 148 ++++++++++++++
.../CELEBORN/configuration/celeborn-log4j.xml | 105 ++++++++++
.../configuration/celeborn-metrics-properties.xml | 52 +++++
.../CELEBORN/configuration/celeborn-quota.xml | 66 +++++++
.../celeborn-ratis-log4j-properties.xml | 66 +++++++
.../BIGTOP/3.2.0/services/CELEBORN/kerberos.json | 50 +++++
.../BIGTOP/3.2.0/services/CELEBORN/metainfo.xml | 102 ++++++++++
.../services/CELEBORN/package/scripts/celeborn.py | 128 ++++++++++++
.../CELEBORN/package/scripts/celeborn_service.py | 82 ++++++++
.../services/CELEBORN/package/scripts/master.py | 65 ++++++
.../services/CELEBORN/package/scripts/params.py | 218 +++++++++++++++++++++
.../CELEBORN/package/scripts/service_check.py | 40 ++++
.../CELEBORN/package/scripts/status_params.py | 37 ++++
.../services/CELEBORN/package/scripts/worker.py | 62 ++++++
.../services/CELEBORN/package/templates/hosts.j2 | 22 +++
.../services/CELEBORN/role_command_order.json | 8 +
.../3.2.0/services/CELEBORN/service_advisor.py | 196 ++++++++++++++++++
19 files changed, 1699 insertions(+)
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/alerts.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/alerts.json
new file mode 100755
index 0000000000..8c8434e82f
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/alerts.json
@@ -0,0 +1,59 @@
+{
+ "CELEBORN": {
+ "service": [],
+ "CELEBORN_MASTER": [
+ {
+ "name": "CELEBORN_MASTER_PROCESS",
+ "label": "celeborn master",
+ "description": "This host-level alert is triggered if the celeborn msater cannot be determined to be up.",
+ "interval": 1,
+ "scope": "HOST",
+ "source": {
+ "type": "PORT",
+ "uri": "{{celeborn-log4j-properties/celeborn.master.rpc.port}}",
+ "default_port": 9097,
+ "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
+ }
+ }
+ }
+ }
+ ],
+ "CELEBORN_WORKER": [
+ {
+ "name": "CELEBORN_WORKER_PROCESS",
+ "label": "celeborn worker",
+ "description": "This host-level alert is triggered if the celeborn worker cannot be determined to be up.",
+ "interval": 1,
+ "scope": "HOST",
+ "source": {
+ "type": "PORT",
+ "uri": "{{celeborn-log4j-properties/celeborn.worker.rpc.port}}",
+ "default_port": 9096,
+ "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
+ }
+ }
+ }
+ }
+ ]
+ }
+}
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/configuration/celeborn-defaults.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/configuration/celeborn-defaults.xml
new file mode 100755
index 0000000000..a2febd4d2d
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/configuration/celeborn-defaults.xml
@@ -0,0 +1,193 @@
+<?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="true">
+
+ <property>
+ <name>celeborn.master.port</name>
+ <description>celeborn.master.port</description>
+ <value>9097</value>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <property>
+ <name>celeborn.master.ratis.port</name>
+ <description>celeborn.master.ratis.port</description>
+ <value>9872</value>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <property>
+ <name>celeborn.master.ha.ratis.raft.server.storage.dir</name>
+ <display-name>celeborn.master.ha.ratis.raft.server.storage.dir</display-name>
+ <value>/mnt/disk1/celeborn_ratis/</value>
+ <description/>
+ <value-attributes>
+ <type>directory</type>
+ <overridable>false</overridable>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>celeborn.worker.storage.dirs</name>
+ <description>If Celeborn workers have local disks and HDFS. Following configs should be added.
+Celeborn will use local disks until local disk become unavailable to gain the best performance.
+Increase Celeborn's off-heap memory if Celeborn write to HDFS.
+If Celeborn workers have local disks, use following config.
+Disk type is HDD by default.
+example: /mnt/disk1:disktype=SSD,/mnt/disk2:disktype=SSD</description>
+ <value>/mnt/disk1</value>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <property>
+ <name>celeborn.storage.activeTypes</name>
+ <description># If Celeborn workers don't have local disks. You can use HDFS.
+# Do not set `celeborn.worker.storage.dirs` and use following configs.</description>
+ <value>HDFS</value>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <property>
+ <name>celeborn.storage.hdfs.dir</name>
+ <description>celeborn.storage.hdfs.dir</description>
+ <value>/celeborn</value>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <property>
+ <name>celeborn.storage.hdfs.kerberos.keytab</name>
+ <description>celeborn.storage.hdfs.kerberos.keytab</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>celeborn.storage.hdfs.kerberos.principal</name>
+ <description># Either principal/keytab or valid TGT cache is required to access kerberized HDFS</description>
+ <property-type>KERBEROS_PRINCIPAL</property-type>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+
+ <property>
+ <name>celeborn.quota.enabled</name>
+ <description>celeborn.quota.enabled</description>
+ <value>fasle</value>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>content</name>
+ <description>metrics.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.
+#
+
+# used by client and worker to connect to master
+#celeborn.master.endpoints clb-1:9097,clb-2:9097,clb-3:9097
+celeborn.master.endpoints {{celeborn_master_endpoints}}
+
+# used by master nodes to bootstrap, every node should know the topology of whole cluster, for each node,
+# `celeborn.master.ha.node.id` should be unique, and `celeborn.master.ha.node.(id).host` is required.
+
+celeborn.master.ha.enabled {{celeborn_master_ha_enabled}}
+{{celeborn_master_endpoints_config}}
+
+#celeborn.master.ha.enabled true
+#celeborn.master.ha.node.id 1
+#celeborn.master.ha.node.1.host clb-1
+#celeborn.master.ha.node.1.port 9097
+#celeborn.master.ha.node.1.ratis.port 9872
+#celeborn.master.ha.node.2.host clb-2
+#celeborn.master.ha.node.2.port 9097
+#celeborn.master.ha.node.2.ratis.port 9872
+#celeborn.master.ha.node.3.host clb-3
+#celeborn.master.ha.node.3.port 9097
+#celeborn.master.ha.node.3.ratis.port 9872
+celeborn.master.ha.ratis.raft.server.storage.dir {{celeborn_master_ha_ratis_raft_server_storage_dir}}
+
+celeborn.metrics.enabled true
+# If you want to use HDFS as shuffle storage, make sure that flush buffer size is at least 4MB or larger.
+celeborn.worker.flusher.buffer.size 256k
+
+# If Celeborn workers have local disks and HDFS. Following configs should be added.
+# Celeborn will use local disks until local disk become unavailable to gain the best performance.
+# Increase Celeborn's off-heap memory if Celeborn write to HDFS.
+# If Celeborn workers have local disks, use following config.
+# Disk type is HDD by default.
+#celeborn.worker.storage.dirs /mnt/disk1:disktype=SSD,/mnt/disk2:disktype=SSD
+celeborn.worker.storage.dirs {{celeborn_worker_storage_dirs}}
+
+# If Celeborn workers don't have local disks. You can use HDFS.
+# Do not set `celeborn.worker.storage.dirs` and use following configs.
+celeborn.storage.activeTypes {{celeborn_storage_activeTypes}}
+celeborn.worker.sortPartition.threads 64
+celeborn.worker.commitFiles.timeout 240s
+celeborn.worker.commitFiles.threads 128
+celeborn.master.slot.assign.policy roundrobin
+celeborn.rpc.askTimeout 240s
+celeborn.worker.flusher.hdfs.buffer.size 4m
+celeborn.storage.hdfs.dir {{celeborn_storage_hdfs_dir}}
+celeborn.worker.replicate.fastFail.duration 240s
+
+# If your hosts have disk raid or use lvm, set celeborn.worker.monitor.disk.enabled to false
+celeborn.worker.monitor.disk.enabled false
+
+
+# if you are using Celeborn for flink, these settings will be needed
+celeborn.worker.directMemoryRatioForReadBuffer 0.4
+celeborn.worker.directMemoryRatioToResume 0.6
+# these setting will affect performance.
+# If there is enough off-heap memory, you can try to increase read buffers.
+# Read buffer max memory usage for a data partition is `taskmanager.memory.segment-size * readBuffersMax`
+celeborn.worker.partition.initial.readBuffersMin 512
+celeborn.worker.partition.initial.readBuffersMax 1024
+celeborn.worker.readBuffer.allocationWait 10ms
+# Currently, shuffle partitionSplit is not supported, so you should disable split in celeborn worker side or set `celeborn.client.shuffle.partitionSplit.threshold` to a high value in flink client side.
+celeborn.worker.shuffle.partitionSplit.enabled false
+
+# Either principal/keytab or valid TGT cache is required to access kerberized HDFS
+celeborn.storage.hdfs.kerberos.principal {{celeborn_storage_hdfs_kerberos_principal}}
+celeborn.storage.hdfs.kerberos.keytab {{celeborn_storage_hdfs_kerberos_keytab}}
+
+celeborn.quota.enabled {{celeborn_quota_enabled}}
+celeborn.client.push.replicate.enabled false
+
+ </value>
+ <value-attributes>
+ <type>content</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/configuration/celeborn-env.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/configuration/celeborn-env.xml
new file mode 100755
index 0000000000..d98c724124
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/configuration/celeborn-env.xml
@@ -0,0 +1,148 @@
+<?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="true">
+ <property>
+ <name>celeborn_user</name>
+ <display-name>Celeborn User</display-name>
+ <value>celeborn</value>
+ <property-type>USER</property-type>
+ <value-attributes>
+ <type>user</type>
+ <overridable>false</overridable>
+ <user-groups>
+ <property>
+ <type>cluster-env</type>
+ <name>user_group</name>
+ </property>
+ <property>
+ <type>celeborn-env</type>
+ <name>celeborn_group</name>
+ </property>
+ </user-groups>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>celeborn_group</name>
+ <display-name>Celeborn Group</display-name>
+ <value>hadoop</value>
+ <property-type>GROUP</property-type>
+ <description>celeborn group</description>
+ <value-attributes>
+ <type>user</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>celeborn_log_dir</name>
+ <display-name>Celeborn Log directory</display-name>
+ <value>/var/log/celeborn</value>
+ <description>Celeborn Log Dir</description>
+ <value-attributes>
+ <type>directory</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>celeborn_pid_dir</name>
+ <display-name>Celeborn PID directory</display-name>
+ <value>/var/run/celeborn</value>
+ <description>Celeborn Log Dir</description>
+ <value-attributes>
+ <type>directory</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <property>
+ <name>celeborn_keytab</name>
+ <description>Celeborn keytab path</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>celeborn_principal</name>
+ <description>Celeborn principal</description>
+ <property-type>KERBEROS_PRINCIPAL</property-type>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+
+ <!-- celeborn-env.sh -->
+ <property>
+ <name>content</name>
+ <description>This is the jinja template for celeborn-env.sh file</description>
+ <value>
+#!/usr/bin/env bash
+#
+# 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.
+#
+
+# - CELEBORN_MASTER_MEMORY, to set how much total memory of master (e.g. 1000m, 2g)
+# - CELEBORN_WORKER_MEMORY, to set how much total memory of workers (e.g. 1000m, 2g)
+# - CELEBORN_WORKER_OFFHEAP_MEMORY, to set how much total off-heap memory of workers (e.g. 1000m, 2g)
+# - CELEBORN_MASTER_JAVA_OPTS
+# - CELEBORN_WORKER_JAVA_OPTS
+# - CELEBORN_PID_DIR
+# - CELEBORN_LOG_DIR
+# - CELEBORN_PREFER_JEMALLOC, to enable jemalloc memory allocator
+# - CELEBORN_JEMALLOC_PATH, to set jemalloc library path
+
+# Example:
+# CELEBORN_MASTER_MEMORY=2g
+# CELEBORN_WORKER_MEMORY=2g
+# CELEBORN_WORKER_OFFHEAP_MEMORY=4g
+# CELEBORN_WORKER_JAVA_OPTS="-XX:-PrintGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xloggc:gc-worker.out -Dio.netty.leakDetectionLevel=advanced"
+# CELEBORN_MASTER_JAVA_OPTS="-XX:-PrintGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xloggc:gc-master.out -Dio.netty.leakDetectionLevel=advanced"
+# CELEBORN_PID_DIR="$CELEBORN_HOME/pids"
+# CELEBORN_LOG_DIR="$CELEBORN_HOME/logs"
+# CELEBORN_PREFER_JEMALLOC="true"
+# CELEBORN_JEMALLOC_PATH="/path/to/libjemalloc.so"
+
+
+CELEBORN_PID_DIR={{celeborn_pid_dir}}
+CELEBORN_LOG_DIR={{celeborn_log_dir}}
+
+CELEBORN_MASTER_MEMORY=1g
+CELEBORN_WORKER_MEMORY=1g
+CELEBORN_WORKER_OFFHEAP_MEMORY=2g
+
+export HADOOP_CONF_DIR=/etc/hadoop/conf
+ </value>
+ <value-attributes>
+ <type>content</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/configuration/celeborn-log4j.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/configuration/celeborn-log4j.xml
new file mode 100755
index 0000000000..717cad6dd8
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/configuration/celeborn-log4j.xml
@@ -0,0 +1,105 @@
+<?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="true">
+ <property>
+ <name>content</name>
+ <description>log4j2.xml</description>
+ <value><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+
+<!--
+ ~ Extra logging related to initialization of Log4j.
+ ~ Set to debug or trace if log4j initialization is failing.
+ -->
+<Configuration status="INFO">
+ <Appenders>
+ <Console name="stdout" target="SYSTEM_OUT">
+ <!--
+ ~ In the pattern layout configuration below, we specify an explicit `%ex` conversion
+ ~ pattern for logging Throwables. If this was omitted, then (by default) Log4J would
+ ~ implicitly add an `%xEx` conversion pattern which logs stacktraces with additional
+ ~ class packaging information. That extra information can sometimes add a substantial
+ ~ performance overhead, so we disable it in our default logging config.
+ -->
+ <PatternLayout pattern="%d{yy/MM/dd HH:mm:ss,SSS} %p [%t] %c{1}: %m%n%ex"/>
+ </Console>
+ <RollingRandomAccessFile name="file" fileName="${env:CELEBORN_LOG_DIR}/celeborn.log"
+ filePattern="${env:CELEBORN_LOG_DIR}/celeborn.log.%d-%i">
+ <PatternLayout pattern="%d{yy/MM/dd HH:mm:ss,SSS} %p [%t] %c{1}: %m%n%ex"/>
+ <Policies>
+ <SizeBasedTriggeringPolicy size="200 MB"/>
+ </Policies>
+ <DefaultRolloverStrategy max="7">
+ <Delete basePath="${env:CELEBORN_LOG_DIR}" maxDepth="1">
+ <IfFileName glob="celeborn.log*">
+ <IfAny>
+ <IfAccumulatedFileSize exceeds="1 GB" />
+ <IfAccumulatedFileCount exceeds="10" />
+ </IfAny>
+ </IfFileName>
+ </Delete>
+ </DefaultRolloverStrategy>
+ </RollingRandomAccessFile>
+ </Appenders>
+
+ <Loggers>
+ <Root level="INFO">
+ <!--
+ ~ Here are appender templates, keep the appender as your need.
+ -->
+ <AppenderRef ref="stdout"/>
+ <AppenderRef ref="file"/>
+ </Root>
+ <Logger name="org.apache.hadoop.hdfs" level="WARN" additivity="false">
+ <Appender-ref ref="stdout" level="WARN" />
+ <Appender-ref ref="file" level="WARN"/>
+ </Logger>
+ <Logger name="org.apache.ratis.server.RaftServerConfigKeys" level="WARN" additivity="false">
+ <Appender-ref ref="stdout" level="WARN" />
+ <Appender-ref ref="file" level="WARN"/>
+ </Logger>
+ </Loggers>
+</Configuration>
+
+]]>
+ </value>
+ <value-attributes>
+ <type>content</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/configuration/celeborn-metrics-properties.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/configuration/celeborn-metrics-properties.xml
new file mode 100755
index 0000000000..fe9308867e
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/configuration/celeborn-metrics-properties.xml
@@ -0,0 +1,52 @@
+<?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="true">
+ <property>
+ <name>content</name>
+ <description>metrics.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.
+#
+
+*.sink.prometheusServlet.class=org.apache.celeborn.common.metrics.sink.PrometheusServlet
+
+ </value>
+ <value-attributes>
+ <type>content</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/configuration/celeborn-quota.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/configuration/celeborn-quota.xml
new file mode 100755
index 0000000000..440034a01e
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/configuration/celeborn-quota.xml
@@ -0,0 +1,66 @@
+<?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="true">
+ <property>
+ <name>content</name>
+ <description>quota.yaml</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.
+#
+
+- tenantId: AAA
+ name: Tom
+ quota:
+ diskBytesWritten: 100m
+ diskFileCount: 200
+ hdfsBytesWritten: 200m
+ hdfsFileCount: 100
+
+- tenantId: BBB
+ name: Jerry
+ quota:
+ diskBytesWritten: 1G
+ diskFileCount: 1000
+ hdfsBytesWritten: 3G
+ hdfsFileCount: 200
+
+ </value>
+ <value-attributes>
+ <type>content</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/configuration/celeborn-ratis-log4j-properties.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/configuration/celeborn-ratis-log4j-properties.xml
new file mode 100755
index 0000000000..fd506924f3
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/configuration/celeborn-ratis-log4j-properties.xml
@@ -0,0 +1,66 @@
+<?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="true">
+ <property>
+ <name>content</name>
+ <description>quota.yaml</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.
+
+# These properties may be overridden by system properties. log4j gives system properties
+# a higher precedence than locally defined variables.
+log4j.rootLogger=INFO, SHELL_LOGGER
+
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c{2} (%F:%M) - %m%n
+
+# SHELL Logger
+log4j.appender.SHELL_LOGGER=org.apache.log4j.RollingFileAppender
+log4j.appender.SHELL_LOGGER.File=${ratis.shell.logs.dir}/celeborn-ratis-shell.log
+log4j.appender.SHELL_LOGGER.MaxFileSize=100MB
+log4j.appender.SHELL_LOGGER.MaxBackupIndex=10
+log4j.appender.SHELL_LOGGER.layout=org.apache.log4j.PatternLayout
+log4j.appender.SHELL_LOGGER.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c{2} (%F:%M) - %m%n
+
+
+ </value>
+ <value-attributes>
+ <type>content</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/kerberos.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/kerberos.json
new file mode 100755
index 0000000000..773caa86fd
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/kerberos.json
@@ -0,0 +1,50 @@
+{
+ "services": [
+ {
+ "name": "CELEBORN",
+ "identities": [
+ {
+ "name": "celeborn_smokeuser",
+ "reference": "/smokeuser"
+ },
+ {
+ "name": "celeborn_user",
+ "principal": {
+ "value": "${celeborn-env/celeborn_user}${principal_suffix}@${realm}",
+ "type" : "user",
+ "local_username" : "${celeborn-env/celeborn_user}",
+ "configuration": "celeborn-env/celeborn_principal"
+ },
+ "keytab": {
+ "file": "${keytab_dir}/celeborn.headless.keytab",
+ "owner": {
+ "name": "${celeborn-env/celeborn_user}",
+ "access": "r"
+ },
+ "group": {
+ "name": "${cluster-env/user_group}",
+ "access": "r"
+ },
+ "configuration": "celeborn-env/celeborn_keytab"
+ }
+ }
+ ],
+ "configurations": [
+ {
+ "celeborn-defaults": {
+ "celeborn.storage.hdfs.kerberos.keytab": "${keytab_dir}/celeborn.headless.keytab",
+ "celeborn.storage.hdfs.kerberos.principal": "${celeborn-env/celeborn_user}${principal_suffix}@${realm}"
+ }
+ }
+ ],
+ "components": [
+ {
+ "name": "CELEBORN_MASTER"
+ },
+ {
+ "name": "CELEBORN_WORKER"
+ }
+ ]
+ }
+ ]
+}
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/metainfo.xml
new file mode 100755
index 0000000000..e1a22c7d1e
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/metainfo.xml
@@ -0,0 +1,102 @@
+<?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>CELEBORN</name>
+ <displayName>Celeborn</displayName>
+ <comment>Celeborn is dedicated to improving the efficiency and elasticity of different map-reduce engines and provides an elastic, high-efficient management service for intermediate data including shuffle data, spilled data, result data, etc. This service is <b>Technical Preview</b>.</comment>
+ <version>0.3.2</version>
+ <components>
+ <component>
+ <name>CELEBORN_MASTER</name>
+ <displayName>Celeborn Master</displayName>
+ <category>MASTER</category>
+ <cardinality>1+</cardinality>
+ <versionAdvertised>true</versionAdvertised>
+ <commandScript>
+ <script>scripts/master.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>600</timeout>
+ </commandScript>
+ <logs>
+ <log>
+ <logId>celeborn_master</logId>
+ <primary>true</primary>
+ </log>
+ </logs>
+ </component>
+
+ <component>
+ <name>CELEBORN_WORKER</name>
+ <displayName>Celeborn Worker</displayName>
+ <category>SLAVE</category>
+ <cardinality>1+</cardinality>
+ <versionAdvertised>true</versionAdvertised>
+ <commandScript>
+ <script>scripts/worker.py</script>
+ <scriptType>PYTHON</scriptType>
+ </commandScript>
+ <logs>
+ <log>
+ <logId>celeborn_worker</logId>
+ <primary>true</primary>
+ </log>
+ </logs>
+ </component>
+
+ </components>
+
+ <configuration-dependencies>
+ <config-type>celeborn-env</config-type>
+ <config-type>celeborn-defaults</config-type>
+ <config-type>celeborn-log4j</config-type>
+ <config-type>celeborn-metrics-properties</config-type>
+ <config-type>cceleborn-quota</config-type>
+ <config-type>celeborn-ratis-log4j-properties</config-type>
+ </configuration-dependencies>
+
+ <commandScript>
+ <script>scripts/service_check.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>300</timeout>
+ </commandScript>
+
+ <requiredServices>
+ <service>HDFS</service>
+ </requiredServices>
+
+
+ <restartRequiredAfterChange>true</restartRequiredAfterChange>
+
+ <osSpecifics>
+ <osSpecific>
+ <osFamily>redhat9,redhat8,redhat7,amazonlinux2,redhat6,suse11,suse12</osFamily>
+ <packages>
+ <package>
+ <name>celeborn_${stack_version}</name>
+ </package>
+ </packages>
+ </osSpecific>
+ </osSpecifics>
+
+ </service>
+ </services>
+</metainfo>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/package/scripts/celeborn.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/package/scripts/celeborn.py
new file mode 100755
index 0000000000..6b56a5fefe
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/package/scripts/celeborn.py
@@ -0,0 +1,128 @@
+#!/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
+import sys
+from resource_management.libraries.script.script import Script
+from resource_management.libraries.resources.xml_config import XmlConfig
+from resource_management.libraries.resources.template_config import TemplateConfig
+from resource_management.libraries.functions.format import format
+from resource_management.libraries.functions import lzo_utils
+from resource_management.libraries.functions.default import default
+from resource_management.libraries.functions.generate_logfeeder_input_config import generate_logfeeder_input_config
+from resource_management.core.source import Template, InlineTemplate
+from resource_management.core.resources import Package
+from resource_management.core.resources.service import ServiceConfig
+from resource_management.core.resources.system import Directory, Execute, File
+from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
+from ambari_commons import OSConst
+from resource_management.libraries.functions.constants import StackFeature
+from resource_management.libraries.functions.stack_features import check_stack_feature
+
+# name is 'master' or 'regionserver' or 'queryserver' or 'client'
+@OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT)
+def celeborn(name=None):
+ import params
+ import status_params
+
+ Directory([ status_params.celeborn_pid_dir, params.celeborn_master_ha_ratis_raft_server_storage_dir],
+ owner=params.celeborn_user,
+ group=params.celeborn_group,
+ mode=0o775,
+ create_parents = True
+ )
+
+ Directory([params.celeborn_log_dir],
+ owner=params.celeborn_user,
+ group=params.celeborn_group,
+ mode=0o777,
+ create_parents = True
+ )
+
+ # create celeborn-defaults.conf in celeborn install dir
+ File(os.path.join(params.celeborn_conf_dir, 'celeborn-defaults.conf'),
+ owner=params.celeborn_user,
+ group=params.celeborn_group,
+ content=InlineTemplate(params.celeborn_defaults_conf),
+ mode=0o644,
+ )
+
+ # create celeborn-env.sh in celeborn install dir
+ File(os.path.join(params.celeborn_conf_dir, 'celeborn-env.sh'),
+ owner=params.celeborn_user,
+ group=params.celeborn_group,
+ content=InlineTemplate(params.celeborn_env_sh),
+ mode=0o775,
+ )
+
+ #create log4j.xml celeborn install dir
+ File(os.path.join(params.celeborn_conf_dir, 'log4j2.xml'),
+ owner=params.celeborn_user,
+ group=params.celeborn_group,
+ content=InlineTemplate(params.celeborn_log4j_xml),
+ mode=0o644,
+ )
+
+ #create metrics.properties celeborn install dir
+ File(os.path.join(params.celeborn_conf_dir, 'metrics.properties'),
+ owner=params.celeborn_user,
+ group=params.celeborn_group,
+ content=InlineTemplate(params.celeborn_metrics_properties),
+ mode=0o644,
+ )
+
+ #quota.yaml
+ if params.celeborn_quota_enabled:
+ File(os.path.join(params.celeborn_conf_dir, 'quota.yaml'),
+ owner=params.celeborn_user,
+ group=params.celeborn_group,
+ content=InlineTemplate(params.celeborn_quota_xml),
+ mode=0o644,
+ )
+
+ #ratis-log4j.properties
+ File(os.path.join(params.celeborn_conf_dir, 'ratis-log4j.properties'),
+ owner=params.celeborn_user,
+ group=params.celeborn_group,
+ content=InlineTemplate(params.celeborn_ratis_log4j_properties),
+ mode=0o644,
+ )
+
+ # hostss
+ File(format("{celeborn_conf_dir}/hosts"),
+ owner=params.celeborn_user,
+ group=params.celeborn_group,
+ mode=0o644,
+ content=Template('hosts.j2', conf_dir=params.celeborn_conf_dir)
+ )
+
+ # hdfs dir
+ params.HdfsResource(params.celeborn_hdfs_user_dir,
+ type="directory",
+ action="create_on_execute",
+ owner=params.celeborn_user,
+ mode=0o775
+ )
+ params.HdfsResource(params.celeborn_storage_hdfs_dir,
+ type="directory",
+ action="create_on_execute",
+ owner=params.celeborn_user,
+ mode=0o775
+ )
+
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/package/scripts/celeborn_service.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/package/scripts/celeborn_service.py
new file mode 100755
index 0000000000..7bcadd4c3d
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/package/scripts/celeborn_service.py
@@ -0,0 +1,82 @@
+#!/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.
+
+"""
+
+# Python Imports
+import os
+import time
+
+# Ambari Commons & Resource Management Imports
+from ambari_commons.constants import UPGRADE_TYPE_ROLLING
+from resource_management.core import shell
+from resource_management.core import utils
+from resource_management.core.exceptions import ComponentIsNotRunning, Fail
+from resource_management.core.logger import Logger
+from resource_management.core.resources.system import File, Execute
+from resource_management.core.shell import as_user, quote_bash_args
+from resource_management.libraries.functions import get_user_call_output
+from resource_management.libraries.functions import StackFeature
+from resource_management.libraries.functions.check_process_status import check_process_status
+from resource_management.libraries.functions.decorator import retry
+from resource_management.libraries.functions.format import format
+from resource_management.libraries.functions.show_logs import show_logs
+from resource_management.libraries.functions.stack_features import check_stack_feature
+
+
+def celeborn_service(name, action='start', upgrade_type=None):
+
+ import params
+ import status_params
+
+ if name == 'master':
+ pid_file = status_params.celeborn_master_pid_file
+ cmd_start = format("{celeborn_home}/sbin/start-master.sh")
+ cmd_stop = format("{celeborn_home}/sbin/stop-master.sh")
+ elif name == 'worker':
+ pid_file = status_params.celeborn_worker_pid_file
+ cmd_start = format("{celeborn_home}/sbin/start-worker.sh")
+ cmd_stop = format("{celeborn_home}/sbin/stop-worker.sh")
+
+
+ pid = get_user_call_output.get_user_call_output(format("cat {pid_file}"), user=params.celeborn_user, is_checked_call=False)[1]
+ process_id_exists_command = format("ls {pid_file} >/dev/null 2>&1 && ps -p {pid} >/dev/null 2>&1")
+
+ if action == 'start':
+
+ daemon_cmd = cmd_start
+ Execute(daemon_cmd,
+ user = params.celeborn_user,
+ environment = { 'HADOOP_HOME': params.hadoop_home, 'HADOOP_CONF_DIR': params.hadoop_conf_dir,'JAVA_HOME': params.java64_home},
+ path = params.execute_path,
+ not_if = process_id_exists_command)
+
+ elif action == 'stop':
+
+ daemon_cmd = cmd_stop
+ hadoop_home = params.hadoop_home
+
+ Execute(daemon_cmd,
+ user = params.celeborn_user,
+ environment = { 'HADOOP_HOME': params.hadoop_home, 'HADOOP_CONF_DIR': params.hadoop_conf_dir, 'JAVA_HOME': params.java64_home },
+ path = params.execute_path)
+
+ File(pid_file,
+ action = "delete"
+ )
+
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/package/scripts/master.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/package/scripts/master.py
new file mode 100755
index 0000000000..aca0338a96
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/package/scripts/master.py
@@ -0,0 +1,65 @@
+#!/usr/bin/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 import *
+from resource_management.core import sudo
+from resource_management.libraries.functions import check_process_status
+import time
+from celeborn import celeborn
+from celeborn_service import celeborn_service
+
+class CelebornMaster(Script):
+ def install(self, env):
+ self.install_packages(env)
+
+ def configure(self, env, upgrade_type=None, config_dir=None):
+ import params
+ env.set_params(params)
+ celeborn(name='master')
+
+ def start(self, env, upgrade_type=None):
+ import params
+ env.set_params(params)
+ self.configure(env)
+ celeborn_service('master', action='start')
+
+
+ def stop(self, env, upgrade_type=None):
+ import params
+ env.set_params(params)
+ celeborn_service('master', action='stop')
+
+
+ def status(self, env):
+ import status_params
+ env.set_params(status_params)
+ check_process_status(status_params.celeborn_master_pid_file)
+
+ def get_user(self):
+ import params
+ return params.celeborn_user
+
+ def get_pid_files(self):
+ import status_params
+ return [status_params.celeborn_master_pid_file]
+
+if __name__ == "__main__":
+ CelebornMaster().execute()
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/package/scripts/params.py
new file mode 100755
index 0000000000..03ae1e3c33
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/package/scripts/params.py
@@ -0,0 +1,218 @@
+#!/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 socket
+import os
+from urllib.parse import urlparse
+
+from ambari_commons.constants import AMBARI_SUDO_BINARY
+from resource_management import *
+from resource_management.libraries.functions.stack_features import check_stack_feature
+from resource_management.libraries.functions.constants import StackFeature
+from resource_management.libraries.functions import conf_select, stack_select
+from resource_management.libraries.functions.version import format_stack_version, get_major_version
+from resource_management.libraries.functions.copy_tarball import get_sysprep_skip_copy_tarballs_hdfs
+from resource_management.libraries.functions.format import format
+from resource_management.libraries.functions.default import default
+from resource_management.libraries.functions import get_kinit_path
+from resource_management.libraries.functions.get_not_managed_resources import get_not_managed_resources
+from resource_management.libraries.resources.hdfs_resource import HdfsResource
+from resource_management.libraries.script.script import Script
+from resource_management.libraries.functions.copy_tarball import get_current_version
+from resource_management.libraries.functions.stack_features import check_stack_feature, get_stack_feature_version
+from resource_management.libraries.functions import StackFeature
+
+
+config = Script.get_config()
+
+java_home = config['ambariLevelParams']['java_home']
+ambari_java_home = default("/ambariLevelParams/ambari_java_home", None)
+# not supporting 32 bit jdk.
+java64_home = ambari_java_home if ambari_java_home is not None else java_home
+stack_root = Script.get_stack_root()
+
+config = Script.get_config()
+tmp_dir = Script.get_tmp_dir()
+sudo = AMBARI_SUDO_BINARY
+fqdn = socket.getfqdn().lower()
+
+retryAble = default("/commandParams/command_retry_enabled", False)
+
+cluster_name = config['clusterName']
+stack_name = default("/clusterLevelParams/stack_name", None)
+stack_root = Script.get_stack_root()
+#3.2
+stack_version_unformatted = config['clusterLevelParams']['stack_version']
+#3.2.0.0
+stack_version_formatted = format_stack_version(stack_version_unformatted)
+#3.2
+major_stack_version = get_major_version(stack_version_formatted)
+
+#3.2.1.0-001
+effective_version = get_current_version(service="GLUTEN")
+
+sysprep_skip_copy_tarballs_hdfs = get_sysprep_skip_copy_tarballs_hdfs()
+
+# New Cluster Stack Version that is defined during the RESTART of a Stack Upgrade
+version = default("/commandParams/version", None)
+
+hadoop_conf_dir = conf_select.get_hadoop_conf_dir()
+hadoop_bin_dir = stack_select.get_hadoop_dir("bin")
+
+if stack_version_formatted and check_stack_feature(StackFeature.ROLLING_UPGRADE, stack_version_formatted):
+ hadoop_home = stack_select.get_hadoop_dir("home")
+
+hdfs_user = config['configurations']['hadoop-env']['hdfs_user']
+hdfs_principal_name = config['configurations']['hadoop-env']['hdfs_principal_name']
+hdfs_user_keytab = config['configurations']['hadoop-env']['hdfs_user_keytab']
+user_group = config['configurations']['cluster-env']['user_group']
+
+execute_path = os.environ['PATH'] + os.pathsep + hadoop_bin_dir
+
+component_directory = "celeborn"
+celeborn_home = format("{stack_root}/current/{component_directory}")
+celeborn_conf_dir = format("{stack_root}/current/{component_directory}/conf")
+
+celeborn_user = config['configurations']['celeborn-env']['celeborn_user']
+celeborn_group = config['configurations']['celeborn-env']['celeborn_group']
+celeborn_log_dir = config['configurations']['celeborn-env']['celeborn_log_dir']
+celeborn_pid_dir = config['configurations']['celeborn-env']['celeborn_pid_dir']
+
+# celeborn masters address
+celeborn_masters = config['clusterHostInfo']['celeborn_master_hosts']
+celeborn_masters_str = '\n'.join(celeborn_masters)
+
+#current hostname
+hostname = config['agentLevelParams']['hostname']
+
+celeborn_master_ha_enabled = False
+celeborn_master_port = config['configurations']['celeborn-defaults']['celeborn.master.port']
+celeborn_master_ratis_port = config['configurations']['celeborn-defaults']['celeborn.master.ratis.port']
+
+celeborn_master_endpoints = ""
+celeborn_master_endpoints_config = ""
+# get comma separated lists of celeborn_master_endpoints hosts from celeborn_masters
+if(len(celeborn_masters) > 0) :
+ if len(celeborn_masters) == 1:
+ host = celeborn_masters[0]
+ celeborn_master_endpoints_config = format("celeborn.master.host {host}\nceleborn.master.port {celeborn_master_port}")
+
+ if len(celeborn_masters) > 1:
+ index = 0
+ for host in celeborn_masters:
+ celeborn_master_host = host
+ if celeborn_master_port is not None:
+ celeborn_master_host = host + ":" + str(celeborn_master_port)
+
+ celeborn_master_endpoints += celeborn_master_host
+
+ if( host == hostname ):
+ celeborn_master_endpoints_config += format("celeborn.master.ha.node.id {index}\n")
+ celeborn_master_endpoints_config += format("celeborn.master.ha.node.{index}.host {host} \nceleborn.master.ha.node.{index}.port {celeborn_master_port} \nceleborn.master.ha.node.{index}.ratis.port {celeborn_master_ratis_port}")
+ index += 1
+ if index < len(celeborn_masters):
+ celeborn_master_endpoints += ","
+ celeborn_master_endpoints_config += "\n"
+ celeborn_master_ha_enabled = True
+
+print(f"celeborn_master_endpoints: {celeborn_master_endpoints}")
+print(f"celeborn_master_endpoints_config: {celeborn_master_endpoints_config}")
+
+# celeborn.master.ha.ratis.raft.server.storage.dir
+celeborn_master_ha_ratis_raft_server_storage_dir = config['configurations']['celeborn-defaults']['celeborn.master.ha.ratis.raft.server.storage.dir']
+if celeborn_master_ha_ratis_raft_server_storage_dir is None:
+ celeborn_master_ha_ratis_raft_server_storage_dir = "/usr/hdp/current/celeborn/celeborn_ratis"
+celeborn_master_ha_ratis_raft_server_storage_dir_formatted = False
+if(os.path.exists(celeborn_master_ha_ratis_raft_server_storage_dir) and os.path.isdir(celeborn_master_ha_ratis_raft_server_storage_dir) and len(os.listdir(celeborn_master_ha_ratis_raft_server_storage_dir)) > 0):
+ celeborn_master_ha_ratis_raft_server_storage_dir_formatted = True
+
+# celeborn workers address
+celeborn_workers = config['clusterHostInfo']['celeborn_worker_hosts']
+celeborn_workers_str = '\n'.join(celeborn_workers)
+celeborn_worker_storage_dirs = config['configurations']['celeborn-defaults']['celeborn.worker.storage.dirs']
+
+#hdfs store
+celeborn_storage_activeTypes = config['configurations']['celeborn-defaults']['celeborn.storage.activeTypes']
+
+# Find current stack and version to push agent files to
+stack_name = default("/hostLevelParams/stack_name", None)
+stack_version = config['hostLevelParams']['stack_version']
+
+# hadoop params
+namenode_address = None
+if 'dfs.namenode.rpc-address' in config['configurations']['hdfs-site']:
+ namenode_rpcaddress = config['configurations']['hdfs-site']['dfs.namenode.rpc-address']
+ namenode_address = format("hdfs://{namenode_rpcaddress}")
+else:
+ namenode_address = config['configurations']['core-site']['fs.defaultFS']
+
+# celeborn underfs address
+celeborn_storage_hdfs_dir = namenode_address + config['configurations']['celeborn-defaults']['celeborn.storage.hdfs.dir']
+
+host_name = config['agentLevelParams']['hostname']
+
+celeborn_hdfs_user_dir = format("/user/{celeborn_user}")
+smoke_user = config['configurations']['cluster-env']['smokeuser']
+celeborn_authentication = "SIMPLE"
+
+#security_enabled
+security_enabled = default("/configurations/cluster-env/security_enabled", None)
+kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None))
+
+if security_enabled:
+ celeborn_storage_hdfs_kerberos_principal = config['configurations']['celeborn-defaults']['celeborn.storage.hdfs.kerberos.principal']
+ celeborn_storage_hdfs_kerberos_keytab = config['configurations']['celeborn-defaults']['celeborn.storage.hdfs.kerberos.keytab']
+
+#for create_hdfs_directory
+default_fs = config['configurations']['core-site']['fs.defaultFS']
+hdfs_site = config['configurations']['hdfs-site']
+hdfs_resource_ignore_file = "/var/lib/ambari-agent/data/.hdfs_resource_ignore"
+
+dfs_type = default("/clusterLevelParams/dfs_type", "")
+
+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 = hdfs_resource_ignore_file,
+ 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(),
+ dfs_type = dfs_type
+)
+
+celeborn_env_sh = config['configurations']['celeborn-env']['content']
+celeborn_defaults_conf = config['configurations']['celeborn-defaults']['content']
+celeborn_log4j_xml = config['configurations']['celeborn-log4j']['content']
+celeborn_metrics_properties = config['configurations']['celeborn-metrics-properties']['content']
+celeborn_quota_xml = config['configurations']['celeborn-quota']['content']
+celeborn_ratis_log4j_properties = config['configurations']['celeborn-ratis-log4j-properties']['content']
+
+celeborn_test_cmd=""
+
+
+celeborn_quota_enabled = config['configurations']['celeborn-defaults']['celeborn.quota.enabled']
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/package/scripts/service_check.py
new file mode 100755
index 0000000000..cd79e1371d
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/package/scripts/service_check.py
@@ -0,0 +1,40 @@
+"""
+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 agree 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 subprocess
+import time
+import os
+
+from resource_management.core.exceptions import Fail
+from resource_management.libraries.script.script import Script
+from resource_management.libraries.functions.format import format
+from resource_management.core.resources.system import Execute
+from resource_management.core.logger import Logger
+
+
+CHECK_COMMAND_TIMEOUT_DEFAULT = 300.0
+
+class CelebornServiceCheck(Script):
+ def service_check(self, env):
+ import params
+ env.set_params(params)
+
+ Execute(params.celeborn_test_cmd, user=params.celeborn_user)
+
+if __name__ == "__main__":
+ CelebornServiceCheck().execute()
+
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/package/scripts/status_params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/package/scripts/status_params.py
new file mode 100755
index 0000000000..32f635d280
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/package/scripts/status_params.py
@@ -0,0 +1,37 @@
+#!/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 import Script
+from resource_management.libraries.functions.format import format
+from resource_management.libraries.functions.default import default
+from resource_management.libraries.functions.version import format_stack_version
+from resource_management.libraries.functions.stack_features import check_stack_feature
+from resource_management.libraries.functions import StackFeature
+
+config = Script.get_config()
+tmp_dir = Script.get_tmp_dir()
+
+
+stack_name = default("/clusterLevelParams/stack_name", None)
+stack_version_unformatted = config['clusterLevelParams']['stack_version']
+stack_version_formatted = format_stack_version(stack_version_unformatted)
+celeborn_pid_dir = config['configurations']['celeborn-env']['celeborn_pid_dir']
+celeborn_master_pid_file = format('{celeborn_pid_dir}/celeborn-celeborn-org.apache.celeborn.service.deploy.master.Master-1.pid')
+celeborn_worker_pid_file = format('{celeborn_pid_dir}/celeborn-celeborn-org.apache.celeborn.service.deploy.worker.Worker-1.pid')
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/package/scripts/worker.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/package/scripts/worker.py
new file mode 100755
index 0000000000..35193bd8f6
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/package/scripts/worker.py
@@ -0,0 +1,62 @@
+#!/usr/bin/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 import *
+from resource_management.libraries.functions import check_process_status
+import time
+from celeborn import celeborn
+from celeborn_service import celeborn_service
+
+class CelebornWorker(Script):
+ def install(self, env):
+ self.install_packages(env)
+
+ def configure(self, env, upgrade_type=None, config_dir=None):
+ import params
+ env.set_params(params)
+ celeborn(name='master')
+
+ def start(self, env, upgrade_type=None):
+ import params
+ env.set_params(params)
+ self.configure(env)
+ celeborn_service('worker', action='start')
+
+ def stop(self, env, upgrade_type=None):
+ import params
+ env.set_params(params)
+ celeborn_service('worker', action='stop')
+
+ def status(self, env):
+ import status_params
+ env.set_params(status_params)
+ check_process_status(status_params.celeborn_worker_pid_file)
+
+ def get_user(self):
+ import params
+ return params.celeborn_user
+
+ def get_pid_files(self):
+ import status_params
+ return [status_params.celeborn_worker_pid_file]
+
+if __name__ == "__main__":
+ CelebornWorker().execute()
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/package/templates/hosts.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/package/templates/hosts.j2
new file mode 100755
index 0000000000..10772a600a
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/package/templates/hosts.j2
@@ -0,0 +1,22 @@
+#
+# 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.
+#
+
+[master]
+{{celeborn_masters_str}}
+
+[worker]
+{{celeborn_workers_str}}
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/role_command_order.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/role_command_order.json
new file mode 100755
index 0000000000..b8c940931a
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/role_command_order.json
@@ -0,0 +1,8 @@
+{
+ "general_deps" : {
+ "_comment" : "dependencies for CELEBORN",
+ "CELEBORN_SERVICE_CHECK-SERVICE_CHECK" : ["CELEBORN_MASTER-START","CELEBORN_WORKER-START"],
+ "CELEBORN_MASTER-START" : ["ZOOKEEPER_SERVER-START", "NAMENODE-START","SECONDARY_NAMENODE-START", "DATANODE-START"],
+ "CELEBORN_WORKER-START" : ["CELEBORN_MASTER-START"]
+ }
+}
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/service_advisor.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/service_advisor.py
new file mode 100755
index 0000000000..6657d21f52
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/CELEBORN/service_advisor.py
@@ -0,0 +1,196 @@
+#!/usr/bin/env ambari-python-wrap
+"""
+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.
+"""
+
+# Python imports
+from ast import Param
+import imp
+import os
+import traceback
+import re
+import socket
+import fnmatch
+
+
+from resource_management.core.logger import Logger
+
+SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
+STACKS_DIR = os.path.join(SCRIPT_DIR, '../../../../../stacks/')
+PARENT_FILE = os.path.join(STACKS_DIR, 'service_advisor.py')
+
+try:
+ if "BASE_SERVICE_ADVISOR" in os.environ:
+ PARENT_FILE = os.environ["BASE_SERVICE_ADVISOR"]
+ with open(PARENT_FILE, 'rb') as fp:
+ service_advisor = imp.load_module('service_advisor', fp, PARENT_FILE, ('.py', 'rb', imp.PY_SOURCE))
+except Exception as e:
+ traceback.print_exc()
+ print("Failed to load parent")
+
+class CelebornServiceAdvisor(service_advisor.ServiceAdvisor):
+
+ def __init__(self, *args, **kwargs):
+ self.as_super = super(CelebornServiceAdvisor, self)
+ self.as_super.__init__(*args, **kwargs)
+
+ # Always call these methods
+ self.modifyMastersWithMultipleInstances()
+ self.modifyCardinalitiesDict()
+ self.modifyHeapSizeProperties()
+ self.modifyNotValuableComponents()
+ self.modifyComponentsNotPreferableOnServer()
+ self.modifyComponentLayoutSchemes()
+
+ def modifyMastersWithMultipleInstances(self):
+ """
+ Modify the set of masters with multiple instances.
+ Must be overriden in child class.
+ """
+ # Nothing to do
+ pass
+
+ def modifyCardinalitiesDict(self):
+ """
+ Modify the dictionary of cardinalities.
+ Must be overriden in child class.
+ """
+ # Nothing to do
+ pass
+
+ def modifyHeapSizeProperties(self):
+ """
+ Modify the dictionary of heap size properties.
+ Must be overriden in child class.
+ """
+ pass
+
+ def modifyNotValuableComponents(self):
+ """
+ Modify the set of components whose host assignment is based on other services.
+ Must be overriden in child class.
+ """
+ # Nothing to do
+ pass
+
+ def modifyComponentsNotPreferableOnServer(self):
+ """
+ Modify the set of components that are not preferable on the server.
+ Must be overriden in child class.
+ """
+ # Nothing to do
+ pass
+
+ def modifyComponentLayoutSchemes(self):
+ """
+ Modify layout scheme dictionaries for components.
+ The scheme dictionary basically maps the number of hosts to
+ host index where component should exist.
+ Must be overriden in child class.
+ """
+
+ # Nothing to do
+ pass
+
+
+ def getServiceComponentLayoutValidations(self, services, hosts):
+ """
+ Get a list of errors.
+ Must be overriden in child class.
+ """
+
+ return self.getServiceComponentCardinalityValidations(services, hosts, "CELEBORN")
+
+ def getServiceConfigurationRecommendations(self, configurations, clusterData, services, hosts):
+ """
+ Entry point.
+ Must be overriden in child class.
+ """
+ # Logger.info("Class: %s, Method: %s. Recommending Service Configurations." %
+ # (self.__class__.__name__, inspect.stack()[0][3]))
+
+ recommender = CelebornRecommender()
+ recommender.recommendCelebornConfigurationsFromHDP33(configurations, clusterData, services, hosts)
+
+
+ # def getServiceConfigurationRecommendationsForSSO(self, configurations, clusterData, services, hosts):
+ # """
+ # Entry point.
+ # Must be overriden in child class.
+ # """
+ # recommender = CelebornRecommender()
+ # recommender.recommendConfigurationsForSSO(configurations, clusterData, services, hosts)
+
+ def getServiceConfigurationsValidationItems(self, configurations, recommendedDefaults, services, hosts):
+ """
+ Entry point.
+ Validate configurations for the service. Return a list of errors.
+ The code for this function should be the same for each Service Advisor.
+ """
+ # Logger.info("Class: %s, Method: %s. Validating Configurations." %
+ # (self.__class__.__name__, inspect.stack()[0][3]))
+
+ return []
+
+ @staticmethod
+ def isKerberosEnabled(services, configurations):
+ """
+ Determines if security is enabled by testing the value of core-site/hadoop.security.authentication enabled.
+ If the property exists and is equal to "kerberos", then is it enabled; otherwise is it assumed to be
+ disabled.
+
+ :type services: dict
+ :param services: the dictionary containing the existing configuration values
+ :type configurations: dict
+ :param configurations: the dictionary containing the updated configuration values
+ :rtype: bool
+ :return: True or False
+ """
+ if configurations and "core-site" in configurations and \
+ "hadoop.security.authentication" in configurations["core-site"]["properties"]:
+ return configurations["core-site"]["properties"]["hadoop.security.authentication"].lower() == "kerberos"
+ elif services and "core-site" in services["configurations"] and \
+ "hadoop.security.authentication" in services["configurations"]["core-site"]["properties"]:
+ return services["configurations"]["core-site"]["properties"]["hadoop.security.authentication"].lower() == "kerberos"
+ else:
+ return False
+
+
+class CelebornRecommender(service_advisor.ServiceAdvisor):
+ """
+ Celeborn Recommender suggests properties when adding the service for the first time or modifying configs via the UI.
+ """
+
+ def __init__(self, *args, **kwargs):
+ self.as_super = super(CelebornRecommender, self)
+ self.as_super.__init__(*args, **kwargs)
+
+ def recommendCelebornConfigurationsFromHDP33(self, configurations, clusterData, services, hosts):
+ """
+ Recommend configurations for this service based on HDP 3.3.
+ """
+
+
+
+
+
+
+
+
+
+
+
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org
(ambari) 17/22: system support il8n kerberos fix hive load data owner remove hive mysql8 support
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch eee
in repository https://gitbox.apache.org/repos/asf/ambari.git
commit 84c43a8bbaeace7a1d26fe315084e34483248355
Author: jialiang <ji...@gmail.com>
AuthorDate: Sat Sep 7 14:16:07 2024 +0800
system support
il8n
kerberos fix
hive load data owner remove
hive mysql8 support
---
.../ui/admin-web/app/scripts/i18n.config.js | 469 +++
.../src/main/python/ambari_agent/AmbariConfig.py | 2 +-
.../libs/ppc64le/_posixsubprocess.so | Bin 115672 -> 0 bytes
.../src/main/python/ambari_commons/os_check.py | 67 +-
.../ambari_simplejson/_speedups/ppc/_speedups.so | Bin 220224 -> 0 bytes
.../libraries/functions/curl_krb_request.py | 2 +-
ambari-server/conf/unix/create-python-wrap.sh | 25 +-
.../3.2.0/services/HIVE/configuration/hive-env.xml | 4 +-
.../services/HIVE/configuration/hive-site.xml | 5 -
.../3.2.0/services/HIVE/package/scripts/params.py | 13 +-
.../KERBEROS/package/scripts/service_check.py | 2 +-
.../services/KERBEROS/properties/krb5_conf.j2 | 2 +-
.../configuration/spark-hive-site-override.xml | 6 -
ambari-web/app/initialize.js | 7 +-
.../{messages.js => locales/default_messages.js} | 7 +-
ambari-web/app/locales/zh/messages.js | 3206 ++++++++++++++++++++
16 files changed, 3777 insertions(+), 40 deletions(-)
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
index 49aae8670d..46371b679f 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/i18n.config.js
@@ -489,6 +489,475 @@ angular.module('ambariAdminConsole')
'remoteClusters.clusterURLPlaceholder': 'http://ambari.server:8080/api/v1/clusters/c1',
'remoteClusters.alerts.fetchError': 'Error in fetching remote clusters.'
+ })
+ .translations('cn',{
+ 'CLUSTER.ADMINISTRATOR': '操作人',
+ 'CLUSTER.USER': '只读',
+ 'VIEW.USER': '使用',
+
+ 'common.ambari': 'Ambari',
+ 'common.apacheAmbari': 'Apache Ambari',
+ 'common.about': '关于',
+ 'common.version': '版本',
+ 'common.signOut': '登出',
+ 'common.register': '注册人',
+ 'common.clusters': '集群',
+ 'common.views': '视图',
+ 'common.viewUrls': '查看路由',
+ 'common.roles': '角色',
+ 'common.users': '用户',
+ 'common.groups': '组',
+ 'common.versions': '版本',
+ 'common.stack': '堆栈',
+ 'common.details': '详情',
+ 'common.goToDashboard': '跳转到仪表盘',
+ 'common.exportBlueprint': 'Export Blueprint',
+ 'common.blueprint': 'Blueprint',
+ 'common.download': '下载',
+ 'common.noClusters': '没有集群',
+ 'common.noViews': '没有视图',
+ 'common.view': '查看',
+ 'common.displayLabel': '显示标签',
+ 'common.search': '查找',
+ 'common.name': '名称',
+ 'common.any': '任意',
+ 'common.none': '没有',
+ 'common.type': '类型',
+ 'common.add': '添加 {{term}}',
+ 'common.delete': '删除 {{term}}',
+ 'common.deregisterCluster': '取消注册集群',
+ 'common.cannotDelete': '不能删除 {{term}}',
+ 'common.privileges': '特权',
+ 'common.cluster': '集群',
+ 'common.remoteClusters': '远程集群',
+ 'common.services': '服务',
+ 'common.clusterRole': '集群角色',
+ 'common.viewPermissions': '查看权限',
+ 'common.getInvolved': '加入我们!',
+ 'common.license': '基于Apache的声明, 版本号为2.0',
+ 'common.tableFilterMessage': '{{showed}} 的 {{total}} {{term}} 显示中',
+ 'common.yes': '是',
+ 'common.no': '否',
+ 'common.renameCluster': '集群重命名',
+ 'common.renameClusterTip': '只能写字母数字字符,最多80个字符',
+ 'common.clusterCreationInProgress': '集群创建正在进行中...',
+ 'common.userGroupManagement': '用户 + 组管理',
+ 'common.all': '所有',
+ 'common.group': '组',
+ 'common.user': '用户',
+ 'common.settings': '配置',
+ 'common.authentication': '认证',
+ 'common.deleteConfirmation': '你确定你想删除 {{instanceType}} {{instanceName}}?',
+ 'common.remoteClusterDelConfirmation': '你确定你想删除 {{instanceType}} {{instanceName}}? This operation cannot be undone.',
+ 'common.messageInstanceAffected': '下面的视图实例正在使用远程集群配置,并且将要被配置:',
+ 'common.local': '本地',
+ 'common.pam': 'PAM',
+ 'common.ldap': 'LDAP',
+ 'common.jwt': 'JWT',
+ 'common.warning': '警告',
+ 'common.filterInfo': '{{showed}} of {{total}} {{term}} showing',
+ 'common.usersGroups': '用户/组',
+ 'common.enabled': '生效',
+ 'common.disabled': '失效',
+ 'common.NA': 'n/a',
+ 'common.blockViewLabel': '块',
+ 'common.listViewLabel': '列表',
+ 'common.rbac': '基于角色的访问控制',
+ 'common.important': '重要',
+ 'common.undo': '撤销',
+ 'common.fromGroupMark': '(来自组)',
+ 'common.copy': '_Copy',
+
+ 'common.clusterNameChangeConfirmation.title': '确认集群名称修改',
+ 'common.clusterNameChangeConfirmation.message': '你确定将集群名称修改为 {{clusterName}}?',
+
+ 'common.loginActivities.loginActivities': '登录活动',
+ 'common.loginActivities.loginMessage': '登录信息',
+ 'common.loginActivities.loginMessage.placeholder': '请输入登录信息',
+ 'common.loginActivities.homeDirectory': '主目录',
+ 'common.loginActivities.notEmpty': '这些字段不能为空',
+ 'common.loginActivities.saveError': '保存错误',
+ 'common.loginActivities.message': '信息',
+
+ 'common.loginActivities.buttonText': '按钮',
+ 'common.loginActivities.buttonText.placeholder': '请输入按钮文字',
+
+ 'common.loginActivities.status': '状态',
+ 'common.loginActivities.status.disabled': '失效',
+
+ 'common.loginActivities.homeDirectory.alert': '很多Ambari视图存储用户偏好在用户的HDFS目录下. 可选操作, Ambari 能自动创建这些目录为用户登录.',
+ 'common.loginActivities.homeDirectory.autoCreate': '自动创建HDFS用户目录',
+ 'common.loginActivities.homeDirectory.header': '用户目录创建选项',
+ 'common.loginActivities.homeDirectory.template': '用户目录创建模板',
+ 'common.loginActivities.homeDirectory.group': '默认组',
+ 'common.loginActivities.homeDirectory.permissions': '权限',
+
+ 'common.controls.cancel': '取消',
+ 'common.controls.close': '关闭',
+ 'common.controls.ok': '好的',
+ 'common.controls.save': '保存',
+ 'common.controls.clearFilters': '清楚筛选',
+ 'common.controls.confirmChange': '确认修改',
+ 'common.controls.discard': '放弃',
+ 'common.controls.remove': '移除',
+ 'common.controls.update': '更新',
+ 'common.controls.checkAll': '全部选中',
+ 'common.controls.clearAll': '全部清除',
+ 'common.controls.add': '添加',
+
+ 'common.alerts.fieldRequired': '必填字段!',
+ 'common.alerts.fieldIsRequired': '该字段是必填的.',
+ 'common.alerts.noSpecialChars': '不能包含特殊字符!',
+ 'common.alerts.nothingToDisplay': '没有 {{term}} 可显示.',
+ 'common.alerts.noRemoteClusterDisplay': '没有远程集群可显示.',
+ 'common.alerts.noPrivileges': '没有 {{term}} 权限',
+ 'common.alerts.noPrivilegesDescription': '这个 {{term}} 没有任何权限.',
+ 'common.alerts.timeOut': '由于你没有操作在 <b>{{time}}</b> 秒后会自动注销退出.',
+ 'common.alerts.isInvalid': '{{term}} 无效.',
+ 'common.alerts.cannotSavePermissions': '不能保存权限',
+ 'common.alerts.cannotLoadPrivileges': '无法加载权限',
+ 'common.alerts.cannotLoadClusterStatus': '无法加载集群状态',
+ 'common.alerts.clusterRenamed': '该集群已经被重命名为 {{clusterName}}.',
+ 'common.alerts.remoteClusterRegistered': '该集群已经被注册为 {{clusterName}}.',
+ 'common.alerts.cannotRenameCluster': '无法重命名集群名称为 {{clusterName}}',
+ 'common.alerts.minimumTwoChars': '至少2个字符.',
+ 'common.alerts.maxTwentyFiveChars': '最多25个字符.',
+ 'common.alerts.onlyText': '只允许填写字母数字字符.',
+ 'common.alerts.onlyAnScore': '无效输入, 只有字母数字允许 例如: My_default_view',
+ 'common.alerts.passwordRequired': '密码必填',
+ 'common.alerts.unsavedChanges': '你有未保存的修改. 保存修改或者放弃?',
+ 'common.alerts.cannotUpdateStatus': '无法修改用户状态',
+ 'common.alerts.cannotUpdateAdminStatus': '无法修改用户管理员状态',
+ 'common.alerts.checkFailed': '检测失败',
+ 'common.alerts.onlySimpleChars': '只能包含简单字符.',
+
+ 'main.title': '欢迎使用Apache Ambari',
+ 'main.noClusterDescription': '提供一个集群, 管理谁可以访问群集,并自定义Ambari用户的视图.',
+ 'main.hasClusterDescription': '监控群集资源,管理谁可以访问群集,以及自定义Ambari用户的视图.',
+ 'main.autoLogOut': '自动注销',
+
+ 'main.operateCluster.title': '你的集群操作',
+ 'main.operateCluster.description': '管理集群的配置并监控服务的运行状况',
+ 'main.operateCluster.manageRoles': '角色管理',
+
+ 'main.createCluster.title': '创建一个集群',
+ 'main.createCluster.description': '使用安装向导选择服务并配置集群',
+ 'main.createCluster.launchInstallWizard': '启动安装向导',
+
+ 'main.manageUsersAndGroups.title': '管理用户 + 组',
+ 'main.manageUsersAndGroups.description': '管理可以访问Ambari的用户和组',
+
+ 'main.deployViews.title': '部署视图',
+ 'main.deployViews.description': '创建视图实例并且赋予它们权限',
+
+ 'main.controls.remainLoggedIn': '保持登录',
+ 'main.controls.logOut': '立即注销',
+
+ 'views.instance': '实例',
+ 'views.viewInstance': '视图实例',
+ 'views.create': '创建实例',
+ 'views.clone': '克隆实例',
+ 'views.createViewInstance': '创建视图实例',
+ 'views.edit': '编辑',
+ 'views.viewName': '视图名称',
+ 'views.instances': '实例',
+ 'views.instanceName': '实例名称',
+ 'views.instanceId': '实例ID',
+ 'views.displayName': '显示名称',
+ 'views.settings': '配置',
+ 'views.advanced': '高级配置',
+ 'views.visible': '可见',
+ 'views.description': '描述',
+ 'views.shortUrl': '短路由',
+ 'views.instanceDescription': '实例描述',
+ 'views.clusterConfiguration': '集群配置',
+ 'views.localCluster': '本地集群',
+ 'views.remoteCluster': '远程集群',
+ 'views.registerRemoteCluster': '注册远程集群',
+ 'views.clusterName': '集群名称',
+ 'views.custom': '自定义',
+ 'views.icon': '图标',
+ 'views.icon64': 'Icon64',
+ 'views.permissions': '权限',
+ 'views.permission': '权限',
+ 'views.grantUsers': '赋予这些用户权限',
+ 'views.grantGroups': '赋予这些组权限',
+ 'views.configuration': '配置',
+ 'views.goToInstance': '跳转到实例',
+ 'views.pending': '挂起中...',
+ 'views.deploying': '部署中...',
+ 'views.properties': '属性',
+ 'views.urlDelete': '删除路由',
+
+ 'views.clusterPermissions.label': '本地集群权限',
+ 'views.clusterPermissions.clusteradministrator': '集群管理者',
+ 'views.clusterPermissions.clusteroperator': '集群操作者',
+ 'views.clusterPermissions.clusteruser': '集群用户',
+ 'views.clusterPermissions.serviceadministrator': '服务管理者',
+ 'views.clusterPermissions.serviceoperator': '服务操作者',
+ 'views.clusterPermissions.infoMessage': '赋予 <strong>使用</strong> 权限对下面的 <strong>{{cluster}}</strong> 角色:',
+ 'views.clusterPermissions.nonLocalClusterMessage': '依赖群集角色继承视图 <strong>使用</strong> 权限的功能仅在使用本地群集配置时可用.',
+
+ 'views.alerts.noSpecialChars': '不能包含任何特殊字符.',
+ 'views.alerts.noSpecialCharsOrSpaces': '不能包含任何特殊字符或空格.',
+ 'views.alerts.instanceExists': '该名称的实例已经存在.',
+ 'views.alerts.notDefined': '这里没有任何 {{term}} 被定义对这个视图.',
+ 'views.alerts.cannotEditInstance': '不能编辑静态实例',
+ 'views.alerts.cannotDeleteStaticInstance': '不能删除静态实例',
+ 'views.alerts.deployError': '部署错误. 查看Ambari的服务器日志.',
+ 'views.alerts.unableToCreate': '无法创建视图实例',
+ 'views.alerts.cannotUseOption': '该视图不能使用该选项',
+ 'views.alerts.unableToResetErrorMessage': '无法对属性: {{key}}重置错误信息',
+ 'views.alerts.instanceCreated': '创建视图实例 {{instanceName}}',
+ 'views.alerts.unableToParseError': '无法解析错误信息: {{message}}',
+ 'views.alerts.cannotCreateInstance': '无法创建实例',
+ 'views.alerts.cannotLoadInstanceInfo': '无法加载实例信息',
+ 'views.alerts.cannotLoadPermissions': '不能加载权限',
+ 'views.alerts.cannotSaveSettings': '不能保存配置',
+ 'views.alerts.cannotSaveProperties': '不能保存属性',
+ 'views.alerts.cannotDeleteInstance': '不能删除实例',
+ 'views.alerts.cannotLoadViews': '不能加载视图',
+ 'views.alerts.cannotLoadViewUrls': '不能加载视图路由',
+ 'views.alerts.cannotLoadViewUrl': '不能加载视图路由',
+ 'views.alerts.savedRemoteClusterInformation': '远程集群信息被保存.',
+ 'views.alerts.credentialsUpdated': '管理证书更新.',
+
+ 'urls.name': '名称',
+ 'urls.url': '路由',
+ 'urls.viewUrls': '查看路由',
+ 'urls.createNewUrl': '创建新路由',
+ 'urls.create': '创建',
+ 'urls.edit': '编辑',
+ 'urls.view': '查看',
+ 'urls.viewInstance': '实例',
+ 'urls.step1': '创建路由',
+ 'urls.step2': '选择实例',
+ 'urls.step3': '指定路由',
+ 'urls.noUrlsToDisplay': '没有部署的路由.',
+ 'urls.noViewInstances': '没有视图实例',
+ 'urls.none': '没有',
+ 'urls.change': '修改',
+ 'urls.urlCreated': '创建短路由 <a href="{{siteRoot}}#/main/view/{{viewName}}/{{shortUrl}}">{{urlName}}</a>',
+ 'urls.urlUpdated': '更新短路由 <a href="{{siteRoot}}#/main/view/{{viewName}}/{{shortUrl}}">{{urlName}}</a>',
+
+ 'clusters.switchToList': '选择 to 列表 视图',
+ 'clusters.switchToBlock': '选择 to 空白 视图',
+ 'clusters.role': '角色',
+ 'clusters.assignRoles': '指定角色到这些 {{term}}',
+
+ 'clusters.alerts.cannotLoadClusterData': '不能加载集群数据',
+
+ 'groups.createLocal': '创建本地组',
+ 'groups.name': '组名称',
+ 'groups.members': '会员',
+ 'groups.membersPlural': '{{n}} 会员{{n == 1 ? "" : "s"}}',
+
+ 'groups.alerts.groupCreated': '创建组 <a href="#/groups/{{groupName}}/edit">{{groupName}}</a>',
+ 'groups.alerts.groupCreationError': '创建组错误',
+ 'groups.alerts.cannotUpdateGroupMembers': '不能更新组成员',
+ 'groups.alerts.getGroupsListError': '获得组列表失败',
+
+ 'users.username': '用户名',
+ 'users.userName': '用户名',
+ 'users.admin': '管理',
+ 'users.ambariAdmin': 'Ambari 管理',
+ 'users.ambariClusterURL': 'Ambari 集群路由',
+ 'users.changePassword': '修改密码',
+ 'users.updateCredentials': '更新证书',
+ 'users.changePasswordFor': '修改密码 {{userName}}',
+ 'users.yourPassword': '你的密码',
+ 'users.newPassword': '新的用户密码',
+ 'users.newPasswordConfirmation': '确认新的用户密码',
+ 'users.create': '创建本地用户',
+ 'users.active': '有效',
+ 'users.inactive': '无效',
+ 'users.status': '状态',
+ 'users.password': '密码',
+ 'users.passwordConfirmation': '确认密码',
+ 'users.userIsAdmin': '该用户是Ambari的管理员并且拥有所有权限.',
+ 'users.showAll': '显示所有用户',
+ 'users.showAdmin': '只显示管理员用户',
+ 'users.groupMembership': '组员关系',
+ 'users.userNameTip': '只有alpha-numeric字符,最多80个字符',
+
+ 'users.changeStatusConfirmation.title': '状态修改',
+ 'users.changeStatusConfirmation.message': '你确定想修改状态对用户 "{{userName}}" 到 {{status}}?',
+
+ 'users.changePrivilegeConfirmation.title': '修改用户权限',
+ 'users.changePrivilegeConfirmation.message': '你确定想 {{action}} 管理员权限到用户 "{{userName}}"?',
+ 'users.changePrivilegeConfirmation.revoke': '撤销',
+ 'users.changePrivilegeConfirmation.grant': '授予',
+
+ 'users.roles.clusterUser': '集群用户',
+ 'users.roles.clusterAdministrator': '集群管理员',
+ 'users.roles.clusterOperator': '集群操作者',
+ 'users.roles.serviceAdministrator': '服务管理员',
+ 'users.roles.serviceOperator': '服务操作者',
+ 'users.roles.ambariAdmin': 'Ambari管理员',
+ 'users.roles.viewUser': '查看用户',
+ 'users.roles.none': '空',
+ 'users.roles.oneRolePerUserOrGroup': '一个用户只能有一种角色',
+ 'users.roles.permissionLevel': '{{level}}-权限等级',
+
+ 'users.alerts.passwordRequired': '密码必填',
+ 'users.alerts.wrongPassword': '密码必须匹配!',
+ 'users.alerts.usernameRequired': '用户名必填',
+ 'users.alerts.cannotChange': '不能修改 {{term}}',
+ 'users.alerts.userCreated': '创建用户 <a href="#/users/{{encUserName}}">{{userName}}</a>',
+ 'users.alerts.userCreationError': '用户创建错误',
+ 'users.alerts.removeUserError': '移除组错误',
+ 'users.alerts.cannotAddUser': '不能添加用户到组',
+ 'users.alerts.passwordChanged': '密码修改.',
+ 'users.alerts.cannotChangePassword': '不能修改密码',
+ 'users.alerts.roleChanged': '{{name}} 修改为 {{role}}',
+ 'users.alerts.roleChangedToNone': '{{user_name}}显示的权限已经被修改为 \'NONE\'. 任何该用户当前显示的权限都来自于组.',
+ 'users.alerts.usersEffectivePrivilege': '通过{{user_name}}\其组的有效特权高于您选择的特权.',
+
+ 'versions.current': '当前',
+ 'versions.addVersion': '添加版本',
+ 'versions.defaultVersion': '(默认版本定义)',
+ 'versions.inUse': '使用中',
+ 'versions.installed': '已安装',
+ 'versions.usePublic': '使用公共仓库',
+
+ 'versions.networkIssues.networkLost': '为什么这个是不可用的?',
+ 'versions.networkIssues.publicDisabledHeader': '公共仓库选择失效',
+ 'versions.networkIssues.publicRepoDisabledMsg': 'Ambari无法访问互联网,无法使用公共存储库来安装软件. 您的选项:',
+ 'versions.networkIssues.publicRepoDisabledMsg1': '通过网络配置你的主机.',
+ 'versions.networkIssues.publicRepoDisabledMsg2': '如果你使用任何网络代理, 涉及到的Ambari文档,关于如何配置Ambari使用网络代理.',
+ 'versions.networkIssues.publicRepoDisabledMsg3': '使用本地仓库选项.',
+
+ 'versions.selectVersion': '选择版本',
+ 'versions.selectVersionEmpty': '没有其他仓库',
+ 'versions.useLocal': '使用本地仓库',
+ 'versions.uploadFile': '上传定义文件版本',
+ 'versions.enterURL': '版本定义文件路由',
+ 'versions.URLPlaceholder': '输入版本定义文件路由',
+ 'versions.defaultURL': 'https://',
+ 'versions.readInfo': '阅读版本信息',
+ 'versions.browse': '浏览',
+ 'versions.installOn': '安装到...',
+
+ 'versions.register.title': '注册版本',
+
+ 'versions.register.error.header': '无法注册',
+ 'versions.register.error.body': '您正在尝试使用已经与现有注册版本一起使用的基本URL注册版本. 您*必须*审核您的基本网址,并确认它们是您尝试注册的版本的唯一.',
+
+ 'versions.deregister': '撤销注册版本',
+ 'versions.deregisterConfirmation': '你确定想撤销注册版本 <strong>{{versionName}}</strong> ?',
+ 'versions.placeholder': '版本编号 (0.0)',
+ 'versions.repos': '存储库',
+ 'versions.os': '操作系统',
+ 'versions.baseURL': '基础路由',
+ 'versions.skipValidation': '跳过存储库基本路由验证(高级)',
+ 'versions.noVersions': '选择版本显示详细信息.',
+ 'versions.patch': '补丁',
+ 'versions.introduction': '要在Ambari注册新版本,请提供版本定义文件,确认软件版本信息并保存版本.',
+ 'versions.repoID': '报告ID',
+ 'versions.repoName': '报告名称',
+
+ 'versions.contents.title': '内容',
+ 'versions.contents.empty': '没有可显示的内容',
+
+ 'versions.details.stackName': '堆栈名称',
+ 'versions.details.displayName': '显示名称',
+ 'versions.details.version': '版本',
+ 'versions.details.actualVersion': '实际版本',
+ 'versions.details.releaseNotes': '发行说明',
+
+ 'versions.repository.placeholder': '输入基础路由或者移除该操作系统',
+ 'versions.repository.add': '添加仓库',
+
+ 'versions.useRedhatSatellite.title': '使用 RedHat Satellite/Spacewalk',
+ 'versions.useRedhatSatellite.warning': '通过选择 <b>"使用 RedHat Satellite/Spacewalk"</b> 进行软件仓库,, ' +
+ '您负责在Satellite / Spacewalk中配置存储库通道,并确认集群中主机上所选的<b>堆栈版本</ b>的存储库是可用的. ' +
+ '有关更多信息,请参阅Ambari文档.',
+ 'versions.useRedhatSatellite.disabledMsg': '使用RedHat Satellite / Spacewalk在使用Public Repositories时无法使用',
+
+ 'versions.changeBaseURLConfirmation.title': '确认基础路由修改',
+ 'versions.changeBaseURLConfirmation.message': '您即将更改已在使用的存储库基本URL. 请确认您打算进行此更改,并且新的基本URL指向相同的确切的Stack版本和构建',
+
+ 'versions.alerts.baseURLs': '为您正在配置的操作系统提供基本URL.',
+ 'versions.alerts.validationFailed': '一些存储库验证失败. 如果您确定网址正确,请更改基本网址或跳过验证',
+ 'versions.alerts.skipValidationWarning': '<b>警告::</b> 仅适用于高级用户. 如果要跳过Repository Base URL的验证,请使用此选项.',
+ 'versions.alerts.useRedhatSatelliteWarning': '禁用分布式存储库,并改用RedHat Satellite / Spacewalk通道',
+ 'versions.alerts.filterListError': '获取堆栈版本过滤器列表错误',
+ 'versions.alerts.versionCreated': '创建版本 <a href="#/stackVersions/{{stackName}}/{{versionName}}/edit">{{stackName}}-{{versionName}}</a>',
+ 'versions.alerts.versionCreationError': '版本创建错误',
+ 'versions.alerts.allOsAdded': '已添加所有操作系统',
+ 'versions.alerts.osListError': 'getSupportedOSList错误',
+ 'versions.alerts.readVersionInfoError': '版本定义读取错误',
+ 'versions.alerts.versionEdited': '编辑版本 <a href="#/stackVersions/{{stackName}}/{{versionName}}/edit">{{displayName}}</a>',
+ 'versions.alerts.versionUpdateError': '版本更新错误',
+ 'versions.alerts.versionDeleteError': '版本删除错误',
+ 'versions.alerts.repositoryExists': '一个仓库对{{os}}已经存在同一个报告ID!',
+ 'versions.alerts.cannotDeleteInstalled': '无法删除已安装的版本.',
+
+ 'authentication.description': 'Ambari支持对Ambari数据库中创建和存储的本地Ambari用户进行身份验证,或对LDAP服务器进行身份验证:',
+ 'authentication.ldap': 'LDAP认证',
+ 'authentication.on': '开启',
+ 'authentication.off': '关闭',
+
+ 'authentication.connectivity.title': 'LDAP连接配置',
+ 'authentication.connectivity.host': 'LDAP服务器主机',
+ 'authentication.connectivity.port': 'LDAP服务器端口',
+ 'authentication.connectivity.ssl': '使用SSL?',
+
+ 'authentication.connectivity.trustStore.label': '信托商店',
+
+ 'authentication.connectivity.trustStore.options.default': '默认JDK',
+ 'authentication.connectivity.trustStore.options.custom': '自定义',
+
+ 'authentication.connectivity.trustStorePath': '信托商店路径',
+
+ 'authentication.connectivity.trustStoreType.label': '信托商店类型',
+
+ 'authentication.connectivity.trustStoreType.options.jks': 'JKS',
+ 'authentication.connectivity.trustStoreType.options.jceks': 'JCEKS',
+ 'authentication.connectivity.trustStoreType.options.pkcs12': 'PKCS12',
+
+ 'authentication.connectivity.trustStorePassword': '信托商店密码',
+ 'authentication.connectivity.dn': '绑定DN',
+ 'authentication.connectivity.bindPassword': '绑定Password',
+
+ 'authentication.connectivity.controls.testConnection': '连接测试',
+
+ 'authentication.attributes.title': 'LDAP属性配置',
+
+ 'authentication.attributes.detection.label': '识别用户和用户组的正确属性可以手动指定或自动检测. 请选择:',
+
+ 'authentication.attributes.detection.options.manual': '手动定义属性',
+ 'authentication.attributes.detection.options.auto': '自动检测属性',
+
+ 'authentication.attributes.userSearch': '用户搜索库',
+ 'authentication.attributes.groupSearch': '组搜索库',
+ 'authentication.attributes.detected': '检测到以下属性,请查看和测试属性以确保其准确性.',
+ 'authentication.attributes.userObjClass': '用户对象类',
+ 'authentication.attributes.userNameAttr': '用户名属性',
+ 'authentication.attributes.groupObjClass': '组对象类',
+ 'authentication.attributes.groupNameAttr': '组名属性',
+ 'authentication.attributes.groupMemberAttr': '组成员属性',
+ 'authentication.attributes.distinguishedNameAttr': '可分辨名称属性',
+
+ 'authentication.attributes.test.description': '要快速测试所选属性,请点击下面的按钮. 在此过程中,您可以指定测试用户名和密码,Ambari将尝试验证和检索组成员身份信息',
+ 'authentication.attributes.test.username': '测试用户名',
+ 'authentication.attributes.test.password': '测试密码',
+
+ 'authentication.attributes.groupsList': '组列表',
+
+ 'authentication.attributes.controls.autoDetect': '执行自动检测',
+ 'authentication.attributes.controls.testAttrs': '测试属性',
+
+ 'authentication.attributes.alerts.successfulAuth': '认证成功',
+
+ 'authentication.controls.test': '测试',
+
+ 'exportBlueprint.dataLoaded': '数据加载...',
+
+ 'remoteClusters.ambariClusterName': 'Ambari集群名称',
+ 'remoteClusters.clusterURLPlaceholder': 'http://ambari.server:8080/api/v1/clusters/c1',
+
+ 'remoteClusters.alerts.fetchError': '拉取远程集群时的错误.'
});
$translateProvider.preferredLanguage('en');
diff --git a/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py b/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py
index 4945d08a74..90e1d2a2e0 100644
--- a/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py
+++ b/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py
@@ -202,7 +202,7 @@ class AmbariConfig:
@property
def cache_dir(self):
- return self.get('agent', 'cache_dir', default='/var/lib/ambari-agent/cache')
+ return '/var/lib/ambari-agent/cache'
@property
def cluster_cache_dir(self):
diff --git a/ambari-common/src/main/python/ambari_commons/libs/ppc64le/_posixsubprocess.so b/ambari-common/src/main/python/ambari_commons/libs/ppc64le/_posixsubprocess.so
deleted file mode 100644
index 7e98dc09fe..0000000000
Binary files a/ambari-common/src/main/python/ambari_commons/libs/ppc64le/_posixsubprocess.so and /dev/null differ
diff --git a/ambari-common/src/main/python/ambari_commons/os_check.py b/ambari-common/src/main/python/ambari_commons/os_check.py
index 2770f37cc2..522373823c 100644
--- a/ambari-common/src/main/python/ambari_commons/os_check.py
+++ b/ambari-common/src/main/python/ambari_commons/os_check.py
@@ -194,7 +194,14 @@ class OSCheck:
distribution = ("", "", "")
else:
# linux distribution
- distribution = distro.linux_distribution()
+ PYTHON_VER = sys.version_info[0] * 10 + sys.version_info[1]
+
+ if sys.version_info[0] < 3:
+ raise RuntimeError("Python 2 or less not supported")
+ elif _is_redhat_linux():
+ distribution = distro.linux_distribution()
+ else:
+ distribution = distro.linux_distribution()
if distribution[0] == '':
distribution = advanced_check(distribution)
@@ -244,12 +251,30 @@ class OSCheck:
# special cases
if _is_oracle_linux():
operatingSystem = 'oraclelinux'
+ elif operatingSystem.startswith('ubuntu'):
+ operatingSystem = 'ubuntu'
elif operatingSystem.startswith('suse linux enterprise server'):
operatingSystem = 'sles'
elif operatingSystem.startswith('red hat enterprise linux'):
operatingSystem = 'redhat'
+ elif operatingSystem.startswith('kylin linux'):
+ operatingSystem = 'redhat'
elif operatingSystem.startswith('rocky linux'):
operatingSystem = 'redhat'
+ elif operatingSystem.startswith('uos'):
+ operatingSystem = 'redhat'
+ elif operatingSystem.startswith('uniontech'):
+ operatingSystem = 'redhat'
+ elif operatingSystem.startswith('anolis'):
+ operatingSystem = 'redhat'
+ elif operatingSystem.startswith('asianux server'):
+ operatingSystem = 'redhat'
+ elif operatingSystem.startswith('bclinux'):
+ operatingSystem = 'redhat'
+ elif operatingSystem.startswith('bigcloud enterprise linux'):
+ operatingSystem = 'redhat'
+ elif operatingSystem.startswith('openeuler'):
+ operatingSystem = 'redhat'
elif operatingSystem.startswith('darwin'):
operatingSystem = 'mac'
@@ -297,13 +322,45 @@ class OSCheck:
@staticmethod
def _get_os_version():
+ # Read content from /etc/*-release file
+ # Full release name
# Read content from /etc/*-release file
# Full release name
dist = OSCheck.os_distribution()
- dist = dist[1]
-
- if dist:
- return dist
+
+ version = dist[1]
+ operatingSystem = dist[0].lower()
+
+ if version:
+ if operatingSystem.startswith('kylin linux'):
+ #kylin v10
+ if version == 'V10':
+ version = '8'
+ elif operatingSystem.startswith('anolis'):
+ if version == '20':
+ version = '8'
+ elif operatingSystem.startswith('uos'):
+ #uos 20
+ if version == '20':
+ version = '8'
+ elif operatingSystem.startswith('uniontech'):
+ #uos 20
+ if version == '20':
+ version = '8'
+ elif operatingSystem.startswith('openeuler'):
+ #openeuler 22
+ version = '8'
+ elif operatingSystem.startswith('bclinux'):
+ version = '8'
+ elif version.startswith('4.0.'):
+ #support nfs (zhong ke fang de)
+ version = '8'
+ elif len(version.split(".")) > 2 :
+ #support 8.4.0
+ version = version.split(".")[0]
+ if OSCheck._get_os_type() == 'redhat' and int(float(version)) > 8 :
+ raise Exception("operatingSystem cannot supoort: " + dist)
+ return version
else:
raise Exception("Cannot detect os version. Exiting...")
diff --git a/ambari-common/src/main/python/ambari_simplejson/_speedups/ppc/_speedups.so b/ambari-common/src/main/python/ambari_simplejson/_speedups/ppc/_speedups.so
deleted file mode 100644
index 59c4ba7c6d..0000000000
Binary files a/ambari-common/src/main/python/ambari_simplejson/_speedups/ppc/_speedups.so and /dev/null differ
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py b/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py
index cc234a3284..7b84182a4d 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py
@@ -98,7 +98,7 @@ def curl_krb_request(tmp_dir, keytab, principal, url, cache_file_prefix,
# when executing curl. Use a hash of the combination of the principal and keytab file
# to generate a (relatively) unique cache filename so that we can use it as needed. Scope
# this file by user in order to prevent sharing of cache files by multiple users.
- ccache_file_name = HASH_ALGORITHM("{0}|{1}".format(principal, keytab)).hexdigest()
+ ccache_file_name = HASH_ALGORITHM("{0}|{1}".format(principal, keytab).encode('utf-8')).hexdigest()
curl_krb_cache_path = os.path.join(tmp_dir, "curl_krb_cache")
if not os.path.exists(curl_krb_cache_path):
diff --git a/ambari-server/conf/unix/create-python-wrap.sh b/ambari-server/conf/unix/create-python-wrap.sh
index f241e4c3a3..2c2a97a481 100644
--- a/ambari-server/conf/unix/create-python-wrap.sh
+++ b/ambari-server/conf/unix/create-python-wrap.sh
@@ -37,4 +37,27 @@ if [ -z "$AMBARI_PYTHON" ] ; then
else
mkdir -p "$PYTHON_WRAPER_DIR"
ln -s "$AMBARI_PYTHON" "$PYTHON_WRAPER_TARGET"
-fi
\ No newline at end of file
+fi
+
+if ! [ -x "$(command -v lsb_release)" ]; then
+ echo "lsb_release is not installed. try install redhat-lsb"
+ if [ -x "$(command -v yum)" ]; then
+ yum install -y redhat-lsb
+ if [ $? -ne 0 ] ; then
+ echo "try install kylin-lsb"
+ yum install -y kylin-lsb
+ fi
+ if [ $? -ne 0 ] ; then
+ echo "try install UnionTech-lsb"
+ yum install -y UnionTech-lsb
+ fi
+ if [ $? -ne 0 ] ; then
+ echo "try install openeuler-lsb"
+ yum install -y openeuler-lsb
+ fi
+ fi
+fi
+if ! [ -x "$(command -v lsb_release)" ]; then
+ >&2 echo "Error: lsb_release is not installed."
+fi
+lsb_release
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/configuration/hive-env.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/configuration/hive-env.xml
index d04b194d87..c2ded0fb8d 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/configuration/hive-env.xml
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/configuration/hive-env.xml
@@ -373,14 +373,14 @@
if [ "$SERVICE" = "metastore" ]; then
export HADOOP_HEAPSIZE={{hive_metastore_heapsize}} # Setting for HiveMetastore
- export HADOOP_OPTS="$HADOOP_OPTS -Xloggc:{{hive_log_dir}}/hivemetastore-gc-%t.log -XX:+UseG1GC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCCause -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=10M -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath={{hive_log_dir}}/hms_heapdump.hprof -Dhive.log.dir={{hive_log_dir}} -Dhive.log.file=hivemetastore.log"
+ export HADOOP_OPTS="$HADOOP_OPTS -XX:+UnlockExperimentalVMOptions -Xloggc:{{hive_log_dir}}/hivemetastore-gc-%t.log -XX:+UseG1GC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCCause -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=10M -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath={{hive_log_dir}}/hms_heapdump.hprof -Dhive.log.dir={{hive_log_dir}} -Dhive.log.file=hivemetastore.log"
fi
if [ "$SERVICE" = "hiveserver2" ]; then
export HADOOP_HEAPSIZE={{hive_heapsize}} # Setting for HiveServer2 and Client
- export HADOOP_OPTS="$HADOOP_OPTS -Xloggc:{{hive_log_dir}}/hiveserver2-gc-%t.log -XX:+UseG1GC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCCause -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=10M -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath={{hive_log_dir}}/hs2_heapdump.hprof -Dhive.log.dir={{hive_log_dir}} -Dhive.log.file=hiveserver2.log"
+ export HADOOP_OPTS="$HADOOP_OPTS -XX:+UnlockExperimentalVMOptions -Xloggc:{{hive_log_dir}}/hiveserver2-gc-%t.log -XX:+UseG1GC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCCause -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=10M -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath={{hive_log_dir}}/hs2_heapdump.hprof -Dhive.log.dir={{hive_log_dir}} -Dhive.log.file=hiveserver2.log"
fi
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/configuration/hive-site.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/configuration/hive-site.xml
index 6a55717a84..58e617d407 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/configuration/hive-site.xml
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/configuration/hive-site.xml
@@ -659,11 +659,6 @@ limitations under the License.
<value>false</value>
<on-ambari-upgrade add="false"/>
</property>
- <property>
- <name>hive.load.data.owner</name>
- <value>hive</value>
- <on-ambari-upgrade add="false"/>
- </property>
<property>
<name>hive.txn.strict.locking.mode</name>
<value>false</value>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/params.py
index 2b752d47a8..108f6dc981 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/params.py
@@ -227,6 +227,8 @@ if hive_jdbc_driver == "com.microsoft.sqlserver.jdbc.SQLServerDriver":
hive_previous_jdbc_jar_name = default("/ambariLevelParams/previous_custom_mssql_jdbc_name", None)
elif hive_jdbc_driver == "com.mysql.jdbc.Driver":
jdbc_jar_name = default("/ambariLevelParams/custom_mysql_jdbc_name", None)
+elif hive_jdbc_driver == "com.mysql.cj.jdbc.Driver":
+ jdbc_jar_name = default("/ambariLevelParams/custom_mysql_jdbc_name", None)
hive_previous_jdbc_jar_name = default("/ambariLevelParams/previous_custom_mysql_jdbc_name", None)
elif hive_jdbc_driver == "org.postgresql.Driver":
jdbc_jar_name = default("/ambariLevelParams/custom_postgres_jdbc_name", None)
@@ -442,17 +444,6 @@ hive_site_config["hive.execution.engine"] = "tez"
hive_site_config["hive.metastore.db.type"] = hive_metastore_db_type.upper()
hive_site_config["hive.hook.proto.base-directory"] = hive_hook_proto_base_directory
-########################################################
-# https://issues.apache.org/jira/browse/HIVE-19740
-# This is not a bug but after 2.x hive.metastore.event.db.notification.api.auth is true by default so if you just upgrade the version in a kerberized cluster, hiverserver2 will probably not be able to connect to the metastore. As specified here this can solved by setting hive.metastore.event.db.notification.api.auth to false or adding something like this to your core.xml or hive-site.xml:
-########################################################
-core_site_config = dict(config['configurations']['core-site'])
-if format("hadoop.proxyuser.{hive_user}.hosts") not in core_site_config and format("hadoop.proxyuser.{hive_user}.groups") not in core_site_config:
- hive_site_config["hive.metastore.event.db.notification.api.auth"] = "false"
- hive_site_config["hive.server2.enable.doAs"] = "false"
-else:
- hive_site_config["hive.metastore.event.db.notification.api.auth"] = "true"
- hive_site_config["hive.server2.enable.doAs"] = "true"
########################################################
############# AMS related params #####################
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/service_check.py
index c0ff7c7fd7..05be1f4391 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/service_check.py
@@ -52,7 +52,7 @@ class KerberosServiceCheck(Script):
os.path.isfile(params.smoke_test_keytab_file)):
print("Performing kinit using %s" % params.smoke_test_principal)
- ccache_file_name = HASH_ALGORITHM("{0}|{1}".format(params.smoke_test_principal, params.smoke_test_keytab_file)).hexdigest()
+ ccache_file_name = HASH_ALGORITHM("{0}|{1}".format(params.smoke_test_principal, params.smoke_test_keytab_file).encode('utf-8')).hexdigest()
ccache_file_path = "{0}{1}kerberos_service_check_cc_{2}".format(params.tmp_dir, os.sep, ccache_file_name)
kinit_path_local = functions.get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None))
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/properties/krb5_conf.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/properties/krb5_conf.j2
index d201c33c55..574147f027 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/properties/krb5_conf.j2
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/properties/krb5_conf.j2
@@ -44,7 +44,7 @@
{%- if master_kdc %}
master_kdc = {{master_kdc|trim()}}
{%- endif -%}
-{%- if kdc_hosts > 0 -%}
+{%- if kdc_hosts|length > 0 -%}
{%- set kdc_host_list = kdc_hosts.split(',') -%}
{%- if kdc_host_list and kdc_host_list|length > 0 %}
admin_server = {{admin_server_host|default(kdc_host_list[0]|trim(), True)}}
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/configuration/spark-hive-site-override.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/configuration/spark-hive-site-override.xml
index 15351908ac..3ab295ee82 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/configuration/spark-hive-site-override.xml
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/configuration/spark-hive-site-override.xml
@@ -68,12 +68,6 @@ limitations under the License.
<description></description>
<on-ambari-upgrade add="false"/>
</property>
- <property>
- <name>hive.load.data.owner</name>
- <value>spark</value>
- <description></description>
- <on-ambari-upgrade add="false"/>
- </property>
<property>
<name>hive.exec.scratchdir</name>
<value>/tmp/spark</value>
diff --git a/ambari-web/app/initialize.js b/ambari-web/app/initialize.js
index 3d050664b9..25eaf10a22 100644
--- a/ambari-web/app/initialize.js
+++ b/ambari-web/app/initialize.js
@@ -21,13 +21,10 @@ window.App = require('app');
require('config');
-var browserLanguage = '';
-
try {
- browserLanguage = navigator.language.slice(0, 2);
- require('locales/' + browserLanguage +'/messages');
+ require('locales/zh/messages');
} catch (error) {
- require('messages');
+ require('locales/default_messages');
}
require('utils');
diff --git a/ambari-web/app/messages.js b/ambari-web/app/locales/default_messages.js
similarity index 99%
rename from ambari-web/app/messages.js
rename to ambari-web/app/locales/default_messages.js
index 350883769d..301a04ed8d 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/locales/default_messages.js
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-Em.I18n.translations = {
+var messages_ambari = {
'app.name':'Ambari',
'app.name.subtitle':'Ambari - {0}',
@@ -3223,6 +3223,8 @@ Em.I18n.translations = {
'dashboard.services.hbase.averageLoadPerServer':'{0} regions per RegionServer',
'dashboard.services.hbase.regionServers':'RegionServers',
'dashboard.services.hbase.regionServersSummary':'{0} live / {1} total',
+ 'dashboard.services.hbase.hbaseRestGateways':'Hbase Rest Gateways',
+ 'dashboard.services.hbase.hbaseRestGatewaysSummary':'{0} live / {1} total',
'dashboard.services.hbase.phoenixServers':'Phoenix Query Servers',
'dashboard.services.hbase.phoenixServersSummary':'{0} live / {1} total',
'dashboard.services.hbase.chart.label':'Request Count',
@@ -3634,3 +3636,6 @@ Em.I18n.translations = {
'app.logger.wizard': 'wizard step {0} loading time'
};
+Em.I18n.translations = messages_ambari;
+
+module.exports = messages_ambari;
\ No newline at end of file
diff --git a/ambari-web/app/locales/zh/messages.js b/ambari-web/app/locales/zh/messages.js
new file mode 100644
index 0000000000..8c95664a77
--- /dev/null
+++ b/ambari-web/app/locales/zh/messages.js
@@ -0,0 +1,3206 @@
+Em.I18n.translations = {
+ "app.name": "Ambari",
+ "app.name.subtitle": "Ambari - {0}",
+ "app.name.subtitle.experimental": "Ambari Experimental",
+ "app.reloadPopup.link": "重新载入页面",
+ "app.reloadPopup.text": "尝试连接到服务器…",
+ "app.reloadPopup.noClusterName.text": "未能检索集群名称,试图重新加载…",
+ "app.reloadPopup.header": "重新载入页面",
+ "app.redirectIssuePopup.header": "登录重定向问题",
+ "app.redirectIssuePopup.body": "对于单点登录,请确保Knox网关和Ambari服务器位于同一主机或子域上。<br/>或者使用本地登录页面作为Ambari本地用户登录。<br /><a href=\"{0}\" target=\"_blank\">{0}</a>",
+ "app.loadingPlaceholder": "加载...",
+ "app.versionMismatchAlert.title": "GPRS服务器/ Web客户端版本不匹配",
+ "app.versionMismatchAlert.body": "Ambari服务器和Web客户端版本不匹配:<br> <br>Ambari 服务器: <strong>{0}</strong><br>Ambari Web客户端: <strong>{1}</strong><br><br>这通常发生在升级Ambari之后,因为在浏览器中缓存了Ambari Web客户端代码。<br>执行浏览器缓存刷新,通常是“Ctrl + Shift +R”('CMD+Shift +R'在OS X上),以查看该消息是否消失。<br>如果您继续看到此消息,请完全清除浏览器缓存并再次访问该URL。<br>你必须继续解决此错误才能继续。",
+ "app.signout": "退出",
+ "app.settings": "设置",
+ "app.manageAmbari": "管理Ambari",
+ "app.aboutAmbari": "关于",
+ "app.settings.selectTimezone": "时区",
+ "app.settings.notshowBgOperationsPopup": "启动操作时不要显示后台操作对话框",
+ "app.settings.notShowBgOperations": "在启动后台操作时不要再次显示此对话框",
+ "app.settings.categories.general": "一般",
+ "app.settings.categories.locale": "现场",
+ "app.settings.noData": "无法检索设置数据",
+ "app.settings.no.view.privileges": "无视图权限",
+ "app.settings.no.cluster.privileges": "无集群权限",
+ "app.settings.admin.all.privileges": "此用户是Ambari管理员,具有所有权限。",
+ "app.settings.no.privileges": "此用户没有任何权限。",
+ "app.settings.clusterRole": "集群角色",
+ "app.settings.viewPermissions": "查看权限",
+ "app.goToView": "查看视图",
+ "app.debugHiveQuery": "调试Hive查询",
+ "app.aboutAmbari.getInvolved": "参与进来!",
+ "app.aboutAmbari.version": "版本",
+ "app.aboutAmbari.licensed": "在数据平台下授权,版本2.0",
+ "apply": "应用",
+ "and": "和",
+ "none": "无",
+ "all": "全部",
+ "minimum": "最小值",
+ "from": "从",
+ "to": "到",
+ "ok": "确定",
+ "as": "作为",
+ "on": "在",
+ "in": "在里面",
+ "any": "任何",
+ "more": "更多",
+ "yes": "是的",
+ "no": "不",
+ "add": "添加",
+ "op": "运算",
+ "ops": "操作",
+ "or": "或",
+ "then": "然后",
+ "it": "它",
+ "common.access": "通路",
+ "common.learnMore": "了解更多",
+ "common.showDetails": "显示细节",
+ "common.back": "返回",
+ "common.prev": "上一步",
+ "common.next": "下一步",
+ "common.host": "主机",
+ "common.hosts": "主机",
+ "common.services": "服务",
+ "common.group": "组",
+ "common.groups": "组",
+ "common.progress": "进度",
+ "common.status": "状态",
+ "common.action": "操作",
+ "common.refresh": "刷新",
+ "common.remove": "移除",
+ "common.retry": "重试",
+ "common.skip": "跳过",
+ "common.filter": "过滤",
+ "common.rollBack": "回降",
+ "common.show": "显示",
+ "common.hide": "隐藏",
+ "common.cancel": "取消",
+ "common.apply": "应用",
+ "common.done": "完成",
+ "common.failed": "失败",
+ "common.service": "服务",
+ "common.version": "版本",
+ "common.downgrade": "降级",
+ "common.description": "描述",
+ "common.default": "默认",
+ "common.client": "客户端",
+ "common.zookeeper": "ZooKeeper",
+ "common.hbase": "HBase",
+ "common.regionServer": "区域服务器",
+ "common.taskTracker": "守护进程",
+ "common.dataNode": "数据节点",
+ "common.more": "更多…",
+ "common.print": "打印",
+ "common.deploy": "部署",
+ "common.message": "消息",
+ "common.tasks": "任务",
+ "common.open": "在新窗口打开",
+ "common.copy": "拷贝",
+ "common.complete": "完成",
+ "common.completed": "已完成",
+ "common.metrics": "指标",
+ "common.timeRange": "时间范围",
+ "common.name": "名字",
+ "common.key": "key",
+ "common.value": "值",
+ "common.ipAddress": "IP地址",
+ "common.rack": "机架",
+ "common.cpu": "CPU",
+ "common.cores": "内核",
+ "common.cores.cpu": "内核(CPU)",
+ "common.ram": "RAM",
+ "common.disabled": "禁用",
+ "common.enabled": "启用",
+ "common.enableAll": "启用所有",
+ "common.disableAll": "全部禁用",
+ "common.disk": "磁盘",
+ "common.diskUsage": "磁盘使用",
+ "common.last": "最后",
+ "common.loadAvg": "加载AVG",
+ "common.components": "组件",
+ "common.component": "组件",
+ "common.quickLinks": "快速链接",
+ "common.save": "保存",
+ "common.saveAnyway": "强制保存",
+ "common.servers": "服务器",
+ "common.clients": "客户端",
+ "common.all.clients": "所有客户端",
+ "common.user": "用户",
+ "common.users": "用户",
+ "common.issues": "问题",
+ "common.os": "操作系统",
+ "common.oss": "开源软件",
+ "common.memory": "内存",
+ "common.maximum": "最大值",
+ "common.started": "已启动",
+ "common.start": "开启",
+ "common.stop": "停止",
+ "common.pause": "暂停",
+ "common.end": "结束",
+ "common.decommission": "停止使用",
+ "common.recommission": "重新启用",
+ "common.failure": "失败",
+ "common.type": "类型",
+ "common.direction": "方向",
+ "common.close": "关闭",
+ "common.warning": "警告",
+ "common.critical": "严重",
+ "common.information": "信息",
+ "common.all": "所有",
+ "common.success": "成功",
+ "common.fail": "失败",
+ "common.error": "错误",
+ "common.loading": "加载",
+ "common.search": "搜索",
+ "common.confirm": "确认",
+ "common.upgrade": "升级",
+ "common.reUpgrade": "重试升级",
+ "common.reDowngrade": "重试降级",
+ "common.security": "安全",
+ "common.kerberos": "Kerberos",
+ "common.cluster": "集群",
+ "common.repositories": "仓库",
+ "common.stack.versions": "栈版本",
+ "common.versions": "版本",
+ "common.upgrade.history": "升级历史",
+ "common.serviceAccounts": "服务帐户",
+ "common.add": "添加",
+ "common.edit": "编辑",
+ "common.delete": "删除",
+ "common.duplicate": "复制",
+ "common.empty": "无",
+ "common.override": "覆盖",
+ "common.undo": "撤消",
+ "common.details": "细节",
+ "common.stats": "统计数据",
+ "common.abort": "中止",
+ "common.aborted": "已中止",
+ "common.misc": "误码率",
+ "common.userSettings": "用户设置",
+ "common.aboutAmbari": "关于",
+ "common.notAvailable": "无法使用",
+ "common.na": "N/A",
+ "common.operations": "操作",
+ "common.startTime": "开始时间",
+ "common.duration": "持续时间",
+ "common.reinstall": "重新安装",
+ "common.revert": "恢复",
+ "common.revert.patch": "恢复补丁",
+ "common.errorPopup.header": "发生了一个错误",
+ "common.use": "使用",
+ "common.stacks": "堆栈",
+ "common.stack": "栈",
+ "common.reset": "重置",
+ "common.reset.default": "重置为默认值",
+ "common.resume": "恢复",
+ "common.path": "路径",
+ "common.patch": "补丁",
+ "common.maint": "维护",
+ "common.package": "包",
+ "common.proceed": "继续",
+ "common.proceedAnyway": "无论如何继续",
+ "common.exitAnyway": "无论如何退出",
+ "common.process": "进程",
+ "common.property": "性能",
+ "common.installed": "已安装",
+ "common.persist.error": "在ambari服务器中维护Web客户端状态时出错。服务器响应以下错误消息:",
+ "common.update.error": "从ambari服务器检索Web客户端状态的错误",
+ "common.tags": "标签",
+ "common.important": "重要的",
+ "common.important.strong": "<strong>重要的:</strong>",
+ "common.allServices": "所有服务",
+ "common.move": "移动",
+ "common.change": "修改",
+ "common.overrides": "覆盖",
+ "common.properties": "性能",
+ "common.conf.group": "配置组",
+ "common.ignore": "忽略",
+ "common.restart": "重新启动",
+ "common.discard": "丢弃",
+ "common.actions": "操作",
+ "common.maintenance": "维护",
+ "common.passive_state": "维护模式",
+ "common.select": "选择",
+ "common.selected": "已选择",
+ "common.password": "密码",
+ "common.url": "URL",
+ "common.advanced": "高级",
+ "common.download": "下载",
+ "common.current": "当前",
+ "common.additional": "附加的",
+ "common.time.start": "开始时间",
+ "common.time.end": "结束时间",
+ "common.hostLog.popup.logDir.path": "/var/lib/ambari-agent/data/",
+ "common.hostLog.popup.outputLog.value": "output-{0}.txt",
+ "common.hostLog.popup.errorLog.value": "errors-{0}.txt",
+ "common.maintenance.task": "开关维修模式",
+ "common.installRepo.task": "安装包",
+ "common.used": "已使用",
+ "common.free": "空余",
+ "common.type.string": "字符串",
+ "common.type.number": "数字",
+ "common.author": "操作人",
+ "common.notes": "备注",
+ "common.view": "视图",
+ "common.compare": "比较",
+ "common.latest": "最新的",
+ "common.custom": "自定义",
+ "common.continueAnyway": "无论如何继续",
+ "common.property.undefined": "未定义",
+ "common.summary": "概览",
+ "common.configs": "配置",
+ "common.configuration": "配置",
+ "common.unknown": "未知",
+ "common.install": "安装",
+ "common.alertDefinition": "报警定义",
+ "common.prerequisites": "先决条件",
+ "common.finalize": "完成",
+ "common.severity": "严重程度",
+ "common.dismiss": "关闭",
+ "common.stdout": "标准输出",
+ "common.stderr": "标准错误",
+ "common.structuredOut": "结构解析",
+ "common.fileName": "文件名",
+ "common.file": "文件",
+ "common.days": "天",
+ "common.hours": "小时",
+ "common.minutes": "分钟",
+ "common.seconds": "秒",
+ "common.milliseconds": "毫秒",
+ "common.configGroup": "配置组",
+ "common.expression": "表达式",
+ "common.dataSet": "数据集",
+ "common.label": "标签",
+ "common.preview": "预览",
+ "common.options": "选项",
+ "common.scope": "范围",
+ "common.clone": "克隆",
+ "common.removed": "已移除",
+ "common.testing": "测试",
+ "common.noData": "没有数据",
+ "common.export": "导出",
+ "common.csv": "CSV",
+ "common.json": "JSON",
+ "common.timestamp": "时间戳",
+ "common.timezone": "时区",
+ "common.loading.eclipses": "加载。。。",
+ "common.optional": "可选的",
+ "common.propertyType": "属性类型",
+ "common.running": "运行",
+ "common.stopped": "停止",
+ "common.enter": "确认",
+ "common.timeout.warning.popup.header": "自动注销",
+ "common.timeout.warning.popup.body.before": "您将自动登录",
+ "common.timeout.warning.popup.body.after": "不活动秒数",
+ "common.timeout.warning.popup.primary": "保持登录",
+ "common.timeout.warning.popup.secondary": "现在注销",
+ "common.openNewWindow": "在新窗口中打开",
+ "common.fullLogPopup.clickToCopy": "点击复制",
+ "common.nothingToDelete": "无需删除",
+ "common.exclude": "排除",
+ "common.include": "包括",
+ "common.exclude.short": "排除",
+ "common.include.short": "包括",
+ "common.filters": "过滤器",
+ "common.keywords": "关键字",
+ "common.levels": "级别",
+ "common.extension": "扩展",
+ "common.logs": "日志",
+ "common.warn.message": "<div class=\"alert alert-warn\">{0}</div>",
+ "common.link": "链接",
+ "common.from.version": "从版本",
+ "common.to.version": "到版本",
+ "common.start.time": "开始时间",
+ "common.end.time": "结束时间",
+ "common.rolling": "波动的",
+ "common.express": "快速的",
+ "common.hostOrdered": "主机顺序",
+ "common.repository": "仓库",
+ "common.repositoryType": "仓库类型",
+ "common.rolling.downgrade": "波动降级",
+ "common.express.downgrade": "快速降级",
+ "common.critical.error": "临界的",
+ "common.installing": "安装中",
+ "common.installFailed": "安装失败",
+ "common.stopped": "已停止",
+ "common.started": "已启动",
+ "common.starting": "正在启动",
+ "common.stopping": "正在停止",
+ "common.unknown": "心跳丢失",
+ "common.upgradeFailed": "升级失败",
+ "common.disabled": "禁用",
+ "common.init": "等待安装",
+ "common.shortState.critical": '严重',
+ "common.shortState.warning": '警告',
+ "common.shortState.ok": '正常',
+ "common.shortState.unknown": '未知',
+ "common.shortState.pending": '无',
+ "models.alert_instance.tiggered.verbose": "发生在{0}上 <br> 已检查{1}",
+ "models.alert_definition.triggered.verbose": "发生在{0}上",
+ "models.alert_definition.triggered.checked": "状态改变:{0} <br> 最新检查: {1}",
+ "models.alert_definition.check.retry": "在{1}次警报检查中收到{0}次警报",
+ "passiveState.turnOn": "开启维护模式",
+ "passiveState.turnOff": "关闭维护模式",
+ "passiveState.turnOnFor": "打开{0}的维护模式",
+ "passiveState.turnOffFor": "关闭{0}的维护模式",
+ "passiveState.disabled.impliedFromHighLevel": "{0}已经处于维护模式,因为{1}处于维护模式。",
+ "passiveState.disabled.impliedFromServiceAndHost": "{0}已经处于维护模式,因为{1}和{2}处于维护模式。",
+ "requestInfo.installComponents": "安装组件",
+ "requestInfo.installKerbeorosComponents": "安装Kerberos组件",
+ "requestInfo.installServices": "安装服务",
+ "requestInfo.kerberosService": "安装Kerberos服务",
+ "requestInfo.startServices": "启动服务",
+ "requestInfo.startAddedServices": "启动附加服务",
+ "requestInfo.stopAllServices": "停止所有服务",
+ "requestInfo.startAllServices": "启动所有服务",
+ "requestInfo.startHostComponent": "启动",
+ "requestInfo.startHostComponent.datanode": "启动DataNode",
+ "requestInfo.startHostComponent.nodemanager": "启动NodeManager",
+ "requestInfo.startHostComponent.hbase_regionserver": "启动RegionServer",
+ "requestInfo.startHostComponents": "启动组件",
+ "requestInfo.upgradeHostComponent": "升级",
+ "requestInfo.stopHostComponent": "停止",
+ "requestInfo.installHostComponent": "安装",
+ "requestInfo.installNewHostComponent": "安装",
+ "requestInfo.refreshComponentConfigs": "刷新{0}配置",
+ "requestInfo.stop": "停止{0}",
+ "requestInfo.start": "启动{0}",
+ "requestInfo.unspecified": "未指定请求名称",
+ "requestInfo.kerberizeCluster": "Kerberize Cluster",
+ "hostPopup.noServicesToShow": "无服务显示",
+ "hostPopup.noHostsToShow": "无主机显示",
+ "hostPopup.noTasksToShow": "无任务显示",
+ "hostPopup.status.category.all": "全部({0})",
+ "hostPopup.status.category.pending": "等待({0})",
+ "hostPopup.status.category.inProgress": "进行中({0})",
+ "hostPopup.status.category.failed": "失败({0})",
+ "hostPopup.status.category.success": "成功({0})",
+ "hostPopup.status.category.aborted": "中止({0})",
+ "hostPopup.status.category.timedout": "超时({0})",
+ "hostPopup.header.postFix": "{0}个后台操作正在运行",
+ "hostPopup.serviceInfo.showMore": "展示更多…",
+ "hostPopup.bgop.abortRequest.title": "中止操作",
+ "hostPopup.bgop.abortRequest.confirmation.body": "确实要中止{0}操作吗?",
+ "hostPopup.bgop.abortRequest.reason": "被用户中止",
+ "hostPopup.bgop.abortRequest.modal.header": "中止发送请求",
+ "hostPopup.bgop.abortRequest.modal.body": "<strong>{0}</strong>中止的请求已发送到服务器。备注: 已经运行的一些任务可能在完成中止请求之前有时间完成或失败。",
+ "hostPopup.bgop.sourceRequestSchedule.running": "此批请求的未来操作可以中止。",
+ "hostPopup.bgop.sourceRequestSchedule.aborted": "此批请求的未来操作已中止。",
+ "hostPopup.bgop.abort.rollingRestart": "中止滚动重启",
+ "hostPopup.warning.alertsTimeOut": "维护模式已转为{0}。警报可能需要几分钟变成{1}。",
+ "hostPopup.reccomendation.beforeDecommission": "停止前需要{0}维护模式。",
+ "hostPopup.setRackId.success": "将机架ID更新为{0}。它可能需要一些时间,使它得到刷新。",
+ "hostPopup.setRackId.error": "更新机架ID失败。",
+ "hostPopup.setRackId.invalid": "以前斜杠开头,可以包括字母数字字符、点、破折号和前斜杠。",
+ "hostPopup.RackId": "机架",
+ "hostPopup.recommendation.beforeDecommission": "停止前需要{0}维护模式。",
+ "question.sure": "你确定吗?",
+ "popup.highlight": "单击以突出显示",
+ "popup.confirmation.commonHeader": "确认",
+ "popup.confirmation.refreshYarnQueues.body": "强烈建议在更改容量调度器配置后<strong>刷新Yarn队列</strong>。你想继续吗?",
+ "popup.warning.refreshYarnQueues.body": "<div class=\"alert alert-warning\"><strong>警告: </strong>队列配置更改可能影响了HIVE LLAP使用的队列。可能需要重新配置Hive LLAP或重启。</div>",
+ "popup.confirmation.refreshYarnQueues.buttonText": "刷新Yarn队列",
+ "popup.confirmation.hsiRestart.body": "强烈建议在更改Hive LLAP大小配置后<strong>重启HiveServer2 Interactive</strong>。你想继续吗?",
+ "popup.confirmation.hsiRestart.buttonText": "重新启动HiveServer2 Interactive",
+ "popup.prompt.commonHeader": "提示",
+ "popup.confirmationFeedBack.sending": "发送中…",
+ "popup.confirmationFeedBack.query.fail": "请求失败",
+ "popup.clusterCheck.failedOn": "失败:",
+ "popup.clusterCheck.reason": "原因:",
+ "popup.clusterCheck.Upgrade.header": "升级到{0}",
+ "popup.clusterCheck.Upgrade.fail.title": "要求",
+ "popup.clusterCheck.Upgrade.fail.alert": "你<strong>必须</strong>满足这些要求才能继续进行。",
+ "popup.clusterCheck.Upgrade.bypassed-failures.title": "可以忽略的错误",
+ "popup.clusterCheck.Upgrade.bypassed-failures.alert": "允许错误被忽略,因为配置堆栈。人们强烈鼓励调查这些失败。",
+ "popup.clusterCheck.Upgrade.warning.title": "警告",
+ "popup.clusterCheck.Upgrade.warning.alert": "警告不需要纠正,但<strong>建议使用</strong>。",
+ "popup.clusterCheck.Upgrade.configsMerge.title": "配置更改",
+ "popup.clusterCheck.Upgrade.configsMerge.alert": "在升级过程中,将应用下列配置更改。",
+ "popup.clusterCheck.Upgrade.configsMerge.configType": "配置类型",
+ "popup.clusterCheck.Upgrade.configsMerge.propertyName": "属性名",
+ "popup.clusterCheck.Upgrade.configsMerge.currentValue": "当前值",
+ "popup.clusterCheck.Upgrade.configsMerge.recommendedValue": "推荐值",
+ "popup.clusterCheck.Upgrade.configsMerge.resultingValue": "结果值",
+ "popup.clusterCheck.Upgrade.configsMerge.deprecated": "属性被弃用",
+ "popup.clusterCheck.Upgrade.configsMerge.willBeRemoved": "将被移除",
+ "popup.clusterCheck.Upgrade.configsRecommend.alert": "我们已经发现需要更新以下属性,但不能自动执行,因为它们已经被自定义。请手动查看这些属性,必要时手动更新属性。",
+ "popup.clusterCheck.Upgrade.configsRecommend.title": "推荐配置更改:手动审查",
+ "popup.clusterCheck.Security.header": "启用安全",
+ "popup.clusterCheck.Security.title": "安全要求未满足",
+ "popup.clusterCheck.Security.alert": "在启用安全之前,必须满足以下要求。",
+ "popup.invalid.KDC.header": "管理会话到期错误",
+ "popup.invalid.KDC.msg": "请输入管理员账户和密码。",
+ "popup.invalid.KDC.admin.principal": "管理员账户",
+ "popup.invalid.KDC.admin.password": "管理员密码",
+ "popup.dependent.configs.header": "相关配置",
+ "popup.dependent.configs.title.recommendation": "根据您的配置更改,Ambari建议以下相关的配置更改。",
+ "popup.dependent.configs.title.values": "Ambari将更新所有选中的配置更改为<b>推荐值</b>。取消任何配置以保留<b>当前值</b>。",
+ "popup.dependent.configs.title.required": "需要进行以下配置更改,并将自动应用。",
+ "popup.dependent.configs.table.recommended": "推荐更改",
+ "popup.dependent.configs.table.required": "要求更改",
+ "popup.dependent.configs.table.saveProperty": "保存属性",
+ "popup.dependent.configs.table.initValue": "初始值",
+ "popup.dependent.configs.table.currentValue": "当前值",
+ "popup.dependent.configs.table.recommendedValue": "推荐值",
+ "popup.dependent.configs.table.newValue": "新值",
+ "popup.dependent.configs.table.undefined": "未定义属性",
+ "popup.dependent.configs.table.removed": "属性移除",
+ "popup.dependent.configs.select.config.group.header": "选择配置组",
+ "popup.dependent.configs.select.config.group.no.groups": "当前服务没有配置组",
+ "popup.dependent.configs.select.config.group": "请选择要保存依赖属性的配置组",
+ "popup.dependent.configs.dependencies.config.singular": "{0}配置改变",
+ "popup.dependent.configs.dependencies.config.plural": "{0}配置改变",
+ "popup.dependent.configs.dependencies.service.singular": "在{0}服务中",
+ "popup.dependent.configs.dependencies.service.plural": "在{0}服务中",
+ "popup.dependent.configs.dependencies.for.groups": "您正在更改默认组,请选择要从其他服务中保存依赖配置的配置组",
+ "popup.jdkValidation.header": "不支持的JDK",
+ "popup.jdkValidation.body": "{0}堆栈需要JDK {1},但Ambari被配置为JDK {2}。这可能导致运行集群时出现错误或问题。",
+ "popup.logTail.header": "文件名",
+ "popup.logTail.openInLogSearch": "在日志搜索中打开",
+ "login.header": "登录",
+ "login.message.title": "登录信息",
+ "login.username": "用户名",
+ "login.loginButton": "登录",
+ 'login.ssoLabel': '使用sso登录',
+ "login.error.bad.credentials": "无法登录。无效的用户名/密码组合。",
+ "login.error.disabled": "无法登录。无效的用户名/密码组合。",
+ "login.error.bad.connection": "无法连接到Ambari服务器。确认Ambari服务器正在运行,您可以从这台机器上访问Ambari服务器。",
+ "titlebar.alerts.noAlerts": "无警报",
+ "titlebar.cluster": "集群",
+ "titlebar.alerts": "警报",
+ "titlebar.options": "操作",
+ "titlebar.service": "服务选项",
+ "titlebar.locale.en": "切换至英文",
+ "titlebar.locale.zh": "切换至中文",
+ "titlebar.user": "用户信息",
+ "graphs.noData.title": "没有数据",
+ "graphs.noData.message": "没有可用数据",
+ "graphs.noData.tooltip.title": "没有可用的数据。Ambari指标服务可能未安装或无法访问",
+ "graphs.noDataAtTime.message": "没有可用的数据的时间段。",
+ "graphs.error.title": "误差",
+ "graphs.error.message": "获取图表的数据存在问题({0}:{1})",
+ "graphs.timeRange.hour": "最近1小时",
+ "graphs.timeRange.twoHours": "最近2小时",
+ "graphs.timeRange.fourHours": "最近4小时",
+ "graphs.timeRange.twelveHours": "最近12小时",
+ "graphs.timeRange.day": "最近24小时",
+ "graphs.timeRange.week": "最近1周",
+ "graphs.timeRange.month": "最近1个月",
+ "graphs.timeRange.year": "最近1年",
+ "graphs.tooltip.title": "点击放大",
+ "users.userName.validationFail": "只推荐小写字母和数字,必须以字母开头。",
+ "host.spacesValidation": "不能包含空白",
+ "services.hdfs.rebalance.title": "HDFS再平衡",
+ "services.ganglia.description": "Ganglia指标收集系统",
+ "services.hdfs.description": "Apache Hadoop分布式文件系统",
+ "services.glusterfs.description": "Apache Hadoop兼容文件系统(必须手动安装)",
+ "services.sqoop.description": "在Apache Hadoop和结构化数据存储(如关系数据库)之间传输大容量数据的工具",
+ "services.pig.description": "用于分析大型数据集的脚本平台",
+ "services.hive.description": "用于大型数据集和表和存储管理服务的自组织查询和分析的数据仓库系统",
+ "services.oozie.description": "Apache Hadoop作业的工作流协调与执行系统",
+ "services.zookeeper.description": "提供高度可靠的分布式协调的集中服务",
+ "services.hbase.description": "非关系分布式数据库与集中式服务的配置管理与同步",
+ "services.hive.databaseComponent": "数据库服务器",
+ "services.mapreduce2.description": "Apache Hadoop NextGen MapReduce(客户端库)",
+ "services.yarn.description": "Apache Hadoop NextGen MapReduce(Yarn)",
+ "services.tez.description": "Tez是下一代Hadoop查询处理框架",
+ "services.falcon.description": "隼镜引擎",
+ "services.storm.description": "Apache Hadoop流处理框架",
+ "services.storm.configs.range-plugin-enable.dialog.title": " 为STORM启用Ranger",
+ "services.storm.configs.range-plugin-enable.dialog.message": "启用Ranger插件对于STORM只在安全集群上有效。",
+ "services.alerts.head": "您有{0}条临界警报通知。",
+ "services.alerts.OK.timePrefixShort": "OK",
+ "services.alerts.WARN.timePrefixShort": "WARN",
+ "services.alerts.CRIT.timePrefixShort": "CRIT",
+ "services.alerts.MAINT.timePrefixShort": "MAINT",
+ "services.alerts.UNKNOWN.timePrefixShort": "UNKNOWN",
+ 'services.alerts.OK.timePrefix': 'OK for {0}',
+ 'services.alerts.WARN.timePrefix': 'WARN for {0}',
+ 'services.alerts.CRIT.timePrefix': 'CRIT for {0}',
+ 'services.alerts.MAINT.timePrefix': 'MAINT for {0}',
+ 'services.alerts.UNKNOWN.timePrefix': 'UNKNOWN for {0}',
+ "services.alerts.lastCheck": "上次检查{0}",
+ "services.alerts.brLastCheck": "<br>上次检查{0}",
+ "services.alerts.occurredOn": "发生在{0},{1}上。",
+ "services.alerts.goToService": "跳转到服务",
+ "services.alerts.goTo": "转到{0}",
+ "services.summary.selectHostForComponent": "选择要添加{0}组件的主机",
+ "services.summary.allHostsAlreadyRunComponent": "已经运行{0}组件的所有主机",
+ "topnav.logo.href": "/#/main/dashboard",
+ "topnav.help.href": "https://cwiki.apache.org/confluence/display/AMBARI/Ambari",
+ "installer.header": "集群安装向导",
+ "installer.navigation.warning.header": "导航栏警告",
+ "installer.noHostsAssigned": "未指定主机",
+ "installer.slaveComponentHosts.selectHosts": "选择此组的主机",
+ "installer.slaveComponentHostsPopup.header": "选择哪些主机应该属于哪个{0}组",
+ "installer.controls.slaveComponentGroups": "组",
+ "installer.controls.serviceConfigPopover.title": "{0}<br><small>{1}</small>",
+ "installer.controls.checkConnection.popover": "此操作将检查来自Ambari服务器主机的{0}主机和端口的可访问性。",
+ "installer.controls.serviceConfigMultipleHosts.other": "1其他",
+ "installer.controls.serviceConfigMultipleHosts.others": "{0}其他",
+ "installer.controls.serviceConfigMasterHosts.header": "{0}主机",
+ "installer.controls.slaveComponentChangeGroupName.error": "具有此名称的组已经存在",
+ "installer.step0.header": "开始",
+ "installer.step0.body.header": "开始",
+ "installer.step0.body": "此向导将引导您通过集群安装过程。首先,从命名新的集群开始。",
+ "installer.step0.clusterName": "命名您的集群",
+ "installer.step0.clusterName.tooltip.title": "集群名称",
+ "installer.step0.clusterName.tooltip.content": "输入唯一的集群名称。",
+ "installer.step0.clusterName.error.required": "需要集群名称",
+ "installer.step0.clusterName.error.tooLong": "集群名称过长",
+ "installer.step0.clusterName.error.whitespace": "集群名称不能包含空格",
+ "installer.step0.clusterName.error.specialChar": "集群名称不能包含特殊字符",
+ "installer.step1.header": "选择版本",
+ "installer.step1.body": "选择集群的软件版本和传递方法。使用公共存储库需要Internet连接。使用本地存储库需要您在网络中可用的存储库中配置软件。",
+ "installer.step1.addVersion.title": "添加版本",
+ "installer.step1.changeVersion.defaultVersion": "默认版本定义",
+ "installer.step1.selectUseRepoOptions.public": "使用公共存储库",
+ "installer.step1.selectUseRepoOptions.public.networkLost.button": "无法使用",
+ "installer.step1.selectUseRepoOptions.public.networkLost": "为什么不选择这个?",
+ "installer.step1.selectUseRepoOptions.public.networkLost.popup.title": "未选择公共存储库选项",
+ "installer.step1.selectUseRepoOptions.public.networkLost.popup.msg": "Ambari无法确认对公共存储库的访问,这意味着您可能没有Internet访问权,并且无法使用公共存储库选项来安装软件。你的选择:",
+ "installer.step1.selectUseRepoOptions.public.networkLost.popup.msg1": "配置您的主机来访问Internet。",
+ "installer.step1.selectUseRepoOptions.public.networkLost.popup.msg2": "如果您使用的是Internet代理,请参阅Ambari关于如何配置Ambari使用Internet代理的文档。",
+ "installer.step1.selectUseRepoOptions.public.networkLost.popup.msg3": "使用本地存储库选项。",
+ "installer.step1.selectUseRepoOptions.public.networkLost.popup.msg4": "如果没有Internet访问并选择此选项,则基础URL验证将失败。",
+ "installer.step1.selectUseRepoOptions.public.select": "选择版本",
+ "installer.step1.selectUseRepoOptions.local": "使用本地存储库",
+ "installer.step1.usePublicRepo.ReposList.empty": "没有其他版本",
+ "installer.step1.usePublicRepo.viewRepos": "查看存储库",
+ "installer.step1.useLocalRepo.uploadFile": "上传版本定义文件",
+ "installer.step1.useLocalRepo.uploadFile.error.title": "上传版本定义文件错误",
+ "installer.step1.useLocalRepo.getSurpottedOs.error.title": "无法获得支持的OS类型",
+ "installer.step1.useLocalRepo.addRepo.button": "添加知识库",
+ "installer.step1.addVersion": "添加版本",
+ "installer.step1.addVersion.stackChanged.popup.body": "堆栈从{0}改为{1}。",
+ "installer.step1.useLocalRepo.enterUrl": "版本定义文件URL",
+ "installer.step1.useLocalRepo.enterUrl.placeholder": "输入URL到版本定义文件",
+ "installer.step1.useLocalRepo.readButton": "阅读版本信息",
+ "installer.step1.useLocalRepo.infoForm.details.title": "细节",
+ "installer.step1.useLocalRepo.infoForm.details.stackName": "栈名",
+ "installer.step1.useLocalRepo.infoForm.details.displayName": "显示名称",
+ "installer.step1.useLocalRepo.infoForm.details.version": "版本",
+ "installer.step1.useLocalRepo.infoForm.details.actualVersion": "实际版本",
+ "installer.step1.useLocalRepo.infoForm.details.releaseNotes": "发行说明",
+ "installer.step1.useLocalRepo.infoForm.content.title": "内容",
+ "installer.step1.useLocalRepo.infoForm.content.empty": "没有显示内容",
+ "installer.step1.useLocalRepo.infoForm.alert.baseUrl": "为正在配置的操作系统提供基础URL。",
+ "installer.step1.useLocalRepo.infoForm.alert.warning": "有些存储库验证失败。请对基础URL进行更改或者如果您确信URL是正确的,则跳过验证。",
+ "installer.step1.advancedRepo.title": "高级储存库选项",
+ "installer.step1.advancedRepo.message": "自定义存储库基础URL,用于下载堆栈软件包。如果您的主机无法访问Internet,则必须创建一个堆栈存储库的本地镜像,该库可以由所有主机访问,并使用这些基础URL。",
+ "installer.step1.advancedRepo.importantMassage": "<b>重要:</b> 当使用本地镜像库时,只需要为正在安装的堆栈操作系统提供基本URL。取消检查所有其他存储库。",
+ "installer.step1.advancedRepo.localRepo.error.modifyUrl": "必须修改本地存储库URL",
+ "installer.step1.advancedRepo.localRepo.error.noUrl": "本地存储库所需的基础URL",
+ "installer.step1.advancedRepo.localRepo.column.baseUrl": "基础网址",
+ "installer.step1.advancedRepo.localRepo.label.os": "操作系统",
+ "installer.step1.advancedRepo.localRepo.label.baseUrl": "库基础URL",
+ "installer.step1.advancedRepo.localRepo.label.stack": "栈",
+ "installer.step1.advancedRepo.localRepo.placeholder": "输入基础URL或删除此操作系统",
+ "installer.step1.advancedRepo.skipValidation.tooltip": "<b>警告:</b> 这只适用于高级用户。如果您想跳过库基础URL的验证,请使用此选项。",
+ "installer.step1.advancedRepo.useRedhatSatellite.tooltip": "禁用分布式存储库,使用RedHat Satellite/Spacewalk通道代替",
+ "installer.step1.advancedRepo.useRedhatSatellite.disabled.tooltip": "使用公共存储库时,RedHat Satellite/Spacewalk不可用",
+ "installer.step1.advancedRepo.skipValidation.message": "跳过存储库基础URL验证(高级)",
+ "installer.step1.advancedRepo.useRedhatSatellite.message": "使用RedHat Satellite/Spacewalk",
+ "installer.step1.advancedRepo.useRedhatSatellite.warning": "通过选择“使用RedHat Satellite/Spacewalk”软件包,您负责在Satellite/Spacewalk中配置存储库通道,并确认所选的<b>堆栈版本</b>的存储库在集群中的主机上可用。更多信息请参阅Ambari文档。",
+ "installer.step1.addOs.disabled.tooltip": "已添加所有操作系统",
+ "installer.step1.attentionNeeded": "<b>注意:</b> 在进行之前,需要至少一个操作系统的存储库基础URL。请确保它们的协议格式正确。",
+ "installer.step1.invalidURLAttention": "<b>注意:</b> 请确保所有库URL在继续之前有效。",
+ "installer.step1.checkAtLeastOneAttention": "<b>注意:</b> 请检查至少一个存储库。",
+ "installer.step1.retryRepoUrls": "点击 <b>这里</b> 进行重试。",
+ "installer.step2.header": "安装选项",
+ "installer.step2.body": "输入要包含在集群中的主机列表,并提供SSH密钥。",
+ "installer.step2.targetHosts": "目标主机",
+ "installer.step2.targetHosts.info": "使用完全限定域名(FQDN)输入主机列表,每行一个",
+ "installer.step2.hostPattern.tooltip.title": "模式表达式",
+ "installer.step2.hostPattern.tooltip.content": "可以使用模式表达式指定多个目标主机。例如,要通过主机10的域指定主机01的域,请在目标主机文本框中输入主机[01-10]的域。",
+ "installer.step2.hostName.error.required": "必须指定至少一个主机名。",
+ "installer.step2.hostName.error.already_installed": "所有这些主机都已经成为集群的一部分。",
+ "installer.step2.hostName.error.notRequired": "如果不使用SSH来自动配置主机,主机名称将被忽略。",
+ "installer.step2.hostName.error.invalid": "无效主机名",
+ "installer.step2.hostName.pattern.header": "主机名模式表达式",
+ "installer.step2.sshKey": "主机注册信息",
+ "installer.step2.sshKey.error.required": "需要SSH私钥",
+ "installer.step2.passphrase.error.match": "口令不匹配",
+ "installer.step2.manualInstall.label": "不要使用SSH自动配置主机",
+ "installer.step2.manualInstall.info": "通过不使用SSH连接到目标主机,必须手动安装和启动每个主机上的Ambari代理,以便向导执行必要的配置和软件安装。",
+ "installer.step2.advancedOption": "高级选项",
+ "installer.step2.repoConf": "软件仓库配置文件路径",
+ "installer.step2.advancedOptions.header": "高级选项",
+ "installer.step2.localRepo.label_use": "使用A",
+ "installer.step2.localRepo.label_instead": "而不是从网络上下载软件包",
+ "installer.step2.localRepo.error.required": "需要本地存储库文件路径",
+ "installer.step2.localRepo.tooltip.title": "本地软件仓库",
+ "installer.step2.localRepo.tooltip.content": "集群安装需要访问Internet以从远程存储库获取软件。在某些情况下,没有足够的带宽,并且希望阻止软件包从远程存储库中反复下载。其他时候,从集群中的主机无法访问Internet。在这些情况下,您必须设置一个版本,您的机器可以在本地访问存储库,这被称为<b>本地软件存储库</b>。",
+ "installer.step2.javaHome.label": "64位JDK的路径",
+ "installer.step2.javaHome.tooltip.title": "JAVA_HOME",
+ "installer.step2.javaHome.tooltip.content": "对于64位JDK的路径,Ambari默认使用的是/usr/jdk/jdk1.6.0_31。你可以将此重写到包含JDK的特定路径。注意:路径必须在你的集群中的<b>所有</b>主机上有效。",
+ "installer.step2.javaHome.tooltip.placeholder": "/usr/jdk/jdk1.6.0_31",
+ "installer.step2.automaticInstall.tooltip.title": "自动配准",
+ "installer.step2.automaticInstall.tooltip.content": "在集群安装之前,Ambari将自动安装和注册Ambari代理在每个主机上。",
+ "installer.step2.useSsh.provide": "提供你的",
+ "installer.step2.useSsh.provide_id_rsa": "自动寄存主机",
+ "installer.step2.useSsh.tooltip.title": "SSH私钥",
+ "installer.step2.useSsh.tooltip.content": "使用<b> ssh私钥文件</b>连接到集群中的目标主机以安装Ambari代理。",
+ "installer.step2.install.perform": "表现",
+ "installer.step2.install.perform_on_hosts": "主机上",
+ "installer.step2.install.without_ssh": "和不要使用SSH",
+ "installer.step2.manualInstall.tooltip.title": "人工登记",
+ "installer.step2.manualInstall.tooltip.content": "在每个主机上手动注册Ambari代理消除了SSH的需要,并且应该在继续集群安装之前执行。",
+ "installer.step2.manualInstall.tooltip.content_no_ssh": "在继续集群安装之前,应在每个主机上手动注册Ambari代理。",
+ "installer.step2.manualInstall.popup.header": "在进行之前",
+ "installer.step2.manualInstall.popup.body": "在继续进行之前,必须在每个要管理的主机上安装Ambari代理。",
+ "installer.step2.warning.popup.body": "<p>下列主机名不是有效的FQDNS:</p><p> {0} </p><p>这可能会导致安装过程中出现问题。你想继续吗?</p>",
+ "installer.step2.orUse": "或使用",
+ "installer.step2.registerAndConfirm": "登记确认",
+ "installer.step2.evaluateStep.installedHosts": "这些主机已安装在集群上,将被忽略:",
+ "installer.step2.evaluateStep.continueConfirm": "您想继续吗?",
+ "installer.step2.evaluateStep.hostRegInProgress": "主机注册目前正在进行中。请稍后再试。",
+ "installer.step2.sshUser": "SSH用户帐户",
+ "installer.step2.sshUser.toolTip": "用于通过SSH在目标主机上安装Ambari代理的用户帐户。该用户必须在所有目标主机上设置无密码SSH和SUDO访问。",
+ "installer.step2.sshUser.placeholder": "输入用户名",
+ "installer.step2.sshUser.required": "需要用户名",
+ "installer.step2.sshPort": "SSH端口号",
+ "installer.step2.sshPort.toolTip": "SSH端口号",
+ "installer.step2.sshPort.required": "需要SSH端口号。",
+ "installer.step2.agentUser": "Ambari代理用户帐户",
+ "installer.step2.agentUser.toolTip": "用于在目标主机上运行Ambari代理守护进程的用户帐户。此用户必须在所有目标主机上设置无密码的SUDO访问。",
+ "installer.step2.bootStrap.error": "在主机上建立Ambari代理时遇到错误。",
+ "installer.step2.bootStrap.inProgress": "在主机上安装Ambari代理时,请稍候。这取决于主机的数量,需要几分钟的时间。",
+ "installer.step2.bootStrap.header": "建立Ambari代理",
+ "installer.step3.header": "确认主机",
+ "installer.step3.body": "注册你的主机。<br>请确认主机列表并删除不希望包含在集群中的任何主机。",
+ "installer.step3.hostLog.popup.header": "{0}的注册日志",
+ "installer.step3.hosts.remove.popup.header": "移除主机",
+ "installer.step3.hosts.remove.popup.body": "确实要删除选定的主机吗?",
+ "installer.step3.hostInformation.popup.header": "检索主机信息时出错",
+ "installer.step3.hostInformation.popup.body": "所有自举主机注册但无法检索CPU和内存相关信息。",
+ "installer.step3.hostOsTypeCheck.popup.body": "主机已成功注册,但主机操作系统类型与“选择堆栈”步骤中高级存储库选项中的选定组不匹配。您可以返回“选择堆栈”步骤或删除此主机。主机类型为{0},但在步骤1中选择组{1}。",
+ "installer.step3.hostWarningsPopup.report": "显示报告",
+ "installer.step3.hostWarningsPopup.report.header": "<p style=\"font-family: monospace\">######################################<br># 主机检查报告<br>#<br># 生成: ",
+ "installer.step3.hostWarningsPopup.report.hosts": "<br>######################################<br><br>######################################<br># 主机<br>#<br># 一个空格分隔的有问题的主机列表<br>这样管理员就可以轻松地将主机名复制到脚本、电子邮件等。<br>######################################<br>主机<br>",
+ "installer.step3.hostWarningsPopup.report.jdk": "<br><br>######################################<br># JDK检查 <br>#<br># JDK问题的换行分隔列表。<br>######################################<br>JDK问题<br>",
+ "installer.step3.hostWarningsPopup.report.disk": "<br><br>######################################<br># 磁盘 <br>#<br># 磁盘问题的换行分隔列表。<br>######################################<br>磁盘问题<br>",
+ "installer.step3.hostWarningsPopup.report.repositories": "<br><br>######################################<br># 仓库 <br>#<br># 仓库问题的换行分隔列表。<br>######################################<br>仓库问题<br>",
+ "installer.step3.hostWarningsPopup.report.hostNameResolution": "<br><br>######################################<br># 主机名解析<br>#<br># 主机名解析问题的换行分隔列表。<br>######################################<br>主机名解析问题<br>",
+ "installer.step3.hostWarningsPopup.report.thp": "<br><br>######################################<br># 透明大页面(THP) <br>#<br># 一个空格分隔的主机名列表,其中启用了透明的巨型页面。<br>######################################<br>THP问题主机<br>",
+ "installer.step3.hostWarningsPopup.report.firewall": "<br><br>######################################<br># 防火墙<br>#<br># 防火墙问题的换行分隔列表。<br>######################################<br>防火墙<br>",
+ "installer.step3.hostWarningsPopup.report.fileFolders": "<br><br>######################################<br># 文件和文件夹<br>#<br># 一个空格分隔的文件和文件夹列表,本不应该存在。<br># 这样,管理员就可以很容易地将路径复制到脚本、电子邮件等。<br># 例如: rm -r /etc/hadoop /etc/hbase<br>######################################<br>文件和文件夹<br>",
+ "installer.step3.hostWarningsPopup.report.reverseLookup": "<br><br>######################################<br># 反向查询<br># <br># 在反向DNS查找中未找到主机名。这可能导致错误的行为。<br># 请检查DNS安装并修复问题。<br>######################################<br>反向查询<br>",
+ "installer.step3.hostWarningsPopup.report.process": "<br><br>######################################<br># 进程<br>#<br># 一个逗号分隔的本不该运行的进程元组列表<br>这样管理员就可以很容易地将路径复制到脚本、电子邮件等。<br>######################################<br>进程<br>",
+ "installer.step3.hostWarningsPopup.report.package": "<br><br>######################################<br># 包<br>#<br># 一个空格分隔的应卸载的软件包列表<br># 这样管理员可以很容易地将路径复制到脚本、电子邮件等。<br>例如:yum删除hadoop-hdfs yarn<br>######################################<br>包<br>",
+ "installer.step3.hostWarningsPopup.report.service": "<br><br>######################################<br># 服务<br>#<br># 一个空格分隔的运行的服务列表<br># 这样管理员可以很容易地将路径复制到脚本、电子邮件等。<br># 例如: 服务启动 ntpd httpd<br>######################################<br>服务<br>",
+ "installer.step3.hostWarningsPopup.report.user": "<br><br>######################################<br># 用户<br>#<br># 一个空格分隔的不应存在的用户列表<br># 这样管理员可以很容易地将路径复制到脚本、电子邮件等。<br># 例如: 用户删除 hdfs<br>######################################<br>用户<br>",
+ "installer.step3.hostWarningsPopup.report.folder": "\\ /folder",
+ "installer.step3.hostWarningsPopup.checks": "主机检查发现",
+ "installer.step3.hostWarningsPopup.notice": "在手动解析问题之后, 点击<b>返回检查</b><br>以手动解决<b>每台主机</b>运行HostCleanup脚本(Python 2.6或更高):<br><div class=\"code-snippet\">python /usr/lib/python2.6/site-packages/ambari_agent/HostCleanup.py --silent --skip=users</div><div class=\"alert alert-warn\"><b>备注</b>: 防火墙清理和透明大页面问题不受HostCleanup脚本的支持。</div><div class=\"alert alert-warn\"><b>备注</b>: 在交互模式下清理,删除 <b>--silent</b>选项。若要清除所有资源, 包含<i>用户</i>, 删除<b>--skip=users</b>选项. 使用<b>--help</b>一个可用选项列表</div>",
+ "installer.step3.hostWarningsPopup.summary": "{1}上的{0}",
+ "installer.step3.hostWarningsPopup.jdk": "JDK问题",
+ "installer.step3.hostWarningsPopup.jdk.name": "在<i>{0}</i>上找不到JDK",
+ "installer.step3.hostWarningsPopup.jdk.context": "{0}",
+ "installer.step3.hostWarningsPopup.jdk.message": "以下注册主机存在与JDK相关的问题",
+ "installer.step3.hostWarningsPopup.repositories": "仓库问题",
+ "installer.step3.hostWarningsPopup.repositories.name": "操作系统的存储库不可用",
+ "installer.step3.hostWarningsPopup.repositories.context": "主机({0})是{1} 操作系统类型,但在“选择堆栈”步骤中选择的存储库是{2}。选定的存储库不支持此主机操作系统类型。",
+ "installer.step3.hostWarningsPopup.repositories.message": "下面的注册主机与“选择堆栈”步骤中所选的可用存储库具有不同的操作系统类型。您可以返回到“选择堆栈”步骤来选择另一个OS存储库<b>或</b>删除主机。",
+ "installer.step3.hostWarningsPopup.disk": "磁盘问题",
+ "installer.step3.hostWarningsPopup.disk.name": "磁盘空间不足",
+ "installer.step3.hostWarningsPopup.disk.context1": "主机上没有足够的磁盘空间({0})。",
+ "installer.step3.hostWarningsPopup.disk.context2": "{1}安装需要最小值{0}。",
+ "installer.step3.hostWarningsPopup.disk.message": "下列注册主机有与磁盘空间相关的问题",
+ "installer.step3.hostWarningsPopup.thp": "透明大页面问题",
+ "installer.step3.hostWarningsPopup.thp.name": "透明大页面",
+ "installer.step3.hostWarningsPopup.thp.context": "{0}",
+ "installer.step3.hostWarningsPopup.thp.message": "以下主机具有启用的透明大页面(THP)。应禁用THP以避免潜在的Hadoop性能问题。",
+ "installer.step3.hostWarningsPopup.firewall": "防火墙问题",
+ "installer.step3.hostWarningsPopup.firewall.message": "防火墙在下列主机上运行。请配置防火墙以允许在<a target=\"_blank\" href=\"http://ambari.apache.org/current/installing-hadoop-using-ambari/content/\">Ambari文档</a>中<i>配置端口</i>部分记录的端口上的通信 ",
+ "installer.step3.hostWarningsPopup.process": "进程问题",
+ "installer.step3.hostWarningsPopup.processes.message": "下列进程不应运行",
+ "installer.step3.hostWarningsPopup.fileAndFolder": "文件和文件夹问题",
+ "installer.step3.hostWarningsPopup.fileFolders.message": "下列文件和文件夹不应该存在",
+ "installer.step3.hostWarningsPopup.package": "包问题",
+ "installer.step3.hostWarningsPopup.packages.message": "应卸载下列软件包",
+ "installer.step3.hostWarningsPopup.user": "用户问题",
+ "installer.step3.hostWarningsPopup.users.message": "应该删除下列用户",
+ "installer.step3.hostWarningsPopup.service": "服务问题",
+ "installer.step3.hostWarningsPopup.services.message": "以下服务应上行",
+ "installer.step3.hostWarningsPopup.misc": "误码率问题",
+ "installer.step3.hostWarningsPopup.misc.message": "下面的掩码应该改变",
+ "installer.step3.hostWarningsPopup.misc.umask": "掩码",
+ "installer.step3.hostWarningsPopup.alternatives": "替代问题",
+ "installer.step3.hostWarningsPopup.alternatives.umask": "替代方案",
+ "installer.step3.hostWarningsPopup.alternatives.message": "应删除下列替代方案",
+ "installer.step3.hostWarningsPopup.alternatives.noIssues": "在替代方案应该取消的情况下,没有其他问题。",
+ "installer.step3.hostWarningsPopup.alternatives.empty": "替代问题",
+ "installer.step3.hostWarningsPopup.issue": "问题",
+ "installer.step3.hostWarningsPopup.issues": "问题",
+ "installer.step3.hostWarningsPopup.emptyMessage": "无",
+ "installer.step3.hostWarningsPopup.empty.filesAndFolders": "不需要的文件和文件夹",
+ "installer.step3.hostWarningsPopup.empty.processes": "不需要的过程",
+ "installer.step3.hostWarningsPopup.empty.packages": "多余的包",
+ "installer.step3.hostWarningsPopup.empty.users": "不需要的用户",
+ "installer.step3.hostWarningsPopup.empty.services": "不需要的服务",
+ "installer.step3.hostWarningsPopup.empty.misc": "问题",
+ "installer.step3.hostWarningsPopup.empty.firewall": "防火墙运行",
+ "installer.step3.hostWarningsPopup.empty.repositories": "与注册主机匹配的存储系统OS类型",
+ "installer.step3.hostWarningsPopup.empty.disk": "磁盘空间问题",
+ "installer.step3.hostWarningsPopup.empty.jdk": "JDK问题",
+ "installer.step3.hostWarningsPopup.empty.thp": "THP问题",
+ "installer.step3.hostWarningsPopup.reverseLookup.name": "反向查找验证失败",
+ "installer.step3.hostWarningsPopup.reverseLookup": "反向查找问题",
+ "installer.step3.hostWarningsPopup.reverseLookup.message": "在反向DNS查找中未找到主机名。这可能导致错误的行为。请检查DNS安装并修复问题。",
+ "installer.step3.hostWarningsPopup.reverseLookup.empty": "反向DNS查找问题。",
+ "installer.step3.hostWarningsPopup.resolution.validation.name": "主机名称解析问题",
+ "installer.step3.hostWarningsPopup.resolution.validation.error": "主机名解析",
+ "installer.step3.hostWarningsPopup.resolution.validation": "主机名解析验证",
+ "installer.step3.hostWarningsPopup.resolution.validation.message": "并非所有主机都可以解析其他主机的主机名。在继续之前,请确保主机解析在所有主机上正常工作。",
+ "installer.step3.hostWarningsPopup.resolution.validation.empty": "主机名称解析问题",
+ "installer.step3.hostWarningsPopup.resolution.validation.context": "{0}无法解析:{1}。",
+ "installer.step3.hostWarningsPopup.action.exists": "存在于",
+ "installer.step3.hostWarningsPopup.action.notRunning": "不运行",
+ "installer.step3.hostWarningsPopup.action.installed": "安装在",
+ "installer.step3.hostWarningsPopup.action.running": "运行在",
+ "installer.step3.hostWarningsPopup.action.invalid": "无效的",
+ "installer.step3.hostWarningsPopup.action.failed": "失败",
+ "installer.step3.hostWarningsPopup.action.enabled": "启用",
+ "installer.step3.hostWarningsPopup.host": "主机",
+ "installer.step3.hostWarningsPopup.hosts": "主机",
+ "installer.step3.hostWarningsPopup.moreHosts": "{0} 更多主机...<br>点击查看更多主机",
+ "installer.step3.hostWarningsPopup.allHosts": "主机列表",
+ "installer.step3.hostWarningsPopup.rerunChecks": "重新检查",
+ "installer.step3.hostWarningsPopup.hostHasWarnings": "警告:主机检查失败了一些主机。强烈建议您先解决这些问题,然后防止集群安装潜在的主要问题。确实要忽略这些警告并继续进行吗?",
+ "installer.step3.warningsWindow.allHosts": "所有主机的警告",
+ "installer.step3.warningsWindow.warningsOn": "警告",
+ "installer.step3.warningsWindow.directoriesAndFiles": "目录和文件",
+ "installer.step3.warningsWindow.noWarnings": "没有警告",
+ "installer.step3.hosts.noHosts": "没有主机显示",
+ "installer.step3.warnings.popup.header": "主机检查",
+ "installer.step3.warnings.description": "在执行对上述主机的检查时遇到了一些警告。",
+ "installer.step3.warnings.linkText": "点击这里查看警告",
+ "installer.step3.noWarnings.linkText": "点击这里查看检查结果",
+ "installer.step3.warnings.noWarnings": "所有主机检查通过{0}注册主机",
+ "installer.step3.warnings.fails": "在对上面注册的{0}主机进行检查时遇到了一些警告",
+ "installer.step3.warnings.someWarnings": "所有主机检查通过{0}注册主机。注意:主机注册被跳过了{1}主机无法注册。",
+ "installer.step3.warnings.allFailed": "在未注册的{0}主机上跳过主机检查。",
+ "installer.step3.warnings.updateChecks.success": "主机检查成功更新",
+ "installer.step3.warnings.updateChecks.failed": "主机检查更新失败",
+ "installer.step3.warnings.missingHosts": "没有注册主机",
+ "installer.step3.warning.registeredHosts": "{0}其他注册主机",
+ "installer.step3.warning.loading": "正在检查主机是否存在潜在问题,请稍候…",
+ "installer.step3.registeredHostsPopup": "这些是已注册到服务器的主机,但不会出现在您正在添加的主机列表中。",
+ "installer.step3.removeSelected": "删除选定",
+ "installer.step3.retryFailed": "重试失败",
+ "installer.step3.hosts.status.registering": "注册",
+ "installer.step3.hosts.status.installing": "安装",
+ "installer.step3.hosts.bootLog.failed": "与服务器注册失败。",
+ "installer.step3.hosts.bootLog.registering": "注册到服务器…",
+ "installer.step3.hostLogPopup.highlight": "单击以突出显示",
+ "installer.step3.hostLogPopup.copy": "按CTRL+C",
+ "installer.step3.hostsTable.selectAll": "选择所有主机",
+ "installer.step3.selectedHosts.popup.header": "选定主机",
+ "installer.step4.header": "选择服务",
+ "installer.step4.body": "选择要在集群上安装哪些服务。",
+ "installer.step4.fsCheck.popup.header": "文件系统要求",
+ "installer.step4.fsCheck.popup.body": "您没有选择文件系统,但需要一个文件系统。我们将自动添加{0}。这样行吗?",
+ "installer.step4.multipleDFS.popup.header": "选择多个文件系统",
+ "installer.step4.multipleDFS.popup.body": "您选择了一个以上的文件系统。我们只会自动选择{0}。这样行吗?",
+ "installer.step4.serviceCheck.popup.header": "{0}需要",
+ "installer.step4.serviceCheck.popup.body": "您没有选择{0},但它是您选择的其他服务所需要的。我们将自动添加{0}。这样行吗?",
+ "installer.step4.limitedFunctionality.popup.header": "有限功能警告",
+ "installer.step4.ambariMetricsCheck.popup.body": "Ambari指标收集集群中的指标,并使它们对Ambari可用。如果不安装Ambari指标服务,指标将无法从Ambari访问。您确定要在没有Ambari指标的情况下继续吗?",
+ "installer.step4.ambariInfraCheck.popup.body": "由于Ambari Infra没有被选中,你必须提供自己的Solr使 数据治理 工作。您确定要继续吗?",
+ "installer.step4.ambariLogsearchCheck.popup.body": "由于没有选择Ambari Infra,您必须提供自己的Solr以使日志搜索工作。您确定要继续吗?",
+ "installer.step4.smartSenseCheck.popup.body": "SmartSense安全地收集集群诊断,以便向您发送建议并自动分析故障排除支持案例。如果您选择不安装SmartSense,您将不会收到任何建议,并且您需要手动收集配置和日志来支持支持案例的故障排除。您确定要在没有SmartSense的情况下继续吗?",
+ "installer.step4.rangerRequirements.popup.header": "Ranger需求",
+ "installer.step4.rangerRequirements.popup.body.requirements": "<ol><li>你必须有 <strong>MySQL/Oracle/Postgres/MSSQL/SQL 任何服务器</strong> 使用Ranger运行的数据库实例。</li><li>在这个向导的分配主步骤中,会提示您指定Ranger管理员的主机。在那个主机上,你<strong>必须有DB客户端安装</strong>,以便Ranger访问数据库。(注意:这只适用于Ranger-0.4.0)</li><li>确保DB管理用户在DB服务器中从任何主机启用。</li> <li>在Ambari服务器主机上执行以下命令。根据对应的JDBC驱动程序的位置:<pre>ambari-server setup --jdbc-db={database-type} --jdbc-driver={/jdbc/driver/path}</pre>,使用<strong>mysql|oracle|postgres|mssql|sqlanywhere</strong>和 [...]
+ "installer.step4.rangerRequirements.popup.body.confirmation": "我已满足以上所有要求。",
+ "installer.step4.sparkWarning.popup.body": "Spark需要HDP 2.2.2或更高版本。试图将Spark安装到HDP 2.2.0集群将失败。确认您正在使用HDP 2.2.2或更高版本的包。您确定要继续吗?",
+ "installer.step5.header": "指派 Masters",
+ "installer.step5.reassign.header": "选择目标主机",
+ "installer.step5.attention": "主机不运行master服务",
+ "installer.step5.body": "将主组件分配给要运行它们的主机。",
+ "installer.step5.body.coHostedComponents": "<i class=\"icon-asterisks\">✵</i> {0} 将会被托管在同一主机上",
+ "installer.step5.hostInfo": "%@ (%@, %@ cores)",
+ "installer.step5.hiveGroup": "HiveServer2, WebHCat Server, MySQL Server",
+ "installer.step5.validationIssuesAttention.header": "验证问题",
+ "installer.step5.validationIssuesAttention": "主组件分配有需要注意的问题。",
+ "installer.step5.error.host.invalid": "您选择的主机可以(1)有一个无效的主机名;(2)与另一个选择冲突;(3)处于维护模式。",
+ "installer.step6.header": "分配Slaves和Clients",
+ "installer.step6.body": "将slave和client组件分配给要运行它们的主机.<br/>被分配主组件的主机用<i class=icon-asterisks>✵</i>展示",
+ "installer.step6.body.clientText": " <br/>"Client" 将被安装 ",
+ "installer.step6.error.mustSelectOne": "必须为每个组件分配至少一个主机。",
+ "installer.step6.error.mustSelectOneForHost": "必须至少分配一个slave/client组件。",
+ "installer.step6.error.mustSelectComponents": "至少必须赋值:{0}。",
+ "installer.step6.wizardStep6Host.title": "托管在{0}上的主组件",
+ "installer.step6.addHostWizard.body": "分配HBase主机和ZooKeeper服务器。",
+ "installer.step6.error.mustSelectOneForSlaveHost": "必须将至少一个slave/client组件分配给没有主组件的每个主机。",
+ "installer.step6.validationSlavesAndClients.hasIssues": "你的slave/client分配都有问题。",
+ "installer.step6.validationSlavesAndClients.click": "点击",
+ "installer.step6.validationSlavesAndClients.forDetails": "详情。",
+ "installer.step6.validationSlavesAndClients.popup.header": "分配slave/client问题",
+ "installer.step6.validationSlavesAndClients.popup.body": "slave和client组件的分配有以下问题",
+ "installer.step6.validationIssuesAttention.header": "验证问题",
+ "installer.step6.validationIssuesAttention": "slave和client组件分配有需要注意的问题。",
+ "installer.step7.header": "定制服务",
+ "installer.step7.body": "我们已经为您选择的服务提出了推荐的配置。按照你认为合适的方式定制它们。",
+ "installer.step7.attentionNeeded": "<b>注意:</b> 某些必填的配置信息需要填写,才能继续后面的操作。",
+ "installer.step7.noIssues": "已经完成了所有配置。",
+ "installer.step7.showPropertiesWithIssues": "显示有问题的配置",
+ "installer.step7.showingPropertiesWithIssues": "显示有问题的配置",
+ "installer.step7.showAllProperties": "显示所有配置",
+ "installer.step7.config.addProperty": "添加属性",
+ "installer.step7.ConfigErrMsg.header": "自定义配置错误:",
+ "installer.step7.ConfigErrMsg.message": "自定义配置出错。该框中输入的某些属性已在此页上公开。",
+ "installer.step7.popup.currentValue": "当前值",
+ "installer.step7.popup.adjustedValue": "调整值",
+ "installer.step7.popup.rddWarning.header": "警告:{0}上的磁盘空间低",
+ "installer.step7.popup.rddWarning.body": "对于Ganglia服务器日志,建议至少16GB,但是{1}上的磁盘安装{0}没有足够的空间({2}空余)。转到MISC选项卡,并用大于16GB的磁盘空间更改Ganglia rrdcached 基础目录。如果你不改变它,{1}很可能会耗尽磁盘空间而变得不可操作。",
+ "installer.step7.popup.mySQLWarning.header": "错误:Hive冲突的新MySQL数据库",
+ "installer.step7.popup.mySQLWarning.body": "你不能为Hive在相同的主机上安装一个 \"New MySQL Database\" 作为Ambari服务器MySQL服务器. 请返回 <b>分配 Masters</b> 重新给另一台主机分配Hive <b>或者</b> 选择 \"Existing MySQL Database\" 选项指定Ambari服务器MySQL服务器实例的数据库凭据和URL。如果你选择\"Existing MySQL Database\" 选项, 则需要执行Hive必备步骤来准备Hive的MySQL服务器实例。",
+ "installer.step7.popup.mySQLWarning.button.gotostep5": "转到指定主机",
+ "installer.step7.popup.mySQLWarning.button.dismiss": "关闭",
+ "installer.step7.popup.mySQLWarning.confirmation.header": "确认:转到指定主机",
+ "installer.step7.popup.mySQLWarning.confirmation.body": "您将返回到“分配Master”一步,将失去您当前的自定义数据。你确定吗?",
+ "installer.step7.popup.database.connection.header": "数据库连接警告",
+ "installer.step7.popup.database.connection.body": "您尚未运行或通过数据库连接测试:{0}。强烈建议您在继续进行连接测试之前,防止部署过程中出现故障。",
+ "installer.step7.popup.validation.failed.header": "一致性检查失败",
+ "installer.step7.popup.validation.failed.body": "有些服务没有正确配置。必须根据推荐的值更改突出显示的配置。",
+ "installer.step7.popup.validation.request.failed.body": "由于未知错误,配置更改无法验证一致性。您的更改尚未保存。您想继续并保存更改吗?",
+ "installer.step7.popup.validation.warning.header": "配置",
+ "installer.step7.popup.validation.issues.body": "高度推荐以下配置更改,但可以跳过。",
+ "installer.step7.popup.validation.criticalIssues.body": "在进行下列事项之前,必须纠正下列关键问题:",
+ "installer.step7.popup.oozie.derby.warning": "Derby不推荐用于生产使用。使用Derby,Oozie Server HA和并发连接支持将不可用。",
+ "installer.step7.oozie.database.new": "新Derby数据库",
+ "installer.step7.hive.database.new.mysql": "新MySQL数据库",
+ "installer.step7.hive.database.new.postgres": "新PostgreSQL数据库",
+ "installer.step7.addWizard.notEditable": "无法在“添加服务向导”上编辑此配置",
+ "installer.step7.misc.notification.configure": "配置电子邮件通知",
+ "installer.step7.misc.notification.configure.later": "稍后配置电子邮件通知",
+ "installer.step7.misc.notification.use_tls": "使用TLS",
+ "installer.step7.misc.notification.use_ssl": "使用SSL",
+ "installer.step7.preInstallChecks": "预安装检查",
+ "installer.step7.preInstallChecks.notRunChecksWarnPopup.header": "跳过预安装检查",
+ "installer.step7.preInstallChecks.notRunChecksWarnPopup.body": "不建议跳过预安装检查。",
+ "installer.step7.preInstallChecks.notRunChecksWarnPopup.primary": "忽略并继续",
+ "installer.step7.preInstallChecks.notRunChecksWarnPopup.secondary": "运行预安装检查",
+ "installer.step7.preInstallChecks.checksPopup.header": "预安装检查",
+ "installer.step7.assign.master.body": "分配 <strong>{0}</strong> 到 {1} 你想运行在 {2} 上",
+ "installer.step7.assign.master.dependent.component.body": "如果不存在,{0}也将被安装在选定的主机上。",
+ "installer.step7.missing.service.header": "丢失服务",
+ "installer.step7.missing.service.body": "应该将{0}服务添加到集群中,以{1}。",
+ "assign.master.popup.header": "选择{0}主机",
+ "assign.master.popup.cancel.body": "不选择{0}主机将禁用交互式查询。",
+ "installer.step8.header": "回顾",
+ "installer.step8.body": "安装前请检查配置",
+ "installer.step8.kerberors.warning": "<strong>因为Kerberos已被手动安装在集群中,所以当完成此操作时,必须创建/分发主体和密钥表。</strong>",
+ "installer.step8.deployPopup.message": "准备部署:{1}任务的{0}完成。",
+ "installer.step8.hosts": "主机",
+ "installer.step8.host": "主机",
+ "installer.step8.other": "和{0}其他主机",
+ "installer.step8.repoInfo.osType.redhat6": "RHEL 6/CENTOS 6/Oracle Linux 6",
+ "installer.step8.repoInfo.osType.redhat5": "RHEL 5/CENTOS 5/Oracle Linux 5",
+ "installer.step8.repoInfo.osType.sles11": "SLE 11/SUS 11",
+ "installer.step8.repoInfo.displayName": "仓库",
+ "installer.step8.services.restart.required": "{0} {1}将在安装过程中重新启动。",
+ "installer.step9.header": "安装、启动和测试",
+ "installer.step9.body": "正在安装和启动选定的服务,请稍候。",
+ "installer.step9.status.success": "成功安装并启动了服务。",
+ "installer.step9.status.skipStartSuccess": "成功安装了服务。",
+ "installer.step9.status.warning": "安装并启动服务,并发出警告。",
+ "installer.step9.status.failed": "安装/启动服务失败。",
+ "installer.step9.status.start.services.failed": "启动所有服务API调用失败。",
+ "installer.step9.status.install.components.failed": "一些服务组件仍然不知道已成功安装。请重试",
+ "installer.step9.status.hosts.heartbeat_lost": "Ambari代理没有运行在{0}主机上。",
+ "installer.step9.host.heartbeat_lost": "主机丢失心跳",
+ "installer.step9.host.heartbeat_lost_popup": "Ambari代理过程对主机没有心跳",
+ "installer.step9.host.heartbeat_lost.header": "心跳丢失主机",
+ "installer.step9.host.status.success": "成功",
+ "installer.step9.host.status.startAborted": "安装完成。开始中止",
+ "installer.step9.host.status.warning": "遇到警告",
+ "installer.step9.host.status.failed": "遇到故障",
+ "installer.step9.host.status.nothingToInstall": "安装完成(等待启动)",
+ "installer.step9.hosts.status.label.inProgress": "在进行中",
+ "installer.step9.hosts.status.label.warning": "警告",
+ "installer.step9.hosts.filteredHostsInfo": "{0} {1}主机显示",
+ "installer.step9.hostLog.popup.header": "任务执行在",
+ "installer.step9.hostLog.popup.categories.all": "所有",
+ "installer.step9.hostLog.popup.categories.pending": "队列/等待",
+ "installer.step9.hostLog.popup.categories.in_progress": "进行中",
+ "installer.step9.hostLog.popup.categories.failed": "失败",
+ "installer.step9.hostLog.popup.categories.completed": "成功",
+ "installer.step9.hostLog.popup.categories.aborted": "中止",
+ "installer.step9.hostLog.popup.categories.timedout": "超时",
+ "installer.step9.hostLog.popup.noTasksToShow": "没有任务显示",
+ "installer.step9.host.status.noTasks": "Ambari服务器没有调度主机上的任何任务。主机上的服务组件已经处于安装状态<b>或</b>主机可达性的预检查失败。",
+ "installer.step9.overallProgress": "{0} %总体",
+ "installer.step9.serviceStatus.install.pending": "准备安装",
+ "installer.step9.serviceStatus.install.queued": "等待安装",
+ "installer.step9.serviceStatus.install.inProgress": "安装",
+ "installer.step9.serviceStatus.install.completed": "成功安装",
+ "installer.step9.serviceStatus.install.failed": "安装失败",
+ "installer.step9.serviceStatus.uninstall.pending": "准备卸载",
+ "installer.step9.serviceStatus.uninstall.queued": "等待卸载",
+ "installer.step9.serviceStatus.uninstall.inProgress": "卸载",
+ "installer.step9.serviceStatus.uninstall.completed": "成功卸载",
+ "installer.step9.serviceStatus.uninstall.failed": "卸载失败",
+ "installer.step9.serviceStatus.start.pending": "准备开始",
+ "installer.step9.serviceStatus.start.queued": "等待开始",
+ "installer.step9.serviceStatus.start.inProgress": "启动",
+ "installer.step9.serviceStatus.start.completed": "成功启动",
+ "installer.step9.serviceStatus.start.failed": "启动失败",
+ "installer.step9.serviceStatus.stop.pending": "准备停止",
+ "installer.step9.serviceStatus.stop.queued": "等待停止",
+ "installer.step9.serviceStatus.stop.inProgress": "停止",
+ "installer.step9.serviceStatus.stop.completed": "成功停止",
+ "installer.step9.serviceStatus.stop.failed": "停止失败",
+ "installer.step9.serviceStatus.execute.pending": "准备执行",
+ "installer.step9.serviceStatus.execute.queued": "等待执行",
+ "installer.step9.serviceStatus.execute.inProgress": "执行",
+ "installer.step9.serviceStatus.execute.completed": "成功执行",
+ "installer.step9.serviceStatus.execute.failed": "执行失败",
+ "installer.step9.serviceStatus.abort.pending": "准备中止",
+ "installer.step9.serviceStatus.abort.queued": "等待中止",
+ "installer.step9.serviceStatus.abort.inProgress": "中止",
+ "installer.step9.serviceStatus.abort.completed": "中止成功",
+ "installer.step9.serviceStatus.abort.failed": "中止失败",
+ "installer.step9.components.install.failed": "安装故障",
+ "installer.step9.service.start.failed": "安装服务有问题。请转到个人服务页面启动它们。",
+ "installer.step9.service.start.header": "启动服务",
+ "installer.step10.header": "总结",
+ "installer.step10.body": "下面是安装过程的摘要。",
+ "installer.step10.staleServicesRestartRequired": "您还可能需要重新启动其他服务以使新添加的服务正常工作(例如, 在添加Oozie之后HDFS和YARN/MapReduce需要重启). 关闭此向导后,请重新启动服务名称旁边具有重启指示器<i class=\"icon-refresh\"></i>的所有服务。",
+ "installer.step10.hostsSummary": "集群由{0}主机组成。",
+ "installer.step10.installedAndStarted": "在{0}新上成功安装和启动服务",
+ "installer.step10.installed": "在{0}上成功安装服务",
+ "installer.step10.warnings": "警告",
+ "installer.step10.clusterState.installing": "安装",
+ "installer.step10.clusterState.starting": "启动",
+ "installer.step10.taskStatus.failed": "失败",
+ "installer.step10.taskStatus.aborted": "中止",
+ "installer.step10.taskStatus.timedOut": "超时",
+ "installer.step10.installStatus.failed": "安装主服务失败",
+ "installer.step10.installStatus.installed": "安装主服务",
+ "installer.step10.master.installedOn": "{0}安装在{1}上",
+ "installer.step10.startStatus.failed": "启动服务失败",
+ "installer.step10.startStatus.skipped": "跳过启动服务",
+ "installer.step10.startStatus.passed": "所有测试通过",
+ "installer.step10.startStatus.started": "所有服务开始",
+ "installer.step10.installTime.seconds": "在{0}秒中完成安装和启动",
+ "installer.step10.installTime.minutes": "安装和启动在{0}分钟和{1}秒完成",
+ "addHost.step4.header": "配置",
+ "addHost.step4.title": "选择添加的主机将属于的配置组。",
+ "form.create": "创建",
+ "form.save": "保存",
+ "form.cancel": "取消",
+ "form.passwordRetype": "重新输入口令",
+ "form.saveSuccess": "成功保存。",
+ "form.saveError": "对不起,发生了错误。",
+ "form.item.placeholders.typePassword": "密码类型",
+ "form.validator.invalidIp": "请输入有效的IP地址",
+ "form.validator.configKey": "无效的密钥。只允许字母数字、连字符、下划线、星号和句点。",
+ "form.validator.configGroupName": "无效的组名。只允许字母数字、连字符、空格和下划线。",
+ "form.validator.alertGroupName": "无效的警报组名称。只允许字母数字、连字符、空格和下划线。",
+ "form.validator.alertNotificationName": "无效警报通知名称。只允许字母数字、连字符、空格和下划线。",
+ "form.validator.configKey.specific": "{0}是无效的密钥。只允许字母数字、连字符、下划线、星号和句点。",
+ "alerts.add.header": "创建警报定义",
+ "alerts.add.step1.header": "选择类型",
+ "alerts.add.step2.header": "配置",
+ "alerts.add.step3.header": "回顾",
+ "alerts.add.step3.selectedType": "选定类型",
+ "alerts.fastAccess.popup.header": "{0} 条严重或警告警报",
+ "alerts.fastAccess.popup.body.name": "警报定义名称",
+ "alerts.fastAccess.popup.body.showmore": "转到警报定义",
+ "alerts.fastAccess.popup.body.noalerts": "没有关键或警告警报显示",
+ "alerts.actions.create": "创建警报",
+ "alerts.actions.manageGroups": "管理警报组",
+ "alerts.actions.manageNotifications": "管理通知",
+ "alerts.actions.manageNotifications.info": "可以管理通知方法和收件人。",
+ "alerts.actions.editRepeatTolerance.header": "编辑警报检查计数",
+ "alerts.actions.editRepeatTolerance.title": "报警检查计数",
+ "alerts.actions.editRepeatTolerance.description": "在发出通知之前设置要执行的警报检查的数量。如果在警报检查期间发生状态更改,平台将尝试在发出通知之前检查此次数。如果你的环境经历了短暂的问题导致错误警报,增加这个数字。",
+ "alerts.actions.editRepeatTolerance.label": "检查计数:",
+ "alerts.actions.editRepeatTolerance.error": "输入应该是介于1和99之间的整数。",
+ "alerts.actions.manageSettings": "管理警报设置",
+ "alerts.actions.manageSettings.error": "远程命令期间的错误:",
+ "alerts.groups.successPopup.header": "警报组处理结果",
+ "alerts.groups.successPopup.body.created": "新警报群",
+ "alerts.groups.successPopup.body.updated": "更新警报组",
+ "alerts.groups.successPopup.body.deleted": "移除警报组",
+ "alerts.detail.label.alertName": "警报名称",
+ "alerts.detail.label.serviceAlertDefinition": "服务警报定义",
+ "alerts.detail.label.hostAlertDefinition": "主机警报定义",
+ "alerts.detail.label.scope": "范围",
+ "alerts.detail.label.description": "描述",
+ "alerts.detail.label.checkInterval": "检查间隔时间",
+ "alerts.detail.label.defaultPort": "默认端口",
+ "alerts.detail.label.metrics": "JMX/Ganglia 指标",
+ "alerts.detail.label.formatString": "格式化字符串",
+ "alerts.detail.label.path": "路径",
+ "alerts.detail.label.thresholds": "阈值",
+ "alerts.detail.label.connecttionTimeout": "连接超时",
+
+ "alerts.table.noAlerts": "没有显示警报",
+ "alerts.table.header.lastTriggered": "最后状态改变",
+ "alerts.table.header.lastChecked": "最后检查",
+ "alerts.table.header.lastTrigger": "最后改变",
+ "alerts.table.header.check.response": "实例状态",
+ "alerts.table.header.definitionName": "警报定义名称",
+ "alerts.table.header.notification": "通知",
+ "alerts.table.header.repeatTolerance": "检查计数",
+ "alerts.table.header.default": "(默认)",
+ "alerts.table.header.helpUrl": "报警上下文",
+ "alerts.table.state": "状态",
+ "alerts.table.state.enabled": "启用",
+ "alerts.table.state.disabled": "禁用",
+ "alerts.table.state.enabled.tooltip": "单击此处禁用此警报定义。",
+ "alerts.table.state.disabled.tooltip": "单击以启用此警报定义",
+ "alerts.table.state.enabled.confirm.msg": "您即将禁用此警报定义。",
+ "alerts.table.state.disabled.confirm.msg": "您将启用此警报定义。",
+ "alerts.table.state.enabled.confirm.btn": "确认禁用",
+ "alerts.table.state.disabled.confirm.btn": "确认启用",
+ "alerts.filters.filteredAlertsInfo": "共{1}条,显示{0}条",
+ "alerts.definition.name": "警报定义名称",
+ "alerts.saveChanges": "您有未保存的更改",
+ "alert.definition.name.invalid": "输入无效。只允许字母数字、下划线、连字符、百分比、括号和空格。值应该小于255个符号。",
+ "alerts.definition.details.enable": "启用",
+ "alerts.definition.details.disable": "禁用",
+ "alerts.definition.details.enableDisable": "启用/禁用",
+ "alerts.definition.details.groups": "组",
+ "alerts.definition.details.instances": "实例",
+ "alerts.definition.details.serviceHost": "服务/主机",
+ "alerts.definition.details.24-hour": "24小时",
+ "alerts.definition.details.notification": "通知",
+ "alerts.definition.details.noAlerts": "没有显示警报实例",
+ "alerts.definition.details.configs.thresholdsErrorMsg": "临界阈值应大于警告阈值",
+ "alerts.notifications.error.email": "必须是一个有效的电子邮件地址",
+ "alerts.notifications.error.integer": "必须是整数",
+ "alerts.notifications.error.host": "主机必须是一个有效的完全限定域名(FQDN)",
+ "alerts.notifications.error.SMTPUsername": "需要用户名",
+ "alerts.notifications.error.SMTPPassword": "需要密码",
+ "alerts.notifications.error.retypePassword": "密码确认必须符合密码",
+ "alerts.notifications.addCustomPropertyPopup.header": "添加属性",
+ "alerts.notifications.addCustomPropertyPopup.error.propertyExists": "具有当前名称的自定义属性已经存在",
+ "alerts.notifications.addCustomPropertyPopup.error.invalidPropertyName": "属性名称只能包含字母、数字或。- *字符",
+ "wizard.progressPage.notice.completed": "请继续下一步。",
+ "wizard.progressPage.notice.failed": "您可以单击重试按钮重试失败的任务。",
+ "wizard.singleRequest.progressPage.notice.failed": "请单击重试链接,重试失败的请求。",
+ "admin.advanced.caution": "本部分只适用于高级用户。<br/>请谨慎继续",
+ "admin.advanced.button.uninstallIncludingData": "卸载包含所有数据的集群。",
+ "admin.advanced.button.uninstallKeepData": "卸载集群但保留数据。",
+ "admin.advanced.popup.header": "卸载集群",
+ "admin.audit.grid.date": "日期/时间",
+ "admin.audit.grid.category": "类别",
+ "admin.audit.grid.operationName": "操作",
+ "admin.audit.grid.performedBy": "通过执行",
+ "admin.audit.grid.service": "类别",
+ "admin.authentication.form.method.database": "使用Ambari Database对用户进行身份验证",
+ "admin.authentication.form.method.ldap": "使用LDAP/ActiveDirectory进行身份验证",
+ "admin.authentication.form.primaryServer": "主服务器",
+ "admin.authentication.form.secondaryServer": "辅助服务器",
+ "admin.authentication.form.useSsl": "使用SSL",
+ "admin.authentication.form.bind.anonymously": "匿名绑定",
+ "admin.authentication.form.bind.useCrenedtials": "使用凭据绑定",
+ "admin.authentication.form.bindUserDN": "绑定用户DN",
+ "admin.authentication.form.searchBaseDN": "搜索基础",
+ "admin.authentication.form.usernameAttribute": "用户名属性",
+ "admin.authentication.form.userDN": "用户DN",
+ "admin.authentication.form.configurationTest": "配置测试",
+ "admin.authentication.form.testConfiguration": "测试配置",
+ "admin.authentication.form.test.success": "配置通过测试",
+ "admin.authentication.form.test.fail": "配置测试失败",
+ "admin.kerberos.credentials.store.hint.supported": "当检查时,Ambari将存储KDC管理凭据,因此在服务、主机和组件的未来更改中不需要重新输入KDC管理凭据。",
+ "admin.kerberos.credentials.store.hint.not.supported": "Ambari未配置用于存储凭据",
+ "admin.kerberos.credentials.store.label": "保存管理员凭证",
+ "admin.kerberos.credentials.store.menu.label": "管理KDC证书",
+ "admin.kerberos.credentials.form.header.stored": "在加密凭据存储中更新或删除存储的KDC凭据。",
+ "admin.kerberos.credentials.form.header.not.stored": "指定要在加密凭据存储中记住的KDC管理员凭据。",
+ "admin.kerberos.credentials.remove.confirmation.header": "删除KDC凭证确认",
+ "admin.kerberos.credentials.remove.confirmation.body": "您即将从Ambari中删除KDC证书。你确定吗?",
+ "admin.kerberos.wizard.configuration.note": "这是启用Kerberos向导创建的初始配置。",
+ "admin.kerberos.wizard.header": "启用Kerberos向导",
+ "admin.kerberos.button.enable": "启用Kerberos",
+ "admin.kerberos.button.disable": "禁用Kerberos",
+ "admin.kerberos.button.regenerateKeytabs": "重新生成Keytabs",
+ "admin.kerberos.wizard.exit.warning.msg": "正在配置Kerberos,您真的想退出启用Kerberos向导吗?",
+ "admin.kerberos.wizard.exit.critical.msg": "正在配置Kerberos,<strong>在关闭之前,您应该完成向导。</strong> 您真的想退出启用Kerberos向导吗?",
+ "admin.kerberos.wizard.step1.header": "开始",
+ "admin.kerberos.wizard.step2.header": "配置Kerberos",
+ "admin.kerberos.wizard.step3.header": "安装和测试Kerberos客户端",
+ "admin.kerberos.wizard.step3.checkbox.ignoreAndProceed.label": "忽略错误并继续下一步",
+ "admin.kerberos.wizard.step4.header": "配置身份",
+ "admin.kerberos.wizard.step5.header": "确认配置",
+ "admin.kerberos.wizard.step6.header": "停止服务",
+ "admin.kerberos.wizard.step7.header": "Kerberize Cluster",
+ "admin.kerberos.wizard.step8.header": "启动和测试服务",
+ "admin.kerberos.wizard.step1.info.body": "欢迎来到Ambari安全向导,使用此向导可以在群集中启用Kerberos安全,让我们开始吧。",
+ "admin.kerberos.wizard.step1.alert.body": "注意:此过程需要重新启动服务和集群停机时间。另外,根据您选择的选项,可能需要来自安全管理员的支持。请相应地计划。",
+ "admin.kerberos.wizard.step1.body.text": "你计划使用什么类型的KDC?",
+ "admin.kerberos.wizard.step1.option.kdc": "现有的MIT KDC",
+ "admin.kerberos.wizard.step1.option.kdc.condition.1": "Ambari服务器和集群主机对KDC和KDC管理主机都有网络访问权。",
+ "admin.kerberos.wizard.step1.option.kdc.condition.2": "拥有KDC管理证书。",
+ "admin.kerberos.wizard.step1.option.kdc.condition.3": "Java Cryptography Extensions(JCE)已经配置在了集群所有的主机中。",
+ "admin.kerberos.wizard.step1.option.manual": "手动管理Kerberos主体和keytabs",
+ "admin.kerberos.wizard.step1.option.manual.condition.1": "集群主机具有对KDC的网络访问。",
+ "admin.kerberos.wizard.step1.option.manual.condition.2": "Kerberos客户端实用程序(如KiNIT)已安装在每个集群主机上。",
+ "admin.kerberos.wizard.step1.option.manual.condition.3": "Java Cryptography Extensions(JCE)已经配置在了集群所有的主机中",
+ "admin.kerberos.wizard.step1.option.manual.condition.4": "在完成此向导之前,将在KDC中手动创建服务和Ambari主体。",
+ "admin.kerberos.wizard.step1.option.manual.condition.5": "在完成此向导之前,将手动创建和分发Ambari主体的键选项卡并分发给集群主机。",
+ "admin.kerberos.wizard.step1.option.ad": "现有活动目录",
+ "admin.kerberos.wizard.step1.option.ad.condition.1": "Ambari服务器和集群主机对域控制器具有网络访问权限。",
+ "admin.kerberos.wizard.step1.option.ad.condition.2": "已配置ActiveDirectory安全LDAP(LDAP)连接。",
+ "admin.kerberos.wizard.step1.option.ad.condition.3": "ActiveDirectory的SSL证书或相关CA证书已导入Ambari的信任存储库",
+ "admin.kerberos.wizard.step1.option.ad.condition.4": "ActiveDirectory用户容器已经创建并在手上(例如OU= Hadoop,OU=People,DC=Apache,DC=org)",
+ "admin.kerberos.wizard.step1.option.ad.condition.5": "ActiveDirectory管理凭据在前面提到的用户容器上具有“创建、删除和管理用户帐户”的委托控制。",
+ "admin.kerberos.wizard.step1.option.ad.condition.6": "Java Cryptography Extensions(JCE)已经配置在了集群所有的主机中",
+ "admin.kerberos.wizard.step1.option.ipa": "现有IPA",
+ "admin.kerberos.wizard.step1.option.ipa.condition.1": "集群主机连接到IPA域,主机在DNS中注册。",
+ "admin.kerberos.wizard.step1.option.ipa.condition.2": "设置为创建的主体或KRBPaseWordExpRy属性没有到期的地方的密码策略是可写的",
+ "admin.kerberos.wizard.step1.option.ipa.condition.3": "IPA管理的KRB5.CONF设置DeFultCyCaseEngEng/tMP/KRB5cc%%uID}",
+ "admin.kerberos.wizard.step1.option.ipa.condition.4": "Java Cryptography Extensions(JCE)已经配置在了集群所有的主机中。",
+ "admin.kerberos.wizard.step1.prerequisites.label": "下面的先决条件需要检查,以在向导中前进。",
+ "admin.kerberos.wizard.step2.info.body": "请配置Kerberos相关属性。",
+ "admin.kerberos.wizard.step3.task0.title": "安装Kerberos客户端",
+ "admin.kerberos.wizard.step3.task1.title": "测试Kerberos客户端",
+ "admin.kerberos.wizard.step3.notice.inProgress": "正在安装和测试Kerberos客户端,请稍候。",
+ "admin.kerberos.wizard.step3.notice.completed": "Kerberos服务已成功安装和测试。",
+ "admin.kerberos.wizard.progressPage.notice.inProgress": "正在集群化时请稍候",
+ "admin.kerberos.wizard.step4.info.body": "为服务用户和Hadoop服务组件配置主体名称和keytab位置。",
+ "admin.kerberos.wizard.step5.info.body": "请在继续安装过程之前检查配置",
+ "admin.kerberos.wizard.step5.moreInfoNonManual.body": "使用<b>Download CSV 按钮</b>, 您可以下载CSV文件,该文件包含由Ambari自动创建的主体和密钥表的列表。",
+ "admin.kerberos.wizard.step5.moreInfoManual.body": "重要: 使用<b>Download CSV</b> 按钮去获取Ambari在集群中启动Kerberos<b>必须的</b>主体和密钥表的列表",
+ "admin.kerberos.wizard.step5.kdc_type.label": "KDC型",
+ "admin.kerberos.wizard.step5.kdc_hosts.label": "KDC主机",
+ "admin.kerberos.wizard.step5.realm.label": "领域名称",
+ "admin.kerberos.wizard.step5.ldap_url.label": "LDAP URL",
+ "admin.kerberos.wizard.step5.container_dn.label": "容器DN",
+ "admin.kerberos.wizard.step5.executable_search_paths.label": "可执行路径",
+ "admin.kerberos.wizard.step5.exitWizard": "退出向导",
+ "admin.kerberos.wizard.step5.downloadCSV": "下载CSV",
+ "admin.kerberos.wizard.step5.group.label": "组用户主体应为",
+ "admin.kerberos.wizard.step6.task0.title": "停止服务",
+ "admin.kerberos.wizard.step6.task1.title": "删除ATS",
+ "admin.kerberos.wizard.step6.notice.inProgress": "正在停止服务,请稍候。",
+ "admin.kerberos.wizard.step6.notice.completed": "服务已成功停止。",
+ "admin.kerberos.wizard.step7.notice.inProgress": "正在对Cerber化进行集群,请稍候。",
+ "admin.kerberos.wizard.step7.notice.completed": "Kerberos在集群上已成功启用。",
+ "admin.kerberos.wizard.step8.notice.inProgress": "正在启动和测试服务,请稍候。",
+ "admin.kerberos.wizard.step8.notice.completed": "服务已经成功地用Kerberos环境测试了。",
+ "admin.kerberos.wizard.step8.notice.failed": "某些服务未能启动并成功执行测试。单击“重试”再次尝试或单击“完成”以删除向导并手动修复。",
+ "admin.kerberos.wizard.step8.task0.title": "启动和测试服务",
+ "admin.kerberos.regenerate_keytabs.popup.body": "在集群中为<strong>所有</strong>主机重新生成密钥是一个破坏性的操作,这导致所有主机都要重启。可选地,<strong>仅</strong>对于缺少的主机和组件,密钥可以被重新生成,并且此操作需要有选择地重新启动受影响的主机和服务。",
+ "admin.kerberos.regenerate_keytabs.checkbox.label": "只为缺少主机和组件重新生成密钥表",
+ "admin.kerberos.regenerate_keytabs.popup.restart.body": "密钥重新生成后, 依赖它们的服务<strong>必须</strong>重启。这可以自动完成,也可以手动完成。",
+ "admin.kerberos.regenerate_keytabs.checkbox.restart.label": "密钥表重新生成后自动重新启动组件",
+ "admin.kerberos.service.alert.yarn": "Yarn日志和本地文件夹将被删除,资源管理状态将被格式化为启用/禁用Kerberos的一部分。",
+ "admin.kerberos.disable.step1.task0.title": "启动ZooKeeper",
+ "admin.kerberos.disable.step1.task1.title": "停止所需服务",
+ "admin.kerberos.disable.step1.task2.title": "Unkerberize集群",
+ "admin.kerberos.disable.step1.task3.title": "删除Kerberos",
+ "admin.kerberos.disable.step1.task4.title": "启动服务",
+ "admin.kerberos.disable.unkerberize.header": "Unkerberize集群",
+ "admin.kerberos.disable.unkerberize.message": "集群未被删除时,无法退出向导。",
+ "admin.kerberos.disable.inProgress": "集群正在Unkerberize时,请稍候。",
+ "admin.kerberos.disable.notice.completed": "没有Kerberos环境,服务已经成功测试。",
+ "admin.kerberos.wizard.step1.notice.inProgress": "集群正在Unkerberize时,请稍候。",
+ "admin.manageJournalNode.label": "管理JournalNodes",
+ "admin.manageJournalNode.warning": "管理JournalNodes向导需要启动所有NameNodes并定义活动/备用状态",
+ "admin.manageJournalNode.wizard.header": "管理JournalNodes向导",
+ "admin.manageJournalNode.wizard.step1.header": "分配JournalNodes",
+ "admin.manageJournalNode.wizard.step2.header": "回顾",
+ "admin.manageJournalNode.wizard.step3.header": "保存命名空间",
+ "admin.manageJournalNode.wizard.step4.header": "添加/删除JournalNodes",
+ "admin.manageJournalNode.wizard.step5.header": "格式化JournalNodes",
+ "admin.manageJournalNode.wizard.step6.header": "启动活动的NameNode",
+ "admin.manageJournalNode.wizard.step7.header": "引导备用的NameNode",
+ "admin.manageJournalNode.wizard.step8.header": "启动所有服务",
+ "admin.manageJournalNode.wizard.step1.body": "添加或删除JournalNodes",
+ "admin.manageJournalNode.wizard.step3.confirm.hosts.body": "<b>确认你的主机选择</b>",
+ "admin.manageJournalNode.wizard.step3.confirm.config.body": "<p><b>回顾配置修改</b></p>作为此过程的一部分,需要进行配置更改。请回顾下面的变化,并注意它们是针对<b>回顾</b>。此向导中的后续步骤将更新此配置,并自动重新启动<b>所有</b>服务。",
+ "admin.manageJournalNode.wizard.step4.task0.title": "停止备用NameNode",
+ "admin.manageJournalNode.wizard.step4.task1.title": "停止服务",
+ "admin.manageJournalNode.wizard.step4.task2.title": "添加JournalNodes",
+ "admin.manageJournalNode.wizard.step4.task3.title": "删除JournalNodes",
+ "admin.manageJournalNode.wizard.step4.task4.title": "启动JournalNodes",
+ "admin.manageJournalNode.wizard.step4.task5.title": "重新配置HDFS",
+ "admin.manageJournalNode.wizard.step6.task0.title": "启动ZooKepper服务器",
+ "admin.manageJournalNode.wizard.step6.task1.title": "启动活动的NameNode",
+ "admin.manageJournalNode.wizard.step8.task0.title": "停止HDFS",
+ "admin.manageJournalNode.wizard.step8.task1.title": "启动所有服务",
+ "admin.manageJournalNode.wizard.step5.bodyHeader": "需要手动步骤:格式化JournalNodes",
+ "admin.manageJournalNode.wizard.step7.bodyHeader": "需要手动步骤:引导备用的NameNode",
+ "admin.manageJournalNode.step4.save.configuration.note": "此配置是由管理JournalNode Wizard创建的",
+ "admin.manageJournalNode.wizard.step8.notice.inProgress": "服务启动时请稍候",
+ "admin.manageJournalNode.wizard.progressPage.notice.inProgress": "正在部署JournalNodes,请稍候。",
+ "admin.manageJournalNode.wizard.step6.notice.inProgress": "请等待相关服务启动",
+ "admin.manageJournalNode.wizard.step4.notice.inProgress": "正在部署JournalNodes,请稍候。",
+ "admin.manageJournalNode.wizard.step8.notice.completed": "完成对JournalNodes的更新。",
+ "admin.manageJournalNode.wizard.step3.body": "<ol><li>登录NameNode主机<b>{1}</b>.</li><li>在安全模式更新NameNode(只读模式):<div class=\"code-snippet\">sudo su {0} -l -c 'hdfs dfsadmin -safemode enter'</div></li><li>在安全模式创建一个检查点:<div class=\"code-snippet\">sudo su {0} -l -c 'hdfs dfsadmin -saveNamespace'</div></li><li>一旦Ambari检测到NameNode处于安全模式,并且检查点已经成功创建,您就可以继续运行。</li><div class=\"alert alert-warn\">如果<b>下一步</b>按钮在你运行<b>\"Step 3: 保存命名空间\"</b>命令时是可点击的,这意味着已经有一个最近的检查点存在了,你可以不用进行<b>\"Step 3: 保存命名空间\"</b [...]
+ "admin.manageJournalNode.wizard.step5.body": "<ol><li>登录NameNode主机<b>{1}</b>.</li><li>运行:<div class=\"code-snippet\">sudo su {0} -l -c 'hdfs namenode -initializeSharedEdits'</div>初始化JournalNodes </li><li>一旦Ambari检测到JournalNodes已成功初始化,就可以继续进行。</li></ol>",
+ "admin.manageJournalNode.wizard.step7.body": "<div class=\"alert alert-info\"><ol start=\"1\"><li>登录附加的NameNode主机<b>{1}</b>.<br><div class=\"alert alert-warn\"><strong>重要!</strong>确保登录了附加的NameNode主机<br>这是与上一步不同的主机</div></li><li>通过运行:<div class=\"code-snippet\">sudo su {0} -l -c 'hdfs namenode -bootstrapStandby'</div>来初始化附加的NameNode的元数据</li></ol></div>请在完成上述步骤后继续进行。",
+ "admin.highAvailability": "高可用性",
+ "admin.highAvailability.button.enable": "启用NameNode HA",
+ "admin.highAvailability.button.disable": "禁用NameNode HA",
+ "admin.rm_highAvailability.button.enable": "启用资源管理器 HA",
+ "admin.rm_highAvailability.button.disable": "禁用资源管理器 HA",
+ "admin.ra_highAvailability.button.enable": "启用Ranger管理器 HA",
+ "admin.highAvailability.disabled": "NameNode HA已禁用",
+ "admin.highAvailability.enabled": "NameNode HA已启用",
+ "admin.rm_highAvailability.disabled": "资源管理器 HA已禁用",
+ "admin.rm_highAvailability.enabled": "资源管理器 HA已启用",
+ "admin.highAvailability.confirmRollbackHeader": "确认回滚",
+ "admin.highAvailability.confirmRollbackBody": "这将回滚所有在HA向导中执行的操作。",
+ "admin.highAvailability.confirmManualRollbackBody": "你正在启动NameNode HA,如果您现在退出,则必须遵循手动指令返回到non-HA设置,如Ambari用户指南的<i>回滚NameNode HA/I>节。确实要退出向导吗?",
+ "admin.highAvailability.error.hostsNum": "在集群中必须至少有3个主机才能启用NameNode HA。",
+ "admin.highAvailability.error.namenodeStarted": "NameNode必须在启用NameNode HA之前运行。",
+ "admin.highAvailability.error.maintenanceMode": "为了启用NameNode HA,所有服务和具有主组件的主机都需要脱离维护模式。",
+ "admin.highAvailability.error.zooKeeperNum": "在集群中必须至少有3个ZooKeeper服务器才能启用NameNode HA。",
+ "admin.rm_highAvailability.error.hostsNum": "在集群中必须至少有3个主机才能启用资源管理器 HA。",
+ "admin.rm_highAvailability.error.zooKeeperNum": "在集群中必须至少有3个ZooKeeper服务器才能启用资源管理器 HA。",
+ "admin.rm_highAvailability.closePopup": "启用资源管理器 HA向导正在进行中。必须允许向导完成Ambari处于可用状态。如果您选择退出,您必须遵循手动指令来完成或恢复使资源管理器 HA在Ambari用户指南中记录。确实要退出向导吗?",
+ "admin.highAvailability.wizard.header": "启用NameNode HA向导",
+ "admin.highAvailability.wizard.progressPage.notice.inProgress": "正在部署NameNode HA,请稍候。",
+ "admin.highAvailability.wizard.progressPage.header": "部署",
+ "admin.highAvailability.wizard.step1.header": "开始",
+ "admin.highAvailability.wizard.step1.nameserviceid.tooltip.title": "Nameservice ID",
+ "admin.highAvailability.wizard.step1.nameserviceid.tooltip.content": "这将会成为NameNode HA集群的ID,例如,如果你设置Nameservice ID为<b>mycluster</b>, HDFS的逻辑URI将会是<b>hdfs://mycluster</b>.",
+ "admin.highAvailability.wizard.step1.nameserviceid": "Nameservice ID",
+ "admin.highAvailability.wizard.step1.nameserviceid.error": "必须由字母、数字和连字符组成。不能用连字号开头或结尾。",
+ "admin.highAvailability.wizard.step2.header": "选择主机",
+ "admin.highAvailability.wizard.step3.header": "回顾",
+ "admin.highAvailability.wizard.step4.header": "创建检查点",
+ "admin.highAvailability.wizard.step4.error.nameNode": "NameNode正在被停止的过程中。请确保NameNode正在运行以成功创建检查点。",
+ "admin.highAvailability.wizard.step5.header": "配置组件",
+ "admin.highAvailability.wizard.step6.header": "初始化JournalNodes",
+ "admin.highAvailability.wizard.step7.header": "启动组件",
+ "admin.highAvailability.wizard.step8.header": "初始化元数据",
+ "admin.highAvailability.wizard.step9.header": "完成HA设置",
+ "admin.highAvailability.wizard.step4.bodyHeader": "需要手动步骤:在NameNode上创建检查点",
+ "admin.highAvailability.wizard.step6.bodyHeader": "需要手动步骤:初始化JournalNodes",
+ "admin.highAvailability.wizard.step8.bodyHeader": "需要手动步骤:初始化NameNode HA元数据",
+ "admin.rollbackHighAvailability.wizard.step1.header": "选择主机页面",
+ "admin.rollbackHighAvailability.wizard.step2.header": "创建检查点页面",
+ "admin.rollbackHighAvailability.wizard.step3.header": "进度页",
+ "admin.highAvailability.wizard.step5.notice.inProgress": "向导正在配置组件,请稍候。",
+ "admin.highAvailability.wizard.step7.notice.inProgress": "向导正在启动组件,请稍候。",
+ "admin.highAvailability.wizard.step9.notice.inProgress": "向导正在结束HA设置,请稍候。",
+ "admin.highAvailability.wizard.rollback.notice.inProgres": "恢复到non-HA设置",
+ "admin.highAvailability.wizard.step5.header.title": "配置组件",
+ "admin.highAvailability.wizard.step7.header.title": "启动组件",
+ "admin.highAvailability.wizard.step9.header.title": "完成HA设置",
+ "admin.highAvailability.wizard.rollback.header.title": "恢复到non-HA设置。",
+ "admin.highAvailability.wizard.step5.task0.title": "停止所有服务",
+ "admin.highAvailability.wizard.step5.task1.title": "安装附加的NameNode",
+ "admin.highAvailability.wizard.step5.task2.title": "安装JournalNodes",
+ "admin.highAvailability.wizard.step5.task3.title": "重新配置HDFS",
+ "admin.highAvailability.wizard.step5.task4.title": "启动JournalNodes",
+ "admin.highAvailability.wizard.step5.task5.title": "禁用Secondary NameNode",
+ "admin.highAvailability.wizard.step7.task0.title": "启动ZooKeeper服务器",
+ "admin.highAvailability.wizard.step7.task1.title": "开始Ambari Infra",
+ "admin.highAvailability.wizard.step7.task2.title": "开始Ranger",
+ "admin.highAvailability.wizard.step7.task3.title": "启动名称",
+
+ "admin.highAvailability.wizard.step9.task0.title": "启动附加NameNode",
+ "admin.highAvailability.wizard.step9.task1.title": "安装故障转移控制器",
+ "admin.highAvailability.wizard.step9.task2.title": "启动故障转移控制器",
+ "admin.highAvailability.wizard.step9.task3.title": "安装PXF",
+ "admin.highAvailability.wizard.step9.task4.title": "重构测距仪",
+ "admin.highAvailability.wizard.step9.task5.title": "重新配置HBase",
+ "admin.highAvailability.wizard.step9.task6.title": "重新配置AMS",
+ "admin.highAvailability.wizard.step9.task7.title": "重新配置累加器",
+ "admin.highAvailability.wizard.step9.task8.title": "重新配置HAWQ",
+ "admin.highAvailability.wizard.step9.task9.title": "删除Secondary NameNode",
+ "admin.highAvailability.wizard.step9.task10.title": "停止HDFS",
+ "admin.highAvailability.wizard.step9.task11.title": "启动所有服务",
+ "admin.highAvailability.wizard.step9.notice.completed": "NameNode HA已成功启用。",
+ "admin.highAvailability.wizard.step3.curNameNode": "<b>当前NameNode:</b> ",
+ "admin.highAvailability.wizard.step3.addNameNode": "<b>附加NameNode:</b> ",
+ "admin.highAvailability.wizard.step3.secNameNode": "<b>Secondary NameNode:</b> ",
+ "admin.highAvailability.wizard.step3.journalNode": "<b>JournalNode:</b> ",
+ "admin.highAvailability.wizard.step3.toBeInstalled": "安装",
+ "admin.highAvailability.wizard.step3.toBeDeleted": "被删除",
+ "admin.highAvailability.wizard.step4.ckNotCreated": "尚未创建检查点",
+ "admin.highAvailability.wizard.step4.ckCreated": "创建检查点",
+ "admin.highAvailability.step4.save.configuration.note": "此配置是通过启用{0} HA向导创建的。",
+ "admin.highAvailability.wizard.step6.jsNoInit": "尚未初始化JournalNodes",
+ "admin.highAvailability.wizard.step6.jsInit": "初始化的节点",
+ "admin.highAvailability.wizard.step6.jnStopped": "所有的JournalNodes都应该在初始化之前启动。",
+ "admin.highAvailability.wizard.step8.metaNoInit": "尚未初始化元数据",
+ "admin.highAvailability.wizard.step8.confirmPopup.body": "请确认您在继续之前已经运行了手动步骤。",
+ "admin.highAvailability.wizard.step9.hawq.confirmPopup.header": "HAWQ需要额外的步骤",
+ "admin.highAvailability.wizard.step9.hawq.confirmPopup.body": "您必须参考“HAWQ文件集和高可用性启用的HDFS”下的HAWQ文档,并执行所需的手动步骤来更新HAWQ文件空间位置。除非步骤成功完成,否则HAWQ不会使用HDFS名称服务。",
+ "admin.highAvailability.rollback.header": "禁用NameNode HA向导",
+ "admin.highAvailability.rollback.task0.title": "停止所有服务",
+ "admin.highAvailability.rollback.task1.title": "恢复HbASE配置",
+ "admin.highAvailability.rollback.task2.title": "恢复累加配置",
+ "admin.highAvailability.rollback.task3.title": "恢复HAWQ配置",
+ "admin.highAvailability.rollback.task4.title": "停止故障转移控制器",
+ "admin.highAvailability.rollback.task5.title": "删除故障转移控制器",
+ "admin.highAvailability.rollback.task6.title": "删除PXF",
+ "admin.highAvailability.rollback.task7.title": "停止附加NameNode",
+ "admin.highAvailability.rollback.task8.title": "停止命名",
+ "admin.highAvailability.rollback.task9.title": "恢复HDFS配置",
+ "admin.highAvailability.rollback.task10.title": "启用Secondary NameNode",
+ "admin.highAvailability.rollback.task11.title": "停止JournalNodes",
+ "admin.highAvailability.rollback.task12.title": "删除JournalNodes",
+ "admin.highAvailability.rollback.task13.title": "删除附加NameNode",
+ "admin.highAvailability.rollback.task14.title": "启动所有服务",
+ "admin.highAvailability.rollback.notice.inProgress": "向导返回到non-HA设置时,请稍候。",
+ "admin.highAvailability.rollback.step2.body": "<ol><li>登录NameNode主机<b>{1}</b>.</li><li>在安全模式更新NameNode(只读模式):<div class=\"code-snippet\">sudo su {0} -l -c 'hdfs dfsadmin -safemode enter'</div></li><li>在安全模式创建一个检查点:<div class=\"code-snippet\">sudo su {0} -l -c 'hdfs dfsadmin -saveNamespace'</div></li></ol>",
+ "admin.highAvailability.wizard.step8.body":
+ `<div class="alert alert-info">
+ <ol>
+ <li>登录NameNode主机 <b>{1}</b>.</li>
+ <li>初始化NameNode 自动failover 模式的元数据:
+ <div class="code-snippet">sudo su {0} -l -c \'hdfs zkfc -formatZK\'</div></li>
+ </div>
+ <div class="alert alert-info">
+ <ol start="3">
+ <li>登录附加的NameNode主机<b>{2}</b>.<br>
+ <div class="alert alert-warn"><strong>重要!</strong>确保登录了附加的NameNode主机<br>这是与上一步不同的主机</div>
+ </li>
+ <li>通过运行:<div class="code-snippet">sudo su {0} -l -c 'hdfs namenode -bootstrapStandby'</div>来初始化附加的NameNode的元数据</li>
+ </ol>
+ </div>请在完成上述步骤后继续进行。`,
+ "admin.highAvailability.wizard.step6.body": "<ol><li>登录NameNode主机<b>{1}</b>.</li><li>运行:<div class=\"code-snippet\">sudo su {0} -l -c 'hdfs namenode -initializeSharedEdits'</div>初始化JournalNodes </li><li>一旦Ambari检测到JournalNodes已成功初始化,就可以继续进行。</li></ol>",
+ "admin.highAvailability.wizard.step4.body": "<ol><li>登录NameNode主机<b>{1}</b>.</li><li>在安全模式更新NameNode(只读模式):<div class=\"code-snippet\">sudo su {0} -l -c 'hdfs dfsadmin -safemode enter'</div></li><li>在安全模式创建一个检查点:<div class=\"code-snippet\">sudo su {0} -l -c 'hdfs dfsadmin -saveNamespace'</div></li><li>一旦Ambari检测到NameNode处于安全模式,并且检查点已经成功创建,您就可以继续运行。</li><div class=\"alert alert-warn\">如果<b>下一步</b>按钮在你运行<b>\"Step 3: 保存命名空间\"</b>命令时是可点击的,这意味着已经有一个最近的检查点存在了,你可以不用进行<b>\"Step 3: 保存命名空间\"</b> [...]
+ "admin.highAvailability.wizard.step3.confirm.host.body": "<b>确认您的主机选择。</b>",
+ "admin.highAvailability.wizard.step3.confirm.config.body": "<div class=\"alert alert-info\"><b>检查配置更改。</b></br>下面列出了向导将启用NameNode HA的配置更改,此信息仅供<b>回顾</b>,除<b>dfs.journalnode.edits.dir</b>属性</div >外,不可编辑。",
+ "admin.highAvailability.wizard.step2.body": "选择将运行附加NameNode的主机。<br/>另外,选择运行JournalNodes的主机, 以容错的方式编辑日志存储NameNode",
+ "admin.highAvailability.wizard.step1.body": "此向导将帮助您在集群中启用NameNode HA。<br/>一旦启用,您将运行一个备用NameNode,除了您的活动NameNode。<br/>这允许一个主动待命的NameNode配置,它自动执行故障转移。<br/><br/>启动HA会涉及<b>自动化步骤</b>(将由向导处理)和<b>手动步骤</b>(您必须按向导指示的顺序执行)的组合。<br/><br/><b>您应该计划集群维护窗口,并在启用NameNode HA时为集群停机做准备。</b>",
+ "admin.highAvailability.wizard.step1.alert": "如果您有HBase运行,请退出此向导并先停止HBase。",
+ "admin.highAvailability.wizard.step1.hawq.alert": "<br/><br/>一旦向导完成,您将需要执行额外的手动步骤来更新HAWQ文件空间位置。有关更多信息,请参阅“HAWQ文件集和高可用性启用的HDFS”部分下的HAWQ文档。",
+ "admin.rm_highAvailability.wizard.header": "启用资源管理器 HA向导",
+ "admin.rm_highAvailability.wizard.step1.header": "开始",
+ "admin.rm_highAvailability.wizard.step1.body": "这个向导将帮助您在您的群集上启用资源管理器 HA。<br/>一旦启用,您将在您的活动资源管理器之外运行备用资源管理器<br/>这允许活动的备用资源管理器配置自动执行故障转移。<br/><br/><b>您应该计划集群维护窗口,并在启用资源管理器 HA时为集群停机做准备。</b>",
+ "admin.rm_highAvailability.wizard.step2.header": "选择主机",
+ "admin.rm_highAvailability.wizard.step2.body": "选择将运行附加资源管理器的主机",
+ "admin.rm_highAvailability.wizard.step3.header": "回顾",
+ "admin.rm_highAvailability.wizard.step3.confirm.host.body": "<b>确认您的主机选择。</b>",
+ "admin.rm_highAvailability.wizard.step3.confirm.config.body": "<div class=\"alert alert-info\"><b>回顾配置修改</b></br>下面列出了向导将启用资源管理器 HA的配置更改。这个信息<b>只供回顾</b>不允许编辑。</div>",
+ "admin.rm_highAvailability.wizard.step3.currentRM": "当前资源管理员",
+ "admin.rm_highAvailability.wizard.step3.additionalRM": "附加资源管理员",
+ "admin.rm_highAvailability.wizard.step4.header": "配置组件",
+ "admin.rm_highAvailability.wizard.step4.task0.title": "停止所需服务",
+ "admin.rm_highAvailability.wizard.step4.task1.title": "安装附加资源管理器",
+ "admin.rm_highAvailability.wizard.step4.task2.title": "重配置Yarn",
+ "admin.rm_highAvailability.wizard.step4.task3.title": "重新配置HAWQ",
+ "admin.rm_highAvailability.wizard.step4.task4.title": "重新配置HDFS",
+ "admin.rm_highAvailability.wizard.step4.task5.title": "启动所有服务",
+ "admin.rm_highAvailability.wizard.step4.notice.inProgress": "正在部署资源管理器 HA,请稍候。",
+ "admin.rm_highAvailability.wizard.step4.notice.completed": "资源管理器 HA已成功启用。",
+ "admin.ra_highAvailability.wizard.header": "启用Ranger-admin HA向导",
+ "admin.ra_highAvailability.wizard.step1.header": "开始",
+ "admin.ra_highAvailability.wizard.step1.body": "此向导将帮助您在集群中启用Ranger Admin HA。<br/>一旦启用,您将运行一个除了你的Active Ranger Admin的Standby Ranger Admin。<br/>这允许Active-Standby Ranger Admin的配置自动执行故障转移。<br/><br/><b>当启用Ranger Admin HA时,应该计划集群维护窗口并为集群停机做准备。</b><br/><br/>请设置负载均衡器并提供要使用的URL。在继续进行之前,请确保负载均衡器安装正确。<br/><br/><div class=\"alert\">确保Ranger Admin和负载均衡器位于单独的主机上。</div>",
+ "admin.ra_highAvailability.wizard.step1.load_balancer_url": "负载平衡器的URL",
+ "admin.ra_highAvailability.wizard.step1.invalid_url": "必须是有效的URL",
+ "admin.ra_highAvailability.wizard.step2.header": "选择主机",
+ "admin.ra_highAvailability.wizard.step2.body": "选择将运行附加Ranger Admin组件的主机",
+ "admin.ra_highAvailability.wizard.step2.warning": "请确保负载均衡器与Ranger Admin组件分开定位。",
+ "admin.ra_highAvailability.wizard.step3.header": "回顾",
+ "admin.ra_highAvailability.wizard.step3.alert_message": "<b>确认您的主机选择。</b>",
+ "admin.ra_highAvailability.wizard.step3.currentRA": "当前Ranger Admin",
+ "admin.ra_highAvailability.wizard.step3.additionalRA": "附加Ranger Admin",
+ "admin.rm_highAvailability.wizard.step3.configs_changes": "<p><b>回顾配置修改</b></p>下面列出了向导将启用Ranger Admin HA的配置更改。这个信息<b>只供回顾</b>不允许编辑。",
+ "admin.ra_highAvailability.wizard.step4.header": "安装、启动和测试",
+ "admin.ra_highAvailability.wizard.step4.task0.title": "停止所有服务",
+ "admin.ra_highAvailability.wizard.step4.task1.title": "安装附加Ranger管理器",
+ "admin.ra_highAvailability.wizard.step4.task2.title": "重新配置服务",
+ "admin.ra_highAvailability.wizard.step4.task3.title": "启动所有服务",
+ "admin.ra_highAvailability.wizard.step4.notice.inProgress": "正在部署Ranger Admin HA,请稍候。",
+ "admin.ra_highAvailability.wizard.step4.notice.completed": "Ranger Admin HA已成功启用。",
+ "admin.ra_highAvailability.closePopup": "启用Ranger Admin HA向导正在进行中。必须允许向导完成Ambari处于可用状态。如果您选择退出,您必须遵循手动指令来完成或恢复启用Ranger Admin HA,如Ambari用户指南中所记载的。确实要退出向导吗?",
+ "admin.security.title": "尚未启用Kerberos安全",
+ "admin.security.enabled": "启用Kerberos安全",
+ "admin.security.disabled": "禁用Kerberos安全",
+ "admin.security.button.enable": "启用安全",
+ "admin.security.button.disable": "禁用安全",
+ "admin.security.enable.popup.body": "我们将通过添加安全向导",
+ "admin.security.enable.popup.header": "增加安全",
+ "admin.security.disable.popup.header": "移除安全",
+ "admin.security.disable.popup.body": "您将要禁用群集上的Kerberos,这将停止群集中的所有服务,并删除Kerberos配置。<strong>您确实希望继续禁用Kerberos吗?</strong>",
+ "admin.security.step1.header": "开始",
+ "admin.security.step2.header": "配置服务",
+ "admin.security.step3.header": "创建Principals和Keytabs",
+ "admin.security.step4.header": "保存和应用配置",
+ "admin.security.step1.body.header": "重要事项:在配置Ambari管理Kerberos启用集群之前,必须在集群上执行以下手动步骤。请确保为每个Hadoop服务记录每个主机的keytab文件的位置和主体。需要使用此信息才能使用向导。",
+ "admin.security.step1.body.instruction1": "安装、配置和启动Kerberos KDC",
+ "admin.security.step1.body.instruction2": "在集群中的每个主机上安装和配置Kerberos客户端",
+ "admin.security.step1.body.instruction3": "为Hadoop服务和宿主创建Kerberos主体",
+ "admin.security.step1.body.instruction4": "为每个主体生成keytab并放置在适当的主机上",
+ "admin.security.step1.body.instruction5": "YARN服务的<b>Application Timeline Server</b>组件作为启用HDP堆栈版本安全的一部分将被<span class=\"text-error\"><b>删除</b></span>",
+ "admin.security.step2.body.header": "配置Kerberos安全属性",
+ "admin.security.step3.notice": "在继续之前,您需要创建Kerberos principals和keytabs。<br />下载CSV文件并使用它创建脚本以生成指定主机上的principals和keytabs。一旦创建了principals和keytabs,点击<i>应用</i>继续。如果需要进行配置更改, 点击<i>返回</i>",
+ "admin.security.step3.table.principal": "Principal",
+ "admin.security.step3.table.keytab": "Keytab",
+ "admin.security.step3.downloadCSV": "下载CSV",
+ "admin.security.step4.body.header": "将Kerberos安全应用到集群",
+ "admin.security.step4.body.success.header": "在集群上启用了基于Kerberos的安全。服务以安全模式启动,请稍候。",
+ "admin.security.step4.body.failure.header": "未能在集群上启用基于Kerberos的安全。您的集群将继续运行在非安全模式。",
+ "admin.security.step4.save.configuration.note": "此配置是通过启用/禁用安全向导创建的。",
+ "admin.security.apply.configuration.error": "未能将安全配置应用到集群。请导航到“配置服务”步骤,并确保所有服务都配置了适当的值。",
+ "admin.security.disable.body.header": "禁用集群上的Kerberos安全",
+ "admin.security.disable.body.success.header": "基于Kerberos的安全在集群上已被禁用。服务在非安全模式下启动,请稍候。",
+ "admin.security.disable.body.failure.header": "无法在集群上禁用基于Kerberos的安全。您的集群将以安全模式运行。",
+ "admin.security.disable.onClose": "您正处于禁用集群安全的过程中。确实要退出吗?",
+ "admin.removeSecurity.header": "禁用安全",
+ "admin.security.applying.config.header": "应用配置",
+ "admin.security.applying.config.body": "在应用配置时不能退出向导",
+ "admin.security.status.error": "从Ambari服务器检索集群安全状态时出错",
+ "admin.users.ldapAuthUsed": "LDAP身份验证用于认证用户。",
+ "admin.users.delete.yourself.message": "你不能删除你自己",
+ "admin.users.delete.yourself.header": "删除警告",
+ "admin.users.delete.header": "删除{0}",
+ "admin.users.addButton": "添加本地用户",
+ "admin.users.editButton": "编辑本地用户",
+ "admin.users.delete": "删除",
+ "admin.users.edit": "编辑",
+ "admin.users.privileges": "Admin",
+ "admin.users.type": "类型",
+ "admin.users.action": "操作",
+ "admin.users.passwordRetype": "重新输入口令",
+ "admin.users.username": "用户名",
+ "admin.users.createSuccess": "用户成功创建。",
+ "admin.users.createError": "用户创建时发生错误。",
+ "admin.users.createError.passwordValidation": "密码不同",
+ "admin.users.createError.userNameExists": "同名的用户已经存在",
+ "admin.users.editError.requiredField": "这是必需的",
+ "admin.access.showJobs": "为非管理员用户启用Jobs tab",
+ "admin.confirmUninstall": "确认卸载",
+ "admin.cluster.stackVersion": "集群堆栈版本",
+ "admin.cluster.upgradeAvailable": "升级可用",
+ "admin.cluster.upgradeUnavailable": "升级不可用",
+ "admin.cluster.repositories.repositories": "仓库",
+ "admin.cluster.repositories.os": "操作系统",
+ "admin.cluster.repositories.baseUrl": "基础网址",
+ "admin.cluster.repositories.popup.header.success": "仓库基础URL已保存",
+ "admin.cluster.repositories.popup.header.fail": "基础URL验证失败",
+ "admin.cluster.repositories.popup.body.success": "已成功保存了RePo基URL。",
+ "admin.cluster.repositories.popup.body.fail": "基础URL验证失败,尚未保存。",
+ "admin.cluster.repositories.invalidURLAttention": "<b>注意:</b>请确保保存之前所有库URL都有效。",
+ "admin.cluster.repositories.emptyURLattention": "<b>注意:</b>需要保存库URL才能保存。",
+ "admin.cluster.repositories.skipValidation.tooltip": "<b>警告:</b>这只适用于高级用户。如果您想跳过库基础URL的验证,请使用此选项。",
+ "admin.misc.header": "服务用户和组",
+ "admin.misc.nothingToShow": "没有显示用户帐户",
+ "admin.serviceAutoStart.title": "服务自动启动",
+ "admin.serviceAutoStart.header": "服务自动启动配置",
+ "admin.serviceAutoStart.header.text": "Ambari服务可以配置为在系统开机时自动启动。每个服务可以被配置为启动所有组件,或者选择性地启动。",
+ "admin.serviceAutoStart.body.text": "自动启动服务",
+ "admin.serviceAutoStart.tooltip.text": "启用{0}个组件",
+ "admin.stackVersions.filter.notInstalled": "未安装({0})",
+ "admin.stackVersions.filter.all": "全部({0})",
+ "admin.stackVersions.filter.upgradeReady": "升级准备就绪({0})",
+ "admin.stackVersions.filter.installed": "安装({0})",
+ "admin.stackVersions.filter.current": "当前({0})",
+ "admin.stackVersions.filter.upgrading": "正在升级/降级({0})",
+ "admin.stackVersions.filter.upgraded": "准备终结({0})",
+ "admin.stackVersions.upgrade.start.fail.title": "无法启动升级",
+ "admin.stackVersions.upgrade.installPackage.fail.title": "无法安装软件包",
+ "admin.stackVersions.upgrade.installPackage.fail.timeout": "请求超时。",
+ "admin.stackVersions.upgrade.installPackage.fail.noAvailableServices": "版本{0}不包含已安装的服务。",
+ "admin.stackVersions.upgrade.patch.revert.confirmation": "确定要还原以下服务:",
+ "admin.stackVersions.editRepositories.info": "为正在配置的操作系统提供基本URL。不检查所有其他操作系统。",
+ "admin.stackVersions.editRepositories.validation.warning": "有些存储库验证失败。如果您确信URL是正确的,则对基本URL进行更改或跳过验证。",
+ "admin.stackVersions.version.install.confirm": "您将在所有主机上安装版本<strong>{0}</strong>",
+ "admin.stackVersions.version.install.patch.confirm": "您将在包含以下服务的主机上安装版本<strong>{0}</strong>",
+ "admin.stackVersions.version.install.skipDependencies": "跳过依赖性检查",
+ "admin.stackVersions.version.install.skipDependencies.tooltip": "选中后,Ambari将不会验证安装新堆栈后是否满足所有包依赖关系。",
+ "admin.stackVersions.version.linkTooltip": "单击以编辑存储库",
+ "admin.stackVersions.version.hostsTooltip": "单击列出主机",
+ "admin.stackVersions.version.emptyHostsTooltip": "没有主机列表",
+ "admin.stackVersions.version.notInstalled": "未安装",
+ "admin.stackVersions.version.hostsInfoTooltip": "有{0}台主机不需要安装软件包。:<li>{1} 维护模式</li><li>{2} 不必要</li>",
+ "admin.stackVersions.removeIopSelect": "删除IOP选择",
+ "admin.stackVersions.removeIopSelect.fail": "IOP选择删除失败",
+ "admin.stackVersions.manageVersions": "管理版本",
+ "admin.stackVersions.manageVersions.popup.body": "你将离开<b>集群管理</b>界面去往<b>Ambari管理</b>界面。你可以通过点击Ambari管理界面中的集群部分的“Go to Dashboard”链接返回",
+ "admin.stackVersions.version.installNow": "安装包",
+ "admin.stackVersions.version.reinstall": "重新安装包",
+ "admin.stackVersions.version.performUpgrade": "执行升级",
+ "admin.stackVersions.version.preUpgradeCheck": "升级前检查",
+ "admin.stackVersions.version.upgrade.pause": "升级:需要的行动",
+ "admin.stackVersions.version.upgrade.notFinalized.warning": "升级还没有最终确定。在集群被验证为功能后,不要忘记尽快完成升级(在两天内被强烈推荐),因为在未完成状态运行集群会对HDFS产生额外的资源需求。",
+ "admin.stackVersions.version.upgrade.running": "升级:在进行中",
+ "admin.stackVersions.version.upgrade.aborted": "升级:中止",
+ "admin.stackVersions.version.upgrade.suspended": "升级:暂停",
+ "admin.stackVersions.version.downgrade.pause": "降级:需要的操作",
+ "admin.stackVersions.version.downgrade.running": "降级:正在进行中",
+ "admin.stackVersions.version.downgrade.aborted": "降级:中止",
+ "admin.stackVersions.version.downgrade.suspended": "降级:暂停",
+ "admin.stackUpgrade.state.paused.fail.header": "暂停升级失败",
+ "admin.stackUpgrade.state.paused.fail.body": "无法暂停升级。稍后再试。",
+ "admin.stackDowngrade.state.paused.fail.header": "暂停降级失败",
+ "admin.stackDowngrade.state.paused.fail.body": "降级不能暂停。稍后再试。",
+ "admin.stackVersions.version.service.notUpgradable": "此存储库中包含的此服务的版本已经安装在集群中。",
+ "admin.stackVersions.version.upgrade.upgradeOptions.header": "升级选项",
+ "admin.stackVersions.version.upgrade.upgradeOptions.bodyMsg.version": "您将要进行升级到<b>{0}</b>.",
+ "admin.stackVersions.version.upgrade.upgradeOptions.bodyMsg.method": "选择升级方法:",
+ "admin.stackVersions.version.upgrade.upgradeOptions.bodyMsg.tolerance": "选择可选的升级容错:",
+ "admin.stackVersions.version.upgrade.upgradeOptions.tolerance.option1": "跳过所有从组件故障",
+ "admin.stackVersions.version.upgrade.upgradeOptions.tolerance.option2": "跳过所有服务检查失败",
+ "admin.stackVersions.version.upgrade.upgradeOptions.tolerance.tooltip": "这些升级失败容错选项在执行大型集群上的升级时是有用的,并且您希望最小化用户干预。",
+ "admin.stackVersions.version.upgrade.upgradeOptions.RU.title": "Rolling",
+ "admin.stackVersions.version.upgrade.upgradeOptions.RU.description": "在执行升级时,服务仍在运行。最小化中断,但升级速度较慢。",
+ "admin.stackVersions.version.upgrade.upgradeOptions.EU.title": "Express",
+ "admin.stackVersions.version.upgrade.upgradeOptions.HOU.title": "主机有序",
+ "admin.stackVersions.version.upgrade.upgradeOptions.EU.description": "在执行升级时停止服务。导致停机时间,但更快的升级。",
+ "admin.stackVersions.version.upgrade.upgradeOptions.errors_bypassed": "绕过升级检查。",
+ "admin.stackVersions.version.upgrade.upgradeOptions.preCheck.rerun": "重新升级升级检查",
+ "admin.stackVersions.version.upgrade.upgradeOptions.preCheck.msg.title": "检查:",
+ "admin.stackVersions.version.upgrade.upgradeOptions.preCheck.msg.checking": "检查。。。",
+ "admin.stackVersions.version.upgrade.upgradeOptions.preCheck.msg.failed.title": "检查失败",
+ "admin.stackVersions.version.upgrade.upgradeOptions.preCheck.msg.failed.link": "再运行",
+ "admin.stackVersions.version.upgrade.upgradeOptions.preCheck.allPassed": "通过",
+ "admin.stackVersions.version.upgrade.upgradeOptions.preCheck.allPassed.msg": "所有检查通过",
+ "admin.stackVersions.version.upgrade.upgradeOptions.preCheck.failed.tooltip": "选项不可用",
+ "admin.stackVersions.version.upgrade.upgradeOptions.notAllowed": "当前版本不允许",
+ "admin.stackVersions.version.upgrade.upgradeOptions.EU.confirm.msg": "您即将执行<b>Express升级</b>到<b>{0}</b>。这将导致集群停机。您确定要继续吗?",
+ "admin.stackVersions.version.upgrade.upgradeOptions.RU.confirm.msg": "您即将执行<b>Rolling升级</b>到<b>{0}</b>。您确定要继续吗?",
+ "admin.stackVersions.version.upgrade.upgradeOptions.error": "无法进行升级:",
+ "admin.stackVersions.version.upgrade.upgradeOptions.loading": "检查支持的升级类型…",
+ "admin.stackVersions.version.upgrade.alertsWarning": "集群警报在Ambari仍然可见和记录,但在升级过程中,通知(如电子邮件和SNMP)将被抑制。",
+ "admin.stackVersions.version.preUpgrade.header": "升级前检查",
+ "admin.stackVersions.version.preUpgrade.bodyMsg.version": "已经运行了以下检查来测试升级到<b>{0}</b>的能力。",
+ "admin.stackVersions.version.column.showDetails": "显示细节",
+ "admin.stackVersions.version.column.showDetails.title": "版本详情",
+ "admin.stackVersions.version.noCompatible.tooltip": "不支持直接升级到这个版本。",
+ "admin.stackVersions.hosts.popup.header.current": "当前",
+ "admin.stackVersions.hosts.popup.header.installed": "已安装",
+ "admin.stackVersions.hosts.popup.header.not_installed": "未安装",
+ "admin.stackVersions.hosts.popup.header": "版本状态:{0}",
+ "admin.stackVersions.hosts.popup.title": "{0}版本{2}主机上{1}:",
+ "admin.stackVersions.hosts.popup.current.title": "{0}应用于{1}主机:",
+ "admin.stackVersions.hosts.popup.primary": "跳转到主机",
+ "admin.stackVersions.details.install.hosts.popup.title": "安装{0}版本",
+ "admin.stackVersions.upgradeHistory.upgrade": "升级",
+ "admin.stackVersions.upgradeHistory.downgrade": "降级",
+ "admin.stackVersions.upgradeHistory.show.details": "单击以显示关于{0}的更多细节",
+ "admin.stackVersions.upgradeHistory.success": "成功的{0}",
+ "admin.stackVersions.upgradeHistory.aborted": "中止{0}",
+ "admin.stackVersions.upgradeHistory.summary": "总结",
+ "admin.stackVersions.upgradeHistory.history": "历史",
+ "admin.stackVersions.upgradeHistory.filter.all": "全部({0})",
+ "admin.stackVersions.upgradeHistory.filter.upgrade": "升级({0})",
+ "admin.stackVersions.upgradeHistory.filter.downgrade": "降级({0})",
+ "admin.stackVersions.upgradeHistory.filter.successful.upgrade": "成功升级({0})",
+ "admin.stackVersions.upgradeHistory.filter.successful.downgrade": "成功降级({0})",
+ "admin.stackVersions.upgradeHistory.filter.aborted.upgrade": "升级已中止({0})",
+ "admin.stackVersions.upgradeHistory.filter.aborted.downgrade": "降级已中止({0})",
+ "admin.stackVersions.upgradeHistory.filter.failed.upgrade": "升级失败({0})",
+ "admin.stackVersions.upgradeHistory.filter.failed.downgrade": "降级失败({0})",
+ "admin.stackVersions.upgradeHistory.no.history": "没有升级/降级历史可用",
+ "admin.stackVersions.upgradeHistory.record.title.upgrade": "{0} {1} to {2}",
+ "admin.stackVersions.upgradeHistory.record.title.downgrade": "{0} {1} from {2}",
+ "admin.stackUpgrade.preCheck.warning.message": "{0}警告{1}",
+ "admin.stackUpgrade.preCheck.bypass.message": "{0}错误{1}",
+ "admin.stackUpgrade.preCheck.fail.message": "{0}需要{1}",
+ "admin.stackUpgrade.finalize.later": "完成",
+ "admin.stackUpgrade.finalize.message.upgrade": "你的集群版本升级完成。当您准备完成升级并提交新版本时,点击<b>完成</b>。强烈建议在群集上运行测试,以确保在最终完成之前完全可以运行。 <b>一旦升级完成,就不能回到原来的版本。</b>",
+ "admin.stackUpgrade.finalize.message.downgrade": "你的集群版本降级完成。当您准备完成降级并提交新版本时,点击<b>完成</b>。强烈建议在群集上运行测试,以确保在最终完成之前完全可以运行。 <b>一旦降级完成,就不能回到原来的版本。</b>",
+ "admin.stackUpgrade.finalize.message.revertible": "<b>{0}</b>升级到<b>{1}</b>即将完成。完成后,如果不再需要,则可以从堆栈和版本页恢复补丁。",
+ "admin.stackUpgrade.finalize.message.autoStart": "请记住如果您禁用升级,请重新启用自动启动。",
+ "admin.stackUpgrade.finalize.message.skippedServiceChecks": "在升级期间,检查下列服务失败并跳过:",
+ "admin.stackUpgrade.finalize.message.testServices": "强烈建议您在最终升级之前测试这些服务。",
+ "admin.stackUpgrade.failedHosts.message": "升级没有成功",
+ "admin.stackUpgrade.failedHosts.showHosts": "{0}主机",
+ "admin.stackUpgrade.failedHosts.options": "你的选择:",
+ "admin.stackUpgrade.failedHosts.options.first": "<b>暂停升级</b>,删除不健康的主机并返回升级向导继续进行。",
+ "admin.stackUpgrade.failedHosts.options.second": "执行<b>降级</b>,这将使所有主机恢复到以前的堆栈版本。",
+ "admin.stackUpgrade.failedHosts.options.third": "忽略这些失败,<b>暂时继续</b>(稍后再协调失败)。",
+ "admin.stackUpgrade.failedHosts.isOutOfSync.options.first": "<b>暂停升级</b>并重新启动组件",
+ "admin.stackUpgrade.failedHosts.isOutOfSync.options.second": "<b>重启</b>Ambari代理",
+ "admin.stackUpgrade.failedHosts.header": "失败主机",
+ "admin.stackUpgrade.failedHosts.subHeader": "{0}主机升级失败",
+ "admin.stackUpgrade.failedHosts.details": "查看细节",
+ "admin.stackUpgrade.doThisLater": "以后再做",
+ "admin.stackUpgrade.pauseUpgrade": "暂停升级",
+ "admin.stackUpgrade.pauseDowngrade": "暂停降级",
+ "admin.stackUpgrade.pauseUpgrade.warning": "你即将暂停{0}。您可以返回继续{ 0 }并在稍后的时间内完成,但在升级暂停时,您<strong style='color:red;'>不应</strong>执行任何集群更改。例如:<ul><li>不要在集群上添加/删除主机</li><li>不要在集群上添加/删除服务</li><li>不要在启用/禁用Kerberos</li><li>不要在启用/禁用HA</li><li>不要对服务配置进行任何重大更改</li></ul>你<strong>必须</strong>继续{0}和完成<strong>之前</strong>执行<strong>任何</strong>对集群的重大更改。",
+ "admin.stackUpgrade.downgrade.proceed": "降级",
+ "admin.stackUpgrade.downgrade.body": "您确实希望中止升级过程并降级到<b>{0}</b>吗?",
+ "admin.stackUpgrade.downgrade.retry.body": "您确实希望重试并降级到<b>{0 }</b>吗?",
+ "admin.stackUpgrade.upgrade.confirm.body": "您即将执行对{0}的升级。",
+ "admin.stackUpgrade.upgrade.retry.confirm.body": "您将重试升级到{0}。",
+ "admin.stackUpgrade.title": "堆栈和版本",
+ "admin.stackUpgrade.state.inProgress": "进步升级",
+ "admin.stackUpgrade.state.paused": "暂停升级",
+ "admin.stackUpgrade.state.aborted": "升级中止",
+ "admin.stackUpgrade.state.completed": "升级完成",
+ "admin.stackUpgrade.state.inProgress.downgrade": "正在降级",
+ "admin.stackUpgrade.state.init": "升级初始化",
+ "admin.stackUpgrade.state.init.downgrade": "降级初始化",
+ "admin.stackUpgrade.state.paused.downgrade": "降级暂停",
+ "admin.stackUpgrade.state.aborted.downgrade": "降级中止",
+ "admin.stackUpgrade.state.completed.downgrade": "降级完成",
+ "admin.stackUpgrade.dialog.upgrade.header": "{0}升级到{1}",
+ "admin.stackUpgrade.dialog.upgrade.patch.header": "{0}补丁升级到{1}",
+ "admin.stackUpgrade.dialog.upgrade.maint.header": "{0}Maint升级到{1}",
+ "admin.stackUpgrade.dialog.downgrade.header": "从{0}降级",
+ "admin.stackUpgrade.dialog.operationFailed": "此操作失败。",
+ "admin.stackUpgrade.dialog.stop": "停止升级",
+ "admin.stackUpgrade.dialog.continue": "忽略并继续",
+ "admin.stackUpgrade.dialog.cancel": "取消升级",
+ "admin.stackUpgrade.dialog.inProgress": "现在运行:",
+ "admin.stackUpgrade.dialog.keepRunning": "后台运行升级",
+ "admin.stackUpgrade.dialog.failed": "失败:",
+ "admin.stackUpgrade.dialog.manual.slaveComponentFailures.title": "Slave组件故障",
+ "admin.stackUpgrade.dialog.manual.serviceCheckFailures.title": "服务检查失败",
+ "admin.stackUpgrade.dialog.manual.serviceCheckFailures.msg1": "下列服务检查失败,但跳过:",
+ "admin.stackUpgrade.dialog.manual.serviceCheckFailures.msg2": "在继续之前,您可以选择暂停升级并修复上面的问题。",
+ "admin.stackUpgrade.dialog.manual": "需要手动步骤",
+ "admin.stackUpgrade.dialog.manualDone": "我已经执行了以上的手动步骤。",
+ "admin.stackUpgrade.dialog.closeProgress": "升级正在进行中。",
+ "admin.stackUpgrade.dialog.closePause": "暂停升级。",
+ "admin.stackUpgrade.dialog.aborted": "升级失败。",
+ "admin.stackUpgrade.dialog.downgrade.aborted": "降级被中止。",
+ "admin.stackUpgrade.dialog.suspended": "升级暂停",
+ "admin.stackUpgrade.dialog.suspended.downgrade": "降级暂停",
+ "admin.stackUpgrade.dialog.resume": "恢复升级",
+ "admin.stackUpgrade.dialog.resume.downgrade": "恢复降级",
+ "admin.stackUpgrade.dialog.details.open": "显示细节",
+ "admin.stackUpgrade.dialog.details.hide": "隐藏细节",
+ "admin.stackUpgrade.dialog.notActive": "等待执行下一个任务…",
+ "admin.stackUpgrade.dialog.prepareUpgrade.header": "准备升级…",
+ "services.service.start": "开启",
+ "services.service.stop": "停止",
+ "services.service.metrics": "指标",
+ "services.nothingToAdd": "无需补充",
+ "services.service.summary.version": "版本",
+ "services.service.summary.viewHost": "查看主机",
+ "services.service.summary.viewHosts": "查看主机",
+ "services.service.summary.clientOnlyService.ToolTip": "客户端专用服务",
+ "services.service.summary.JournalNodesLive": "JournalNodes Live",
+ "services.service.summary.mapreduce2.client": "MapReduce2 Client",
+ "services.service.summary.mapreduce2.clients": "MapReduce2 Clients",
+ "services.service.summary.nodeManagersLive": "NodeManagers Live",
+ "services.service.summary.TrackersLive": "Trackers Live",
+ "services.service.summary.RegionServersLIVE": "RegionServers Live",
+ "services.service.summary.RestServersLIVE": "HBaseRESTServer Live",
+ "services.service.summary.PhoenixServersLIVE": "Phoenix Query servers Live",
+ "services.service.summary.GangliaMonitorsLIVE": "Ganglia Monitors Live",
+ "services.service.summary.SupervisorsLIVE": "Supervisors Live",
+ "services.service.summary.nameNode": "NameNode Web UI",
+ "services.service.summary.nameNodeUptime": "NameNode Uptime",
+ "services.service.summary.nameNodeHeap": "NameNode Heap",
+ "services.service.summary.nameNode.active": "Active NameNode",
+ "services.service.summary.nameNode.standby": "Standby NameNode",
+ "services.service.summary.pendingUpgradeStatus": "升级状态",
+ "services.service.summary.pendingUpgradeStatus.notFinalized": "升级未完成",
+ "services.service.summary.pendingUpgradeStatus.notPending": "无升级队列",
+ "services.service.summary.safeModeStatus": "安全模式状态",
+ "services.service.summary.safeModeStatus.inSafeMode": "在安全模式下",
+ "services.service.summary.safeModeStatus.notInSafeMode": "不在安全模式下",
+ "services.service.summary.dataNodes": "DataNodes",
+ "services.service.summary.diskCapacity": "硬盘容量",
+ "services.service.summary.blocksTotal": "块(总计)",
+ "services.service.summary.blockErrors": "块错误",
+ "services.service.summary.totalFiles": "总文件+目录",
+ "services.service.summary.jobTracker": "jobTracker",
+ "services.service.summary.jobTrackerWebUI": "JobTracker Web UI",
+ "services.service.summary.jobTrackerUptime": "JobTracker Uptime",
+ "services.service.summary.trackersLiveTotal": "Trackers",
+ "services.service.summary.trackersBlacklistGraylist": "Trackers",
+ "services.service.summary.jobTrackerHeap": "JobTracker Heap",
+ "services.service.summary.totalSlotsCapacity": "总时隙容量",
+ "services.service.summary.totalJobs": "总工作",
+ "services.service.summary.currentSlotUtiliMaps": "Map Slots",
+ "services.service.summary.currentSlotUtiliReduces": "Reduce Slots",
+ "services.service.summary.tasksMaps": "任务:Maps",
+ "services.service.summary.tasksReduces": "任务:Reduces",
+ "services.service.summary.hbaseMaster": "HBase Master Web UI",
+ "services.service.summary.regionServerCount": "RegionServer Count",
+ "services.service.summary.regionInTransition": "Region In Transition",
+ "services.service.summary.masterStarted": "Master Started",
+ "services.service.summary.masterActivated": "Master Activated",
+ "services.service.summary.averageLoad": "平均负荷",
+ "services.service.summary.masterHeap": "主堆",
+ "services.service.summary.moreStats": "更多统计数据",
+ "services.service.summary.clientCount": "{0}客户端主机",
+ "services.service.summary.historyServer": "历史服务器Web用户界面",
+ "services.service.summary.hiveserver2.jdbc.url.text": "JDBC URL",
+ "services.service.summary.hiveserver2.endpoint.tooltip.text": "{0}的JDBC连接字符串",
+ "services.service.summary.hiveserver2.endpoint.value": "jdbc:hive2://{0}/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace={1}",
+ "services.service.actions.downloadClientConfigs": "下载客户端配置文件",
+ "services.service.actions.downloadClientConfigs.fail.noConfigFile": "没有为组件定义配置文件",
+ "services.service.actions.downloadClientConfigs.fail.popup.header": "{0}配置",
+ "services.service.actions.downloadClientConfigs.fail.popup.body.noErrorMessage": "{0}配置文件的生成失败。",
+ "services.service.actions.downloadClientConfigs.fail.popup.body.errorMessage": "{0}配置文件的生成失败了{1}错误: <br/><pre><span class=\"text-error\">{2}</span></pre>",
+ "services.service.actions.downloadClientConfigs.fail.popup.body.question": "你想再试一次吗?",
+ "services.service.actions.deleteService": "删除服务",
+ "services.service.actions.run.rebalancer": "运行Rebalancer",
+ "services.service.actions.run.rebalanceHdfsNodes": "Rebalance HDFS",
+ "services.service.actions.run.rebalanceHdfsNodes.title": "HDFS Rebalance",
+ "services.service.actions.run.rebalanceHdfsNodes.prompt": "平衡器阈值(磁盘容量百分比):",
+ "services.service.actions.run.rebalanceHdfsNodes.promptTooltip": "磁盘容量百分比。这将重写默认阈值。",
+ "services.service.actions.run.rebalanceHdfsNodes.promptError": "值应该在1到100之间。",
+ "services.service.actions.run.rebalanceHdfsNodes.context": "Rebalance HDFS",
+ "services.service.actions.run.rebalanceHdfsNodes.error": "远程命令期间的错误:",
+ "services.service.actions.run.yarnRefreshQueues.title": "刷新队列资源管理器",
+ "services.service.actions.run.yarnRefreshQueues.menu": "刷新YARN容量调度程序",
+ "services.service.actions.run.yarnRefreshQueues.context": "刷新YARN容量调度程序",
+ "services.service.actions.run.yarnRefreshQueues.error": "远程命令期间的错误:",
+ "services.service.actions.run.executeCustomCommand.menu": "{0}",
+ "services.service.actions.run.executeCustomCommand.context": "执行{0}",
+ "services.service.actions.run.executeCustomCommand.error": "远程命令期间的错误:",
+ "services.service.actions.run.compaction": "运行压缩",
+ "services.service.actions.run.smoke": "运行服务检查",
+ "services.service.actions.reassign.master": "迁移{0}",
+ "services.service.actions.reassign.master.hive": "移动HiveServer2、WebHCat Server、MySQL Server",
+ "services.service.actions.manage_configuration_groups": "管理配置组…",
+ "services.service.actions.run.startLdapKnox.title": "启动演示LDAP KNOX网关",
+ "services.service.actions.run.startLdapKnox.context": "启动演示LDAP",
+ "services.service.actions.run.stopLdapKnox.title": "停止演示LDAP NOX网关",
+ "services.service.actions.run.stopLdapKnox.context": "停止演示LDAP",
+ "services.service.actions.run.startStopLdapKnox.error": "远程命令期间的错误:",
+ "services.service.actions.run.restartLLAP": "重新启动LLAP",
+ "services.service.actions.run.immediateStopHawqService.context": "停止HAWQ服务(即时模式)",
+ "services.service.actions.run.immediateStopHawqService.label": "停止HAWQ服务(即时模式)",
+ "services.service.actions.run.immediateStopHawqSegment.label": "停止(立即模式)",
+ "services.service.actions.run.immediateStopHawqSegment.context": "停止HAWQ段(立即模式)",
+ "services.service.actions.run.resyncHawqStandby.context": "HAWQ备用主机",
+ "services.service.actions.run.resyncHawqStandby.label": "重新同步HAWQ备用主机",
+ "services.service.actions.run.clearHawqCache.label": "清除HAWQ的HDFS元数据缓存",
+ "services.service.actions.run.runHawqCheck.label": "运行HAWQ配置检查",
+ "services.service.actions.manage_configuration_groups.short": "管理配置组",
+ "services.service.actions.serviceActions": "服务操作",
+ "services.service.actions.hsi.alertPopup.header": "无法启用交互式查询",
+ "services.service.actions.hsi.alertPopup.body": "现在无法启用交互式查询,因为交互式查询处于禁用的过程中。这可能需要几分钟。稍后再试。",
+ "services.service.delete.popup.header": "删除服务",
+ "services.service.delete.popup.kerberos": "Kerberos服务<i>不能被删除</i>,因为Kerberos当前已启用,并在集群中使用。Kerberos服务只能通过禁用Kerberos来删除,通过跳转到<b> admin > Kerberos </b>,并选择<b>禁用Kerberos </b>。",
+ "services.service.delete.popup.ranger": "在删除<b>Ranger</b>之前,必须禁用插件。",
+ "services.service.delete.configVersionNote": "在{0}被移除之后更新配置",
+ "services.service.delete.configVersionNote.plural": "{0}移除后的更新配置",
+ "services.service.delete.lastService.popup.body": "不能删除<b>{0}</b>服务,必须安装至少一个服务。",
+ "services.service.delete.popup.dependentServices": "在删除<b>{0}</b>之前,必须删除以下相关的服务:",
+ "services.service.delete.popup.mustBeStopped": "在删除<b>{0}</b>之前,必须停止服务和每个slave和主组件。",
+ "services.service.delete.popup.mustBeStopped.dependent": " 伴随服务<b>{0}</b>。",
+ "services.service.delete.popup.warning": "<b>将从Ambari中删除{0}服务,所有配置和配置历史将丢失。</b>",
+ "services.service.delete.popup.warning.dependent": "<b>注意:从属{0}服务也将被移除。</b>",
+ "services.service.confirmDelete.popup.header": "确认删除",
+ "services.service.confirmDelete.popup.body": "您必须通过在确认框中输入“{1}”来确认删除<b>{0}</b>。<b>此操作不可逆,所有配置历史都将丢失。</b>",
+ "services.service.confirmDelete.popup.body.type": "输入“{0}”以确认",
+ "services.service.confirmDelete.popup.body.dependent": "必须通过在确认框中输入“{2}”来确认删除<b>{0}</b>和<b>{1}</b>。<b>此操作不可逆,所有配置历史都将丢失。</b>",
+ "services.service.delete.progressPopup.message": "正在删除{0}…",
+ "services.service.delete.service.success.confirmation": "服务{0}被成功删除",
+ "services.service.delete.service.success.confirmation.plural": "服务{0}被成功删除",
+ "services.service.delete.popup.warning.ranger_kms": "<b>如果加密区域(EZ)和密钥由服务管理,则不应删除Ranger KMS。否则EZ中的数据将无法访问。</b>",
+ "services.service.summary.unknown": "未知的",
+ "services.service.summary.notRunning": "不运行",
+ "services.service.summary.notAvailable": "N/A",
+ "services.service.summary.diskInfoBar.used": "已使用",
+ "services.service.summary.storm.freeslots": "剩余槽数",
+ "services.service.summary.storm.executors": "执行人",
+ "services.service.summary.storm.tasks": "任务",
+ "services.service.summary.storm.nimbus.uptime": "Nimbus正常运行时间",
+ "services.service.summary.storm.topologies": "拓扑",
+ "services.service.summary.flume.startAgent": "启动代理",
+ "services.service.summary.flume.stopAgent": "停止代理",
+ "services.service.summary.flume.stop.context": "停止Flume{0}",
+ "services.service.summary.flume.start.context": "启动Flume{0}",
+ "services.service.summary.flume.noAgents": "无Flume显示",
+ "services.service.summary.ranger.plugin.title": "Ranger{0}插件",
+ "services.service.summary.ranger.plugin.loadingStatus": "加载状态…",
+ "services.service.summary.alerts.noAlerts": "无警报",
+ "services.service.summary.alerts.alertsExist": "{0}警报",
+ "services.service.summary.alerts.popup.header": "{0}的警报",
+ "services.service.info.metrics.ambariMetrics.master.averageLoad": "平均负荷",
+ "services.service.info.metrics.ambariMetrics.master.displayNames.averageLoad": "平均负荷",
+ "services.service.info.metrics.ambariMetrics.regionServer.storeFiles": "保存文件数",
+ "services.service.info.metrics.ambariMetrics.regionServer.displayNames.storeFilesCount": "保存文件数",
+ "services.service.info.metrics.ambariMetrics.regionServer.regions": "地区数",
+ "services.service.info.metrics.ambariMetrics.regionServer.displayNames.regionsCount": "地区数",
+ "services.service.info.metrics.ambariMetrics.regionServer.requests": "总请求数",
+ "services.service.info.metrics.ambariMetrics.regionServer.displayNames.requestCount": "总请求数",
+ "services.service.info.metrics.ambariMetrics.regionServer.blockCacheHitPercent": "块缓存命中率",
+ "services.service.info.metrics.ambariMetrics.regionServer.displayNames.blockCacheHitPercent": "块缓存命中率",
+ "services.service.info.metrics.ambariMetrics.regionServer.compactionQueueSize": "压缩队列大小",
+ "services.service.info.metrics.ambariMetrics.regionServer.displayNames.compactionQueueSize": "压缩队列大小",
+ "services.service.info.metrics.flume.channelFillPercent": "通道填充率",
+ "services.service.info.metrics.flume.channelSize": "通道尺寸",
+ "services.service.info.metrics.flume.sinkDrainSuccess": "沉没事件计数",
+ "services.service.info.metrics.flume.sourceAccepted": "源事件接受计数",
+ "services.service.info.metrics.flume.sinkConnectionFailed": "接收器连接失败计数",
+ "services.service.info.metrics.flume.channelSizeMMA": "信道大小事件",
+ "services.service.info.metrics.flume.channelSizeSum": "信道大小事件和",
+ "services.service.info.metrics.flume.incoming.mma": "传入事件率",
+ "services.service.info.metrics.flume.incoming.sum": "传入事件数",
+ "services.service.info.metrics.flume.outgoing.mma": "传出事件率",
+ "services.service.info.metrics.flume.outgoing.sum": "传出事件和",
+ "services.service.info.metrics.flume.gc": "垃圾收集时间",
+ "services.service.info.metrics.flume.cpu.user": "CPU(用户)",
+ "services.service.info.metrics.flume.jvmThreadsRunnable": "JVM可运行线程",
+ "services.service.info.metrics.flume.jvmHeapUsed": "使用的JVM堆内存",
+ "services.service.info.metrics.flume.channelType": "信道大小{0}",
+ "services.service.info.metrics.flume.incoming_mma": "传入{0}",
+ "services.service.info.metrics.flume.outgoing_mma": "传出{0}",
+ "services.service.info.metrics.flume.sourceName": "源{0}",
+ "services.service.info.metrics.flume.hostName": "主机:{0}",
+ "services.service.info.metrics.flume.channelName": "通道{0}",
+ "services.service.info.metrics.flume.sinkName": "接收器{0}",
+ "services.service.info.metrics.hbase.clusterRequests": "集群请求",
+ "services.service.info.metrics.hbase.clusterRequests.displayNames.requestCount": "请求计数",
+ "services.service.info.metrics.hbase.hlogSplitSize": "HLog分块尺寸",
+ "services.service.info.metrics.hbase.hlogSplitSize.displayNames.splitSize": "分割大小",
+ "services.service.info.metrics.hbase.hlogSplitTime": "HLog分裂时间",
+ "services.service.info.metrics.hbase.hlogSplitTime.displayNames.splitTime": "分裂时间",
+ "services.service.info.metrics.hbase.regionServerQueueSize": "区域服务器队列大小",
+ "services.service.info.metrics.hbase.regionServerQueueSize.displayNames.compactionQueueSize": "压缩队列大小",
+ "services.service.info.metrics.hbase.regionServerQueueSize.displayNames.flushQueueSize": "刷新队列大小",
+ "services.service.info.metrics.hbase.regionServerRegions": "区域服务器区域",
+ "services.service.info.metrics.hbase.regionServerRegions.displayNames.regions": "区域",
+ "services.service.info.metrics.hbase.regionServerRequests": "累积请求",
+ "services.service.info.metrics.hbase.regionServerRequests.2": "区域服务器请求",
+ "services.service.info.metrics.hbase.regionServerRequests.displayNames.writeRequests": "写入请求",
+ "services.service.info.metrics.hbase.regionServerRequests.displayNames.readRequests": "读取请求",
+ "services.service.info.metrics.hdfs.blockStatus": "块状态",
+ "services.service.info.metrics.hdfs.blockStatus.displayNames.pendingReplicationBlocks": "等待复制块",
+ "services.service.info.metrics.hdfs.blockStatus.displayNames.underReplicatedBlocks": "在复制块下",
+ "services.service.info.metrics.hdfs.fileOperations": "文件操作",
+ "services.service.info.metrics.hdfs.fileOperations.displayNames.fileInformationOperations": "文件信息操作",
+ "services.service.info.metrics.hdfs.fileOperations.displayNames.deleteFileOperations": "删除文件操作",
+ "services.service.info.metrics.hdfs.fileOperations.displayNames.createFileOperations": "创建文件操作",
+ "services.service.info.metrics.hdfs.gc": "垃圾收集",
+ "services.service.info.metrics.hdfs.gc.displayNames.gcTimeMillis": "时间",
+ "services.service.info.metrics.hdfs.io": "HDFS I/O",
+ "services.service.info.metrics.hdfs.io.displayNames.bytesWritten": "字节写入",
+ "services.service.info.metrics.hdfs.io.displayNames.bytesRead": "字节读取",
+ "services.service.info.metrics.hdfs.jvmHeap": "JVM内存状态",
+ "services.service.info.metrics.hdfs.jvmHeap.displayNames.memHeapCommittedM": "提交堆内存",
+ "services.service.info.metrics.hdfs.jvmHeap.displayNames.memNonHeapUsedM": "使用非堆内存",
+ "services.service.info.metrics.hdfs.jvmHeap.displayNames.memHeapUsedM": "使用堆内存",
+ "services.service.info.metrics.hdfs.jvmHeap.displayNames.memNonHeapCommittedM": "提交的非堆内存",
+ "services.service.info.metrics.hdfs.jvmThreads": "JVM线程状态",
+ "services.service.info.metrics.hdfs.jvmThreads.displayNames.threadsBlocked": "线程阻塞",
+ "services.service.info.metrics.hdfs.jvmThreads.displayNames.threadsWaiting": "线程等待",
+ "services.service.info.metrics.hdfs.jvmThreads.displayNames.threadsTimedWaiting": "线程定时等待",
+ "services.service.info.metrics.hdfs.jvmThreads.displayNames.threadsRunnable": "可运行线程",
+ "services.service.info.metrics.hdfs.rpc": "RPC",
+ "services.service.info.metrics.hdfs.rpc.displayNames.rpcQueueTimeAvgTime": "队列平均等待时间",
+ "services.service.info.metrics.hdfs.spaceUtilization": "总空间利用率",
+ "services.service.info.metrics.hdfs.spaceUtilization.displayNames.capacityRemainingGB": "剩余容量",
+ "services.service.info.metrics.hdfs.spaceUtilization.displayNames.capacityUsedGB": "使用容量",
+ "services.service.info.metrics.hdfs.spaceUtilization.displayNames.capacityTotalGB": "总容量",
+ "services.service.info.metrics.hdfs.spaceUtilization.displayNames.capacityRemaining": "剩余容量",
+ "services.service.info.metrics.hdfs.spaceUtilization.displayNames.capacityUsed": "已使用容量",
+ "services.service.info.metrics.hdfs.spaceUtilization.displayNames.capacityTotal": "总容量",
+ "services.service.info.metrics.hdfs.spaceUtilization.displayNames.capacityNonDFSUsed": "非DFS容量使用",
+ "services.service.info.metrics.yarn.jvmHeap": "JVM内存状态",
+ "services.service.info.metrics.yarn.jvmHeap.displayNames.memHeapCommittedM": "提交堆内存",
+ "services.service.info.metrics.yarn.jvmHeap.displayNames.memNonHeapUsedM": "使用非堆内存",
+ "services.service.info.metrics.yarn.jvmHeap.displayNames.memHeapUsedM": "使用堆内存",
+ "services.service.info.metrics.yarn.jvmHeap.displayNames.memNonHeapCommittedM": "提交的非堆内存",
+ "services.service.info.metrics.yarn.jvmThreads": "JVM线程状态",
+ "services.service.info.metrics.yarn.jvmThreads.displayNames.threadsBlocked": "线程阻塞",
+ "services.service.info.metrics.yarn.jvmThreads.displayNames.threadsWaiting": "线程等待",
+ "services.service.info.metrics.yarn.jvmThreads.displayNames.threadsTimedWaiting": "线程定时等待",
+ "services.service.info.metrics.yarn.jvmThreads.displayNames.threadsRunnable": "可运行线程",
+ "services.service.info.metrics.yarn.rpc": "RPC",
+ "services.service.info.metrics.yarn.rpc.displayNames.RpcQueueTimeAvgTime": "队列平均等待时间",
+ "services.service.info.metrics.yarn.gc": "垃圾收集",
+ "services.service.info.metrics.yarn.gc.displayNames.gcTimeMillis": "时间",
+ "services.service.info.metrics.yarn.allocated.memory": "集群存储器",
+ "services.service.info.metrics.yarn.allocated.memory.displayNames.allocated": "分配的",
+ "services.service.info.metrics.yarn.allocated.memory.displayNames.available": "可用的",
+ "services.service.info.metrics.yarn.allocated.memory.displayNames.pending": "的",
+ "services.service.info.metrics.yarn.allocated.container": "容器",
+ "services.service.info.metrics.yarn.allocated.container.displayNames.allocated": "分配",
+ "services.service.info.metrics.yarn.allocated.container.displayNames.reserved": "保留的",
+ "services.service.info.metrics.yarn.allocated.container.displayNames.pending": "待定的",
+ "services.service.info.metrics.yarn.nodemanager.statuses": "NodeManagers",
+ "services.service.info.metrics.yarn.nodemanager.statuses.displayNames.active": "Active NodeManagers",
+ "services.service.info.metrics.yarn.nodemanager.statuses.displayNames.decommissioned": "Decommissioned NodeManagers",
+ "services.service.info.metrics.yarn.nodemanager.statuses.displayNames.lost": "Lost NodeManagers",
+ "services.service.info.metrics.yarn.nodemanager.statuses.displayNames.rebooted": "Rebooted NodeManagers",
+ "services.service.info.metrics.yarn.nodemanager.statuses.displayNames.unhealthy": "Unhealthy NodeManagers",
+ "services.service.info.metrics.yarn.queueMemoryResource": "队列内存使用",
+ "services.service.info.metrics.yarn.queueMemoryResource.displayNames.allocated": "已分配({0})",
+ "services.service.info.metrics.yarn.queueMemoryResource.displayNames.available": "可用({0})",
+ "services.service.info.metrics.yarn.queueMemoryResource.displayName": "队列:{0}",
+ "services.service.info.metrics.yarn.apps.states.current.title": "当前应用",
+ "services.service.info.metrics.yarn.apps.states.finished.title": "已完成的应用程序",
+ "services.service.info.metrics.yarn.apps.states.completed": "已完成",
+ "services.service.info.metrics.yarn.apps.states.failed": "失败",
+ "services.service.info.metrics.yarn.apps.states.killed": "已中止",
+ "services.service.info.metrics.yarn.apps.states.pending": "待定的",
+ "services.service.info.metrics.yarn.apps.states.running": "运行",
+ "services.service.info.metrics.yarn.apps.states.submitted": "提交",
+ "services.service.info.menu.summary": "概览",
+ "services.service.info.menu.configs": "配置",
+ "services.service.info.menu.heatmaps": "热力图",
+ "services.service.info.summary.hostsRunningMonitor": "{0}/{1}",
+ "services.service.info.summary.serversHostCount": "{0}更多",
+ "services.service.config.nothing.to.display": "没有显示的属性。",
+ "services.service.config.final": "不可更改",
+ "services.service.config.password.additionalDescription": "出于安全目的,在配置版本比较中不会显示密码更改。",
+ "services.service.config.secure.additionalDescription": "此配置可由特权用户在Admin导航下从Kerberos页面更改。",
+ "services.service.config.saved": "保存配置更改",
+ "services.service.config.notSaved": "无法保存配置更改",
+ "services.service.config.restartService.TooltipMessage": "{1}主机上{0}组件<b>重新启动服务</b><br>所使用的旧配置:",
+ "services.service.config.restartService.needToRestart": "<strong>必须重启项:</strong> ",
+ "services.service.config.restartService.needToRestartEnd": "应重新启动",
+ "service.service.config.restartService.shouldBeRestarted": "需要重新启动{0}",
+ "services.service.config.saved.message": "服务配置更改成功保存。",
+ "services.service.config.saving.message": "正在保存配置更改…",
+ "services.service.config.msgServiceStop": "无法保存配置更改。请先停止服务。在所有组件停止后,您将能够保存配置更改。",
+ "services.service.config.failCreateConfig": "创建服务配置失败",
+ "services.service.config.failSaveConfig": "保存服务配置失败",
+ "services.service.config.failSaveConfigHostOverrides": "保存服务配置重写失败",
+ "services.service.config.addPropertyWindow.error.required": "这是必需的",
+ "services.service.config.addPropertyWindow.error.derivedKey": "此属性已定义",
+ "services.service.config.addPropertyWindow.error.derivedKey.location": "此属性已在其他配置文件({0})中定义。",
+ "services.service.config.addPropertyWindow.error.derivedKey.infile": "此属性已在该配置文件中定义",
+ "services.service.config.addPropertyWindow.error.derivedKey.specific": "属性“{0}”已在该配置文件中定义。",
+ "services.service.config.addPropertyWindow.error.format": "键和值应用“=”号分隔。",
+ "services.service.config.addPropertyWindow.error.lineNumber": "行{0}:",
+ "services.service.config.addPropertyWindow.filterKeyLink": "查找属性",
+ "services.service.config.addPropertyWindow.properties": "属性",
+ "services.service.config.addPropertyWindow.propertiesHelper": "键=值(每行一个)",
+ "services.service.config.addPropertyWindow.propertiesPlaceholder": "输入键=值(每行一个)",
+ "services.service.config.addPropertyWindow.bulkMode": "批量属性添加模式",
+ "services.service.config.addPropertyWindow.singleMode": "单一属性添加模式",
+ "services.service.config.stopService.runningHostComponents": "{1}主机上的{0}组件正在运行",
+ "services.service.config.stopService.unknownHostComponents": "{1}主机上的{0}组件处于未知状态。这些组件实际上可能正在运行,并且需要在以后重新启动以使更改有效。",
+ "services.service.config.confirmDirectoryChange": "您将要对核心为{0}的服务目录进行更改。在进行之前,绝对要知道这些含义,并且如果有任何改变,你必须采取必要的手动步骤。您确定要继续吗?",
+ "services.service.config.configOverride.head": "配置覆盖",
+ "services.service.config.configOverride.body": "无法覆盖尚未保存的配置文件。",
+ "services.service.config.exitPopup.body": "您有未保存的更改。保存更改还是丢弃?",
+ "services.service.config.exitChangesPopup.body": "你将返回到“分配slave和client”一步,将失去所有当前的自定义。你确定吗?",
+ "services.service.config.propertyFilterPopover.title": "属性过滤器",
+ "services.service.config.propertyFilterPopover.content": "通过属性名称、值或描述输入关键字来过滤属性。",
+ "services.service.config.hive.oozie.postgresql": "现有PostgreSQL数据库",
+ "services.service.config.database.connection.success": "连接OK",
+ "services.service.config.database.connection.inProgress": "检查连通性",
+ "services.service.config.database.connection.failed": "连接失败",
+ "services.service.config.connection.logsPopup.header": "{0}连接:{1}",
+ "services.service.config.connection.exitPopup.msg": "测试连接正在进行中。建议等到它完成。确实要退出启用Kerberos向导吗?",
+ "services.service.config.database.btn.idle": "测试连接",
+ "services.service.config.kdc.btn.idle": "测试KDC连接",
+ "services.service.config.database.btn.connecting": "连接。。。",
+ "services.service.config.database.msg.jdbcSetup": "确保在Ambari服务器主机上已运行:<br/><b>ambari-server setup --jdbc-db={0} --jdbc-driver=/path/to/{0}/{1}</b>使JDBC驱动程序可用,并启用测试数据库连接。",
+ "services.service.config.configHistory.configGroup": "配置组",
+ "services.service.config.configHistory.rightArrow.tooltip": "显示早期版本",
+ "services.service.config.configHistory.leftArrow.tooltip": "显示最新版本",
+ "services.service.config.configHistory.dismissIcon.tooltip": "关闭",
+ "services.service.config.configHistory.makeCurrent.message": "从服务配置版本{0}创建的",
+ "services.service.config.configHistory.comparing": "比较",
+ "services.service.config.setRecommendedValue": "重置",
+ "services.service.config.database.msg.jdbcSetup.detailed": "在Hive上使用{0},必须<a href=\"{3}\" target=\"_blank\">从{0}下载{4}</a>。一旦下载到Ambari服务器主机上, 运行: <br/><b>ambari-server setup --jdbc-db={1} --jdbc-driver=/path/to/{1}/{2}</b>",
+ "services.service.widgets.list-widget.nothingSelected": "没有选择",
+ "services.add.header": "添加服务向导",
+ "services.reassign.header": "移动主向导",
+ "services.service.add": "添加服务",
+ "services.service.startAll": "全部启动",
+ "services.service.stopAll": "全部停止",
+ "services.service.restartAllRequired": "重启所需的",
+ "services.service.downloadAllClientConfigs": "下载所有客户端配置",
+ "services.service.startAll.confirmMsg": "你即将启动所有的服务",
+ "services.service.stopAll.confirmMsg": "你即将停止所有的服务",
+ "services.service.refreshAll.confirmMsg": "<p>你正准备重启{0}</p><div class=\"alert alert-warning\">这将触发服务重新启动时的警报。为了避免警报,在运行所有重启之前打开上面列出的服务的维护模式。</div>",
+ "services.service.start.confirmMsg": "你即将启动{0}",
+ "services.service.stop.confirmMsg": "你即将停止{0}",
+ "services.service.stop.confirmButton": "确认停止",
+ "services.service.start.confirmButton": "确认启动",
+ "services.service.stop.warningMsg.turnOnMM": "这将在服务停止时生成警报。为了避免警报,在停止之前打开{0}的维护模式。",
+ "services.service.stop.warningMsg.dependent.services": "停止{0}可能会损害其相关服务的功能:{1}。",
+ "services.service.restartAll.confirmButton": "确认重启所有",
+ "services.service.restartAll.confirmMsg": "您将重新启动{0}。",
+ "services.service.restartAll.warningMsg.turnOnMM": "这将触发服务重新启动时的警报。若要避免警报,请在运行重新启动之前打开{0}的维护模式。",
+ "services.service.stop.HDFS.warningMsg.checkPointNA": "无法确定最后一个HDFS检查点的年龄。请确保您有最近的检查站。否则,NameNode(S)可能需要很长的时间才能启动。",
+ "services.service.stop.HDFS.warningMsg.checkPointTooOld.instructions": "<br><ol><li>登录NameNode主机<b>{0}</b>.</li><li>将NameNode设置成安全模式(只读模式):<div class=\"code-snippet\">sudo su {1} -l -c 'hdfs dfsadmin -safemode enter'</div></li><li>一旦处于安全模式,创建检查点:<div class=\"code-snippet\">sudo su {1} -l -c 'hdfs dfsadmin -saveNamespace'</div></li></ol>",
+ "services.service.stop.HDFS.warningMsg.checkPointTooOld": "最后一个HDFS检查点比{0}小时长。请务必在开始之前检查一个检查点。否则,NameNode可能需要很长的时间才能启动。",
+ "services.service.config_groups_popup.header": "管理{0}配置组",
+ "services.service.config_groups_popup.notice": "您可以通过管理{{serviceName}}配置组及其主机成员资格,将不同的{{serviceName}}配置集合应用到主机组。属于{{serviceName}}配置组的主机具有相同的{{serviceName}}的配置集合。每个主机属于一个{{serviceName}}配置组。",
+ "services.service.config_groups_popup.rename": "重命名",
+ "services.service.config_groups_popup.duplicate": "复制",
+ "services.service.config_groups_popup.group_name_lable": "名称",
+ "services.service.config_groups_popup.group_desc_lable": "描述",
+ "services.service.config_groups_popup.properties": "属性",
+ "services.service.config_groups_popup.addButton": "创建新配置组",
+ "services.service.config_groups_popup.removeButton": "删除配置组",
+ "services.service.config_groups_popup.renameButton": "重命名配置组",
+ "services.service.config_groups_popup.addHost": "向选定的配置组添加主机",
+ "services.service.config_groups_popup.addHostDisabled": "没有可用的主机添加。",
+ "services.service.config_groups_popup.removeHost": "从选定的配置组中删除主机",
+ "services.service.config_groups_popup.duplicateButton": "重复配置组",
+ "services.service.config_groups.add_config_group_popup.header": "创建新配置组",
+ "services.service.config_groups.duplicate_config_group_popup.header": "重复配置组",
+ "services.service.config_groups.rename_config_group_popup.header": "重命名配置组",
+ "services.service.config_groups.switchGroupTextFull": "切换到\'{0}\'主机配置组",
+ "services.service.config_groups.switchGroupTextShort": "切换到\'{0}\'",
+ "services.reassign.closePopup": "移动{0}向导正在进行中。必须允许向导完成Ambari处于可用状态。如果您选择退出,您必须遵循手动指令来完成或恢复移动{0}向导,如Ambari用户指南中所记载的那样。确实要退出向导吗?",
+ "services.reassign.error.fewHosts": "必须在集群中至少有2个主机才能运行移动向导。",
+ "services.reassign.step1.header": "开始",
+ "services.reassign.step1.message1": "此向导将引导您移动{0}。<br/>",
+ "services.reassign.step1.message2": "重新分配{0}的过程涉及到<b>自动化步骤</b>(这将由向导处理)和<b>手动步骤</b>(必须按照向导指示的顺序执行)的组合。<br/><br/>",
+ "services.reassign.step1.message3": "<br/><p class=\"restart-services-alert\">以下服务将作为向导的一部分重新启动:<b>{0}</b>。在移动{1}时,应计划集群维护窗口并准备集群停机时间。</p>",
+ "services.reassign.step2.header": "分配主体",
+ "services.reassign.step2.currentHost": "当前:",
+ "services.reassign.step2.body": "将{0}分配给新主机。",
+ "services.reassign.step2.body.namenodeHA": "将{0}移动到新主机。每次只能移动一个主组件。",
+ "services.reassign.step3.header": "回顾",
+ "services.reassign.step3.body": "<b>确认您的主机选择。</b>",
+ "services.reassign.step3.targetHost": "目标主机:",
+ "services.reassign.step3.sourceHost": "源主机:",
+ "services.reassign.step3.component": "组件名称:",
+ "services.reassign.step3.configs": "<div class=\"alert alert-info\"><p><b>回顾配置修改</b></p>向导将进行以下配置更改。</div>",
+ "services.reassign.step4.header": "配置组件",
+ "services.reassign.step4.tasks.stopRequiredServices.title": "停止所需服务",
+ "services.reassign.step4.tasks.createHostComponents.title": "创建{0}",
+ "services.reassign.step4.tasks.putHostComponentsInMaintenanceMode.title": "禁用{0}",
+ "services.reassign.step4.tasks.reconfigure.title": "重新配置{0}",
+ "services.reassign.step4.tasks.save.configuration.note": "此配置是由移动{0}向导创建的",
+ "services.reassign.step4.tasks.installHostComponents.title": "安装{0}",
+ "services.reassign.step4.tasks.startZooKeeperServers.title": "启动ZooKeeper服务器",
+ "services.reassign.step4.tasks.startNameNode.title": "启动NameNode",
+ "services.reassign.step4.tasks.stopHostComponentsInMaintenanceMode.title": "停止{0}",
+ "services.reassign.step4.tasks.deleteHostComponents.title": "删除禁用{0}",
+ "services.reassign.step4.tasks.startRequiredServices.title": "启动所需服务",
+ "services.reassign.step4.tasks.cleanMySqlServer.title": "清除MySQL服务器",
+ "services.reassign.step4.tasks.testHiveMysqlConnection.title": "测试MySQL连接",
+ "services.reassign.step4.tasks.configureMySqlServer.title": "配置MySQL服务器",
+ "services.reassign.step4.tasks.startMySqlServer.title": "启动MySQL服务器",
+ "services.reassign.step4.tasks.restartMySqlServer.title": "重新启动MySQL服务器",
+ "services.reassign.step4.tasks.startServices.title": "启动服务",
+ "services.reassign.step4.tasks.testDBConnection.title": "测试数据库连接",
+ "services.reassign.step4.tasks.testDBConnection.tooltip": "数据库主机:{0}\n 数据库类型: {1}\n 数据库名称: {2}\n 用户名: {3}\n 密码: {4}\n JDBC驱动类: {5}\n 数据库URL: {6}",
+ "services.reassign.rollback.confirm": "你确定吗?",
+ "services.reassign.step4.task0.title": "停止所需服务",
+ "services.reassign.step4.task1.title": "创建{0}",
+ "services.reassign.step4.task2.title": "禁用{0}",
+ "services.reassign.step4.task3.title": "重新配置{0}",
+ "services.reassign.step4.save.configuration.note": "此配置是由移动{0}向导创建的",
+ "services.reassign.step4.task4.title": "安装{0}",
+ "services.reassign.step4.task5.title": "启动ZooKeeper服务器",
+ "services.reassign.step4.task6.title": "启动NameNode",
+ "services.reassign.step4.task7.title": "删除禁用{0}",
+ "services.reassign.step4.task8.title": "启动所需服务",
+ "services.reassign.step4.tasks.startNewMySqlServer.title": "启动新的MySQL服务器",
+ "services.reassign.step4.status.success": "成功地将<b>{0}</b>从<b>{1}</b>主机迁移到<b>{2}</b>主机",
+ "services.reassign.step4.status.success.withManualSteps": "进入下一步",
+ "services.reassign.step4.status.failed": "将<b>{0}</b>从<b>{1}</b>主机迁移到<b>{2}</b>主机失败",
+ "services.reassign.step4.status.info": "重新赋值{0}。",
+ "services.reassign.step4.retry": "您可以单击重试或中止按钮重试失败的任务或中止更改。",
+ "services.reassign.step4.abortError": "中止更改时出错。",
+ "services.reassign.step5.header": "手动命令",
+ "services.reassign.step5.body.namenode": "<div class=\"alert alert-info\"><ol><li>在源主机<b>{1}</b>上复制<b>{0}</b>内容到目标主机<b>{2}</b>上的<b>{0}</b>。</li><li>登录到目标主机<b>{2}</b>并通过运行<div class=\"code-snippet\">chown -R {3}:{5} {6}</div>来更改NameNode目录的权限</li><li>通过运行<div class=\"code-snippet\">mkdir -p /var/lib/hdfs/namenode/formatted</div>创建标记目录</li></ol></div>",
+ "services.reassign.step5.body.namenode_ha": "<div class=\"alert alert-info\"><ol><li>登录NameNode主机<b>{4}</b>.</li><li>通过运行<div class=\"code-snippet\">sudo su {3} -l -c 'hdfs zkfc -formatZK'</div>重置ZooKeeeper中的自动故障转移信息</li></ol></div><div class=\"alert alert-info\"><ol start=\"3\"><li>登录到新安装的NameNode主机<b>{2}</b>.<br><div class=\"alert alert-warn\"><strong>重要!</strong>请务必登录到新安装的NameNode主机。<br>这是与上述步骤1和2不同的主机。</div></li><li>通过运行<div class='code-snippet'>sudo su {3} -l -c 'hdfs namenode -bo [...]
+ "services.reassign.step5.body.secondary_namenode": "<div class=\"alert alert-info\"><ol><li>在源主机<b>{1}</b>上复制<b>{0}</b>内容到目标主机<b>{2}</b>上的<b>{0}</b>。</li><li>登录到目标主机<b>{2}</b>并通过运行<div class=\"code-snippet\">chown -R {3}:{5} {6}</div>来更改SNameNode目录的权限</li></ol></div>",
+ "services.reassign.step5.body.oozie_server": "<div class=\"alert alert-info\"><ol><li在<b>{1}</b>上复制<div class=\"code-snippet\"><b>/hadoop/oozie/data/oozie-db</b></div>的内容</li><li>到目标主机<b>{2}</b></li><li>如果目录不存在,可以通过运行<div class=\"code-snippet\">mkdir -p /hadoop/oozie/data/oozie-db</div>创建</li><li>通过运行<div class=\"code-snippet\">chown -R oozie:{5} /hadoop/oozie/data</div>更新目录权限</li></ol></div>",
+ "services.reassign.step5.body.mysql_server": "<div class=\"alert alert-info\"><ol><li>在<b>{1}</b>使用终端可以通过使用<div class=\"code-snippet\">mysqldump db_name > backup-file.sql</div>导出你的Metastore DB (MYSQL)</li><li>将文件复制到目标主机<b>{2}</b>托管MySQL DB</li><li>在<b>mysql<b>内执行这个SQL<div class=\"code-snippet\">CREATE DATABASE db_name;</div></li><li>使用<div class=\"code-snippet\">mysql db_name < backup-file.sql</div>导入数据库</li></ol></div>",
+ "services.reassign.step5.body.app_timeline_server": "<div class=\"alert alert-info\"><ol><li>在源主机<b>{1}</b>上复制<b>{7}/{8}</b>到目标主机<b>{2}</b>上的<b>{7}/{8}</b>。</li><li>登录到目标主机<b>{2}</b>并通过运行<div class=\"code-snippet\">chown -R {3}:{5} {7}/{8}</div>来更改权限</li><div class=\"code-snippet\">chmod -R 700 {7}/{8}</div></li></ol></div>",
+ "services.reassign.step5.body.securityNotice": "<div class=\"alert alert-info\"> <div class=\"alert alert-warn\"> <strong>注意: </strong>安全集群需要为重新分配组件生成必要的主体,并在目标主机上用主体创建keytab文件。keytab文件应该是服务用户可访问的。</div> {0} </div>",
+ "services.reassign.step5.body.securityConfigsList": "在<b>{2}</b>主机上的主体<b>{1}</b>创建keytab文件<b>{0}</b>。",
+ "services.reassign.step5.body.proceedMsg": "请在完成以上步骤后继续进行",
+ "services.reassign.step5.confirmPopup.body": "请确认您在继续之前已经运行了手动步骤。",
+ "services.reassign.step6.header": "启动和测试服务",
+ "services.reassign.step6.tasks.putHostComponentsInMaintenanceMode.title": "禁用{0}",
+ "services.reassign.step6.tasks.deleteHostComponents.title": "删除禁用{0}",
+ "services.reassign.step6.tasks.startAllServices.title": "启动所有服务",
+ "services.reassign.step6.tasks.installPxf.title": "在NameNode上安装PXF",
+ "services.reassign.step6.tasks.stopMysqlService.title": "停止MySQL服务器",
+ "services.reassign.step6.tasks.stopHostComponentsInMaintenanceMode.title": "停止{0}",
+ "services.reassign.step6.tasks.startDatanodes.title": "启动DataNodes",
+ "services.reassign.step6.status.success": "成功地将<b>{0}</b>从<b>{1}</b>主机迁移到<b>{2}</b>主机",
+ "services.reassign.step6.status.failed": "将<b>{0}</b>从<b>{1}</b>主机迁移到<b>{2}</b>主机失败",
+ "services.reassign.step6.status.info": "重新赋值{0}。",
+ "services.reassign.step7.header": "回滚",
+ "services.reassign.step7.info": "正在进行回滚",
+ "services.reassign.step7.failed": "回滚失败",
+ "services.reassign.step7.success": "回滚成功完成",
+ "service.hbase.activeMaster": "Active Master",
+ "services.hive.client": "Hive客户端",
+ "services.hive.clients": "Hive客户端",
+ "services.falcon.client": "Falcon客户端",
+ "services.falcon.clients": "Falcon客户",
+ "services.oozie.client": "Oozie客户端",
+ "services.oozie.clients": "Oozie客户",
+ "services.oozie.webUi": "Oozie网络用户界面",
+ "services.ganglia.webUi": "Ganglia网络用户界面",
+ "services.ganglia.monitors": "Ganglia监视器",
+ "services.mapreduce2.webUi": "历史服务器用户界面",
+ "services.zookeeper.prefix": "{0}",
+ "services.zookeeper.title": "{0}ZooKeeper",
+ "services.zookeeper.postfix": "运行",
+ "services.zookeeper.clients": "ZooKeeper客户端",
+ "services.zookeeper.client": "ZooKeeper客户端",
+ "services.mapreduce2.history.running": "历史服务器正在运行",
+ "services.mapreduce2.history.stopped": "历史服务器停止",
+ "services.mapreduce2.history.unknown": "历史服务器状态未知",
+ "services.mapreduce2.smokeTest.requirement": "MapReduce2烟测试要求YARN服务启动",
+ "services.tez.client": "Tez客户端",
+ "services.tez.clients": "Tez客户端",
+ "services.pig.client": "Pig客户端",
+ "services.pig.clients": "Pig客户端",
+ "services.glusterfs.client": "GLUSTERFS客户端",
+ "services.glusterfs.clients": "GLUSTERFS客户端",
+ "services.sqoop.client": "Sqoop客户端",
+ "services.sqoop.clients": "Sqoop客户端",
+ "services.hbase.master.error": "没有HBase master是活动的",
+ "alerts.actions.manage_alert_groups_popup.header": "管理警报组",
+ "alerts.actions.manage_alert_groups_popup.notice": "您可以在这个对话框中为每个服务管理警报组。查看警报组列表和配置在其中的警报定义。还可以添加/删除警报定义,并为该警报组选择通知。",
+ "alerts.actions.manage_alert_groups_popup.rename": "重命名",
+ "alerts.actions.manage_alert_groups_popup.duplicate": "复制",
+ "alerts.actions.manage_alert_groups_popup.group_name_lable": "名称",
+ "alerts.actions.manage_alert_groups_popup.group_desc_lable": "描述",
+ "alerts.actions.manage_alert_groups_popup.notifications": "通知",
+ "alerts.actions.manage_alert_groups_popup.addButton": "创建警报组",
+ "alerts.actions.manage_alert_groups_popup.addGroup.exist": "已经存在给定名称的警报组",
+ "alerts.actions.manage_alert_groups_popup.removeButton": "删除警报组",
+ "alerts.actions.manage_alert_groups_popup.removeButtonDisabled": "无法删除默认警报组",
+ "alerts.actions.manage_alert_groups_popup.renameButton": "重命名警报组",
+ "alerts.actions.manage_alert_groups_popup.duplicateButton": "复制警报组",
+ "alerts.actions.manage_alert_groups_popup.addDefinition.noDefinitions": "没有显示的警报定义",
+ "alerts.actions.manage_alert_groups_popup.addDefinition": "向选定的警报组添加警报定义",
+ "alerts.actions.manage_alert_groups_popup.addDefinitionDisabled": "没有可用的警报定义要添加",
+ "alerts.actions.manage_alert_groups_popup.addDefinitionToDefault": "无法修改默认警报组",
+ "alerts.actions.manage_alert_groups_popup.removeDefinition": "从选定的警报组中删除警报定义",
+ "alerts.actions.manage_alert_groups_popup.removeDefinitionDisabled": "无法修改默认警报组",
+ "alerts.actions.manage_alert_groups_popup.selectDefsDialog.title": "选择警报组定义",
+ "alerts.actions.manage_alert_groups_popup.selectDefsDialog.message": "选择要添加到这个“{0}”警报组的警报定义。",
+ "alerts.actions.manage_alert_groups_popup.selectDefsDialog.filter.placeHolder": "所有",
+ "alerts.actions.manage_alert_groups_popup.selectDefsDialog.selectedDefsLink": "{0}从{1}警报定义中选择",
+ "alerts.actions.manage_alert_groups_popup.selectDefsDialog.message.warning": "至少需要选择一个警报定义。",
+ "alerts.actions.manage_alert_notifications_popup.header": "管理警报通知",
+ "alerts.actions.manage_alert_notifications_popup.noAlertNotification": "没有定义警报通知",
+ "alerts.actions.manage_alert_notifications_popup.addButton": "创建新的警报通知",
+ "alerts.actions.manage_alert_notifications_popup.addHeader": "创建警报通知",
+ "alerts.actions.manage_alert_notifications_popup.removeButton": "删除警报通知",
+ "alerts.actions.manage_alert_notifications_popup.editButton": "编辑警报通知",
+ "alerts.actions.manage_alert_notifications_popup.editHeader": "编辑通知",
+ "alerts.actions.manage_alert_notifications_popup.duplicateButton": "复制警报通知",
+ "alerts.actions.manage_alert_notifications_popup.method": "方法",
+ "alerts.actions.manage_alert_notifications_popup.email": "发送电子邮件到",
+ "alerts.actions.manage_alert_notifications_popup.SMTPServer": "SMTP服务器",
+ "alerts.actions.manage_alert_notifications_popup.SMTPPort": "SMTP端口",
+ "alerts.actions.manage_alert_notifications_popup.SMTPUseAuthentication": "使用身份验证",
+ "alerts.actions.manage_alert_notifications_popup.SMTPUsername": "用户名",
+ "alerts.actions.manage_alert_notifications_popup.SMTPPassword": "密码",
+ "alerts.actions.manage_alert_notifications_popup.retypeSMTPPassword": "密码确认",
+ "alerts.actions.manage_alert_notifications_popup.SMTPSTARTTLS": "启动TLS",
+ "alerts.actions.manage_alert_notifications_popup.emailFrom": "电子邮件来自",
+ "alerts.actions.manage_alert_notifications_popup.version": "版本",
+ "alerts.actions.manage_alert_notifications_popup.OIDs": "OID",
+ "alerts.actions.manage_alert_notifications_popup.community": "社区",
+ "alerts.actions.manage_alert_notifications_popup.host": "主机",
+ "alerts.actions.manage_alert_notifications_popup.port": "端口",
+ "alerts.actions.manage_alert_notifications_popup.global": "全局",
+ "alerts.actions.manage_alert_notifications_popup.noDescription": "<i>无描述</i>",
+ "alerts.actions.manage_alert_notifications_popup.noGroup": "<i>无选中</i>",
+ "alerts.actions.manage_alert_notifications_popup.severityFilter": "严重程度",
+ "alerts.actions.manage_alert_notifications_popup.clearAll": "清除全部",
+ "alerts.actions.manage_alert_notifications_popup.selectAll": "选择全部",
+ "alerts.actions.manage_alert_notifications_popup.confirmDeleteHeader": "确认删除",
+ "alerts.actions.manage_alert_notifications_popup.confirmDeleteBody": "确实要删除{0}通知吗?",
+ "alerts.actions.manage_alert_notifications_popup.error.name.empty": "通知名称不能为空",
+ "alerts.actions.manage_alert_notifications_popup.error.name.existed": "通知名称已经存在",
+ "hosts.host.add": "添加新主机",
+ "hosts.table.noHosts": "没有主机显示",
+ "hosts.filters.filteredHostsInfo": "{0} {1}主机显示",
+ "hosts.filters.selectedHostInfo": "主机选择",
+ "hosts.filters.selectedHostsInfo": "主机选择",
+ "hosts.filters.clearSelection": "清除选择",
+ "hosts.filters.filterComponents": "从<strong>组件</strong>过滤",
+ "hosts.table.restartComponents.withNames": "重新启动{0}",
+ "hosts.table.restartComponents.withoutNames": "{0}组件应重新启动",
+ "hosts.table.componentsInPassiveState.withNames": "维护模式中的“{0}”",
+ "hosts.table.componentsInPassiveState.withoutNames": "维护模式中的{0}组件",
+ "hosts.table.menu.l1.selectedHosts": "选定主机",
+ "hosts.table.menu.l1.filteredHosts": "过滤主机",
+ "hosts.table.menu.l1.allHosts": "所有主机",
+ "hosts.table.menu.l2.allComponents": "所有组件",
+ "hosts.table.menu.l2.restartAllComponents": "重新启动所有组件",
+ "hosts.table.menu.l2.reinstallFailedComponents": "重新安装失败的组件",
+ "hosts.bulkOperation.confirmation.header": "确认批量操作",
+ "hosts.bulkOperation.confirmation.hosts": "你确定要在下面的{1}主机上<strong>{0}</strong>?",
+ "hosts.bulkOperation.confirmation.hostComponents": "你确定要在下面的{2}主机上<strong>{0} {1}</strong>?",
+ "hosts.bulkOperation.passiveState.nothingToDo.body": "您选择的所有主机都已处于维护模式。",
+ "hosts.bulkOperation.warningInfo.body": "这些主机上的组件被停止,因此将跳过Debug。",
+ "hosts.bulkOperation.host_components.passiveState.nothingToDo.body": "所选的所有主机组件都已处于维护模式。",
+ "hosts.bulkOperation.confirmation.add.component": "你正在下面的{2}主机上<strong>{0} {1}</strong>。",
+ "hosts.bulkOperation.confirmation.add.component.skip": "下列主机被跳过,因为它们已经安装了{0}。",
+ "hosts.bulkOperation.confirmation.add.component.nothingToDo.body": "所有选定的主机都已经安装了{0}。",
+ "hosts.bulkOperation.deleteHosts.dryRun.header": "确认批量删除主机",
+ "hosts.bulkOperation.deleteHosts.dryRun.message": "有<strong>{0} 主机</strong>不能被删除(扩展为原因):",
+ "hosts.bulkOperation.deleteHosts.dryRun.primary": "删除另一个{0}主机",
+ "hosts.bulkOperation.deleteHosts.confirmation.header": "确认批量删除主机",
+ "hosts.bulkOperation.deleteHosts.confirmation.body": "确实要删除主机:",
+ "hosts.bulkOperation.deleteHosts.confirmation.body.msg1": "通过移除上面的主机,Ambari将忽略将来的通信。软件包不会从主机中删除。主机上的组件不应重新启动。如果希望将主机读入集群,请务必清除它们。",
+ "hosts.bulkOperation.deleteHosts.confirmation.body.msg2": "<b>警告!</b>如果代理仍处于心跳状态,则主机仍将存在于数据库中。",
+ "hosts.bulkOperation.deleteHosts.confirmation.body.msg3": "要完全删除主机,首先在其上停止Ambari代理。",
+ "hosts.bulkOperation.deleteHosts.confirmation.body.msg4": "如果主机正在托管Zookeeper服务器,则应重新启动Zookeeper服务,转到<i>服务</i>页面。",
+ "hosts.bulkOperation.deleteHosts.result.header": "删除主机",
+ "hosts.bulkOperation.deleteHosts.result.body": "下列主机已成功删除:",
+ "hosts.selectHostsDialog.title": "选择配置组主机",
+ "hosts.selectHostsDialog.message": "选择应该属于这个{0}配置组的主机。属于该组的所有主机将具有相同的配置集合。",
+ "hosts.selectHostsDialog.filter.placeHolder": "过滤器…",
+ "hosts.selectHostsDialog.selectedHostsLink": "{0}从{1}主机中选择",
+ "hosts.selectHostsDialog.message.warning": "至少需要选择一个主机。",
+ "hosts.host.serviceNotAvailable": "此主机上不可用的服务",
+ "hosts.host.menu.logs": "Logs",
+ "hosts.host.menu.stackVersions": "版本",
+ "hosts.host.stackVersions.table.allVersions": "所有版本",
+ "hosts.host.stackVersions.table.allNames": "所有名字",
+ "hosts.host.stackVersions.table.noVersions": "没有版本",
+ "hosts.host.stackVersions.table.filteredInfo": "{1}版本的{0}显示",
+ "hosts.host.stackVersions.status.init": "卸载的",
+ "hosts.host.stackVersions.status.installed": "已安装",
+ "hosts.host.stackVersions.status.install_failed": "安装失败",
+ "hosts.host.stackVersions.status.installing": "安装中",
+ "hosts.host.stackVersions.status.current": "当前",
+ "hosts.host.stackVersions.status.out_of_sync": "不同步",
+ "hosts.host.stackVersions.status.upgrading": "升级改造",
+ "hosts.host.stackVersions.status.upgrade_failed": "升级失败",
+ "hosts.host.stackVersions.outOfSync.tooltip": "这个版本在这个主机上是不同步的。在安装不使用的版本后,主机上的组件会发生不同步。单击安装以使Ambari安装此版本的软件包以使主机处于同步状态。",
+ "hosts.host.stackVersions.install.confirmation": "您将在这个主机上安装版本<b>{0}</b>。",
+ "hosts.host.metrics.dataUnavailable": "数据不可用",
+ "hosts.host.metrics.cpu": "CPU使用",
+ "hosts.host.metrics.cpu.displayNames.cpu_wio": "CPU I/O Idle",
+ "hosts.host.metrics.cpu.displayNames.cpu_idle": "CPU Idle",
+ "hosts.host.metrics.cpu.displayNames.cpu_nice": "CPU Nice",
+ "hosts.host.metrics.cpu.displayNames.cpu_aidle": "CPU Boot Idle",
+ "hosts.host.metrics.cpu.displayNames.cpu_system": "CPU System",
+ "hosts.host.metrics.cpu.displayNames.cpu_user": "CPU User",
+ "hosts.host.metrics.disk": "磁盘使用",
+ "hosts.host.metrics.disk.displayNames.disk_total": "合计",
+ "hosts.host.metrics.disk.displayNames.disk_free": "可用的",
+ "hosts.host.metrics.load": "负载",
+ "hosts.host.metrics.load.displayNames.load_fifteen": "15分钟负载",
+ "hosts.host.metrics.load.displayNames.load_one": "1分钟负载",
+ "hosts.host.metrics.load.displayNames.load_five": "5分钟负载",
+ "hosts.host.metrics.memory": "内存使用",
+ "hosts.host.metrics.memory.displayNames.mem_shared": "共享",
+ "hosts.host.metrics.memory.displayNames.swap_free": "交换",
+ "hosts.host.metrics.memory.displayNames.mem_buffers": "缓冲器",
+ "hosts.host.metrics.memory.displayNames.mem_free": "剩余",
+ "hosts.host.metrics.memory.displayNames.mem_cached": "缓存的",
+ "hosts.host.metrics.network": "网络使用",
+ "hosts.host.metrics.network.displayNames.pkts_out": "Packets Out",
+ "hosts.host.metrics.network.displayNames.bytes_in": "Bytes In",
+ "hosts.host.metrics.network.displayNames.bytes_out": "Bytes Out",
+ "hosts.host.metrics.network.displayNames.pkts_in": "Packets In",
+ "hosts.host.metrics.processes": "进程",
+ "hosts.host.metrics.processes.displayNames.proc_total": "全过程",
+ "hosts.host.metrics.processes.displayNames.proc_run": "进程运行",
+ "hosts.host.summary.header": "概览",
+ "hosts.host.summary.hostname": "主机名",
+ "hosts.host.summary.agentHeartbeat": "心跳",
+ "hosts.host.summary.agentHasJce": "无限JCE安装",
+ "hosts.host.summary.hostMetrics": "主机指标",
+ "hosts.host.summary.hostLogMetrics": "主机日志指标",
+ "hosts.host.summary.addComponent": "添加组件",
+ "hosts.host.summary.currentVersion": "当前版本",
+ "hosts.host.details.hostActions": "主机操作",
+ "hosts.host.details.needToRestart": "主机需要重新启动{0} {1}",
+ "hosts.host.details.needToRestart.button": "重新启动",
+ "hosts.host.details.deleteHost": "删除主机",
+ "hosts.host.details.startAllComponents": "启动所有组件",
+ "hosts.host.details.stopAllComponents": "停止所有组件",
+ "hosts.host.details.restartAllComponents": "重新启动所有组件",
+ "hosts.host.details.deleteHosts": "删除主机",
+ "hosts.host.details.refreshConfigs": "刷新配置",
+ "hosts.host.details.for.postfix": "主机的{0}",
+ "hosts.host.details.setRackId": "机架",
+ "hosts.host.details.recoverHost": "恢复主机",
+ "host.host.details.installClients": "安装客户端",
+ "host.host.details.reinstallClients": "重新安装客户端",
+ "host.host.details.downloadAllClients": "主机上的所有客户端",
+ "host.host.componentFilter.master": "主组件",
+ "host.host.componentFilter.slave": "从属部件",
+ "host.host.componentFilter.client": "客户端组件",
+ "hosts.host.deleteComponent.popup.msg1": "确实要删除{0}吗?",
+ "hosts.host.deleteComponent.popup.deleteJournalNodeMsg": "你正在打开<i>Manage Journal Node Wizard</i>。你确定吗?",
+ "hosts.host.deleteComponent.popup.warning": "<b>警告!</b> 删除集群中的最后的<i>{0}</i>组件?</br>删除集群中的最后一个组件可能会导致服务数据的永久丢失。",
+ "hosts.host.deleteComponent.popup.confirm": "确认删除",
+ "hosts.host.installComponent.popup.confirm": "确认安装",
+ "hosts.host.installComponent.msg": "确实要安装{0}吗?",
+ "hosts.host.addComponent.msg": "确实要添加{0}吗?",
+ "hosts.host.addComponent.deleteHostWithZooKeeper": "用ZooKeeper服务器删除主机可以重新配置这样的属性:<ul><li>ha.zookeeper.quorum</li><li>hbase.zookeeper.quorum</li><li>templeton.zookeeper.hosts</li><li>yarn.resourcemanager.zk-address</li><li>hive.zookeeper.quorum</li><li>hive.cluster.delegation.token.store.zookeeper.connectString</li></ul>",
+ "host.host.addComponent.popup.dependedComponents.body": "{0}需要在同一主机上同时安装{1}。请先添加它们,然后尝试添加{0}。",
+ "host.host.addComponent.popup.dependedComponents.header": "组件依赖",
+ "host.host.addComponent.popup.clients.dependedComponents.body": "{0}需要{1}连同它们一起安装在同一主机上。请先把它们加起来",
+ "hosts.host.zooKeeper.configs.save.note": "此配置是由Ambari在主机上安装/删除ZooKeeper组件创建的。",
+ "hosts.host.addComponent.securityNote": "您正在以安全模式运行集群。在继续之前,必须在{1}上设置{0}的键选项卡。否则,组件将无法正确启动。",
+ "hosts.host.addComponent.popup.confirm": "确认添加",
+ "hosts.host.manualKerberosWarning": "<strong>因为Kerberos已被手动安装在集群中,所以当完成此操作时,必须创建/分发主体和密钥表。</strong>",
+ "hosts.host.deleteComponent.popup.deleteNimbus": "删除<i>Storm Nimbus</i>将重新配置<b>nimbus.seeds</b>, <b>topology.min.replication.count</b>, <b>topology.max.replication.wait.time.sec</b>这些属性,前提是他们已经被定义。",
+ "hosts.host.storm.configs.save.note": "这个配置是由Ambari在安装/删除主机上的storm组件时创建的",
+ "hosts.host.datanode.decommission": "停止使用DataNode",
+ "hosts.host.datanode.recommission": "重新使用DataNode",
+ "hosts.host.nodemanager.decommission": "停止使用NodeManager",
+ "hosts.host.nodemanager.recommission": "重新使用NodeManager",
+ "hosts.host.tasktracker.decommission": "停止使用TaskTracker",
+ "hosts.host.tasktracker.recommission": "重新使用TaskTracker",
+ "hosts.host.tasktracker.restart": "重启TaskTracker",
+ "hosts.host.regionserver.decommission.batch1": "停止使用RegionServer-转向排水模式",
+ "hosts.host.regionserver.decommission.batch2": "停止使用RegionServer-停止RegionServer",
+ "hosts.host.regionserver.decommission.batch3": "停止使用RegionServer-关闭排水模式",
+ "hosts.host.hbase_regionserver.recommission": "重新使用RegionServer",
+ "hosts.host.hbase_regionserver.decommission": "停止使用RegionServer",
+ "hosts.host.hbase_regionserver.decommission.warning": "最后一个RegionServer不能停止",
+ "hosts.host.decommissioned": "停止使用的",
+ "hosts.host.decommissioning": "停止使用中",
+ "hosts.host.addComponent.JOURNALNODE": "你正在打开<i>Manage Journal Node Wizard</i>。你确定吗?",
+ "hosts.host.deleteComponent.popup.deleteHiveMetastore": "删除<i>Hive Metastore</i>将重新配置以下属性:<ul><li>hive.metastore.uris</li><li>templeton.hive.properties</li></ul>",
+ "hosts.host.deleteComponent.popup.deleteWebHCatServer": "你正在删除<i>WebHCat Server</i>。你确定吗?",
+ "hosts.host.configs.save.note": "此配置是由Ambari在主机上安装/删除{0}组件创建的。",
+ "hosts.component.passive.implied.host.mode.tooltip": "无法关闭维护模式,因为主机处于维护模式",
+ "hosts.component.passive.implied.service.mode.tooltip": "不能关闭维护模式,因为{0}处于维护模式",
+ "hosts.component.passive.mode": "组件处于维护模式",
+ "hosts.component.passive.short.mode": "维护模式",
+ "hosts.host.passive.mode": "主机处于维护模式",
+ "hosts.host.alert.noAlerts": "无警报",
+ "hosts.host.alert.noAlerts.message": "此主机没有警报。",
+ "hosts.host.healthStatus.heartBeatNotReceived": "服务器没有从主机接收心跳超过3分钟。",
+ "hosts.host.healthStatus.mastersDown": "下面的主组件已故障:",
+ "hosts.host.healthStatus.slavesDown": "下面的从属部件已故障:",
+ "hosts.host.healthStatus.allUp": "所有组件都已正常",
+ "hosts.host.healthStatusCategory.green": "健康的",
+ "hosts.host.healthStatusCategory.red": "主体故障",
+ "hosts.host.healthStatusCategory.orange": "从属部件故障",
+ "hosts.host.healthStatusCategory.yellow": "失去心跳",
+ "hosts.host.alerts.label": "警报",
+ "hosts.host.maintainance.allComponents.context": "所有主机组件",
+ "hosts.host.maintainance.stopAllComponents.context": "停止所有主机组件",
+ "hosts.host.maintainance.startAllComponents.context": "启动所有主机组件",
+ "hosts.host.maintainance.reinstallFailedComponents.context": "重新安装失败的组件",
+ "hosts.host.recover.initAllComponents.context": "初始化所有主机组件",
+ "hosts.host.recover.installAllComponents.context": "安装所有主机组件",
+ "hosts.host.recover.regenerateKeytabs.context": "重新生成keytab",
+ "hosts.host.alerts.st": " ! ",
+ "hosts.decommission.popup.body": "你确定吗?",
+ "hosts.decommission.popup.header": "确认",
+ "hosts.decommission.tooltip.warning": "{0}不能运行,因为{1}未运行",
+ "hosts.delete.popup.body": "你确定删除主机<i>{0}</i>?",
+ "hosts.delete.popup.body.msg1": "通过删除这个主机,Ambari将忽略来自主机的未来通信。软件包不会从主机中删除。主机上的组件不应重新启动。如果希望将此主机读入集群,请确保清理主机。",
+ "hosts.delete.popup.body.msg3": "如果主机托管了Zookeeper服务器, Zookeeper服务应要重启。跳转到<i>服务</i>页面。",
+ "hosts.delete.popup.body.msg4": "<b>警告!</b>删除集群中的最后的<i>{0}</i>组件?</br>删除集群中的最后组件可能导致服务数据的永久丢失。",
+ "hosts.delete.popup.body.msg5": "<b>警告!</b>代理仍在心跳,因此主机仍将存在于数据库中。",
+ "hosts.delete.popup.body.msg6": "要完全删除主机,首先在其上停止Ambari代理。",
+ "hosts.delete.popup.body.msg7": "<b>警告!</b>{0}应首先停止使用以防止数据丢失。",
+ "hosts.delete.popup.body.msg.unknownComponents": "此主机似乎没有联机,并且Ambari与代理的通信已经丢失。",
+ "hosts.delete.popup.header": "确认",
+ "hosts.delete.popup.title": "删除主机",
+ "hosts.delete.popup.unknownComponents": "下列组件具有未知状态:",
+ "hosts.recover.popup.title": "确认",
+ "hosts.recover.popup.body": "此操作将完全重新安装此主机上的所有组件。<strong>确实要继续吗?<strong>",
+ "hosts.recover.error.popup.title": "无法恢复主机",
+ "hosts.recover.error.popup.body": "除非每个组件停止,否则无法恢复此主机。请停止所有组件,然后再试一次。",
+ "hosts.cant.do.popup.title": "无法删除主机",
+ "hosts.cant.do.popup.masterList.body": "此主机不能删除,因为它具有以下主组件:",
+ "hosts.cant.do.popup.masterList.body.end": "要删除此主机,必须首先迁移上面列出的所有主组件。",
+ "hosts.cant.do.popup.nonDeletableList.body": "不支持删除以下{0}组件。",
+ "hosts.cant.do.popup.runningList.body": "由于下列组件正在运行,无法删除此主机:",
+ "hosts.cant.do.popup.runningList.body.end": "要删除此主机,必须首先停止上面列出的所有运行组件。如果这个主机有{0},则应该首先对其进行停止使用以防止数据丢失。",
+ "hosts.cant.do.popup.lastMasterList.body": "由于以下主组件没有任何其他实例,因此无法删除此主机:",
+ "hosts.cant.do.popup.lastMasterList.body.end": "要删除此主机,必须首先将上面列出的所有组件添加到其他主机",
+ "hosts.add.header": "添加主机向导",
+ "hosts.add.exit.header": "退出",
+ "hosts.add.exit.body": "您真的想退出添加主机向导吗?",
+ "hosts.assignRack": "分配机架",
+ "hosts.passiveMode.popup": "确定要对{1}<b>Turn {0}维护模式</b>吗?",
+ "hosts.passiveMode.popup.version.mismatch": "{0}具有来自非当前堆栈的组件。在将主机从维护模式中移出之前,建议将其组件升级到{1}。",
+ "hosts.passiveMode.popup.version.mismatch.multiple": "有些主机有来自堆栈的组件,而这些组件不是当前的。在将这些主机带出维护模式之前,建议将它们的组件升级到{0}。",
+ "hosts.combo.search.placebolder": "通过主机和组件属性过滤或按关键字搜索…",
+ "hosts.combo.search.invalidCategory": "不是有效的类别。",
+ "charts.horizon.chart.showText": "显示",
+ "charts.horizon.chart.hideText": "隐藏",
+ "charts.horizon.chart.attributes.cpu": "CPU",
+ "charts.horizon.chart.attributes.memory": "内存",
+ "charts.horizon.chart.attributes.network": "网络",
+ "charts.horizon.chart.attributes.io": "I/O",
+ "charts.heatmap.selectMetric": "选择指标…",
+ "charts.heatmap.category.host": "主机",
+ "charts.heatmap.item.host.memory": "内存已使用",
+ "charts.heatmap.item.host.disk": "磁盘空间已使用",
+ "charts.heatmap.item.host.process": "总运行过程",
+ "charts.heatmap.category.hdfs": "HDFS",
+ "charts.heatmap.category.yarn": "YARN",
+ "charts.heatmap.category.hbase": "HBase",
+ "charts.heatmap.unknown": "未知",
+ "charts.heatmap.label.notApplicable": "不适用",
+ "charts.heatmap.label.invalidData": "无效数据",
+ "metric.notFound": "未找到任何项目",
+ "metric.default": "组合的",
+ "metric.cpu": "cpu",
+ "metric.memory": "磁盘使用",
+ "metric.network": "网络",
+ "metric.io": "io",
+ "metric.more": "更多",
+ "metric.more.cpu": "CPU",
+ "metric.more.disk": "磁盘",
+ "metric.more.load": "负载",
+ "metric.more.memory": "内存",
+ "metric.more.network": "网络",
+ "metric.more.process": "进程",
+ "dashboard.clusterMetrics": "集群指标",
+ "dashboard.clusterMetrics.cpu": "CPU使用",
+ "dashboard.clusterMetrics.cpu.displayNames.idle": "Idle",
+ "dashboard.clusterMetrics.load": "集群负荷",
+ "dashboard.clusterMetrics.memory": "内存使用",
+ "dashboard.clusterMetrics.network": "网络使用",
+ "dashboard.widgets.title": "指标",
+ "dashboard.heatmaps.title": "热力图",
+ "dashboard.button.switch": "切换到经典工作台",
+ "dashboard.button.switchShort": "切换",
+ "dashboard.button.reset": "重置仪表盘",
+ "dashboard.widgets.actions.title": "指标操作",
+ "dashboard.widgets.create": "创建部件",
+ "dashboard.widgets.actions.browse": "浏览部件",
+ "dashboard.widgets.layout.import": "导入布局",
+ "dashboard.widgets.layout.save": "保存布局",
+ "dashboard.widgets.addButton.tooltip": "添加部件",
+ "dashboard.widgets.browser.header": "窗口浏览器",
+ "dashboard.widgets.browser.menu.shared": "共享",
+ "dashboard.widgets.browser.menu.mine": "我的",
+ "dashboard.widgets.browser.noWidgets": "没有显示部件",
+ "dashboard.widgets.browser.footer.checkbox": "只显示我的部件",
+ "dashboard.widgets.browser.action.add": "添加",
+ "dashboard.widgets.browser.action.added": "已添加",
+ "dashboard.widgets.browser.action.delete": "删除",
+ "dashboard.widgets.browser.action.unshare": "不分享",
+ "dashboard.widgets.browser.action.share": "分享",
+ "dashboard.widgets.browser.action.share.confirmation": "您将要使这成为共享部件。所有集群运算符将能够修改或删除此部件。确实要共享这个部件吗?",
+ "dashboard.widgets.browser.shareIcon.tooltip": "共享",
+ "dashboard.widgets.browser.action.delete.shared.bodyMsg": "您将要永久删除<b>{0}</b>部件。这个部件是一个共享部件,这个操作将从共享部件库中删除部件,并从所有用户中删除部件。<br /> <br /> <b>确实要永久删除此共享部件吗?</b>",
+ "dashboard.widgets.browser.action.delete.mine.bodyMsg": "您将要永久删除<b>{0}</b>部件。此操作将删除部件库中的部件。<br /><br /><b>确实要永久删除这个部件吗?</b>",
+ "dashboard.widgets.browser.action.delete.btnMsg": "确认删除",
+ "dashboard.widgets.NameNodeHeap": "NameNode Heap",
+ "dashboard.widgets.NameNodeCpu": "NameNode CPU WIO",
+ "dashboard.widgets.HDFSDiskUsage": "HDFS Disk Usage",
+ "dashboard.widgets.HDFSDiskUsage.DFSused": "DFS已使用",
+ "dashboard.widgets.HDFSDiskUsage.nonDFSused": "非DFS已使用",
+ "dashboard.widgets.HDFSDiskUsage.remaining": "剩余",
+ "dashboard.widgets.HDFSDiskUsage.info": "{0} ({1}%)",
+ "dashboard.widgets.DataNodeUp": "DataNodes Live",
+ "dashboard.widgets.SuperVisorUp": "Supervisors Live",
+ "dashboard.widgets.FlumeAgentUp": "Flume Live",
+ "dashboard.widgets.NameNodeRpc": "NameNode RPC",
+ "dashboard.widgets.nothing": "没有部件可添加",
+ "dashboard.widgets.NameNodeUptime": "NameNode Uptime",
+ "dashboard.widgets.HDFSLinks": "HDFS Links",
+ "dashboard.widgets.HDFSLinks.activeNameNode": "Active NameNode",
+ "dashboard.widgets.HDFSLinks.standbyNameNode": "Standby NameNode",
+ "dashboard.widgets.HDFSLinks.standbyNameNodes": "2个Standby NameNode",
+ "dashboard.widgets.HBaseLinks": "HBase Links",
+ "dashboard.widgets.HBaseAverageLoad": "HBase Ave Load",
+ "dashboard.widgets.HBaseMasterHeap": "HBase Master Heap",
+ "dashboard.widgets.HBaseRegionsInTransition": "Region In Transition",
+ "dashboard.widgets.HBaseMasterUptime": "HBase Master Uptime",
+ "dashboard.widgets.ResourceManagerHeap": "ResourceManager Heap",
+ "dashboard.widgets.ResourceManagerUptime": "ResourceManager Uptime",
+ "dashboard.widgets.NodeManagersLive": "NodeManagers Live",
+ "dashboard.widgets.YARNMemory": "YARN Memory",
+ "dashboard.widgets.YARNLinks": "YARN Links",
+ "dashboard.widgets.error.invalid": "无效!在0到{0}之间输入一个数字",
+ "dashboard.widgets.error.smaller": "阈值1应该小于阈值2!",
+ "dashboard.widgets.HawqSegmentUp": "HAWQ Segments Live",
+ "dashboard.widgets.PxfUp": "PXF Agents Live",
+ "dashboard.widgets.PXFAgents": "PXF Agents",
+ "dashboard": {
+ "widgets": {
+ "popupHeader": "自定义部件",
+ "hintInfo": {
+ "common": "编辑百分比阈值以更改当前饼图的颜色。<br/>在0到{0}之间输入两个数字",
+ "hint1": "编辑阈值百分比来改变当前部件的颜色。<br />假设所有组件上限是100,下限是0。<br />所以在0到{0}之间输入两个数字",
+ "hint2": "编辑阈值以更改当前部件的颜色。<br /><br />所以输入两个大于0的数字。",
+ "hint3": "编辑阈值以更改当前部件的颜色。<br />这个单位是毫秒。 <br />所以输入两个大于0的数字。 ",
+ "hint4": "编辑表示{0}的值的阈值,以改变部件的颜色。<br />如果向下的{0}的数目大于阈值,则部件将以红色显示警告。<br/>选择0和{1}之间的一个数字。"
+ }
+ }
+ },
+ "dashboard.services": "服务",
+ "dashboard.services.hosts": "主机",
+ "dashboard.services.uptime": "{0}",
+ "dashboard.services.summary.slaves.live": "Live",
+ "dashboard.services.hdfs.summary": "{1}live节点的{0},{2}%容量使用",
+ "dashboard.services.hdfs.nanmenode": "NameNode",
+ "dashboard.services.hdfs.snanmenode": "Secondary NameNode",
+ "dashboard.services.hdfs.journalnodes": "JournalNodes",
+ "dashboard.services.hdfs.capacity": "HDFS磁盘使用",
+ "dashboard.services.hdfs.capacity.dfsUsed": "磁盘使用(DFS)",
+ "dashboard.services.hdfs.capacity.nonDfsUsed": "磁盘使用(非DFS)",
+ "dashboard.services.hdfs.capacity.remaining": "磁盘剩余",
+ "dashboard.services.hdfs.capacityUsed": "{0}/{1}",
+ "dashboard.services.hdfs.totalFilesAndDirs": "总文件+目录",
+ "dashboard.services.hdfs.datanodes": "DataNodes",
+ "dashboard.services.hdfs.datanodecounts": "DataNodes状态",
+ "dashboard.services.hdfs.nfsgateways": "NFSGateways",
+ "dashboard.services.hdfs.version": "版本",
+ "dashboard.services.hdfs.nameNodeWebUI": "NameNode Web UI",
+ "dashboard.services.hdfs.nodes.live": "live",
+ "dashboard.services.hdfs.nodes.dead": "dead",
+ "dashboard.services.hdfs.nodes.decom": "decommissioning",
+ "dashboard.services.hdfs.nodes.uptime": "NameNode Uptime",
+ "dashboard.services.hdfs.nodes.heap": "NameNode Heap",
+ "dashboard.services.hdfs.nodes.heapUsed": "{0}/{1}",
+ "dashboard.services.hdfs.chart.label": "容量(已使用/总计)",
+ "dashboard.services.hdfs.blockErrors": "{0}复制错误/ {1}缺失/ {2}复制不足",
+ "dashboard.services.hdfs.datanode.status.tooltip.live": "这是从NameNode报告的活着的DataNodes的数量。即使DataNode进程数上涨,NameNode可能会看到如果DataNode不像预期的那样与NameNode通信,则该状态已经死亡。这可能是由于网络问题或者长时间GC导致的DataNode进程挂起。",
+ "dashboard.services.hdfs.datanode.status.tooltip.dead": "这是从NameNode报告的死亡的DataNodes的数量。即使DataNode进程数上涨,NameNode可能会看到如果DataNode不像预期的那样与NameNode通信,则该状态已经死亡。这可能是由于网络问题或者长时间GC导致的DataNode进程挂起。",
+ "dashboard.services.hdfs.datanode.status.tooltip.decommission": "这是从NameNode报告的当前正在停用的DataNodes的数目。如果集群中没有足够的其他DataNodes来创建基于DFS复制属性(通常为3)的块副本的配置数,则DataNode会陷入停用状态,直到更多的DataNodes对NameNode可用。",
+ "dashboard.services.yarn.summary": "{1}live节点的{0}",
+ "dashboard.services.yarn.resourceManager": "ResourceManager",
+ "dashboard.services.yarn.nodeManagers": "NodeManagers",
+ "dashboard.services.yarn.nodeManager": "NodeManager",
+ "dashboard.services.yarn.nodes.heapUsed": "{0}/{1}",
+ "dashboard.services.yarn.clients": "YARN客户端",
+ "dashboard.services.yarn.client": "YARN客户端",
+ "dashboard.services.yarn.resourceManager.uptime": "ResourceManager Uptime",
+ "dashboard.services.yarn.resourceManager.active": "Active ResourceManager",
+ "dashboard.services.yarn.resourceManager.standby": "Standby ResourceManager",
+ "dashboard.services.resourceManager.nodes.heap": "ResourceManager Heap",
+ "dashboard.services.yarn.nodeManagers.status": "NodeManagers Status",
+ "dashboard.services.yarn.nodeManagers.status.active": "活动的",
+ "dashboard.services.yarn.nodeManagers.status.lost": "丢失的",
+ "dashboard.services.yarn.nodeManagers.status.unhealthy": "不健康的",
+ "dashboard.services.yarn.nodeManagers.status.rebooted": "重新启动",
+ "dashboard.services.yarn.nodeManagers.status.decommissioned": "停用的",
+ "dashboard.services.yarn.nodeManagers.status.tooltip.active": "这是来自ResourceManager报告的活跃的NodeManagers数目。",
+ "dashboard.services.yarn.nodeManagers.status.tooltip.lost": "这是来自ResourceManager报告的丢失的NodeManagers数目。即使NodeManager进程已经启动,ResourceManager也可能会发现如果NodeManager不与ResourceManager通信,则状态将丢失。这可能是由于过度收集垃圾引起的网络问题或挂起NodeManager进程。",
+ "dashboard.services.yarn.nodeManagers.status.tooltip.unhealthy": "这是来自ResourceManager报告的不健康的NodeManagers数目。",
+ "dashboard.services.yarn.nodeManagers.status.tooltip.rebooted": "这是来自ResourceManager报告的处于重新启动状态的NodeManagers的数量。",
+ "dashboard.services.yarn.nodeManagers.status.tooltip.decommissioned": "这是来自ResourceManager报告的停用的NodeManagers数目。",
+ "dashboard.services.yarn.containers": "容器",
+ "dashboard.services.yarn.containers.msg": "{0}分配/ {1}挂起/ {2}保留",
+ "dashboard.services.yarn.apps": "应用",
+ "dashboard.services.yarn.apps.msg": "{0}提交/ {1}运行/ {2}待定/ {2}完成/ {4}命中/ {5}失败",
+ "dashboard.services.yarn.memory": "集群内存",
+ "dashboard.services.yarn.memory.msg": "{0}使用/ {1}保留/ {2}可用",
+ "dashboard.services.yarn.queues": "队列",
+ "dashboard.services.yarn.queues.msg": "{0}队列",
+ "dashboard.services.hawq.hawqSegments": "HAWQ Segments",
+ "dashboard.services.pxf.pxfHosts": "PXF",
+ "dashboard.services.flume.summary.title": "Flume安装在{0}主机{1}({2}代理{3})上",
+ "dashboard.services.flume.summary.configure": "配置代理",
+ "dashboard.services.flume.agentsLabel": "Flume",
+ "dashboard.services.flume.agentLabel": "Flume组件",
+ "dashboard.services.flume.channels": "渠道",
+ "dashboard.services.flume.sources": "来源",
+ "dashboard.services.flume.sinks": "槽数",
+ "dashboard.services.flume.agent": "代理",
+ "dashboard.services.hbase.summary": "具有{1}平均负载的{0}区域服务器",
+ "dashboard.services.hbase.masterServer": "HBase Master",
+ "dashboard.services.hbase.masterServer.active": "Active HBase Master",
+ "dashboard.services.hbase.masterServer.standby": "Standby HBase Master",
+ "dashboard.services.hbase.noMasterServer": "No Active Master",
+ "dashboard.services.hbase.masterServerHeap": "主堆",
+ "dashboard.services.hbase.masterServerHeap.summary": "{0}/{1}",
+ "dashboard.services.hbase.masterServerUptime": "主服务器正常运行时间",
+ "dashboard.services.hbase.averageLoad": "平均负荷",
+ "dashboard.services.hbase.averageLoadPerServer": "每个RegionServer {0}区域",
+ "dashboard.services.hbase.regionServers": "RegionServer",
+ "dashboard.services.hbase.regionServersSummary": "{0} live/ {1}合计",
+ "dashboard.services.hbase.restServers": "HBaseRESTServer",
+ "dashboard.services.hbase.restServersSummary": "{0} live/ {1}合计",
+ 'dashboard.services.hbase.hbaseRestGateways':'Hbase Rest Gateways',
+ 'dashboard.services.hbase.hbaseRestGatewaysSummary':'{0} live / {1} 合计',
+ "dashboard.services.hbase.phoenixServers": "Phoenix Query Servers",
+ "dashboard.services.hbase.phoenixServersSummary": "{0} live/ {1}合计",
+ "dashboard.services.hbase.chart.label": "请求数",
+ "dashboard.services.hbase.masterWebUI": "Master Web UI",
+ "dashboard.services.hbase.regions.transition": "Regions In Transition",
+ "dashboard.services.hbase.masterStarted": "Master Started",
+ "dashboard.services.hbase.masterActivated": "Master Activated",
+ "dashboard.services.ranger.rangerTagsyncs": "Ranger Tagsyncs",
+ "dashboard.services.components.started": "已启动",
+ "dashboard.services.components.stopped": "已停止",
+ "dashboard.services.components.total": "总计",
+ "dashboard.services.hive.clients": "Hive客户端",
+ "dashboard.services.hive.client": "Hive客户端",
+ "dashboard.services.hive.metastore": "Hive Metastore",
+ "dashboard.services.hive.server2": "HiveServer2",
+ "dashboard.services.oozie.clients": "Oozie客户端",
+ "dashboard.services.oozie.client": "Oozie客户端",
+ "dashboard.services.storm.supervisor": "Supervisor",
+ "dashboard.services.storm.supervisors": "Supervisors",
+ "dashboard.services.configs.popup.stopService.header": "停止服务",
+ "dashboard.services.configs.popup.stopService.body": "需要停止服务以进行重新配置",
+ "dashboard.services.configs.popup.restartService.header": "重新启动服务",
+ "dashboard.services.configs.popup.restartService.body": "需要重启服务以进行重新配置",
+ "dashboard.services.zookeeper.server": "ZooKeeper服务器",
+ "dashboard.configHistory.title": "历史配置",
+ "dashboard.configHistory.table.version.title": "服务",
+ "dashboard.configHistory.table.configGroup.title": "配置组",
+ "dashboard.configHistory.table.created.title": "创建",
+ "dashboard.configHistory.table.configGroup.default": "默认",
+ "dashboard.configHistory.table.empty": "没有历史显示",
+ "dashboard.configHistory.table.notes.default": "{0}的初始配置",
+ "dashboard.configHistory.table.notes.addService": "添加服务时更新配置",
+ "dashboard.configHistory.table.notes.no": "",
+ "dashboard.configHistory.table.version.versionText": "V{0}",
+ "dashboard.configHistory.table.version.prefix": "V",
+ "dashboard.configHistory.table.current.tooltip": "{0}:{1}的当前配置",
+ "dashboard.configHistory.table.restart.tooltip": "要求重新启动",
+ "dashboard.configHistory.table.filteredHostsInfo": "{1}版本的{0}显示",
+ "dashboard.configHistory.info-bar.authoredOn": "编辑于",
+ "dashboard.configHistory.info-bar.changesToHandle": "更改处理",
+ "dashboard.configHistory.info-bar.showMore": "显示更多",
+ "dashboard.configHistory.info-bar.save.popup.title": "保存配置",
+ "dashboard.configHistory.info-bar.makeCurrent.popup.title": "进行当前确认",
+ "dashboard.configHistory.info-bar.save.popup.placeholder": "你改变了什么?",
+ "dashboard.configHistory.info-bar.save.popup.warningForPasswordChange": "此配置更改包括密码更改。密码更改将被保存,但出于安全目的,密码更改不会在配置版本比较中显示。",
+ "dashboard.configHistory.info-bar.save.popup.notesForPasswordChange": "密码更改",
+ "dashboard.configHistory.info-bar.revert.button": "恢复",
+ "dashboard.configHistory.info-bar.revert.versionButton": "恢复成{0}",
+ "dashboard.configHistory.info-bar.view.button.disabled": "您当前正在查看此版本。",
+ "dashboard.configHistory.info-bar.compare.button.disabled": "不能与同一版本进行比较。",
+ "dashboard.configHistory.info-bar.revert.button.disabled": "这是当前版本。",
+ "timeRange.presets.1hour": "1h",
+ "timeRange.presets.12hour": "12h",
+ "timeRange.presets.1day": "1d",
+ "timeRange.presets.1week": "1wk",
+ "timeRange.presets.1month": "1mo",
+ "timeRange.presets.1year": "1yr",
+ "tableView.filters.all": "所有",
+ "tableView.filters.filtered": "过滤的",
+ "tableView.filters.clearFilters": "清除过滤器",
+ "tableView.filters.paginationInfo": "{0} - {1} 条,共 {2} 条",
+ "tableView.filters.clearAllFilters": "清除过滤器",
+ "tableView.filters.showAll": "全部显示",
+ "tableView.filters.filteredConfigVersionInfo": "{1}版本的{0}显示",
+ "tableView.filters.filteredAlertInstancesInfo": "{1}实例的{0}显示",
+ "tableView.filters.filteredLogsInfo": "{1}日志的{0}显示",
+ "rollingrestart.dialog.title": "重新启动{0}",
+ "rollingrestart.dialog.primary": "Trigger Rolling重启",
+ "rollingrestart.notsupported.hostComponent": "{0}组件不支持滚动重启",
+ "rollingrestart.dialog.msg.restart": "这将一次重启指定数量的{0} s。",
+ "rollingrestart.dialog.msg.noRestartHosts": "滚动重启没有{0}。",
+ "rollingrestart.dialog.msg.maintainance": "注意:在维护模式中{0}{1}将不会重新启动。",
+ "rollingrestart.dialog.msg.maintainance.plural": "注意:在维护模式中{0} {1} 将不会重新启动。",
+ "rollingrestart.dialog.msg.componentsAtATime": "{0}一次",
+ "rollingrestart.dialog.msg.timegap.prefix": "等待",
+ "rollingrestart.dialog.msg.timegap.suffix": "批间秒数",
+ "rollingrestart.dialog.msg.toleration.prefix": "容忍到",
+ "rollingrestart.dialog.msg.toleration.suffix": "重启失败",
+ "rollingrestart.dialog.err.invalid.batchsize": "无效的重新启动批处理大小:{0}",
+ "rollingrestart.dialog.err.invalid.waitTime": "批间无效等待时间:{0}",
+ "rollingrestart.dialog.err.invalid.toleratesize": "无效故障容忍计数:{0}",
+ "rollingrestart.dialog.warn.datanode.batch.size": "不建议一次重新启动一个以上的DataNode。这样做会导致数据不可用和/或可能丢失的数据被主动写入HDFS。",
+ "rollingrestart.dialog.msg.serviceNotInMM": "注意:这将触发警报。为了避免警报,在触发滚动重启之前打开{0}的维护模式。",
+ "rollingrestart.dialog.msg.staleConfigsOnly": "仅用过时的配置重新启动{0}",
+ "rollingrestart.rest.context": "{2}的{0} -批处理{1}的滚动重启",
+ "rollingrestart.context.allOnSelectedHosts": "重新启动选定主机上的所有组件",
+ "rollingrestart.context.allForSelectedService": "重新启动{0}的所有组件",
+ "rollingrestart.context.allWithStaleConfigsForSelectedService": "用过时的配置重新启动所有组件,{0}",
+ "rollingrestart.context.allClientsOnSelectedHost": "重新启动{0}上的所有客户端",
+ "rollingrestart.context.allWithStaleConfigsOnSelectedHost": "在{0}上重新启动具有过时配置的组件",
+ "rollingrestart.context.allOnSelectedHost": "重新启动{0}上的所有组件",
+ "rollingrestart.context.selectedComponentOnSelectedHost": "重新启动{0}",
+ "rollingrestart.context.default": "重新启动组件",
+ "rolling.command.context": "滚动设置{0}到状态{1} - 批处理{3}的{2}",
+ "rolling.nothingToDo.header": "无事可做",
+ "rolling.nothingToDo.body": "选定主机上的{0}已处于选定状态或维护模式。",
+ "widget.type.gauge.description": "显示可以以百分比表示的指标的视图。",
+ "widget.type.number.description": "显示可以用可选的单位字段表示为单个数字的指标。",
+ "widget.type.graph.description": "显示可在时间范围内以线图或面积图表示的指标的视图。",
+ "widget.type.template.description": "显示指标值和模板化文本的视图。",
+ "widget.create.wizard.header": "创建部件",
+ "widget.create.wizard.step1.header": "选择类型",
+ "widget.create.wizard.step1.body.text": "要创建什么类型的部件?",
+ "widget.create.wizard.step1.body.choose.tooltip": "点击选择",
+ "widget.create.wizard.step2.header": "指标与表达",
+ "widget.create.wizard.step2.template.header": "模板",
+ "widget.create.wizard.step2.body.text": "用任何度量和有效运算符定义表达式。 </br>必要时使用括号。",
+ "widget.create.wizard.step2.body.template": "用任意数量的表达式和任何字符串定义模板。可以通过用双花键括起来它的名称来从模板引用表达式。",
+ "widget.create.wizard.step2.body.warning": "注:有效运算符为+,-,*,/",
+ "widget.create.wizard.step2.body.template.invalid.msg": "存在无效的表达式名。应使用双花键的名称“表达式”。",
+ "widget.create.wizard.step2.addExpression": "添加表达式",
+ "widget.create.wizard.step2.addDataset": "添加数据集",
+ "widget.create.wizard.step2.body.gauge.overflow.warning": "溢出!量规只能显示0到1之间的数字。",
+ "widget.create.wizard.step2.allComponents": "全部{0}",
+ "widget.create.wizard.step2.activeComponents": "Active{0}",
+ "widget.create.wizard.step2.noMetricFound": "没有指标",
+ "widget.create.wizard.step3.widgetName": "名称",
+ "widget.create.wizard.step3.sharing": "分享",
+ "widget.create.wizard.step3.sharing.msg": "在部件库中共享这个部件",
+ "widget.create.wizard.step3.header": "名称和说明",
+ "widget.create.wizard.step3.name.invalid.msg": "部件名称太长。请输入小于129个字符的部件名称。",
+ "widget.create.wizard.step3.name.invalidCharacter.msg": "无效的部件名称。只允许字母数字、下划线、连字符、百分比和空格。",
+ "widget.create.wizard.step3.description.invalid.msg": "描述太长。请输入少于2049个字符的描述。",
+ "widget.create.wizard.step3.description.invalidCharacter.msg": "输入无效。只允许字母数字、下划线、连字符、百分比和空格。",
+ "widget.edit.wizard.header": "编辑部件",
+ "widget.clone.body": "您确定要克隆当前部件<b>{0}</b>吗?",
+ "widget.edit.body": "这是一个共享部件,编辑将为所有用户更改这个部件。你要克隆部件吗?",
+ "widget.edit.button.primary": "编辑共享",
+ "widget.edit.button.secondary": "克隆与编辑",
+ "dashboard.widgets.wizard.step2.dataSeries": "数据序列{0}",
+ "dashboard.widgets.wizard.step2.addMetrics": "在这里添加指标和运算符…",
+ "dashboard.widgets.wizard.step2.newMetric": "+ 添加指标",
+ "dashboard.widgets.wizard.step2.newOperator": "+ 添加运算符",
+ "dashboard.widgets.wizard.step2.newNumber": "+ 添加数量",
+ "dashboard.widgets.wizard.step2.Component": "组件",
+ "dashboard.widgets.wizard.step2.Metric": "指标",
+ "dashboard.widgets.wizard.step2.selectComponent": "选择组件",
+ "dashboard.widgets.wizard.step2.selectMetric": "选择指标",
+ "dashboard.widgets.wizard.step2.addMetric": "添加指标",
+ "dashboard.widgets.wizard.step2.aggregateFunction": "聚合函数",
+ "dashboard.widgets.wizard.step2.aggregateFunction.scanOps": "选择聚合",
+ "dashboard.widgets.wizard.step2.aggregateFunction.notFound": "没有发现聚合函数",
+ "dashboard.widgets.wizard.step2.aggregateTooltip": "这个数学函数将被应用于在所有主机组件上计算所选择的指标的单个值。",
+ "dashboard.widgets.wizard.step2.threshold.ok.tooltip": "这是部件颜色从绿色(OK)变为橙色(警告)的阈值。",
+ "dashboard.widgets.wizard.step2.threshold.warning.tooltip": "这是部件颜色从橙色(警告)变为红色(临界)的阈值。",
+ "dashboard.widgets.wizard.onClose.popup.body": "您有未保存的更改。如果在该步骤退出向导,您的更改将不被保存。",
+ "dashboard.widgets.wizard.onClose.popup.discardAndExit": "丢弃并退出",
+ "restart.service.all": "重启全部",
+ "restart.service.all.affected": "重启受影响的组件",
+ "restart.service.rest.context": "重启{0}",
+ "menu.item.dashboard": "工作台",
+ "menu.item.services": "服务",
+ "menu.item.hosts": "主机",
+ "menu.item.admin": "Admin",
+ "menu.item.alerts": "警报",
+ "menu.item.views": "视图",
+ "menu.item.views.noViews": "无视图",
+ "bulkOperation.loading": "加载。。。",
+ "jobs.nothingToShow": "没有job要显示",
+ "jobs.loadingTasks": "加载。。。",
+ "jobs.error.ats.down": "由于YARN App Timeline Server没有运行,无法显示job数据。",
+ "jobs.error.400": "无法加载数据。",
+ "jobs.table.custom.date.am": "AM",
+ "jobs.table.custom.date.pm": "PM",
+ "jobs.table.custom.date.header": "选择时间范围",
+ "jobs.table.job.fail": "运行Job失败",
+ "jobs.customDateFilter.error.required": "此字段必填",
+ "jobs.customDateFilter.error.incorrect": "日期不正确",
+ "jobs.customDateFilter.error.laterThanNow": "指定的时间在将来",
+ "jobs.customDateFilter.error.date.order": "结束日期必须在开始日期之后",
+ "jobs.customDateFilter.startTime": "开始时间",
+ "jobs.customDateFilter.endTime": "结束时间",
+ "jobs.customDateFilter.duration.15min": "15分钟",
+ "jobs.customDateFilter.duration.30min": "30分钟",
+ "jobs.customDateFilter.duration.1hr": "1小时",
+ "jobs.customDateFilter.duration.2hr": "2小时",
+ "jobs.customDateFilter.duration.4hr": "4小时",
+ "jobs.customDateFilter.duration.12hr": "12小时",
+ "jobs.customDateFilter.duration.24hr": "24小时",
+ "jobs.customDateFilter.duration.1w": "1周",
+ "jobs.customDateFilter.duration.1m": "1个月",
+ "jobs.customDateFilter.duration.1yr": "1年",
+ "views.main.yourViews": "你的视图",
+ "views.main.noViews": "没有视图",
+ "views.main.instance.noDescription": "没有描述",
+ "number.validate.empty": "不能为空",
+ "number.validate.notValidNumber": "无效数字",
+ "number.validate.lessThanMinimum": "小于{0}的值",
+ "number.validate.moreThanMaximum": "大于{0}的值",
+ "common.combobox.placeholder": "过滤器…",
+ "common.combobox.dropdown.overridden": "覆盖属性",
+ "common.combobox.dropdown.final": "最终属性",
+ "common.combobox.dropdown.changed": "改变属性",
+ "common.combobox.dropdown.issues": "显示属性问题",
+ "common.combobox.dropdown.warnings": "显示属性警告",
+ "quick.links.error.quicklinks.unavailable.label": "快速链接不可用",
+ "quick.links.error.nohosts.label": "未能获得{0}的主机信息",
+ "quick.links.error.oozie.label": "没有可用的快速链接。确保Oozie服务器正在运行。",
+ "quick.links.publicHostName": "{0}({1})",
+ "quick.links.label.active": "Active",
+ "quick.links.label.standby": "Standby",
+ "contact.administrator": "联系系统管理员获取更多信息!",
+ "config.group.selection.dialog.title": "{0}配置组",
+ "config.group.selection.dialog.subtitle": "选择或创建一个{0}配置组,其中配置值将被重写。",
+ "config.group.selection.dialog.option.select": "选择一个现有的{0}配置组",
+ "config.group.selection.dialog.option.select.msg": "将为属于选定组的主机更改重写属性。",
+ "config.group.selection.dialog.option.create": "创建一个新的{0}配置组",
+ "config.group.selection.dialog.option.create.msg": "将使用给定名称创建新的{0}配置组。最初,在组中没有主机,只有被选择的属性被重写。",
+ "config.group.selection.dialog.err.name.exists": "具有给定名称的配置组已经存在",
+ "config.group.selection.dialog.err.create": "创建新配置组时出错[{0}]",
+ "config.group.selection.dialog.no.groups": "没有现有的{0}配置组。",
+ "config.group.host.switch.dialog.title": "变更组",
+ "config.group.save.confirmation.header": "保存配置组",
+ "config.group.save.confirmation.msg": "点击<em>管理主机</em>来管理配置组的主机成员资格",
+ "config.group.save.confirmation.configGroup": "配置组",
+ "config.group.save.confirmation.saved": "已成功保存",
+ "config.group.save.confirmation.manage.button": "管理主机",
+ "config.group.description.default": "在{0}上创建的新配置组",
+ "config.infoMessage.wrong.value.for.widget": "配置值不能转换为UI控制值",
+ "config.infoMessage.wrong.value.for.combobox.widget": "“{0}”在有效值列表中不可用。",
+ "config.warnMessage.outOfBoundaries.greater": "不推荐使用大于{0}的值。",
+ "config.warnMessage.outOfBoundaries.less": "不推荐使用小于{0}的值。",
+ "errorMessage.config.required": "这是必需的",
+ "errorMessage.config.number.integer": "必须只包含数字",
+ "errorMessage.config.number.float": "必须是有效数字",
+ "errorMessage.config.mail": "必须是一个有效的电子邮件地址",
+ "errorMessage.config.user": "值无效",
+ "errorMessage.config.ldapUrl": "必须是一个有效的LDAP URL",
+ "errorMessage.config.password": "密码不匹配",
+ "errorMessage.config.password.length": "密码至少应包含{0}符号",
+ "errorMessage.config.directory.heterogeneous": "DIR格式是错误的,可以是“[{storage type}]/{dir name}”",
+ "errorMessage.config.directory.default": "必须在开始时是斜线或驱动器,并且不能包含空格。",
+ "errorMessage.config.directory.allowed": "不能从“home”开始",
+ "errorMessage.config.spaces.trailing": "尾部不能包含空格",
+ "errorMessage.config.spaces.trim": "头部和尾部不能包含空格",
+ "utils.ajax.errorMessage": "错误信息",
+ "utils.ajax.defaultErrorPopupBody.message": "在API的{0}方法上接收:{1}",
+ "utils.ajax.defaultErrorPopupBody.statusCode": "{0}状态码",
+ "wizard.inProgress": "{0}正在进行中",
+ "alerts.instance.fullLogPopup.header": "实例状态",
+ "admin.addHawqStandby.button.enable": "添加HAWQ备用主机",
+ "admin.addHawqStandby.closePopup": "正在添加HAWQ备用主机向导。必须允许向导完成Ambari处于可用状态。如果您选择退出,则必须遵循文件化的手动指令来完成或恢复添加HAWQ备用主机。确实要退出向导吗?",
+ "admin.addHawqStandby.wizard.header": "添加HAWQ备用主机向导",
+ "admin.addHawqStandby.wizard.step1.header": "开始",
+ "admin.addHawqStandby.wizard.step1.body": "此向导会让您通过添加HAWQ备用主控器作为当前HAWQ主控主机的备份过程。在添加了HAWQ备用主机之后,它作为一个<i>热备份</i>,在主HAWQ主机主机无法运行时,它可以被激活。<br/><br/><b>此过程重新启动HAWQ服务。在计划的群集维护窗口中执行此过程。</b>",
+ "admin.addHawqStandby.wizard.step2.header": "选择主机",
+ "admin.addHawqStandby.wizard.step2.body": "选择将运行HAWQ备用主机的主机",
+ "admin.addHawqStandby.wizard.step3.header": "回顾",
+ "admin.addHawqStandby.wizard.step3.configs_changes": "检查配置更改。",
+ "admin.addHawqStandby.wizard.step3.confirm.host.body": "<b>确认您的主机选择。</b>",
+ "admin.addHawqStandby.wizard.step3.confirm.config.body": "<div class=\"alert alert-info\"><b>回顾配置修改</b><br/><br/>下面列出了向导将添加HAWQ备用主机的配置更改。此信息用于<b>只回顾</b>,不可编辑。</div>",
+ "admin.addHawqStandby.wizard.step3.hawqMaster": "当前HAWQ主机",
+ "admin.addHawqStandby.wizard.step3.newHawqStandby": "新的HAWQ备用主机",
+ "admin.addHawqStandby.wizard.step3.confirm.dataDir.title": "HAWQ备用主目录确认",
+ "admin.addHawqStandby.wizard.step3.confirm.dataDir.body": "在完成这个过程之前, 确保在HAWQ备用Master主机上重命名<b>{0}</b>目录(例如,将其更改为{0}_old)如果目录存在的话。<br/><br/><b>如果在HAWQ备用Master主机上存在{0},那么新的HAWQ备用Master可以用陈旧的数据启动,使集群处于不一致的状态。</b><br/><br/>点击确认以表明你已在HAWQ备用Master主机<b>{1}</b>上重命名任何现有的<b>{0}</b>目录.",
+ "admin.addHawqStandby.step4.save.configuration.note": "此配置是通过添加HAWQ备用向导创建的。",
+ "admin.addHawqStandby.wizard.step4.header": "配置组件",
+ "admin.addHawqStandby.wizard.step4.task0.title": "停止HAWQ服务",
+ "admin.addHawqStandby.wizard.step4.task1.title": "安装HAWQ备用主机",
+ "admin.addHawqStandby.wizard.step4.task2.title": "重新配置HAWQ",
+ "admin.addHawqStandby.wizard.step4.task3.title": "启动HAWQ服务",
+ "admin.addHawqStandby.wizard.step4.notice.inProgress": "正在部署HAWQ备用主机,请稍候。",
+ "admin.addHawqStandby.wizard.step4.notice.completed": "HAWQ备用主机已成功添加。",
+ "admin.removeHawqStandby.button.enable": "删除HAWQ备用",
+ "admin.removeHawqStandby.wizard.header": "删除HAWQ备用向导",
+ "admin.removeHawqStandby.wizard.step1.header": "开始",
+ "admin.removeHawqStandby.wizard.step1.body": "在HAWQ备用Master主机故障或维护的情况下,此向导将引导您完成删除HAWQ备用主机的过程。在删除HAWQ备用主机之后,现有的HAWQ主机将在没有备份的独立模式下运行。<br/><br/><b>此过程停止并重新启动HAWQ服务。只有在HAWQ主机正常运行时,才能在计划的群集维护窗口中执行此过程。</b><br/><br/>完成此向导后,HAWQ集群将不再拥有备用主机。作为最佳实践,使用“添加HAWQ备用主机”服务动作来为集群配置新的HAWQ备用主机。",
+ "admin.removeHawqStandby.wizard.step2.header": "回顾",
+ "admin.removeHawqStandby.wizard.step2.hawqStandby": "<b>当前HAWQ备用:</b>",
+ "admin.removeHawqStandby.wizard.step2.confirm.config.body": "<div class=\"alert alert-info\"><p><b>回顾配置修改</b></p>在删除HAWQ备用主机之后,向导从hawq-site.xml中删除hawq_standby_address_host属性。作为最佳实践,您应该在向导完成之后配置一个新的HAWQ备用主控主机。</div>",
+ "admin.removeHawqStandby.wizard.step2.confirm.host.body": "<b>回顾HAWQ主角色的变化。</b>",
+ "admin.removeHawqStandby.wizard.step2.confirmPopup.body": "您希望继续删除HAWQ备用主机吗?请确认,然后继续前进,因为你将无法从Ambari中回滚。",
+ "admin.removeHawqStandby.wizard.step3.header": "完成设置",
+ "admin.removeHawqStandby.wizard.step3.task0.title": "删除HAWQ备用",
+ "admin.removeHawqStandby.wizard.step3.task1.title": "停止HAWQ服务",
+ "admin.removeHawqStandby.wizard.step3.task2.title": "重新配置HAWQ",
+ "admin.removeHawqStandby.wizard.step3.task3.title": "删除角色:HAWQ备用",
+ "admin.removeHawqStandby.wizard.step3.task4.title": "启动HAWQ服务",
+ "admin.removeHawqStandby.closePopup": "正在删除“HAWQ备用向导”。必须允许向导完成Ambari处于可用状态。如果选择退出,则必须遵循手动指令才能恢复到稳定状态。确实要退出向导吗?",
+ "admin.removeHawqStandby.wizard.step3.notice.inProgress": "正在等待删除HAWQ备用,请稍候。",
+ "admin.removeHawqStandby.wizard.step3.notice.completed": "已成功删除了HAWQ备用。",
+ "admin.removeHawqStandby.wizard.step3.removeHawqStandbyCommand.context": "执行HAWQ备用删除命令",
+ "admin.removeHawqStandby.wizard.step3.save.configuration.note": "此配置是通过删除HAWQ备用向导创建的。",
+ "admin.activateHawqStandby.button.enable": "激活HAWQ备用主机",
+ "admin.activateHawqStandby.wizard.header": "激活HAWQ备用主向导",
+ "admin.activateHawqStandby.wizard.step1.header": "开始",
+ "admin.activateHawqStandby.wizard.step1.body": "在HAWQ Master主机故障的情况下,该向导会引导您激活HAWQ备用主机的过程。激活HAWQ备用主机之后,它被提升为新的HAWQ Master,并且先前的HAWQ主配置从集群中移除。<br/><br/><b>此过程重新启动HAWQ服务。在计划的群集维护窗口中执行此过程,除非当前HAWQ Master不工作。</b><br/><br/> 完成此向导后,HAWQ集群将不再拥有备用主机。作为最佳实践,使用“添加HAWQ备用主机”服务动作来为集群配置新的HAWQ备用主机。",
+ "admin.activateHawqStandby.wizard.step2.header": "回顾",
+ "admin.highAvailability.wizard.step2.toBeDeleted": "被删除",
+ "admin.activateHawqStandby.wizard.step2.hawqMaster": "<b>当前HAWQ主机:</b>",
+ "admin.activateHawqStandby.wizard.step2.hawqStandby": "<b>当前HAWQ备用主机:</b>",
+ "admin.activateHawqStandby.wizard.step2.toBeActivated": "被激活为新的HAWQ主机",
+ "admin.activateHawqStandby.step4.save.configuration.note": "此配置是通过激活HAWQ备用向导创建的",
+ "admin.activateHawqStandby.wizard.step2.confirm.config.body": "<div class=\"alert alert-info\"><p><b>回顾配置修改</b></p>向导将进行以下配置更改。此信息仅供回顾,无法编辑。<br/><br/><b>在激活HAWQ备用主机后,向导从hawq-site.xml中删除hawq_standby_address_host属性。</b>作为最佳实践,您应该在向导完成之后配置一个新的HAWQ备用Master主机。</div>",
+ "admin.activateHawqStandby.wizard.step2.confirm.host.body": "<b>查看HAWQ主机和备用主角色更改</b>",
+ "admin.activateHawqStandby.wizard.step2.confirmPopup.body": "您希望继续激活HAWQ标准主机吗?请确认,然后继续前进,因为你将无法从Ambari回滚。",
+ "admin.activateHawqStandby.wizard.step3.header": "完成设置",
+ "admin.activateHawqStandby.wizard.step3.task0.title": "激活HAWQ备用主机",
+ "admin.activateHawqStandby.wizard.step3.task1.title": "停止HAWQ服务",
+ "admin.activateHawqStandby.wizard.step3.task2.title": "重新配置HAWQ",
+ "admin.activateHawqStandby.wizard.step3.task3.title": "安装角色:新的HAWQ主机",
+ "admin.activateHawqStandby.wizard.step3.task4.title": "删除角色:以前的HAWQ主",
+ "admin.activateHawqStandby.wizard.step3.task5.title": "删除角色:以前的HAWQ备用",
+ "admin.activateHawqStandby.wizard.step3.task6.title": "启动HAWQ服务",
+ "admin.activateHawqStandby.closePopup": "激活HAWQ备用向导正在进行中。必须允许向导完成Ambari处于可用状态。如果选择退出,则必须遵循手动指令才能恢复到稳定状态。确实要退出向导吗?",
+ "admin.activateHawqStandby.wizard.step3.notice.inProgress": "正在等待HAWQ备用主机,请稍候。",
+ "admin.activateHawqStandby.wizard.step3.notice.completed": "HAWQ备用主机已成功启动。",
+ "admin.activateHawqStandby.wizard.step3.activateHawqStandbyCommand.context": "执行HAWQ备用主激活命令",
+ "admin.serviceAutoStart.save.popup.title": "保存自动启动配置",
+ "admin.serviceAutoStart.save.popup.body": "您正在更改自动启动配置。点击<b>保存</b>来提交改动或者<b>丢弃</b>来恢复",
+ "admin.serviceAutoStart.save.popup.transition.title": "警告",
+ "admin.serviceAutoStart.save.popup.transition.body": "您有未保存的更改",
+ "reset.ui.states": "重置UI状态",
+ "reset.ui.states.body": "只有当UI行为不正常时(如登录时导航不正确、UI被卡住、不会加载等),才应继续进行。确实要重置UI状态吗?",
+ "app.logger.ajax": "Ajax加载时间:{0}[{1}]",
+ "app.logger.wizard": "向导步骤{0}加载时间",
+ "app.name.subtitle.installer": "Cluster Install Wizard",
+ "common.master": "Master",
+ "common.slave": "Slave",
+ "common.generate.blueprint": "Generate Blueprint",
+ "common.taskLog": "Task Log",
+ "common.disable": "Disable",
+ "common.enable": "Enable",
+ "common.backgroundOperations": "Background Operations",
+ "common.confirm.password": "Confirm Password",
+ "common.username": "Username",
+ "common.continue": "Continue",
+ "common.noLink": "No Links",
+ "common.live": "Live",
+ "common.minute.ago": "less than a minute ago",
+ "common.views": "Views",
+ "common.review": "Review",
+ "common.with": "with",
+ "common.propertyName": "Property Name",
+ "common.configure.restart": "Configure Restart",
+ "hostPopup.default.userName": "none",
+ "question.sure.restart": "Are you sure you want to restart {0}?",
+ "question.sure.start": "Are you sure you want to start {0}?",
+ "question.sure.stop": "Are you sure you want to stop {0}?",
+ "question.sure.move": "Are you sure you want to move {0}?",
+ "question.sure.refresh": "Are you sure you want to restart {0} on {1}?",
+ "question.sure.maintenance": "Are you sure you want to turn {0} maintenance mode for {1}?",
+ "question.sure.upgrade": "Are you sure you want to upgrade {0}?",
+ "question.sure.decommission": "Are you sure you want to decommission {0}?",
+ "question.sure.recommission": "Are you sure you want to recommission {0}?",
+ "question.sure.startAll": "Are you sure you want to start all the components?",
+ "question.sure.stopAll": "Are you sure you want to stop all the components?",
+ "question.sure.restartAll": "Are you sure you want to restart all the components?",
+ "question.sure.regenerateKeytab.service": "Are you sure you want to regenerate keytab file operations for a {0} service?",
+ "question.sure.regenerateKeytab.host": "Are you sure you want to regenerate keytab file operations for a {0} host?",
+ "popup.clusterCheck.Upgrade.fail.auto_start_disabled": "Auto Start must be disabled before performing an Upgrade.",
+ "popup.clusterCheck.Upgrade.fail.auto_start_disabled.action_btn": "Disable autostart",
+ "popup.clusterCheck.Upgrade.fail.services_up": "The following services should be started:",
+ "popup.clusterCheck.Upgrade.fail.services_up.action_btn": "Start Services",
+ "popup.clusterCheck.Upgrade.fail.maintanance": "The following hosts must not be in in Maintenance Mode since they host Master components:",
+ "popup.clusterCheck.Upgrade.fail.maintanance.action_btn": "Turn off MM",
+ "popup.clusterCheck.Upgrade.fail.atlasInstalled.action_btn": "Remove Atlas",
+ "popup.clusterCheck.Upgrade.fail.atlasInstalled": "Atlas should be removed.",
+ "popup.clusterCheck.Upgrade.services.checks": "Services Checks",
+ "popup.clusterCheck.Upgrade.configsMerge.serviceName": "Service Name",
+ "popup.dependent.configs.table.originalValue": "Original Value",
+ "installer.step1.repo.body": "Using a Public Repository requires Internet connectivity. Using a Local Repository requires you have configured the software in a repository available in your network.",
+ "installer.step1.useLocalRepo.getSurpottedOs.stackError.title": "Stack {0} {1} errors ",
+ "installer.step1.useLocalRepo.getSurpottedOs.noStacksError.title": "There is no available Stack to install",
+ "installer.step1.useLocalRepo.getSurpottedOs.noStacksError.body": "All stacks contains errors. Installation can't be completed",
+ "installer.step1.noVersionDefinitions": "Unable to load versions data from server.",
+ "installer.step2.skipHostChecks.label": "Skip host checks",
+ "installer.step2.skipHostChecks.popup.header": "Warning",
+ "installer.step2.skipHostChecks.popup.body": "By skipping host checks, Ambari will not check and warn if any issues with the host are identified and the host will be added to the cluster as is.",
+ "installer.step3.hostWarningsPopup.notice.beginning": "After manually resolving the issues, click <b>Rerun Checks</b>.",
+ "installer.step3.hostWarningsPopup.hostHasWarnings.header": "Host Check Warning",
+ "installer.step4.headerFS": "Choose File System",
+ "installer.step4.bodyFS": "Choose which file system you want to install on your cluster.",
+ "installer.step4.serviceCheck.popup.body.multiOptions": "You did not select {0}, but it is needed by other services you selected. Select a compatible service from the following list: {1}",
+ "installer.step4.hcfs.displayName": "a Hadoop Compatible File System",
+ "installer.step4.ambariMetricsCheck.popup.header": "Ambari Metrics",
+ "installer.step4.ambariRangerInfraCheck.popup.header": "Infra Solr",
+ "installer.step4.ambariRangerInfraCheck.popup.body": "In order for Ranger to work, Solr is required. Either select Infra Solr to be added to the cluster, or ensure you configure your own during the Customize Services step.",
+ "installer.step4.ambariAtlasInfraCheck.popup.header": "Infra Solr",
+ "installer.step4.ambariAtlasInfraCheck.popup.body": "In order for Atlas to work, Solr is required. Either select Infra Solr to be added to the cluster, or ensure you configure your own during the Customize Services step.",
+ "installer.step4.ambariAtlasHbaseCheck.popup.header": "HBase",
+ "installer.step4.ambariAtlasHbaseCheck.popup.body": "In order for Atlas to work, HBase is required. Either select HBase to be added to the cluster, or ensure you configure your own during the Customize Services step.",
+ "installer.step4.ambariLogsearchCheck.popup.header": "Ambari Logsearch",
+ "installer.step4.smartSenseCheck.popup.header": "Apache SmartSense",
+ "installer.step4.rangerCheck.popup.header": "Apache Ranger",
+ "installer.step4.rangerCheck.popup.body": "Apache Ranger provides fine grained authorization and audit of access attempts for many Hadoop ecosystem services. If you do not install the Apache Ranger Service and enable Kerberos, the security of your cluster will be diminished. Are you sure you want to proceed without it? ",
+ "installer.step4.atlasCheck.popup.header": "Apache Atlas",
+ "installer.step4.atlasCheck.popup.body": "Apache Atlas provides strong data governance, lineage and metadata management for many hadoop ecosystem services. If you do not install Apache Atlas service, the data governance capabilities of you cluster will be diminished. Are you sure you want to proceed without it? ",
+ "installer.step7.credentialsTab.body": "Please provide credentials for these services",
+ "installer.step7.databasesTab.body": "Please choose and configure the appropriate databases for these services",
+ "installer.step7.databasesTab.radioButton.default": "Use Ambari Database",
+ "installer.step7.databasesTab.radioButton.custom": "Use Custom Database",
+ "installer.step7.credentialsTab.usersGroups": "Users/Groups",
+ "installer.step7.credentialsTab.usernames": "Usernames",
+ "installer.step7.accountsTab.body": "Please review these settings for Service Accounts",
+ "installer.step7.popup.validation.issues.title": "Highly Recommended Configurations",
+ "installer.step7.recommendations.popover.header": "Review Recommendations",
+ "installer.step7.recommendations.popover.message": "<p>Based on your configuration changes, Ambari is recommending the following dependent configuration changes. Ambari has updated all checked configuration changes to the <strong>Recommended Value</strong>. Uncheck any configuration to retain the <strong>Original Value</strong>.</p>",
+ "installer.step7.requirements.popover.header": "Required Configurations",
+ "installer.step7.requirements.popover.message": "<p>The following properties must be set to proceed with the install.</p>",
+ "installer.step8.generateBlueprint.popup.msg": "You will be <b>downloading</b> blueprint.json and clustertemplate.json to your local machine. <br/><br/> You can use them to deploy a cluster via AMBARI REST API. <br/> Update clustertemplate.json with a custom cluster name if you do not want to use name <b>{0}</b>. <br/><br/>If you want to use custom repo URLs, make sure to update them via Ambari REST API before deploying the cluster.",
+ "installer.step8.deployPopup.header": "Initializing Tasks",
+ "alerts.dropdown.dialog.title": "Notifications",
+ "alerts.dropdown.dialog.filters.critical": "Critical ({0})",
+ "alerts.dropdown.dialog.filters.warning": "Warning ({0})",
+ "alerts.dropdown.dialog.filters.all": "All ({0})",
+ "alerts.add.step1.header.description": "Select the type of alert you want to create",
+ "alerts.add.wizard.step1.body.choose.tooltip": "Click to select",
+ "alerts.add.wizard.step1.body.port.description": "Check TCP connectivity to a remote endpoint",
+ "alerts.add.wizard.step1.body.web.description": "Check for TCP connectivity and verify that a proper HTTP response code was returned",
+ "alerts.add.wizard.step1.body.metric.description": "Define JMX/AMS endpoints that can be queried for values",
+ "alerts.add.wizard.step1.body.script.description": "Defer all functionality to a Python script accessible to the Ambari agents from a specified relative or absolute path",
+ "alerts.add.wizard.step1.body.aggregate.description": "Combine the results of another alert definition from different nodes",
+ "alerts.add.wizard.step1.body.raw.description": "User can upload alert parameter using a JSON script",
+ "alerts.definition.details.infoSection": "Alert Info",
+ "alerts.notifications.regenerateKeytab.service.error": "Keytabs for {0} service could not be regenerated",
+ "alerts.notifications.regenerateKeytab.host.error": "Keytabs for {0} host could not be regenerated",
+ "admin.kerberos.wizard.step1.option.kdc.condition.4": "The Isilon administrator has setup all appropriate principals in OneFS",
+ "admin.manageJournalNode.wizard.step7.task0.title": "Start All Services",
+ "admin.manageJournalNode.wizard.step7.notice.inProgress": "Please wait while services are started",
+ "admin.manageJournalNode.wizard.step7.notice.completed": "Completed update to JournalNodes.",
+ "admin.manageJournalNode.wizard.step3.error.multipleNameSpaces.nameNodes": "Some NameNodes are in the process of being stopped. Please make sure that NameNodes are running to create checkpoints successfully.",
+ "admin.manageJournalNode.wizard.step3.body.singleNameSpace.safeModeText": "Put the NameNode in Safe Mode (read-only mode)",
+ "admin.manageJournalNode.wizard.step3.body.multipleNameSpaces.safeModeText": "Put the NameNodes in Safe Mode (read-only mode)",
+ "admin.manageJournalNode.wizard.step3.body.singleNameSpace.safeModeCommand": "sudo su {0} -l -c 'hdfs dfsadmin -safemode enter'",
+ "admin.manageJournalNode.wizard.step3.body.multipleNameSpaces.safeModeCommand": "sudo su {0} -l -c 'hdfs dfsadmin -fs hdfs://{1} -safemode enter'",
+ "admin.manageJournalNode.wizard.step3.body.singleNameSpace.checkPointText": "Once in Safe Mode, create a Checkpoint",
+ "admin.manageJournalNode.wizard.step3.body.multipleNameSpaces.checkPointText": "Once in Safe Mode, create Checkpoints",
+ "admin.manageJournalNode.wizard.step3.body.singleNameSpace.checkPointCommand": "sudo su {0} -l -c 'hdfs dfsadmin -saveNamespace'",
+ "admin.manageJournalNode.wizard.step3.body.multipleNameSpaces.checkPointCommand": "sudo su {0} -l -c 'hdfs dfsadmin -fs hdfs://{1} -saveNamespace'",
+ "admin.manageJournalNode.wizard.step3.body.singleNameSpace.proceed": "You will be able to proceed once Ambari detects that the NameNode is in Safe Mode and the Checkpoint has been created successfully.",
+ "admin.manageJournalNode.wizard.step3.body.multipleNameSpaces.proceed": "You will be able to proceed once Ambari detects that the NameNodes are in Safe Mode and the Checkpoints have been created successfully.",
+ "admin.manageJournalNode.wizard.step3.body.singleNameSpace.recentCheckPoint": "If the <b>Next</b> button is enabled before you run the <b>\"Step 3: Save Namespace\"</b> command, it means there is a recent Checkpoint already and you may proceed without running the <b>\"Step 3: Save Namespace\"</b> command.",
+ "admin.manageJournalNode.wizard.step3.body.multipleNameSpaces.recentCheckPoint": "If the <b>Next</b> button is enabled before you run the <b>\"Step 3: Save Namespace\"</b> commands, it means there are recent Checkpoints already and you may proceed without running the <b>\"Step 3: Save Namespace\"</b> commands.",
+ "admin.manageJournalNode.wizard.step3.checkPointsNotCreated": "Checkpoints not created yet",
+ "admin.manageJournalNode.wizard.step3.checkPointsCreated": "Checkpoints created",
+ "admin.rm_highAvailability.error.resourceManagerStarted": "ResourceManager must be running before you enable ResourceManager HA.",
+ "admin.highAvailability.wizard.step7.task4.title": "Start NameNode",
+ "admin.highAvailability.wizard.step8.proceed": "Please proceed once you have completed the steps above.",
+ "admin.nameNodeFederation.button.enable": "Add New HDFS Namespace",
+ "admin.nameNodeFederation.wizard.required.zookeepers": "All ZooKeeper Servers should be up",
+ "admin.nameNodeFederation.wizard.required.journalnodes": "All JournalNodes should be up",
+ "admin.nameNodeFederation.wizard.header": "Add New HDFS Namespace",
+ "admin.nameNodeFederation.closePopup": "Are you sure you want to quit?",
+ "admin.nameNodeFederation.closePopup2": "Add New HDFS Namespace Wizard is in progress. You must allow the wizard to complete for Ambari to be in usable state. If you choose to quit, you must follow manual instructions to complete or revert Add New HDFS Namespace as documented in the Ambari User Guide. Are you sure you want to exit the wizard?",
+ "admin.nameNodeFederation.wizard.step1.header": "Get Started",
+ "admin.nameNodeFederation.wizard.step1.body": "This wizard will walk you through the process of setting up a new Highly Available NameNode pair that will be used to create a new HDFS namespace, allowing you to use Ambari to manage multiple HDFS namespaces and take advantage of HDFS Federation.",
+ "admin.nameNodeFederation.wizard.step1.alert": "You should plan a cluster maintenance window and prepare for cluster downtime when adding a new HDFS Namespace as this Wizard will restart all services.",
+ "admin.nameNodeFederation.wizard.step1.nameserviceid": "New Nameservice ID",
+ "admin.nameNodeFederation.wizard.step1.nameserviceid.existing": "Existing Nameservice ID",
+ "admin.nameNodeFederation.wizard.step1.nameserviceid.error": "Must be unique and consist of letters, numbers, and hyphens. Cannot begin or end with a hyphen.",
+ "admin.nameNodeFederation.wizard.step2.header": "Select Hosts",
+ "admin.nameNodeFederation.wizard.step2.body": "Select hosts running the NameNodes for {0}",
+ "admin.nameNodeFederation.wizard.step3.header": "Review",
+ "admin.nameNodeFederation.wizard.step3.confirm.config.body": "<div class=\"alert alert-info\"><p><b>Review Configuration Changes.</b></p>The following lists the configuration changes that will be made by the Wizard to enable NameNode Federation. This information is for <b> review only </b> and is not editable except for the <b>dfs.journalnode.edits.dir</b> properties</div>",
+ "admin.nameNodeFederation.wizard.step4.header": "Configure Components",
+ "admin.nameNodeFederation.wizard,step4.save.configuration.note": "This configuration is created by Enable NameNode Federation wizard",
+ "admin.nameNodeFederation.wizard.step4.notice.inProgress": "Please wait while your new HDFS Namespace is being deployed.",
+ "admin.nameNodeFederation.wizard.step4.notice.completed": "Add New HDFS Namespace Wizard has been completed successfully.",
+ "admin.nameNodeFederation.wizard.step4.task0.title": "Stop Required Services",
+ "admin.nameNodeFederation.wizard.step4.task1.title": "Reconfigure Services",
+ "admin.nameNodeFederation.wizard.step4.task2.title": "Install Additional NameNodes",
+ "admin.nameNodeFederation.wizard.step4.task3.title": "Install Additional ZKFCs",
+ "admin.nameNodeFederation.wizard.step4.task4.title": "Start JournalNodes",
+ "admin.nameNodeFederation.wizard.step4.task5.title": "Start Infra Solr",
+ "admin.nameNodeFederation.wizard.step4.task6.title": "Start Ranger Admin",
+ "admin.nameNodeFederation.wizard.step4.task7.title": "Start Ranger Usersync",
+ "admin.nameNodeFederation.wizard.step4.task8.title": "Start NameNodes",
+ "admin.nameNodeFederation.wizard.step4.task9.title": "Start ZKFCs",
+ "admin.nameNodeFederation.wizard.step4.task10.title": "Format NameNode",
+ "admin.nameNodeFederation.wizard.step4.task11.title": "Format ZKFC",
+ "admin.nameNodeFederation.wizard.step4.task12.title": "Start ZKFC",
+ "admin.nameNodeFederation.wizard.step4.task13.title": "Start NameNode",
+ "admin.nameNodeFederation.wizard.step4.task14.title": "Bootstrap NameNode",
+ "admin.nameNodeFederation.wizard.step4.task15.title": "Start ZKFC",
+ "admin.nameNodeFederation.wizard.step4.task16.title": "Start NameNode",
+ "admin.nameNodeFederation.wizard.step4.task17.title": "Restart Required Services",
+ "admin.serviceAutoStart.general.switcher": "Auto Start Settings",
+ "admin.serviceAutoStart.column.autoStart": "Auto Start",
+ "admin.stackVersions.version.installError": "Installation Error!",
+ "admin.stackVersions.version.upgrade.running.nonWizard": "Upgrade: In Process | Initiated by {0}",
+ "admin.stackVersions.version.downgrade.running.nonWizard": "Downgrade: In Process | Initiated by {0}",
+ "admin.stackVersions.version.errors.outOfSync.title": "Host component out of sync",
+ "admin.stackVersions.version.errors.outOfSync.desc": "One of more host components did not report the version that Ambari expected. Please re-install the failed host component, or remove it.",
+ "admin.stackVersions.version.errors.outOfSync.reinstall.title": "Confirm Re-Install",
+ "admin.stackVersions.version.errors.outOfSync.remove.title": "Confirm Remove",
+ "admin.stackVersions.version.service.notSupported": "This service is unsupported in the current version of the stack.",
+ "admin.stackUpgrade.dialog.skipped.failures": "There were automatically skipped failed steps. Please resolve each failure before continuing with the upgrade.",
+ "services.service.allComponents": "All Components",
+ "services.service.summary.blocks": "Blocks",
+ "services.service.summary.inMaintenanceMode.tooltip": "Service is in maintenance mode",
+ "services.service.actions.run.updateHBaseReplication.label": "Start/Update HBase Replication",
+ "services.service.actions.run.updateHBaseReplication.context": "Enable Cross Cluster HBase Replication",
+ "services.service.actions.run.updateHBaseReplication.title": "HBase Replication: Start/Update",
+ "services.service.actions.run.updateHBaseReplication.promptError": "ZKQuorum should be comma(,) separated ZK nodes. Port and Peer ID should be number",
+ "services.service.actions.run.updateHBaseReplication.zkquorumText.prompt": "Peer Cluster ZK Quorum: ",
+ "services.service.actions.run.updateHBaseReplication.zkportText.prompt": "Peer Cluster ZK Port: ",
+ "services.service.actions.run.updateHBaseReplication.parentzkeyText.prompt": "Parent ZKey for HBase: ",
+ "services.service.actions.run.updateHBaseReplication.peerIdText.prompt": "Peer Cluster ID: ",
+ "services.service.actions.run.updateHBaseReplication.error": "Error while setting up HBase Cross Cluster Replication ",
+ "services.service.actions.run.stopHBaseReplication.label": "Stop HBase Replication",
+ "services.service.actions.run.stopHBaseReplication.context": "Disable Cross Cluster HBase Replication",
+ "services.service.actions.run.stopHBaseReplication.title": "HBase Replication: Stop",
+ "services.service.actions.run.stopHBaseReplication.promptError": "Peer ID should be number",
+ "services.service.actions.run.stopHBaseReplication.error": "Error while disabling HBase Cross Cluster Replication ",
+ "services.service.actions.run.stopHBaseReplication.prompt": "Peer Cluster ID to remove from Replication Peer list: ",
+ "services.service.info.menu.metrics": "Metrics",
+ "services.add.warning": "Add Service Wizard is in progress. Do you really want to exit the Add Service Wizard?",
+ "services.add.warningStep6": "Closing this dialog will continue to install the selected service(s) in the background, but the installed services need to be started manually. Are you sure you want to quit?",
+ "services.service.startAllComponents": "Start all components for {0}",
+ "services.service.stopAllComponents": "Stop all components for {0}",
+ "services.service.stopCertain.warningMsg.turnOnMM": "This will generate alerts as components are stopped. To suppress alerts, turn on Maintenance Mode for {0} prior to stopping.",
+ "services.service.restartCertain.warningMsg.turnOnMM": "This will trigger alerts as components are restarted. To suppress alerts, turn on Maintenance Mode for {0} prior to running restart all",
+ "services.service.componentsInNameSpace": "components in {0} namespace",
+ "services.service.stop.HDFS.warningMsg.checkPointTooOld.instructions.singleHost.login": "<br><ol><li>Login to the NameNode host <b>{0}</b>.</li>",
+ "services.service.stop.HDFS.warningMsg.checkPointTooOld.instructions.multipleHosts.login": "<ol><li>Login to the NameNode hosts {0}.</li>",
+ "services.service.stop.HDFS.warningMsg.checkPointTooOld.makeSure": "Make sure that you have taken a checkpoint before proceeding. Otherwise, the NameNode(s) can take a very long time to start up.",
+ "services.service.stop.HDFS.warningMsg.nameSpaces.checkPointTooOld": "The last HDFS checkpoint is older than {0} hours for the following namespaces:",
+ "alerts.actions.manage_alert_notifications_popup.disableButton": "Disable Alert Notification",
+ "alerts.actions.manage_alert_notifications_popup.enableButton": "Enable Alert Notification",
+ "alerts.actions.manage_alert_notifications_popup.scriptDispatchProperty": "Script Dispatch Property",
+ "alerts.actions.manage_alert_notifications_popup.scriptFileName": "Script Filename",
+ "alerts.actions.manage_alert_notifications_popup.error.scriptFileName.invalid": "Invalid script filename",
+ "hosts.table.menu.l2.refreshConfigsClientComponents": "Refresh All Configs",
+ "hosts.bulkOperation.confirmation.delete.hosts": "Are you sure you want to delete the following {0} hosts?",
+ "hosts.bulkOperation.confirmation.add.component.noHeartBeat.skip": "Host heartbeat lost",
+ "hosts.bulkOperation.confirmation.cannot.add1": "The following hosts will be skipped (expand for reason):",
+ "hosts.bulkOperation.confirmation.cannot.add2": "{0} cannot be added to the following hosts (expand for reason):",
+ "hosts.bulkOperation.deleteHosts.nonDeletableComponents": "Deletion of the following components is not supported: {0}",
+ "hosts.bulkOperation.deleteHosts.nonAddableMasterComponents": "Host contains the following master components: {0}",
+ "hosts.bulkOperation.deleteHosts.lastMasterComponents": "Cluster does not contain any other instance of the following master components: {0}",
+ "hosts.bulkOperation.deleteHosts.runningComponents": "The following components are running and need to be stopped: {0}",
+ "hosts.bulkOperation.deleteHosts.confirm.header": "Confirm Bulk Delete Hosts",
+ "hosts.bulkOperation.deleteHosts.confirm.delete": "The following hosts will be deleted:",
+ "hosts.bulkOperation.deleteHosts.cannot.delete1": "The following hosts will be skipped (expand for reason):",
+ "hosts.bulkOperation.deleteHosts.cannot.delete2": "Selected hosts cannot be deleted (expand for reason)",
+ "hosts.bulkOperation.confirmation.delete.component.cannot1": "The following hosts will be skipped (expand for reason):",
+ "hosts.bulkOperation.confirmation.delete.component.cannot2": "{0} cannot be deleted from the selected hosts:",
+ "hosts.bulkOperation.confirmation.delete.component": "{0} will be deleted from the following hosts",
+ "hosts.bulkOperation.confirmation.delete.component.minimum.body": "Cannot delete. At least {0} {1} required",
+ "hosts.bulkOperation.confirmation.delete.component.nothingToDo.notStopped": "{0} not Stopped on all selected hosts",
+ "hosts.bulkOperation.confirmation.delete.component.nothingToDo.notInstalled": "{0} not installed in any of the selected hosts",
+ "hosts.bulkOperation.confirmation.delete.component.skip": "The following hosts will be skipped",
+ "hosts.bulkOperation.delete.component.result.header": "Delete Components",
+ "hosts.bulkOperation.confirmation.delete.component.notStopped": "{0} not Stopped",
+ "hosts.bulkOperation.confirmation.delete.component.notInstalled": "{0} not Installed",
+ "hosts.bulkOperation.delete.component.result.body": " was successfully removed from the following hosts:",
+ "hosts.bulkOperation.delete.component.dryRun.message": "{0} could not be deleted from the following hosts(expand for reason)",
+ "hosts.bulkOperation.delete.component.failed.header": "Delete Component failed",
+ "hosts.bulkOperation.delete.component.failed.body": "Delete {0} component from {1} host failed",
+ "hosts.host.details.upgradeFailed": "Component upgrade failed",
+ "host.host.details.checkHost": "Check host",
+ "hosts.host.delete.componentsRequireReconfigure": "Deleting host with {0} may reconfigure such properties:",
+ "hosts.host.maintainance.removeFailedComponents.context": "Remove Failed Components",
+ "hosts.checkHost.popup": "Are you sure you want to <b>Check host</b> for {0}?",
+ "charts.heatmap.label.notAvailable": "Data Not Available",
+ "dashboard.widgets.YarnContainers": "YARN Containers",
+ "dashboard.widgets.nameSpace": "Namespace",
+ "dashboard.services.hdfs.summary.components": "Components",
+ "dashboard.services.hdfs.summary.service-metrics": "Service Metrics",
+ "dashboard.services.hdfs.capacityUsedPercent": "{0}%",
+ "dashboard.services.hdfs.nodes.heapUsedPercent": "{0}%",
+ "dashboard.services.hdfs.blockErrors.total": "total",
+ "dashboard.services.hdfs.blockErrors.corrupt": "corrupt replica",
+ "dashboard.services.hdfs.blockErrors.replicated": "under replicated",
+ "dashboard.services.hdfs.blockErrors.missing": "missing",
+ "dashboard.services.yarn.nodes.heapUsedPercent": "{0}%",
+ "dashboard.services.hdfs.clients": "HDFS Clients",
+ "dashboard.services.hdfs.client": "HDFS Client",
+ "dashboard.services.yarn.containers.allocated": "allocated",
+ "dashboard.services.yarn.containers.pending": "pending",
+ "dashboard.services.yarn.containers.reserved": "reserved",
+ "dashboard.services.yarn.apps.submitted": "submitted",
+ "dashboard.services.yarn.apps.running": "running",
+ "dashboard.services.yarn.apps.pending": "pending",
+ "dashboard.services.yarn.apps.completed": "completed",
+ "dashboard.services.yarn.apps.killed": "killed",
+ "dashboard.services.yarn.apps.failed": "failed",
+ "dashboard.services.yarn.memory.used": "used",
+ "dashboard.services.yarn.memory.reserved": "reserved",
+ "dashboard.services.yarn.memory.available": "available",
+ "dashboard.services.hbase.masterServerHeap.percent": "{0}%",
+ "dashboard.services.hive.server2interactive": "HiveServer2 Interactive",
+ "dashboard.configHistory.info-bar.compare.tooltip": "Compare this version with current",
+ "tableView.filters.itemsPerPage": "Items per page:",
+ "rollingrestart.context.configs.allOnSelectedHosts": "Refresh all configs on the selected hosts",
+ "rollingrestart.context.ClientOnSelectedHost": "Restart {0} on {1}",
+ "service.restart.choose.text": "Please choose which type of restart should be performed.",
+ "service.rolling.restart.choose.info": "Critical services remain running while the upgrade is performed. </br>Minimized disruption, but is a slower upgrade.",
+ "service.express.restart.choose.info": "Services are stopped when this upgrade is performed. </br>Incurs downtime, but is a faster upgrade.",
+ "service.restart.show.advanced.info": "Show advanced configurations options <p style=\"font-size: 12px; color: #999999; display: inline;\">(Restart by batches/hosts, interval between restarts, etc.)</p>",
+ "service.restart.rolling.restart.hosts.by": "RESTART HOSTS BY",
+ "service.restart.rolling.batchesOfHosts": "Batches of Hosts",
+ "service.restart.rolling.rackByRack": "Rack by Rack",
+ "service.restart.rolling.advanced.noOfHosts": "NUMBER OF HOSTS IN A BATCH",
+ "service.restart.rolling.advanced.batchIntervalHosts": "INTERVAL BETWEEN BATCHES (SEC)",
+ "service.restart.rolling.advanced.percentRacks": "% OF RACKS STARTED AT A TIME",
+ "service.restart.rolling.advanced.batchIntervalRacks": "INTERVAL BETWEEN RACKS (SEC)",
+ "service.restart.rolling.advanced.automatic.retry": "Automatically retry on failed hosts",
+ "service.restart.rolling.advanced.noOfRetries": "NUMBER OF RETRIES PER HOST",
+ "service.restart.rolling.advanced.max.failures.tolerated": "MAXIMUM FAILURES TOLERATED<p style=\"font-size: 11px;\">(Restart process is suspended after threshold is reached)</p>",
+ "service.restart.rolling.advanced.max.failures.batch": "MAXIMUM FAILURES TOLERATED/BATCH",
+ "service.restart.rolling.advanced.max.failures.rack": "MAXIMUM FAILURES TOLERATED/RACK",
+ "service.restart.rolling.advanced.suppress.alerts": "Suppress alerts during rolling restart",
+ "service.restart.rolling.advanced.pause.after.first": "Pause after first batch",
+ "widget.create.wizard.step2.body.invalid.label": "Invalid name. Only alphanumerics, underscores, hyphens, percentage and spaces are allowed.",
+ "widget.create.wizard.step2.body.invalid.expression": "Expression is not complete or is invalid!",
+ "widget.create.wizard.step2.body.invalid.expression2": "Invalid expression!",
+ "widget.create.wizard.step2.body.invalid.msg2": "Only numbers or operators are allowed in this field.",
+ "dashboard.widgets.wizard.step2.nameSpaceDropDownItem": "{0} (Active)"
+};
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org
(ambari) 08/22: add router
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch eee
in repository https://gitbox.apache.org/repos/asf/ambari.git
commit c1669f3037594893060c860caebf4820efa9845e
Author: jialiang <ji...@gmail.com>
AuthorDate: Fri Sep 6 17:13:59 2024 +0800
add router
---
ambari-server/src/main/python/bootstrap.py | 6 +-
.../BIGTOP/3.2.0/properties/stack_packages.json | 12 +
.../services/HDFS/configuration/hdfs-rbf-site.xml | 771 +++++++++++++++++++++
.../BIGTOP/3.2.0/services/HDFS/kerberos.json | 26 +
.../stacks/BIGTOP/3.2.0/services/HDFS/metainfo.xml | 46 ++
.../services/HDFS/package/scripts/dfsrouter.py | 143 ++++
.../3.2.0/services/HDFS/package/scripts/hdfs.py | 9 +
.../services/HDFS/package/scripts/hdfs_router.py | 91 +++
.../services/HDFS/package/scripts/params_linux.py | 33 +
.../3.2.0/services/HDFS/package/scripts/utils.py | 16 +
ambari-web/app/controllers.js | 5 +
.../routerBasedFederation/step1_controller.js | 26 +
.../routerBasedFederation/step2_controller.js | 67 ++
.../routerBasedFederation/step3_controller.js | 191 +++++
.../routerBasedFederation/step4_controller.js | 80 +++
.../routerBasedFederation/wizard_controller.js | 158 +++++
.../main/admin/highAvailability_controller.js | 22 +
ambari-web/app/controllers/main/service/item.js | 5 +
.../wizards/router_federation_properties.js | 80 +++
ambari-web/app/data/controller_route.js | 4 +
ambari-web/app/locales/default_messages.js | 22 +
.../app/mixins/wizard/assign_master_components.js | 3 +
ambari-web/app/models/host_component.js | 6 +
ambari-web/app/models/service.js | 2 +-
.../app/routes/dfsrouter_federation_routes.js | 166 +++++
ambari-web/app/routes/main.js | 2 +
.../federation/routerBasedFederation/step1.hbs | 28 +
.../federation/routerBasedFederation/step3.hbs | 56 ++
.../federation/routerBasedFederation/step4.hbs | 19 +
.../federation/routerBasedFederation/wizard.hbs | 35 +
ambari-web/app/utils/db.js | 1 +
ambari-web/app/views.js | 5 +
.../federation/routerBasedFederation/step1_view.js | 28 +
.../federation/routerBasedFederation/step2_view.js | 25 +
.../federation/routerBasedFederation/step3_view.js | 31 +
.../federation/routerBasedFederation/step4_view.js | 35 +
.../routerBasedFederation/wizard_view.js | 32 +
ambari-web/app/views/main/service/item.js | 7 +
ambari-web/test/models/service_test.js | 2 +-
39 files changed, 2291 insertions(+), 5 deletions(-)
diff --git a/ambari-server/src/main/python/bootstrap.py b/ambari-server/src/main/python/bootstrap.py
index 7b3e36bd78..13aed53801 100755
--- a/ambari-server/src/main/python/bootstrap.py
+++ b/ambari-server/src/main/python/bootstrap.py
@@ -345,7 +345,7 @@ class BootstrapWindows(Bootstrap):
user_run_as = self.shared_state.user_run_as
server = self.shared_state.ambari_server
version = self.getAmbariVersion()
- return ' '.join(['python', setupFile, expected_hostname, passphrase, server, user_run_as, version])
+ return ' '.join(['python3', setupFile, expected_hostname, passphrase, server, user_run_as, version])
def runSetupAgent(self):
self.host_log.write("==========================\n")
@@ -609,7 +609,7 @@ class BootstrapDefault(Bootstrap):
version = self.getAmbariVersion()
port = self.getAmbariPort()
passwordFile = self.getPasswordFile()
- return "{sudo} -S python ".format(sudo=AMBARI_SUDO) + str(setupFile) + " " + str(expected_hostname) + \
+ return "{sudo} -S python3 ".format(sudo=AMBARI_SUDO) + str(setupFile) + " " + str(expected_hostname) + \
" " + str(passphrase) + " " + str(server)+ " " + quote_bash_args(str(user_run_as)) + " " + str(version) + \
" " + str(port) + " < " + str(passwordFile)
@@ -620,7 +620,7 @@ class BootstrapDefault(Bootstrap):
user_run_as = self.shared_state.user_run_as
version=self.getAmbariVersion()
port=self.getAmbariPort()
- return "{sudo} python ".format(sudo=AMBARI_SUDO) + str(setupFile) + " " + str(expected_hostname) + \
+ return "{sudo} python3 ".format(sudo=AMBARI_SUDO) + str(setupFile) + " " + str(expected_hostname) + \
" " + str(passphrase) + " " + str(server)+ " " + quote_bash_args(str(user_run_as)) + " " + str(version) + \
" " + str(port)
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/properties/stack_packages.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/properties/stack_packages.json
index 93a335202c..5f5f64980e 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/properties/stack_packages.json
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/properties/stack_packages.json
@@ -187,6 +187,18 @@
"hadoop-hdfs-namenode"
]
},
+ "ROUTER": {
+ "STACK-SELECT-PACKAGE": "hadoop-hdfs-dfsrouter",
+ "INSTALL": [
+ "hadoop-hdfs-dfsrouter"
+ ],
+ "PATCH": [
+ "hadoop-hdfs-dfsrouter"
+ ],
+ "STANDARD": [
+ "hadoop-hdfs-dfsrouter"
+ ]
+ },
"JOURNALNODE": {
"STACK-SELECT-PACKAGE": "hadoop-hdfs-journalnode",
"INSTALL": [
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/configuration/hdfs-rbf-site.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/configuration/hdfs-rbf-site.xml
new file mode 100644
index 0000000000..6088b51112
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/configuration/hdfs-rbf-site.xml
@@ -0,0 +1,771 @@
+<?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.
+-->
+<!-- Put site-specific property overrides in this file. -->
+<configuration supports_final="true">
+ <property>
+ <name>dfs.federation.router.rpc.enable</name>
+ <value>true</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description>
+ If true, the RPC service to handle client requests in the router is
+ enabled.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.rpc-address</name>
+ <value>0.0.0.0:20010</value>
+ <description>
+ RPC address that handles all clients requests.
+ The value of this property will take the form of router-host1:rpc-port.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.rpc-bind-host</name>
+ <value>0.0.0.0</value>
+ <description>
+ The actual address the RPC server will bind to. If this optional address is
+ set, it overrides only the hostname portion of
+ dfs.federation.router.rpc-address. This is useful for making the name node
+ listen on all interfaces by setting it to 0.0.0.0.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.handler.count</name>
+ <value>10</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ The number of server threads for the router to handle RPC requests from
+ clients.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.handler.queue.size</name>
+ <value>100</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ The size of the queue for the number of handlers to handle RPC client requests.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.reader.count</name>
+ <value>1</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ The number of readers for the router to handle RPC client requests.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.reader.queue.size</name>
+ <value>100</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ The size of the queue for the number of readers for the router to handle RPC client requests.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.connection.creator.queue-size</name>
+ <value>100</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ Size of async connection creator queue.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.connection.pool-size</name>
+ <value>1</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ Size of the pool of connections from the router to namenodes.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.connection.min-active-ratio</name>
+ <value>0.5f</value>
+ <description>
+ Minimum active ratio of connections from the router to namenodes.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.connection.clean.ms</name>
+ <value>10000</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ Time interval, in milliseconds, to check if the connection pool should
+ remove unused connections.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.connection.pool.clean.ms</name>
+ <value>60000</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ Time interval, in milliseconds, to check if the connection manager should
+ remove unused connection pools.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.metrics.enable</name>
+ <value>true</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description>
+ If the metrics in the router are enabled.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+
+ <property>
+ <name>dfs.federation.router.dn-report.time-out</name>
+ <value>1000</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ Time out, in milliseconds for getDatanodeReport.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.dn-report.cache-expire</name>
+ <value>10s</value>
+ <description>
+ Expiration time in seconds for datanodereport.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.metrics.class</name>
+ <value>org.apache.hadoop.hdfs.server.federation.metrics.FederationRPCPerformanceMonitor</value>
+ <description>
+ Class to monitor the RPC system in the router. It must implement the
+ RouterRpcMonitor interface.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.admin.enable</name>
+ <value>true</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description>
+ If true, the RPC admin service to handle client requests in the router is
+ enabled.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.admin-address</name>
+ <value>0.0.0.0:8111</value>
+ <description>
+ RPC address that handles the admin requests.
+ The value of this property will take the form of router-host1:rpc-port.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.admin-bind-host</name>
+ <value>0.0.0.0</value>
+ <description>
+ The actual address the RPC admin server will bind to. If this optional
+ address is set, it overrides only the hostname portion of
+ dfs.federation.router.admin-address. This is useful for making the name
+ node listen on all interfaces by setting it to 0.0.0.0.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.admin.handler.count</name>
+ <value>1</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ The number of server threads for the router to handle RPC requests from
+ admin.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.http-address</name>
+ <value>0.0.0.0:50071</value>
+ <description>
+ HTTP address that handles the web requests to the Router.
+ The value of this property will take the form of router-host1:http-port.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.http-bind-host</name>
+ <value>0.0.0.0</value>
+ <description>
+ The actual address the HTTP server will bind to. If this optional
+ address is set, it overrides only the hostname portion of
+ dfs.federation.router.http-address. This is useful for making the name
+ node listen on all interfaces by setting it to 0.0.0.0.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.https-address</name>
+ <value>0.0.0.0:50072</value>
+ <description>
+ HTTPS address that handles the web requests to the Router.
+ The value of this property will take the form of router-host1:https-port.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.https-bind-host</name>
+ <value>0.0.0.0</value>
+ <description>
+ The actual address the HTTPS server will bind to. If this optional
+ address is set, it overrides only the hostname portion of
+ dfs.federation.router.https-address. This is useful for making the name
+ node listen on all interfaces by setting it to 0.0.0.0.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.http.enable</name>
+ <value>true</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description>
+ If the HTTP service to handle client requests in the router is enabled.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.file.resolver.client.class</name>
+ <value>org.apache.hadoop.hdfs.server.federation.resolver.MountTableResolver</value>
+ <description>
+ Class to resolve files to subclusters. To enable multiple subclusters for a mount point,
+ set to org.apache.hadoop.hdfs.server.federation.resolver.MultipleDestinationMountTableResolver.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.namenode.resolver.client.class</name>
+ <value>org.apache.hadoop.hdfs.server.federation.resolver.MembershipNamenodeResolver</value>
+ <description>
+ Class to resolve the namenode for a subcluster.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.store.enable</name>
+ <value>true</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description>
+ If true, the Router connects to the State Store.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.store.serializer</name>
+ <value>org.apache.hadoop.hdfs.server.federation.store.driver.impl.StateStoreSerializerPBImpl</value>
+ <description>
+ Class to serialize State Store records.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.store.driver.class</name>
+ <value>org.apache.hadoop.hdfs.server.federation.store.driver.impl.StateStoreZooKeeperImpl</value>
+ <description>
+ Class to implement the State Store. There are three implementation classes currently
+ being supported:
+ org.apache.hadoop.hdfs.server.federation.store.driver.impl.StateStoreFileImpl,
+ org.apache.hadoop.hdfs.server.federation.store.driver.impl.StateStoreFileSystemImpl and
+ org.apache.hadoop.hdfs.server.federation.store.driver.impl.StateStoreZooKeeperImpl.
+ These implementation classes use the local file, filesystem and ZooKeeper as a backend respectively.
+ By default it uses the ZooKeeper as the default State Store.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.store.connection.test</name>
+ <value>60000</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ How often to check for the connection to the State Store in milliseconds.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.cache.ttl</name>
+ <value>1m</value>
+ <description>
+ How often to refresh the State Store caches in milliseconds. This setting
+ supports multiple time unit suffixes as described in
+ dfs.heartbeat.interval. If no suffix is specified then milliseconds is
+ assumed.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.store.membership.expiration</name>
+ <value>300000</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ Expiration time in milliseconds for a membership record.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.store.membership.expiration.deletion</name>
+ <value>-1</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ Deletion time in milliseconds for a membership record. If an expired
+ membership record exists beyond this time, it will be deleted. If this
+ value is negative, the deletion is disabled.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.heartbeat.enable</name>
+ <value>true</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description>
+ If true, the Router heartbeats into the State Store.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.heartbeat.interval</name>
+ <value>5000</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ How often the Router should heartbeat into the State Store in milliseconds.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.heartbeat-state.interval</name>
+ <value>5s</value>
+ <description>
+ How often the Router should heartbeat its state into the State Store in
+ milliseconds. This setting supports multiple time unit suffixes as
+ described in dfs.federation.router.quota-cache.update.interval.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.namenode.heartbeat.enable</name>
+ <value>true</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description>
+ If true, get namenode heartbeats and send into the State Store.
+ If not explicitly specified takes the same value as for
+ dfs.federation.router.heartbeat.enable.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.store.router.expiration</name>
+ <value>5m</value>
+ <description>
+ Expiration time in milliseconds for a router state record. This setting
+ supports multiple time unit suffixes as described in
+ dfs.federation.router.quota-cache.update.interval.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.store.router.expiration.deletion</name>
+ <value>-1</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ Deletion time in milliseconds for a router state record. If an expired
+ router state record exists beyond this time, it will be deleted. If this
+ value is negative, the deletion is disabled.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.safemode.enable</name>
+ <value>true</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description>
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.safemode.extension</name>
+ <value>30s</value>
+ <description>
+ Time after startup that the Router is in safe mode. This setting
+ supports multiple time unit suffixes as described in
+ dfs.heartbeat.interval. If no suffix is specified then milliseconds is
+ assumed.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.safemode.expiration</name>
+ <value>3m</value>
+ <description>
+ Time without being able to reach the State Store to enter safe mode. This
+ setting supports multiple time unit suffixes as described in
+ dfs.heartbeat.interval. If no suffix is specified then milliseconds is
+ assumed.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.monitor.localnamenode.enable</name>
+ <value>true</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description>
+ If true, the Router should monitor the namenode in the local machine.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.mount-table.max-cache-size</name>
+ <value>10000</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ Maximum number of mount table cache entries to have.
+ By default, remove cache entries if we have more than 10k.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.mount-table.cache.enable</name>
+ <value>true</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description>
+ Set to true to enable mount table cache (Path to Remote Location cache).
+ Disabling the cache is recommended when a large amount of unique paths are queried.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.quota.enable</name>
+ <value>false</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description>
+ Set to true to enable quota system in Router. When it's enabled, setting
+ or clearing sub-cluster's quota directly is not recommended since Router
+ Admin server will override sub-cluster's quota with global quota.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.quota-cache.update.interval</name>
+ <value>60s</value>
+ <description>
+ Interval time for updating quota usage cache in Router.
+ This property is used only if the value of
+ dfs.federation.router.quota.enable is true.
+ This setting supports multiple time unit suffixes as described
+ in dfs.heartbeat.interval. If no suffix is specified then milliseconds
+ is assumed.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.client.thread-size</name>
+ <value>32</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ Max threads size for the RouterClient to execute concurrent
+ requests.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.client.retry.max.attempts</name>
+ <value>3</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ Max retry attempts for the RouterClient talking to the Router.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.client.reject.overload</name>
+ <value>false</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description>
+ Set to true to reject client requests when we run out of RPC client
+ threads.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.client.allow-partial-listing</name>
+ <value>true</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description>
+ If the Router can return a partial list of files in a multi-destination mount point when one of the subclusters is unavailable.
+ True may return a partial list of files if a subcluster is down.
+ False will fail the request if one is unavailable.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.client.mount-status.time-out</name>
+ <value>1s</value>
+ <description>
+ Set a timeout for the Router when listing folders containing mount
+ points. In this process, the Router checks the mount table and then it
+ checks permissions in the subcluster. After the time out, we return the
+ default values.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.connect.max.retries.on.timeouts</name>
+ <value>0</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ Maximum number of retries for the IPC Client when connecting to the
+ subclusters. By default, it doesn't let the IPC retry and the Router
+ handles it.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.connect.timeout</name>
+ <value>2s</value>
+ <description>
+ Time out for the IPC client connecting to the subclusters. This should be
+ short as the Router has knowledge of the state of the Routers.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <!-- <property>
+ <name>dfs.federation.router.keytab.file</name>
+ <value></value>
+ <description>
+ The keytab file used by router to login as its
+ service principal. The principal name is configured with
+ dfs.federation.router.kerberos.principal.
+ </description>
+ </property>
+ <property>
+ <name>dfs.federation.router.kerberos.principal</name>
+ <value></value>
+ <description>
+ The Router service principal. This is typically set to
+ router/_HOST@REALM.TLD. Each Router will substitute _HOST with its
+ own fully qualified hostname at startup. The _HOST placeholder
+ allows using the same configuration setting on both Router
+ in an HA setup.
+ </description>
+ </property>
+ <property>
+ <name>dfs.federation.router.kerberos.principal.hostname</name>
+ <value></value>
+ <description>
+ Optional. The hostname for the Router containing this
+ configuration file. Will be different for each machine.
+ Defaults to current hostname.
+ </description>
+ </property>
+ <property>
+ <name>dfs.federation.router.kerberos.internal.spnego.principal</name>
+ <value>${dfs.web.authentication.kerberos.principal}</value>
+ <description>
+ The server principal used by the Router for web UI SPNEGO
+ authentication when Kerberos security is enabled. This is
+ typically set to HTTP/_HOST@REALM.TLD The SPNEGO server principal
+ begins with the prefix HTTP/ by convention.
+ If the value is '*', the web server will attempt to login with
+ every principal specified in the keytab file
+ dfs.web.authentication.kerberos.keytab.
+ </description>
+ </property>
+ -->
+ <property>
+ <name>dfs.federation.router.mount-table.cache.update</name>
+ <value>true</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description>Set true to enable MountTableRefreshService. This service
+ updates mount table cache immediately after adding, modifying or
+ deleting the mount table entries. If this service is not enabled
+ mount table cache are refreshed periodically by
+ StateStoreCacheUpdateService
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.mount-table.cache.update.timeout</name>
+ <value>1m</value>
+ <description>This property defines how long to wait for all the
+ admin servers to finish their mount table cache update. This setting
+ supports multiple time unit suffixes as described in
+ dfs.federation.router.safemode.extension.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.mount-table.cache.update.client.max.time</name>
+ <value>5m</value>
+ <description>Remote router mount table cache is updated through
+ RouterClient(RPC call). To improve performance, RouterClient
+ connections are cached but it should not be kept in cache forever.
+ This property defines the max time a connection can be cached. This
+ setting supports multiple time unit suffixes as described in
+ dfs.federation.router.safemode.extension.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>dfs.federation.router.secret.manager.class</name>
+ <value>org.apache.hadoop.hdfs.server.federation.router.security.token.ZKDelegationTokenSecretManagerImpl</value>
+ <description>
+ Class to implement state store to delegation tokens.
+ Default implementation uses zookeeper as the backend to store delegation tokens.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/kerberos.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/kerberos.json
index 271d895461..e11292171f 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/kerberos.json
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/kerberos.json
@@ -161,6 +161,32 @@
}
]
},
+ {
+ "name": "ROUTER",
+ "identities": [
+ {
+ "name": "dfsrouter_dr",
+ "principal": {
+ "value": "router/_HOST@${realm}",
+ "type" : "service",
+ "configuration": "hdfs-rbf-site/dfs.federation.router.kerberos.principal",
+ "local_username" : "${hadoop-env/hdfs_user}"
+ },
+ "keytab": {
+ "file": "${keytab_dir}/dr.service.keytab",
+ "owner": {
+ "name": "${hadoop-env/hdfs_user}",
+ "access": "r"
+ },
+ "group": {
+ "name": "${cluster-env/user_group}",
+ "access": ""
+ },
+ "configuration": "hdfs-rbf-site/dfs.federation.router.keytab.file"
+ }
+ }
+ ]
+ },
{
"name": "SECONDARY_NAMENODE",
"identities": [
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/metainfo.xml
index 8656000331..d183da6366 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/metainfo.xml
@@ -223,6 +223,52 @@
</configFiles>
</component>
+ <component>
+ <name>ROUTER</name>
+ <displayName>Router</displayName>
+ <category>SLAVE</category>
+ <cardinality>0+</cardinality>
+ <versionAdvertised>true</versionAdvertised>
+ <reassignAllowed>true</reassignAllowed>
+ <timelineAppid>router</timelineAppid>
+ <commandScript>
+ <script>scripts/router.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>1800</timeout>
+ </commandScript>
+ <logs>
+ <log>
+ <logId>hdfs_router</logId>
+ <primary>true</primary>
+ </log>
+ <log>
+ <logId>hdfs_audit</logId>
+ </log>
+ </logs>
+ <dependencies>
+ <dependency>
+ <name>HDFS/HDFS_CLIENT</name>
+ <scope>host</scope>
+ <auto-deploy>
+ <enabled>true</enabled>
+ </auto-deploy>
+ </dependency>
+ </dependencies>
+ <configuration-dependencies>
+ <config-type>hdfs-rbf-site</config-type>
+ </configuration-dependencies>
+ <customCommands>
+ <customCommand>
+ <name>DECOMMISSION</name>
+ <commandScript>
+ <script>scripts/router.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>600</timeout>
+ </commandScript>
+ </customCommand>
+ </customCommands>
+ </component>
+
<component>
<name>JOURNALNODE</name>
<displayName>JournalNode</displayName>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/dfsrouter.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/dfsrouter.py
new file mode 100644
index 0000000000..15d04936c9
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/dfsrouter.py
@@ -0,0 +1,143 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
+
+import sys
+import os
+import json
+import tempfile
+import hashlib
+from datetime import datetime
+import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set.
+
+from ambari_commons import constants
+
+from resource_management.libraries.resources.xml_config import XmlConfig
+
+from resource_management.libraries.script.script import Script
+from resource_management.core.resources.system import Execute, File
+from resource_management.core import shell
+from resource_management.libraries.functions import stack_select
+from resource_management.libraries.functions import upgrade_summary
+from resource_management.libraries.functions.constants import Direction
+from resource_management.libraries.functions.format import format
+from resource_management.libraries.resources.execute_hadoop import ExecuteHadoop
+from resource_management.libraries.functions.security_commons import build_expectations, \
+ cached_kinit_executor, get_params_from_filesystem, validate_security_config_properties, \
+ FILE_TYPE_XML
+
+from resource_management.core.exceptions import Fail
+from resource_management.core.shell import as_user
+from resource_management.core.logger import Logger
+
+
+from ambari_commons.os_family_impl import OsFamilyImpl
+from ambari_commons import OSConst
+
+from hdfs_router import router
+
+
+from hdfs import hdfs, reconfig
+import hdfs_rebalance
+from utils import initiate_safe_zkfc_failover, get_hdfs_binary, get_dfsrouteradmin_base_command
+from resource_management.libraries.functions.namenode_ha_utils import get_hdfs_cluster_id_from_jmx
+
+# The hash algorithm to use to generate digests/hashes
+HASH_ALGORITHM = hashlib.sha224
+
+class Router(Script):
+
+ def get_hdfs_binary(self):
+ """
+ Get the name or path to the hdfs binary depending on the component name.
+ """
+ return get_hdfs_binary("hadoop-hdfs-dfsrouter")
+
+ def install(self, env):
+ import params
+ env.set_params(params)
+ self.install_packages(env)
+ self.configure(env)
+
+ def configure(self, env):
+ import params
+ env.set_params(params)
+ hdfs("router")
+ hdfs_binary = self.get_hdfs_binary()
+ router(action="configure", hdfs_binary=hdfs_binary, env=env)
+ XmlConfig("hdfs-site.xml",
+ conf_dir=params.hadoop_conf_dir,
+ configurations=params.router_hdfs_site,
+ configuration_attributes=params.config['configurationAttributes']['hdfs-site'],
+ mode=0o644,
+ owner=params.hdfs_user,
+ group=params.user_group
+ )
+ XmlConfig("core-site.xml",
+ conf_dir=params.hadoop_conf_dir,
+ configurations=params.router_core_site,
+ configuration_attributes=params.config['configurationAttributes']['core-site'],
+ mode=0o644,
+ owner=params.hdfs_user,
+ group=params.user_group
+ )
+
+ def save_configs(self, env):
+ import params
+ env.set_params(params)
+ hdfs()
+
+ def reload_configs(self, env):
+ import params
+ env.set_params(params)
+ Logger.info("RELOAD CONFIGS")
+ reconfig("router", params.router_address)
+
+ def start(self, env, upgrade_type=None):
+ import params
+ env.set_params(params)
+ self.configure(env)
+ hdfs_binary = self.get_hdfs_binary()
+ router(action="start", hdfs_binary=hdfs_binary, env=env)
+
+ def stop(self, env, upgrade_type=None):
+ import params
+ env.set_params(params)
+ hdfs_binary = self.get_hdfs_binary()
+ router(action="stop", hdfs_binary=hdfs_binary, env=env)
+
+ def status(self, env):
+ import status_params
+ env.set_params(status_params)
+ router(action="status", env=env)
+
+ def get_log_folder(self):
+ import params
+ return params.hdfs_log_dir
+
+ def get_user(self):
+ import params
+ return params.hdfs_user
+
+ def get_pid_files(self):
+ import status_params
+ return [status_params.router_pid_file]
+
+def _print(line):
+ sys.stdout.write(line)
+ sys.stdout.flush()
+
+if __name__ == "__main__":
+ Router().execute()
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs.py
index 31664c9744..93bd8f0c9e 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs.py
@@ -130,6 +130,15 @@ def hdfs(name=None):
group=params.user_group
)
+ XmlConfig("hdfs-rbf-site.xml",
+ conf_dir=params.hadoop_conf_dir,
+ configurations=params.config['configurations']['hdfs-rbf-site'],
+ configuration_attributes=params.config['configurationAttributes']['hdfs-rbf-site'],
+ mode=0o644,
+ owner=params.hdfs_user,
+ group=params.user_group
+ )
+
XmlConfig("core-site.xml",
conf_dir=params.hadoop_conf_dir,
configurations=params.config['configurations']['core-site'],
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_router.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_router.py
new file mode 100644
index 0000000000..a4064925a2
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_router.py
@@ -0,0 +1,91 @@
+"""
+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.path
+import time
+
+from ambari_commons import constants
+
+from resource_management.core import shell
+from resource_management.core.source import Template
+from resource_management.core.resources.system import File, Execute, Directory
+from resource_management.core.resources.service import Service
+from resource_management.libraries.functions.decorator import retry
+from resource_management.libraries.functions.default import default
+from resource_management.libraries.functions.format import format
+from resource_management.libraries.functions.check_process_status import check_process_status
+from resource_management.libraries.resources.execute_hadoop import ExecuteHadoop
+from resource_management.libraries.functions import Direction, upgrade_summary
+from resource_management.libraries.functions.namenode_ha_utils import get_name_service_by_hostname
+from resource_management.libraries.functions.generate_logfeeder_input_config import generate_logfeeder_input_config
+from ambari_commons import OSCheck, OSConst
+from ambari_commons.os_family_impl import OsFamilyImpl, OsFamilyFuncImpl
+from utils import get_dfsrouteradmin_base_command
+from utils import set_up_zkfc_security
+
+if OSCheck.is_windows_family():
+ from resource_management.libraries.functions.windows_service_utils import check_windows_service_status
+
+from resource_management.core.exceptions import Fail
+from resource_management.core.logger import Logger
+
+from utils import service, safe_zkfc_op, is_previous_fs_image
+from setup_ranger_hdfs import setup_ranger_hdfs, create_ranger_audit_hdfs_directories
+
+
+@OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT)
+def router(action=None, hdfs_binary=None, env=None):
+
+ if action is None:
+ raise Fail('"action" parameter is required for function router().')
+
+ if action in ["start", "stop"] and hdfs_binary is None:
+ raise Fail('"hdfs_binary" parameter is required for function router().')
+
+ if action == "configure":
+ import params
+ generate_logfeeder_input_config('hdfs', Template("input.config-hdfs.json.j2", extra_imports=[default]))
+ # set up failover / secure zookeper ACLs, this feature is supported from VDP 2.6 ownwards
+ set_up_zkfc_security(params)
+ elif action == "start":
+ import params
+ service(
+ action="start",
+ name="dfsrouter",
+ user=params.hdfs_user,
+ create_pid_dir=True,
+ create_log_dir=True
+ )
+
+ if params.security_enabled:
+ Execute(format("{kinit_path_local} -kt {hdfs_user_keytab} {hdfs_principal_name}"),
+ user = params.hdfs_user)
+
+ name_service = get_name_service_by_hostname(params.hdfs_site, params.hostname)
+ ensure_safemode_off = True
+
+ elif action == "stop":
+ import params
+ service(
+ action="stop", name="dfsrouter",
+ user=params.hdfs_user
+ )
+ elif action == "status":
+ import status_params
+ check_process_status(status_params.router_pid_file)
+
+
+
+
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params_linux.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params_linux.py
index d4618067f7..cf5072fdc7 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params_linux.py
@@ -220,6 +220,7 @@ hbase_master_hosts = default("/clusterHostInfo/hbase_master_hosts", [])
hs_host = default("/clusterHostInfo/historyserver_hosts", [])
jtnode_host = default("/clusterHostInfo/jtnode_hosts", [])
namenode_host = default("/clusterHostInfo/namenode_hosts", [])
+router_host = default("/clusterHostInfo/router_hosts", [])
nm_host = default("/clusterHostInfo/nodemanager_hosts", [])
ganglia_server_hosts = default("/clusterHostInfo/ganglia_server_hosts", [])
journalnode_hosts = default("/clusterHostInfo/journalnode_hosts", [])
@@ -320,6 +321,38 @@ dfs_data_dirs_perm = int(dfs_data_dirs_perm, base=8) # convert int from octal re
data_dir_mount_file = "/var/lib/ambari-agent/data/datanode/dfs_data_dir_mount.hist"
+router_address = None
+if 'dfs.federation.router.rpc-address' in config['configurations']['hdfs-rbf-site']:
+ router_rpcaddress = config['configurations']['hdfs-rbf-site']['dfs.federation.router.rpc-address']
+ router_address = format("hdfs://{router_rpcaddress}")
+else:
+ router_address = config['configurations']['core-site']['fs.defaultFS']
+if router_host:
+ router_hdfs_site = dict(config['configurations']['hdfs-site'])
+ router_core_site = dict(config['configurations']['core-site'])
+ nameservices = config['configurations']['hdfs-site'].get('dfs.nameservices')
+ if not isinstance(nameservices, str):
+ # handle the error, for example by raising an exception or setting a default value
+ print("The dfs.nameservices property is not set or not a string")
+ nameservices = ''
+
+ router_hdfs_site['dfs.nameservices'] = nameservices + ",ns-fed"
+ router_hdfs_site['dfs.client.failover.proxy.provider.ns-fed'] = 'org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider'
+ router_hdfs_site['dfs.client.failover.random.order'] = 'true'
+ router_id_list = ["r" + str(i) for i in range(1, len(router_host) + 1)]
+ router_ids = ",".join(router_id_list)
+ router_hdfs_site['dfs.ha.namenodes.ns-fed'] = router_ids
+ for i, curr_router_host in enumerate(router_host):
+ id = router_id_list[i]
+ prop_name = "dfs.namenode.rpc-address.ns-fed." + id
+ prop_value = curr_router_host + ":" + "20010"
+ router_hdfs_site[prop_name] = prop_value
+
+ router_core_site['fs.defaultFS'] = "hdfs://ns-fed"
+ router_core_site['hadoop.zk.address'] = config['configurations']['core-site'].get('ha.zookeeper.quorum')
+else:
+ print("No router hosts found")
+
# HDFS High Availability properties
dfs_ha_enabled = False
dfs_ha_nameservices = default('/configurations/hdfs-site/dfs.internal.nameservices', None)
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/utils.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/utils.py
index 5ce8598bf5..9bebc21663 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/utils.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/utils.py
@@ -403,6 +403,22 @@ def get_dfsadmin_base_command(hdfs_binary, use_specific_namenode = False):
dfsadmin_base_command = format("{hdfs_binary} dfsadmin -fs {params.namenode_address}")
return dfsadmin_base_command
+def get_dfsrouteradmin_base_command(hdfs_binary, use_specific_router = False):
+ """
+ Get the dfsrouteradmin base command constructed using hdfs_binary path and passing router address as explicit -fs argument
+ :param hdfs_binary: path to hdfs binary to use
+ :param use_specific_router: flag if set and Router HA is enabled, then the dfsrouteradmin command will use
+ current router's address
+ :return: the constructed dfsrouteradmin base command
+ """
+ import params
+ dfsrouteradmin_base_command = ""
+ if params.dfs_ha_enabled and use_specific_router:
+ dfsrouteradmin_base_command = format("{hdfs_binary} dfsrouteradmin -fs hdfs://{params.router_rpc}")
+ else:
+ dfsadmin_base_command = format("{hdfs_binary} dfsrouteradmin -fs {params.router_address}")
+ return dfsrouteradmin_base_command
+
def set_up_zkfc_security(params):
""" Sets up security for accessing zookeper on secure clusters """
diff --git a/ambari-web/app/controllers.js b/ambari-web/app/controllers.js
index bd858a51b0..fbfa68d05c 100644
--- a/ambari-web/app/controllers.js
+++ b/ambari-web/app/controllers.js
@@ -61,6 +61,11 @@ require('controllers/main/admin/federation/step1_controller');
require('controllers/main/admin/federation/step2_controller');
require('controllers/main/admin/federation/step3_controller');
require('controllers/main/admin/federation/step4_controller');
+require('controllers/main/admin/federation/routerBasedFederation/wizard_controller');
+require('controllers/main/admin/federation/routerBasedFederation/step1_controller');
+require('controllers/main/admin/federation/routerBasedFederation/step2_controller');
+require('controllers/main/admin/federation/routerBasedFederation/step3_controller');
+require('controllers/main/admin/federation/routerBasedFederation/step4_controller');
require('controllers/main/admin/highAvailability/hawq/addStandby/wizard_controller');
require('controllers/main/admin/highAvailability/hawq/addStandby/step1_controller');
require('controllers/main/admin/highAvailability/hawq/addStandby/step2_controller');
diff --git a/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step1_controller.js b/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step1_controller.js
new file mode 100644
index 0000000000..60ee0bb268
--- /dev/null
+++ b/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step1_controller.js
@@ -0,0 +1,26 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+App.RouterFederationWizardStep1Controller = Em.Controller.extend({
+ name: "routerFederationWizardStep1Controller",
+ next: function () {
+ App.router.send('next');
+ }
+});
\ No newline at end of file
diff --git a/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step2_controller.js b/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step2_controller.js
new file mode 100644
index 0000000000..a367c3d2b2
--- /dev/null
+++ b/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step2_controller.js
@@ -0,0 +1,67 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+App.RouterFederationWizardStep2Controller = Em.Controller.extend(App.AssignMasterComponents, {
+
+ name: "routerFederationWizardStep2Controller",
+
+ useServerValidation: false,
+
+ mastersToShow: ['NAMENODE', 'ROUTER'],
+
+ mastersToAdd: ['ROUTER'],
+
+ showCurrentPrefix: ['NAMENODE', 'ROUTER'],
+
+ showAdditionalPrefix: ['ROUTER'],
+
+ mastersAddableInHA: ['ROUTER'],
+
+ showInstalledMastersFirst: true,
+
+ renderComponents: function (masterComponents) {
+ // check if we are restoring components assignment by checking existence of ROUTER component in array
+ var restoringComponents = masterComponents.someProperty('component_name', 'ROUTER');
+ masterComponents = restoringComponents ? masterComponents : masterComponents.concat(this.generateRouterComponents());
+ this._super(masterComponents);
+ // if you have similar functions for router, call them here
+ },
+
+
+ generateRouterComponents: function () {
+ var router = [];
+ App.HostComponent.find().filterProperty('componentName', 'ROUTER').forEach(function (rbf) {
+ var rbfComponent = this.createComponentInstallationObject(Em.Object.create({
+ serviceName: rbf.get('service.serviceName'),
+ componentName: rbf.get('componentName')
+ }), rbf.get('hostName'));
+ rbfComponent.isInstalled = true;
+ router.push(rbfComponent);
+ }, this);
+ return router;
+ },
+
+ actions: {
+ back() {
+ this.clearStep()
+ }
+ }
+
+});
diff --git a/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step3_controller.js b/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step3_controller.js
new file mode 100644
index 0000000000..364f125b1c
--- /dev/null
+++ b/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step3_controller.js
@@ -0,0 +1,191 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+App.RouterFederationWizardStep3Controller = Em.Controller.extend(App.BlueprintMixin, {
+ name: "routerFederationWizardStep3Controller",
+ selectedService: null,
+ stepConfigs: [],
+ serverConfigData: {},
+ once: false,
+ isLoaded: false,
+ isConfigsLoaded: false,
+ versionLoaded: true,
+ hideDependenciesInfoBar: true,
+
+ /**
+ * Map of sites and properties to delete
+ * @type Object
+ */
+
+ clearStep: function () {
+ this.get('stepConfigs').clear();
+ this.set('serverConfigData', {});
+ this.set('isConfigsLoaded', false);
+ this.set('isLoaded', false);
+ },
+
+ loadStep: function () {
+ this.clearStep();
+ this.loadConfigsTags();
+ },
+
+ loadConfigsTags: function () {
+ return App.ajax.send({
+ name: 'config.tags',
+ sender: this,
+ success: 'onLoadConfigsTags'
+ });
+ },
+
+
+ onLoadConfigsTags: function (data) {
+ var urlParams = '(type=hdfs-rbf-site&tag=' + data.Clusters.desired_configs['hdfs-rbf-site'].tag + ')|';
+ urlParams += '(type=hdfs-site&tag=' + data.Clusters.desired_configs['hdfs-site'].tag + ')|';
+ urlParams += '(type=core-site&tag=' + data.Clusters.desired_configs['core-site'].tag + ')';
+ App.ajax.send({
+ name: 'admin.get.all_configurations',
+ sender: this,
+ data: {
+ urlParams: urlParams
+ },
+ success: 'onLoadConfigs'
+ });
+ },
+
+ onLoadConfigs: function (data) {
+ this.set('serverConfigData', data);
+ this.set('isConfigsLoaded', true);
+ },
+
+ onLoad: function () {
+ if (this.get('isConfigsLoaded') && App.router.get('clusterController.isHDFSNameSpacesLoaded')) {
+ var routerFederationConfig = $.extend(true, {}, require('data/configs/wizards/router_federation_properties').routerFederationConfig);
+ if (App.get('hasNameNodeFederation')) {
+ routerFederationConfig.configs = routerFederationConfig.configs.rejectProperty('firstRun');
+ }
+ routerFederationConfig.configs = this.tweakServiceConfigs(routerFederationConfig.configs);
+ var configsFromServer = this.get('serverConfigData.items');
+ var hdfsrbfConfigs = configsFromServer.findProperty('type', 'hdfs-rbf-site');
+ var configToSave = {
+ type: 'hdfs-rbf-site',
+ properties: hdfsrbfConfigs&&hdfsrbfConfigs.properties,
+ };
+ if (hdfsrbfConfigs && hdfsrbfConfigs.properties_attributes) {
+ configToSave.properties_attributes = hdfsrbfConfigs.properties_attributes;
+ }
+ for(const property of routerFederationConfig.configs){
+ configToSave.properties[property.name]=property.value
+ }
+ App.ajax.send({
+ name: 'common.service.configurations',
+ sender: self,
+ data: {
+ desired_config: configToSave
+ },
+ error: 'onTaskError'
+ });
+
+ this.renderServiceConfigs(routerFederationConfig);
+ this.set('isLoaded', true);
+ }
+ }.observes('isConfigsLoaded', 'App.router.clusterController.isHDFSNameSpacesLoaded'),
+
+ prepareDependencies: function () {
+ var ret = {};
+ var configsFromServer = this.get('serverConfigData.items');
+ var nameNodes = this.get('content.masterComponentHosts').filterProperty('component', 'NAMENODE');
+ var hdfsSiteConfigs = configsFromServer.findProperty('type', 'hdfs-site').properties;
+ var coreSiteConfigs = configsFromServer.findProperty('type', 'core-site').properties;
+ var nameServices = App.HDFSService.find().objectAt(0).get('masterComponentGroups').mapProperty('name');
+ var modifiedNameServices = [];
+ var nnCounter = 1;
+ ret.nameServicesList = nameServices.join(',');
+ ret.nameservice1 = nameServices[0];
+ for (let i = 0; i < nameServices.length; i++) {
+ let nameservice = nameServices[i];
+ modifiedNameServices.push(`${nameservice}.nn${nnCounter}`);
+ nnCounter++;
+ modifiedNameServices.push(`${nameservice}.nn${nnCounter}`);
+ nnCounter++;
+ }
+ ret.modifiedNameServices = modifiedNameServices.join(',');
+
+ ret.zkAddress = coreSiteConfigs['ha.zookeeper.quorum'];
+
+ return ret;
+ },
+ tweakServiceConfigs: function (configs) {
+ var dependencies = this.prepareDependencies();
+ var result = [];
+ var configsToRemove = [];
+ var hdfsSiteConfigs = this.get('serverConfigData').items.findProperty('type', 'hdfs-site').properties;
+ var wizardController = App.router.get(this.get('content.controllerName'));
+ configs.forEach(function (config) {
+ config.isOverridable = false;
+ config.name = wizardController.replaceDependencies(config.name, dependencies);
+ config.displayName = wizardController.replaceDependencies(config.displayName, dependencies);
+ config.value = wizardController.replaceDependencies(config.value, dependencies);
+ config.recommendedValue = wizardController.replaceDependencies(config.recommendedValue, dependencies);
+ result.push(config);
+
+ }, this);
+
+ return result;
+ },
+
+ renderServiceConfigs: function (_serviceConfig) {
+ var serviceConfig = App.ServiceConfig.create({
+ serviceName: _serviceConfig.serviceName,
+ displayName: _serviceConfig.displayName,
+ configCategories: [],
+ showConfig: true,
+ configs: []
+ });
+
+ _serviceConfig.configCategories.forEach(function (_configCategory) {
+ if (App.Service.find().someProperty('serviceName', _configCategory.name)) {
+ serviceConfig.configCategories.pushObject(_configCategory);
+ }
+ }, this);
+
+ this.loadComponentConfigs(_serviceConfig, serviceConfig);
+
+ this.get('stepConfigs').pushObject(serviceConfig);
+ this.set('selectedService', this.get('stepConfigs').objectAt(0));
+ this.set('once', true);
+ },
+
+ /**
+ * Load child components to service config object
+ * @param _componentConfig
+ * @param componentConfig
+ */
+ loadComponentConfigs: function (_componentConfig, componentConfig) {
+ _componentConfig.configs.forEach(function (_serviceConfigProperty) {
+ var serviceConfigProperty = App.ServiceConfigProperty.create(_serviceConfigProperty);
+ componentConfig.configs.pushObject(serviceConfigProperty);
+ serviceConfigProperty.set('isEditable', serviceConfigProperty.get('isReconfigurable'));
+ }, this);
+ },
+
+ isNextDisabled: function () {
+ return !this.get('isLoaded') || (this.get('isLoaded') && this.get('selectedService.configs').someProperty('isValid', false));
+ }.property('selectedService.configs.@each.isValid', 'isLoaded')
+});
\ No newline at end of file
diff --git a/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step4_controller.js b/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step4_controller.js
new file mode 100644
index 0000000000..8e0f5925f2
--- /dev/null
+++ b/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/step4_controller.js
@@ -0,0 +1,80 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+App.RouterFederationWizardStep4Controller = App.HighAvailabilityProgressPageController.extend(App.WizardEnableDone, {
+
+ name: "routerFederationWizardStep4Controller",
+
+ commands: ['installRouter', 'startRouters'],
+
+ tasksMessagesPrefix: 'admin.routerFederation.wizard.step',
+
+ initializeTasks: function () {
+ this._super();
+ this.removeUnneededTasks();
+ },
+
+ removeUnneededTasks: function () {
+ var installedServices = App.Service.find().mapProperty('serviceName');
+ if (!installedServices.contains('RANGER')) {
+ this.removeTasks(['startInfraSolr', 'startRangerAdmin', 'startRangerUsersync']);
+ }
+ if (!installedServices.contains('AMBARI_INFRA_SOLR')) {
+ this.removeTasks(['startInfraSolr']);
+ }
+ },
+
+ reconfigureServices: function () {
+ var servicesModel = App.Service.find();
+ var configs = [];
+ var data = this.get('content.serviceConfigProperties');
+ var note = Em.I18n.t('admin.routerFederation.wizard,step4.save.configuration.note');
+ configs.push({
+ Clusters: {
+ desired_config: this.reconfigureSites(['hdfs-rbf-site'], data, note)
+ }
+ });
+ return App.ajax.send({
+ name: 'common.service.multiConfigurations',
+ sender: this,
+ data: {
+ configs: configs
+ },
+ error: 'onTaskError',
+ success: 'installHDFSClients'
+ });
+ },
+
+ installHDFSClients: function () {
+ var nnHostNames = this.get('content.masterComponentHosts').filterProperty('component', 'NAMENODE').mapProperty('hostName');
+ var jnHostNames = App.HostComponent.find().filterProperty('componentName', 'JOURNALNODE').mapProperty('hostName');
+ var hostNames = nnHostNames.concat(jnHostNames).uniq();
+ this.createInstallComponentTask('HDFS_CLIENT', hostNames, 'HDFS');
+ },
+
+ installRouter: function () {
+ this.createInstallComponentTask('ROUTER', this.get('content.masterComponentHosts').filterProperty('component', 'ROUTER').mapProperty('hostName'), "HDFS");
+ },
+
+ startRouters: function () {
+ var hostNames = this.get('content.masterComponentHosts').filterProperty('component', 'ROUTER').mapProperty('hostName');
+ this.updateComponent('ROUTER', hostNames, "HDFS", "Start");
+ }
+});
\ No newline at end of file
diff --git a/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/wizard_controller.js b/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/wizard_controller.js
new file mode 100644
index 0000000000..588030821d
--- /dev/null
+++ b/ambari-web/app/controllers/main/admin/federation/routerBasedFederation/wizard_controller.js
@@ -0,0 +1,158 @@
+/**
+ * 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.
+ */
+
+
+var App = require('app');
+
+App.RouterFederationWizardController = App.WizardController.extend({
+
+ name: 'routerFederationWizardController',
+
+ totalSteps: 4,
+
+ /**
+ * @type {string}
+ */
+ displayName: Em.I18n.t('admin.routerFederation.wizard.header'),
+
+ isFinished: false,
+
+ content: Em.Object.create({
+ controllerName: 'routerFederationWizardController'
+ }),
+
+ /**
+ * Load data for all steps until <code>current step</code>
+ */
+ loadMap: {
+ '1': [
+ {
+ type: 'sync',
+ callback: function () {
+ this.load('cluster');
+ }
+ }
+ ],
+ '2': [
+ {
+ type: 'async',
+ callback: function () {
+ var self = this,
+ dfd = $.Deferred();
+ this.loadServicesFromServer();
+ this.loadMasterComponentHosts().done(function () {
+ self.loadConfirmedHosts();
+ dfd.resolve();
+ });
+ return dfd.promise();
+ }
+ }
+ ],
+ '3': [
+ {
+ type: 'sync',
+ callback: function () {
+ this.load('cluster');
+ }
+ }
+ ],
+ '4': [
+ {
+ type: 'sync',
+ callback: function () {
+ this.loadServiceConfigProperties();
+ this.loadTasksStatuses();
+ this.loadTasksRequestIds();
+ this.loadRequestIds();
+ }
+ }
+ ]
+ },
+
+ init: function () {
+ this._super();
+ this.clearStep();
+ },
+
+ clearStep: function () {
+ this.set('isFinished', false);
+ },
+
+ setCurrentStep: function (currentStep, completed) {
+ this._super(currentStep, completed);
+ App.clusterStatus.setClusterStatus({
+ clusterName: this.get('content.cluster.name'),
+ wizardControllerName: 'routerFederationWizardController',
+ localdb: App.db.data
+ });
+ },
+
+ saveNNHosts: function (nnHosts) {
+ this.set('content.nnHosts', nnHosts);
+ this.setDBProperty('nnHosts', nnHosts);
+ },
+
+ /**
+ * Load hosts for additional and current ResourceManagers from local db to <code>controller.content</code>
+ */
+ loadNNHosts: function() {
+ var nnHosts = this.getDBProperty('nnHosts');
+ this.set('content.nnHosts', nnHosts);
+ },
+
+ saveServiceConfigProperties: function (stepController) {
+ var serviceConfigProperties = [];
+ var data = stepController.get('serverConfigData');
+
+ var _content = stepController.get('stepConfigs')[0];
+ _content.get('configs').forEach(function (_configProperties) {
+ var siteObj = data.items.findProperty('type', _configProperties.get('filename'));
+ if (siteObj) {
+ siteObj.properties[_configProperties.get('name')] = _configProperties.get('value');
+ }
+ }, this);
+ this.setDBProperty('serviceConfigProperties', data);
+ this.set('content.serviceConfigProperties', data);
+ },
+
+ /**
+ * Load serviceConfigProperties to model
+ */
+ loadServiceConfigProperties: function () {
+ this.set('content.serviceConfigProperties', this.getDBProperty('serviceConfigProperties'));
+ },
+
+ /**
+ * Remove all loaded data.
+ * Created as copy for App.router.clearAllSteps
+ */
+ clearAllSteps: function () {
+ this.clearInstallOptions();
+ // clear temporary information stored during the install
+ this.set('content.cluster', this.getCluster());
+ },
+
+ /**
+ * Clear all temporary data
+ */
+ finish: function () {
+ this.resetDbNamespace();
+ App.router.get('updateController').updateAll();
+ this.set('isFinished', true);
+ }
+});
\ No newline at end of file
diff --git a/ambari-web/app/controllers/main/admin/highAvailability_controller.js b/ambari-web/app/controllers/main/admin/highAvailability_controller.js
index 3ac7214979..f73f895ec7 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability_controller.js
@@ -142,6 +142,28 @@ App.MainAdminHighAvailabilityController = App.WizardController.extend({
return true;
},
+ /**
+ * enable router Based Federation
+ * @return {Boolean}
+ */
+ enableRouterFederation: function () {
+ //Prerequisite Checks
+ var message = [];
+ if (!App.HostComponent.find().filterProperty('componentName', 'ZOOKEEPER_SERVER').everyProperty('workStatus', 'STARTED')) {
+ message.push(Em.I18n.t('admin.nameNodeFederation.wizard.required.zookeepers'));
+ }
+
+ if (!App.HostComponent.find().filterProperty('componentName', 'JOURNALNODE').everyProperty('workStatus', 'STARTED')) {
+ message.push(Em.I18n.t('admin.nameNodeFederation.wizard.required.journalnodes'));
+ }
+ if (message.length > 0) {
+ this.showErrorPopup(message);
+ return false;
+ }
+ App.router.transitionTo('main.services.enableRouterFederation');
+ return true;
+ },
+
/**
* open Manage JournalNode Wizard if there are two started NameNodes with defined active/standby state
* @returns {boolean}
diff --git a/ambari-web/app/controllers/main/service/item.js b/ambari-web/app/controllers/main/service/item.js
index d749c313f7..380c94aaab 100644
--- a/ambari-web/app/controllers/main/service/item.js
+++ b/ambari-web/app/controllers/main/service/item.js
@@ -1518,6 +1518,11 @@ App.MainServiceItemController = Em.Controller.extend(App.SupportClientConfigsDow
highAvailabilityController.enableNameNodeFederation();
},
+ openRouterFederationWizard: function () {
+ var highAvailabilityController = App.router.get('mainAdminHighAvailabilityController');
+ highAvailabilityController.enableRouterFederation();
+ },
+
/**
* This method is called when user event to download configs for "All Clients"
* is made from service action menu
diff --git a/ambari-web/app/data/configs/wizards/router_federation_properties.js b/ambari-web/app/data/configs/wizards/router_federation_properties.js
new file mode 100644
index 0000000000..c87f2eb4d4
--- /dev/null
+++ b/ambari-web/app/data/configs/wizards/router_federation_properties.js
@@ -0,0 +1,80 @@
+/**
+ * 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.
+ */
+
+module.exports =
+ {
+ "routerFederationConfig": {
+ serviceName: 'MISC',
+ displayName: 'MISC',
+ configCategories: [
+ App.ServiceConfigCategory.create({ name: 'HDFS', displayName: 'HDFS'})
+ ],
+ sites: ['core-site', 'hdfs-rbf-site'],
+ configs: [
+ {
+ "name": "dfs.federation.router.monitor.namenode",
+ "displayName": "dfs.federation.router.monitor.namenode",
+ "description": "RPC address for HDFS Services communication.",
+ "isReconfigurable": false,
+ "recommendedValue": "{{nameservice1}}.nn1, {{nameservice1}}.nn2, {{newNameservice}}.{{newNameNode1Index}},{{newNameservice}}.{{newNameNode2Index}}",
+ "value": "{{modifiedNameServices}}",
+ "category": "HDFS",
+ "filename": "hdfs-rbf-site",
+ "serviceName": 'MISC',
+ "isRouterConfigs" : true
+ },
+ {
+ "name": "dfs.federation.router.default.nameserviceId",
+ "displayName": "dfs.federation.router.default.nameserviceId",
+ "description": "Nameservice identifier of the default subcluster to monitor.",
+ "isReconfigurable": false,
+ "recommendedValue": "{{nameservice1}}",
+ "value": "{{nameservice1}}",
+ "category": "HDFS",
+ "filename": "hdfs-rbf-site",
+ "serviceName": 'MISC',
+ "isRouterConfigs" : true
+ },
+ {
+ "name": "zk-dt-secret-manager.zkAuthType",
+ "displayName": "zk-dt-secret-manager.zkAuthType",
+ "description": "Secret Manager Zookeeper Authentication Type",
+ "isReconfigurable": false,
+ "recommendedValue": "none",
+ "value": "none",
+ "category": "HDFS",
+ "filename": "hdfs-rbf-site",
+ "serviceName": 'MISC',
+ "isRouterConfigs" : true
+ },
+ {
+ "name": "zk-dt-secret-manager.zkConnectionString",
+ "displayName": "zk-dt-secret-manager.zkConnectionString",
+ "description": "Secret Manager Zookeeper Connection String",
+ "isReconfigurable": false,
+ "recommendedValue": "zk1.example.com:2181,zk2.example.com:2181,zk3.example.com:2181",
+ "value": "{{zkAddress}}",
+ "category": "HDFS",
+ "filename": "hdfs-rbf-site",
+ "serviceName": 'MISC',
+ "isRouterConfigs" : true
+ }
+ ]
+ }
+
+ };
\ No newline at end of file
diff --git a/ambari-web/app/data/controller_route.js b/ambari-web/app/data/controller_route.js
index 8f6f385bff..914ee88f15 100644
--- a/ambari-web/app/data/controller_route.js
+++ b/ambari-web/app/data/controller_route.js
@@ -85,6 +85,10 @@ module.exports = [
wizardControllerName: App.router.get('nameNodeFederationWizardController.name'),
route: 'main.services.enableNameNodeFederation'
},
+ {
+ wizardControllerName: App.router.get('routerFederationWizardController.name'),
+ route: 'main.services.enableRouterFederation'
+ },
{
wizardControllerName: App.router.get('manageJournalNodeWizardController.name'),
route: 'main.services.manageJournalNode'
diff --git a/ambari-web/app/locales/default_messages.js b/ambari-web/app/locales/default_messages.js
index b1d7b03cd0..301a04ed8d 100644
--- a/ambari-web/app/locales/default_messages.js
+++ b/ambari-web/app/locales/default_messages.js
@@ -1727,6 +1727,28 @@ var messages_ambari = {
'admin.nameNodeFederation.wizard.step4.task16.title': 'Start NameNode',
'admin.nameNodeFederation.wizard.step4.task17.title': 'Restart Required Services',
+ 'admin.routerFederation.button.enable':'Add DFSRouter',
+ 'admin.routerFederation.wizard.header': 'Add HDFS Router',
+ 'admin.routerFederation.closePopup': 'Are you sure you want to quit?',
+ 'admin.routerFederation.closePopup2': 'Add HDFS Router Wizard is in progress. Are you sure you want to exit the wizard?',
+ 'admin.routerFederation.wizard.step1.header': 'Get Started',
+ 'admin.routerFederation.wizard.step1.body':'This wizard will walk you through the process of enabling DFSRouter to manage federated cluster.',
+ 'admin.routerFederation.wizard.step2.header': 'Select Hosts',
+ 'admin.routerFederation.wizard.step2.body': 'Select hosts running the Routers for {0}',
+ 'admin.routerFederation.wizard.step3.header': 'Review',
+ 'admin.routerFederation.wizard.step3.addRouter': '<b>Add Router:</b> ',
+ 'admin.routerFederation.wizard.step3.toBeInstalled': 'Router TO BE INSTALLED',
+ 'admin.routerFederation.wizard.step3.confirm.config.body': '<div class="alert alert-info">' +
+ '<p><b>Review Configuration Changes.</b></p>' +
+ 'The following lists the configuration changes that will be made by the Wizard to enable Router. This information is for <b> review only </b> and is not editable' +
+ '</div>',
+ 'admin.routerFederation.wizard.step4.header': 'Configure Router',
+ 'admin.routerFederation.wizard,step4.save.configuration.note':'This configuration is created by Enable DFSRouter wizard',
+ 'admin.routerFederation.wizard.step4.notice.inProgress':'Please wait while your Router is being deployed.',
+ 'admin.routerFederation.wizard.step4.notice.completed':'Add DFSRouter Wizard has been completed successfully.',
+ 'admin.routerFederation.wizard.step4.task0.title': 'Install Routers',
+ 'admin.routerFederation.wizard.step4.task1.title': 'Start Routers',
+
'admin.security.title':'Kerberos security has not been enabled',
'admin.security.enabled': 'Kerberos security is enabled',
'admin.security.disabled': 'Kerberos security is disabled',
diff --git a/ambari-web/app/mixins/wizard/assign_master_components.js b/ambari-web/app/mixins/wizard/assign_master_components.js
index 25bf86c38b..53b566212e 100644
--- a/ambari-web/app/mixins/wizard/assign_master_components.js
+++ b/ambari-web/app/mixins/wizard/assign_master_components.js
@@ -1120,6 +1120,9 @@ App.AssignMasterComponents = Em.Mixin.create(App.HostComponentValidationMixin, A
}
newMaster.set("selectedHost", suggestedHost);
+ if(!currentMasters.get("lastObject.serviceComponentId")){
+ currentMasters.get("lastObject").set("serviceComponentId",0)
+ }
newMaster.set("serviceComponentId", (currentMasters.get("lastObject.serviceComponentId") + 1));
this.get("selectedServicesMasters").insertAt(this.get("selectedServicesMasters").indexOf(lastMaster) + 1, newMaster);
diff --git a/ambari-web/app/models/host_component.js b/ambari-web/app/models/host_component.js
index 428bca3a16..c404e5691b 100644
--- a/ambari-web/app/models/host_component.js
+++ b/ambari-web/app/models/host_component.js
@@ -575,6 +575,12 @@ App.HostComponentActionMap = {
cssClass: 'icon icon-sitemap',
disabled: !App.get('isHaEnabled') || App.get('allHostNames.length') < 4
},
+ TOGGLE_RBF_FEDERATION: {
+ action: 'openRouterFederationWizard',
+ label: Em.I18n.t('admin.routerFederation.button.enable'),
+ cssClass: 'icon icon-sitemap',
+ disabled: !App.get('hasNameNodeFederation')
+ },
UPDATE_REPLICATION: {
action: 'updateHBaseReplication',
customCommand: 'UPDATE_REPLICATION',
diff --git a/ambari-web/app/models/service.js b/ambari-web/app/models/service.js
index 06d108297e..a1bb73ba37 100644
--- a/ambari-web/app/models/service.js
+++ b/ambari-web/app/models/service.js
@@ -117,7 +117,7 @@ App.Service = DS.Model.extend({
serviceTypes: function() {
var typeServiceMap = {
GANGLIA: ['MONITORING'],
- HDFS: ['HA_MODE', 'FEDERATION'],
+ HDFS: ['HA_MODE', 'FEDERATION', 'DFSRouter'],
YARN: ['HA_MODE'],
RANGER: ['HA_MODE'],
HAWQ: ['HA_MODE']
diff --git a/ambari-web/app/routes/dfsrouter_federation_routes.js b/ambari-web/app/routes/dfsrouter_federation_routes.js
new file mode 100644
index 0000000000..bc7f8388e9
--- /dev/null
+++ b/ambari-web/app/routes/dfsrouter_federation_routes.js
@@ -0,0 +1,166 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+module.exports = App.WizardRoute.extend({
+ route: '/NameNode/federation/routerBasedFederation',
+
+ breadcrumbs: {
+ label: Em.I18n.t('admin.routerFederation.wizard.header')
+ },
+
+ enter: function (router, transition) {
+ var routerFederationWizardController = router.get('routerFederationWizardController');
+ routerFederationWizardController.dataLoading().done(function () {
+ //Set HDFS as current service
+ App.router.set('mainServiceItemController.content', App.Service.find().findProperty('serviceName', 'HDFS'));
+ App.router.get('updateController').set('isWorking', false);
+ var popup = App.ModalPopup.show({
+ classNames: ['wizard-modal-wrapper'],
+ modalDialogClasses: ['modal-xlg'],
+ header: Em.I18n.t('admin.routerFederation.wizard.header'),
+ bodyClass: App.RouterFederationWizardView.extend({
+ controller: routerFederationWizardController
+ }),
+ primary: Em.I18n.t('form.cancel'),
+ showFooter: false,
+ secondary: null,
+
+ onClose: function () {
+ var routerFederationWizardController = router.get('routerFederationWizardController'),
+ currStep = routerFederationWizardController.get('currentStep');
+ App.showConfirmationPopup(function () {
+ routerFederationWizardController.resetOnClose(routerFederationWizardController, 'main.services.index');
+ }, Em.I18n.t(parseInt(currStep) === 4 ? 'admin.routerFederation.closePopup2' : 'admin.routerFederation.closePopup'));
+ },
+ didInsertElement: function () {
+ this._super();
+ this.fitHeight();
+ }
+ });
+ routerFederationWizardController.set('popup', popup);
+ var currentClusterStatus = App.clusterStatus.get('value');
+ if (currentClusterStatus) {
+ switch (currentClusterStatus.clusterState) {
+ case 'RBF_FEDERATION_DEPLOY' :
+ routerFederationWizardController.setCurrentStep(currentClusterStatus.localdb.RouterFederationWizard.currentStep);
+ break;
+ default:
+ var currStep = App.router.get('routerFederationWizardController.currentStep');
+ routerFederationWizardController.setCurrentStep(currStep);
+ break;
+ }
+ }
+ Em.run.next(function () {
+ App.router.get('wizardWatcherController').setUser(routerFederationWizardController.get('name'));
+ router.transitionTo('step' + routerFederationWizardController.get('currentStep'));
+ });
+ });
+ },
+
+ step1: Em.Route.extend({
+ route: '/step1',
+ connectOutlets: function (router) {
+ var controller = router.get('routerFederationWizardController');
+ controller.dataLoading().done(function () {
+ controller.setCurrentStep('1');
+ controller.connectOutlet('routerFederationWizardStep1', controller.get('content'));
+ })
+ },
+ unroutePath: function () {
+ return false;
+ },
+ next: function (router) {
+ var controller = router.get('routerFederationWizardController');
+ router.transitionTo('step2');
+ }
+ }),
+
+ step2: Em.Route.extend({
+ route: '/step2',
+ connectOutlets: function (router) {
+ var controller = router.get('routerFederationWizardController');
+ controller.dataLoading().done(function () {
+ controller.setCurrentStep('2');
+ controller.loadAllPriorSteps();
+ controller.connectOutlet('routerFederationWizardStep2', controller.get('content'));
+ })
+ },
+ unroutePath: function () {
+ return false;
+ },
+ next: function (router) {
+ var wizardController = router.get('routerFederationWizardController');
+ var stepController = router.get('routerFederationWizardStep2Controller');
+ wizardController.saveMasterComponentHosts(stepController);
+ router.transitionTo('step3');
+ },
+ back: function (router) {
+ router.transitionTo('step1');
+ }
+ }),
+
+ step3: Em.Route.extend({
+ route: '/step3',
+ connectOutlets: function (router) {
+ var controller = router.get('routerFederationWizardController');
+ controller.dataLoading().done(function () {
+ controller.setCurrentStep('3');
+ controller.loadAllPriorSteps();
+ controller.connectOutlet('routerFederationWizardStep3', controller.get('content'));
+ })
+ },
+ unroutePath: function () {
+ return false;
+ },
+ next: function (router) {
+ var controller = router.get('routerFederationWizardController');
+ var stepController = router.get('routerFederationWizardStep3Controller');
+ controller.saveServiceConfigProperties(stepController);
+ router.transitionTo('step4');
+ },
+ back: Em.Router.transitionTo('step2')
+ }),
+
+ step4: Em.Route.extend({
+ route: '/step4',
+ connectOutlets: function (router) {
+ var controller = router.get('routerFederationWizardController');
+ controller.dataLoading().done(function () {
+ controller.setCurrentStep('4');
+ controller.setLowerStepsDisable(4);
+ controller.loadAllPriorSteps();
+ controller.connectOutlet('routerFederationWizardStep4', controller.get('content'));
+ })
+ },
+ unroutePath: function (router, path) {
+ // allow user to leave route if wizard has finished
+ if (router.get('routerFederationWizardController').get('isFinished')) {
+ this._super(router, path);
+ } else {
+ return false;
+ }
+ },
+ next: function (router) {
+ var controller = router.get('routerFederationWizardController');
+ controller.resetOnClose(controller, 'main.services.index');
+ }
+ })
+
+});
\ No newline at end of file
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index bc2c542c8a..6567a92f0d 100644
--- a/ambari-web/app/routes/main.js
+++ b/ambari-web/app/routes/main.js
@@ -893,6 +893,8 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
enableNameNodeFederation: require('routes/namenode_federation_routes'),
+ enableRouterFederation : require('routes/dfsrouter_federation_routes'),
+
addHawqStandby: require('routes/add_hawq_standby_routes'),
removeHawqStandby: require('routes/remove_hawq_standby_routes'),
diff --git a/ambari-web/app/templates/main/admin/federation/routerBasedFederation/step1.hbs b/ambari-web/app/templates/main/admin/federation/routerBasedFederation/step1.hbs
new file mode 100644
index 0000000000..1576e900d4
--- /dev/null
+++ b/ambari-web/app/templates/main/admin/federation/routerBasedFederation/step1.hbs
@@ -0,0 +1,28 @@
+{{!
+* 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.
+}}
+<div class="wizard-content col-md-9">
+ <h4 class="step-title">{{t admin.routerFederation.wizard.step1.header}}</h4>
+ <div class="step-description">
+ <p>{{t admin.routerFederation.wizard.step1.body}}</p>
+ </div>
+</div>
+<div class="wizard-footer col-md-12">
+ <div class="btn-area">
+ <button class="btn btn-success pull-right" {{action next target="controller"}}>{{t common.next}} →</button>
+ </div>
+</div>
\ No newline at end of file
diff --git a/ambari-web/app/templates/main/admin/federation/routerBasedFederation/step3.hbs b/ambari-web/app/templates/main/admin/federation/routerBasedFederation/step3.hbs
new file mode 100644
index 0000000000..41e14ab3b0
--- /dev/null
+++ b/ambari-web/app/templates/main/admin/federation/routerBasedFederation/step3.hbs
@@ -0,0 +1,56 @@
+{{!
+* 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.
+}}
+<div class="wizard-content col-md-9">
+ <h4 class="step-title">{{t admin.highAvailability.wizard.step3.header}}</h4>
+ <p class="step-description">{{t admin.highAvailability.wizard.step3.confirm.host.body}}</p>
+ <div class="panel panel-default">
+ <div class="panel-body">
+ <div id="ha-step3-content" class="well pre-scrollable">
+ <div id="step8-info">
+ <table id="ha-step3-review-table">
+ {{#each host in view.addRouters}}
+ <tr>
+ <td>{{t admin.routerFederation.wizard.step3.addRouter}}</td>
+ <td>{{host}}</td>
+ <td><span class="to-be-installed-green"><i class="glyphicon glyphicon-plus"></i> {{t admin.routerFederation.wizard.step3.toBeInstalled}}</span></td>
+ </tr>
+ {{/each}}
+ </table>
+ </div>
+ </div>
+ <div id="serviceConfig">
+ {{#if controller.isLoaded}}
+ {{{t admin.routerFederation.wizard.step3.confirm.config.body}}}
+ {{view App.ServiceConfigView isNotEditableBinding="controller.isNotEditable"}}
+ {{else}}
+ {{view App.SpinnerView}}
+ {{/if}}
+ </div>
+ </div>
+ </div>
+</div>
+
+<div class="wizard-footer col-md-12">
+ <div class="btn-area">
+ <a class="btn btn-default" {{action back}}>← {{t common.back}}</a>
+ <button class="btn btn-success pull-right" {{bindAttr disabled="controller.isNextDisabled"}} {{action next}}>{{t common.next}} →</button>
+ {{#if App.router.nextBtnClickInProgress}}
+ {{view App.SpinnerView tagName="span" classNames="pull-right"}}
+ {{/if}}
+ </div>
+</div>
\ No newline at end of file
diff --git a/ambari-web/app/templates/main/admin/federation/routerBasedFederation/step4.hbs b/ambari-web/app/templates/main/admin/federation/routerBasedFederation/step4.hbs
new file mode 100644
index 0000000000..79f070ab5d
--- /dev/null
+++ b/ambari-web/app/templates/main/admin/federation/routerBasedFederation/step4.hbs
@@ -0,0 +1,19 @@
+{{!
+* 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.
+}}
+{{template "templates/common/progress"}}
+
diff --git a/ambari-web/app/templates/main/admin/federation/routerBasedFederation/wizard.hbs b/ambari-web/app/templates/main/admin/federation/routerBasedFederation/wizard.hbs
new file mode 100644
index 0000000000..6f81321fd7
--- /dev/null
+++ b/ambari-web/app/templates/main/admin/federation/routerBasedFederation/wizard.hbs
@@ -0,0 +1,35 @@
+{{!
+* 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.
+}}
+
+<div id="rm-ha-wizard" class="wizard">
+ <div class="wizard-body row">
+ <div class="wizard-nav col-md-3">
+ <ul class="nav nav-pills nav-stacked">
+ <li {{bindAttr class="isStep1:active view.isStep1Disabled:disabled view.isStep1Completed:completed"}}><a href="javascript:void(null);" {{action gotoStep1 target="controller"}}><i class="step-marker"><span class="step-index">1</span></i><p class="step-name">{{t admin.routerFederation.wizard.step1.header}}</p></a></li>
+ <li {{bindAttr class="isStep2:active view.isStep2Disabled:disabled view.isStep2Completed:completed"}}><a href="javascript:void(null);" {{action gotoStep2 target="controller"}}><i class="step-marker"><span class="step-index">2</span></i><p class="step-name">{{t admin.routerFederation.wizard.step2.header}}</p></a></li>
+ <li {{bindAttr class="isStep3:active view.isStep3Disabled:disabled view.isStep3Completed:completed"}}><a href="javascript:void(null);" {{action gotoStep3 target="controller"}}><i class="step-marker"><span class="step-index">3</span></i><p class="step-name">{{t admin.routerFederation.wizard.step3.header}}</p></a></li>
+ <li {{bindAttr class="isStep4:active view.isStep4Disabled:disabled view.isStep4Completed:completed"}}><a href="javascript:void(null);" {{action gotoStep4 target="controller"}}><i class="step-marker"><span class="step-index">4</span></i><p class="step-name">{{t admin.routerFederation.wizard.step4.header}}</p></a></li>
+ </ul>
+ </div>
+ {{#if view.isLoaded}}
+ {{outlet}}
+ {{else}}
+ {{view App.SpinnerView}}
+ {{/if}}
+ </div>
+</div>
\ No newline at end of file
diff --git a/ambari-web/app/utils/db.js b/ambari-web/app/utils/db.js
index 78bc99af57..701a70cca2 100644
--- a/ambari-web/app/utils/db.js
+++ b/ambari-web/app/utils/db.js
@@ -49,6 +49,7 @@ var InitialData = {
'ActivateHawqStandbyWizard': {},
'RAHighAvailabilityWizard': {},
'NameNodeFederationWizard': {},
+ 'RouterFederationWizard': {},
'RollbackHighAvailabilityWizard': {},
'MainAdminStackAndUpgrade': {},
'KerberosDisable': {},
diff --git a/ambari-web/app/views.js b/ambari-web/app/views.js
index c11d1d6332..30aa6bc7ee 100644
--- a/ambari-web/app/views.js
+++ b/ambari-web/app/views.js
@@ -224,6 +224,11 @@ require('views/main/admin/federation/step1_view');
require('views/main/admin/federation/step2_view');
require('views/main/admin/federation/step3_view');
require('views/main/admin/federation/step4_view');
+require('views/main/admin/federation/routerBasedFederation/wizard_view');
+require('views/main/admin/federation/routerBasedFederation/step1_view');
+require('views/main/admin/federation/routerBasedFederation/step2_view');
+require('views/main/admin/federation/routerBasedFederation/step3_view');
+require('views/main/admin/federation/routerBasedFederation/step4_view');
require('views/main/admin/serviceAccounts_view');
require('views/main/admin/stack_upgrade/upgrade_wizard_view');
require('views/main/admin/stack_upgrade/upgrade_version_box_view');
diff --git a/ambari-web/app/views/main/admin/federation/routerBasedFederation/step1_view.js b/ambari-web/app/views/main/admin/federation/routerBasedFederation/step1_view.js
new file mode 100644
index 0000000000..cb4a2086a9
--- /dev/null
+++ b/ambari-web/app/views/main/admin/federation/routerBasedFederation/step1_view.js
@@ -0,0 +1,28 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+App.RouterFederationWizardStep1View = Em.View.extend({
+
+ templateName: require('templates/main/admin/federation/routerBasedFederation/step1'),
+
+ didInsertElement: function() {
+ }
+
+});
\ No newline at end of file
diff --git a/ambari-web/app/views/main/admin/federation/routerBasedFederation/step2_view.js b/ambari-web/app/views/main/admin/federation/routerBasedFederation/step2_view.js
new file mode 100644
index 0000000000..07c4f3bab0
--- /dev/null
+++ b/ambari-web/app/views/main/admin/federation/routerBasedFederation/step2_view.js
@@ -0,0 +1,25 @@
+/**
+ * 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.
+ */
+
+
+var App = require('app');
+
+App.RouterFederationWizardStep2View = App.AssignMasterComponentsView.extend({
+ title: Em.I18n.t('admin.routerFederation.wizard.step2.header'),
+ alertMessage: Em.computed.i18nFormat('admin.routerFederation.wizard.step2.body', 'controller.content.nameServiceId')
+});
\ No newline at end of file
diff --git a/ambari-web/app/views/main/admin/federation/routerBasedFederation/step3_view.js b/ambari-web/app/views/main/admin/federation/routerBasedFederation/step3_view.js
new file mode 100644
index 0000000000..d79b9f4e0b
--- /dev/null
+++ b/ambari-web/app/views/main/admin/federation/routerBasedFederation/step3_view.js
@@ -0,0 +1,31 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+App.RouterFederationWizardStep3View = Em.View.extend({
+
+ templateName: require('templates/main/admin/federation/routerBasedFederation/step3'),
+
+ didInsertElement: function () {
+ this.get('controller').loadStep();
+ },
+ addRouters: function () {
+ return this.get('controller.content.masterComponentHosts').filterProperty('component', 'ROUTER').filterProperty('isInstalled', false).mapProperty('hostName');
+ }.property('controller.content.masterComponentHosts'),
+});
\ No newline at end of file
diff --git a/ambari-web/app/views/main/admin/federation/routerBasedFederation/step4_view.js b/ambari-web/app/views/main/admin/federation/routerBasedFederation/step4_view.js
new file mode 100644
index 0000000000..b4ef26551f
--- /dev/null
+++ b/ambari-web/app/views/main/admin/federation/routerBasedFederation/step4_view.js
@@ -0,0 +1,35 @@
+/**
+ * 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.
+ */
+
+var App = require('app');
+
+App.RouterFederationWizardStep4View = App.HighAvailabilityProgressPageView.extend({
+
+ templateName: require('templates/main/admin/federation/routerBasedFederation/step4'),
+
+ headerTitle: Em.I18n.t('admin.routerFederation.wizard.step4.header'),
+
+ noticeInProgress: Em.I18n.t('admin.routerFederation.wizard.step4.notice.inProgress'),
+
+ noticeCompleted: Em.I18n.t('admin.routerFederation.wizard.step4.notice.completed'),
+
+ submitButtonText: Em.I18n.t('common.complete'),
+
+ labelWidth: 'col-md-5'
+
+});
\ No newline at end of file
diff --git a/ambari-web/app/views/main/admin/federation/routerBasedFederation/wizard_view.js b/ambari-web/app/views/main/admin/federation/routerBasedFederation/wizard_view.js
new file mode 100644
index 0000000000..6c15e364aa
--- /dev/null
+++ b/ambari-web/app/views/main/admin/federation/routerBasedFederation/wizard_view.js
@@ -0,0 +1,32 @@
+/**
+ * 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.
+ */
+
+
+var App = require('app');
+
+App.RouterFederationWizardView = Em.View.extend(App.WizardMenuMixin, App.WizardHostsLoading, {
+
+ templateName: require('templates/main/admin/federation/routerBasedFederation/wizard'),
+
+ didInsertElement: function() {
+ var currentStep = this.get('controller.currentStep');
+ if (currentStep > 3) {
+ this.get('controller').setLowerStepsDisable(currentStep);
+ }
+ }
+});
\ No newline at end of file
diff --git a/ambari-web/app/views/main/service/item.js b/ambari-web/app/views/main/service/item.js
index bb61663e0e..b887e1eae1 100644
--- a/ambari-web/app/views/main/service/item.js
+++ b/ambari-web/app/views/main/service/item.js
@@ -241,6 +241,13 @@ App.MainServiceItemView = Em.View.extend(App.HiveInteractiveCheck, {
break;
}
}
+ if (service.get('serviceTypes').contains('DFSRouter') && App.isAuthorized('SERVICE.ENABLE_HA')) {
+ switch (service.get('serviceName')) {
+ case 'HDFS':
+ options.push(actionMap.TOGGLE_RBF_FEDERATION);
+ break;
+ }
+ }
if (serviceCheckSupported) {
options.push(actionMap.RUN_SMOKE_TEST);
}
diff --git a/ambari-web/test/models/service_test.js b/ambari-web/test/models/service_test.js
index c600af6781..fdcd0eb08b 100644
--- a/ambari-web/test/models/service_test.js
+++ b/ambari-web/test/models/service_test.js
@@ -137,7 +137,7 @@ describe('App.Service', function () {
},
{
serviceName: 'HDFS',
- result: ['HA_MODE', 'FEDERATION']
+ result: ['HA_MODE', 'FEDERATION', 'DFSRouter']
},
{
serviceName: 'YARN',
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org
(ambari) 06/22: merge trunk
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch eee
in repository https://gitbox.apache.org/repos/asf/ambari.git
commit b50997d50e3af2fd92a63303834726fd79081426
Author: jialiang <ji...@gmail.com>
AuthorDate: Fri Sep 6 17:07:02 2024 +0800
merge trunk
---
ambari-agent/conf/unix/agent-multiplier.py | 1 +
ambari-agent/conf/unix/upgrade_agent_configs.py | 4 +-
ambari-agent/conf/windows/service_wrapper.py | 1 +
.../src/main/python/ambari_agent/ActionQueue.py | 1 +
.../src/main/python/ambari_agent/AgentException.py | 1 +
.../BackgroundCommandExecutionHandle.py | 1 +
.../src/main/python/ambari_agent/ClusterCache.py | 1 -
.../ambari_agent/CommandHooksOrchestrator.py | 1 +
.../python/ambari_agent/ComponentStatusExecutor.py | 1 +
.../ambari_agent/ComponentVersionReporter.py | 1 +
.../src/main/python/ambari_agent/ExitHelper.py | 1 -
.../src/main/python/ambari_agent/Facter.py | 1 -
ambari-agent/src/main/python/ambari_agent/Grep.py | 1 +
.../main/python/ambari_agent/HostStatusReporter.py | 1 +
.../src/main/python/ambari_agent/NetUtil.py | 1 +
.../main/python/ambari_agent/RecoveryManager.py | 1 +
.../main/python/ambari_agent/RemoteDebugUtils.py | 1 -
.../main/python/ambari_agent/StaleAlertsMonitor.py | 1 -
ambari-agent/src/main/python/ambari_agent/Utils.py | 1 -
.../main/python/ambari_agent/alerts/__init__.py | 1 +
.../main/python/ambari_agent/alerts/collector.py | 6 +--
.../python/ambari_agent/apscheduler/__init__.py | 1 +
.../main/python/ambari_agent/apscheduler/events.py | 1 +
.../main/python/ambari_agent/apscheduler/job.py | 1 +
.../ambari_agent/apscheduler/jobstores/__init__.py | 1 +
.../ambari_agent/apscheduler/jobstores/base.py | 1 +
.../apscheduler/jobstores/mongodb_store.py | 1 +
.../apscheduler/jobstores/ram_store.py | 1 +
.../apscheduler/jobstores/redis_store.py | 1 +
.../apscheduler/jobstores/shelve_store.py | 1 +
.../apscheduler/jobstores/sqlalchemy_store.py | 1 +
.../python/ambari_agent/apscheduler/scheduler.py | 1 +
.../python/ambari_agent/apscheduler/threadpool.py | 1 +
.../ambari_agent/apscheduler/triggers/__init__.py | 1 +
.../apscheduler/triggers/cron/__init__.py | 1 +
.../apscheduler/triggers/cron/expressions.py | 1 +
.../apscheduler/triggers/cron/fields.py | 1 +
.../ambari_agent/apscheduler/triggers/interval.py | 1 +
.../ambari_agent/apscheduler/triggers/simple.py | 1 +
.../main/python/ambari_agent/apscheduler/util.py | 1 +
ambari-agent/src/main/python/ambari_agent/debug.py | 4 +-
.../listeners/CommandsEventListener.py | 1 -
.../listeners/ConfigurationEventListener.py | 1 -
.../listeners/HostLevelParamsEventListener.py | 1 -
.../listeners/MetadataEventListener.py | 1 -
.../listeners/TopologyEventListener.py | 1 -
.../main/python/ambari_agent/models/__init__.py | 1 +
.../main/python/ambari_agent/models/commands.py | 1 +
.../src/main/python/ambari_agent/models/hooks.py | 1 +
ambari-agent/src/main/python/setup.py | 1 +
.../python/ambari_agent/BaseStompServerTestCase.py | 1 -
.../ambari_agent/TestCommandHooksOrchestrator.py | 1 +
.../test/python/ambari_agent/TestKerberosCommon.py | 1 -
.../src/test/python/ambari_agent/TestMain.py | 1 -
.../src/test/python/ambari_agent/TestPortAlert.py | 6 +--
.../resource_management/TestContentSources.py | 1 +
.../resource_management/TestDataStructureUtils.py | 1 +
.../resource_management/TestDatanodeHelper.py | 1 +
.../resource_management/TestDirectoryResource.py | 1 +
.../python/resource_management/TestEncryption.py | 1 +
.../TestExecuteHadoopResource.py | 1 +
.../resource_management/TestExecuteResource.py | 1 +
.../TestFcntlBasedProcessLock.py | 1 +
.../python/resource_management/TestFileResource.py | 1 +
.../python/resource_management/TestFileSystem.py | 1 +
.../resource_management/TestGetPathFromUrl.py | 1 +
.../resource_management/TestGroupResource.py | 1 +
.../resource_management/TestLibraryFunctions.py | 1 +
.../python/resource_management/TestLinkResource.py | 1 +
.../TestMonitorWebserverResource.py | 1 +
.../resource_management/TestPackageResource.py | 1 +
.../resource_management/TestRepositoryResource.py | 1 +
.../resource_management/TestSecurityCommons.py | 1 +
.../resource_management/TestServiceResource.py | 1 +
.../python/resource_management/TestTarArchive.py | 1 +
.../TestTemplateConfigResource.py | 1 +
.../python/resource_management/TestUserResource.py | 1 +
.../test/python/resource_management/TestUtils.py | 1 +
ambari-agent/src/test/python/unitTests.py | 2 +-
.../main/python/ambari_commons/ambari_service.py | 1 +
.../main/python/ambari_commons/buffered_queue.py | 1 +
.../ambari_commons/kerberos/kerberos_common.py | 1 +
.../main/python/ambari_commons/kerberos/utils.py | 1 +
.../main/python/ambari_commons/libs/__init__.py | 1 -
.../python/ambari_commons/libs/ppc64le/__init__.py | 1 -
.../python/ambari_commons/libs/x86_64/__init__.py | 1 -
.../main/python/ambari_commons/os_family_impl.py | 1 +
.../src/main/python/ambari_commons/os_linux.py | 1 -
.../src/main/python/ambari_commons/os_utils.py | 1 -
.../src/main/python/ambari_commons/os_windows.py | 3 +-
.../python/ambari_commons/parallel_processing.py | 1 -
.../python/ambari_commons/repo_manager/__init__.py | 1 +
.../ambari_commons/repo_manager/apt_manager.py | 1 +
.../ambari_commons/repo_manager/apt_parser.py | 1 +
.../ambari_commons/repo_manager/choco_manager.py | 1 +
.../ambari_commons/repo_manager/generic_manager.py | 1 +
.../ambari_commons/repo_manager/generic_parser.py | 1 +
.../repo_manager/repo_manager_helper.py | 1 +
.../ambari_commons/repo_manager/yum_manager.py | 1 +
.../ambari_commons/repo_manager/yum_parser.py | 1 +
.../ambari_commons/repo_manager/zypper_manager.py | 1 +
.../ambari_commons/repo_manager/zypper_parser.py | 1 +
.../src/main/python/ambari_commons/shell.py | 3 +-
.../python/ambari_commons/unicode_tolerant_fs.py | 1 +
.../src/main/python/ambari_commons/xml_utils.py | 1 +
.../python/ambari_jinja2/ambari_jinja2/__init__.py | 1 +
.../ambari_jinja2/_markupsafe/__init__.py | 1 +
.../ambari_jinja2/_markupsafe/_bundle.py | 1 +
.../ambari_jinja2/_markupsafe/_constants.py | 1 +
.../ambari_jinja2/_markupsafe/_native.py | 1 +
.../ambari_jinja2/_markupsafe/tests.py | 1 +
.../ambari_jinja2/ambari_jinja2/_stringdefs.py | 1 +
.../python/ambari_jinja2/ambari_jinja2/bccache.py | 1 +
.../python/ambari_jinja2/ambari_jinja2/compiler.py | 1 +
.../ambari_jinja2/ambari_jinja2/constants.py | 1 +
.../python/ambari_jinja2/ambari_jinja2/debug.py | 1 +
.../python/ambari_jinja2/ambari_jinja2/defaults.py | 1 +
.../ambari_jinja2/ambari_jinja2/environment.py | 1 +
.../ambari_jinja2/ambari_jinja2/exceptions.py | 1 +
.../main/python/ambari_jinja2/ambari_jinja2/ext.py | 1 +
.../python/ambari_jinja2/ambari_jinja2/filters.py | 1 +
.../python/ambari_jinja2/ambari_jinja2/lexer.py | 1 +
.../python/ambari_jinja2/ambari_jinja2/loaders.py | 1 +
.../python/ambari_jinja2/ambari_jinja2/meta.py | 1 +
.../python/ambari_jinja2/ambari_jinja2/nodes.py | 1 +
.../ambari_jinja2/ambari_jinja2/optimizer.py | 1 +
.../python/ambari_jinja2/ambari_jinja2/parser.py | 1 +
.../python/ambari_jinja2/ambari_jinja2/runtime.py | 1 +
.../python/ambari_jinja2/ambari_jinja2/sandbox.py | 1 +
.../python/ambari_jinja2/ambari_jinja2/tests.py | 1 +
.../ambari_jinja2/testsuite/__init__.py | 1 +
.../ambari_jinja2/ambari_jinja2/testsuite/api.py | 1 +
.../ambari_jinja2/testsuite/core_tags.py | 1 +
.../ambari_jinja2/ambari_jinja2/testsuite/debug.py | 1 +
.../ambari_jinja2/testsuite/doctests.py | 1 +
.../ambari_jinja2/ambari_jinja2/testsuite/ext.py | 1 +
.../ambari_jinja2/testsuite/filters.py | 1 +
.../ambari_jinja2/testsuite/imports.py | 1 +
.../ambari_jinja2/testsuite/inheritance.py | 1 +
.../ambari_jinja2/testsuite/lexnparse.py | 1 +
.../ambari_jinja2/testsuite/loader.py | 1 +
.../ambari_jinja2/testsuite/regression.py | 1 +
.../ambari_jinja2/testsuite/security.py | 1 +
.../ambari_jinja2/ambari_jinja2/testsuite/tests.py | 1 +
.../ambari_jinja2/ambari_jinja2/testsuite/utils.py | 1 +
.../python/ambari_jinja2/ambari_jinja2/utils.py | 1 +
.../python/ambari_jinja2/ambari_jinja2/visitor.py | 1 +
.../ambari_jinja2/custom_fixers/fix_alt_unicode.py | 1 +
.../custom_fixers/fix_broken_reraising.py | 1 +
.../ambari_jinja2/custom_fixers/fix_xrange2.py | 1 +
.../python/ambari_jinja2/docs/cache_extension.py | 1 +
.../src/main/python/ambari_jinja2/docs/conf.py | 1 +
.../src/main/python/ambari_jinja2/docs/jinjaext.py | 1 +
.../python/ambari_jinja2/examples/basic/cycle.py | 1 +
.../ambari_jinja2/examples/basic/debugger.py | 1 +
.../ambari_jinja2/examples/basic/inheritance.py | 1 +
.../python/ambari_jinja2/examples/basic/test.py | 1 +
.../basic/test_filter_and_linestatements.py | 1 +
.../examples/basic/test_loop_filter.py | 1 +
.../ambari_jinja2/examples/basic/translate.py | 1 +
.../main/python/ambari_jinja2/examples/bench.py | 1 +
.../main/python/ambari_jinja2/examples/profile.py | 1 +
.../ambari_jinja2/examples/rwbench/djangoext.py | 1 +
.../ambari_jinja2/examples/rwbench/rwbench.py | 1 +
.../ambari_jinja2/ext/django2jinja/django2jinja.py | 1 +
.../ambari_jinja2/ext/django2jinja/example.py | 1 +
.../main/python/ambari_jinja2/ext/djangojinja2.py | 1 +
.../main/python/ambari_jinja2/ext/inlinegettext.py | 1 +
.../src/main/python/ambari_jinja2/setup.py | 1 +
.../src/main/python/ambari_pbkdf2/__init__.py | 1 +
.../src/main/python/ambari_pbkdf2/pbkdf2.py | 2 +-
.../src/main/python/ambari_pyaes/__init__.py | 1 +
ambari-common/src/main/python/ambari_pyaes/aes.py | 1 +
.../src/main/python/ambari_pyaes/blockfeeder.py | 1 +
ambari-common/src/main/python/ambari_pyaes/util.py | 1 +
.../src/main/python/ambari_simplejson/__init__.py | 1 +
.../python/ambari_simplejson/_speedups/__init__.py | 1 +
.../ambari_simplejson/_speedups/posix/__init__.py | 1 +
.../_speedups/posix/usc2/__init__.py | 1 +
.../_speedups/posix/usc4/__init__.py | 1 +
.../ambari_simplejson/_speedups/ppc/__init__.py | 1 +
.../ambari_simplejson/_speedups/win/__init__.py | 1 +
.../main/python/ambari_simplejson/c_extension.py | 1 +
.../src/main/python/ambari_simplejson/compat.py | 1 +
.../src/main/python/ambari_simplejson/decoder.py | 1 +
.../src/main/python/ambari_simplejson/encoder.py | 1 +
.../src/main/python/ambari_simplejson/errors.py | 1 +
.../main/python/ambari_simplejson/ordered_dict.py | 1 +
.../src/main/python/ambari_simplejson/raw_json.py | 1 +
.../src/main/python/ambari_simplejson/scanner.py | 1 +
.../src/main/python/ambari_stomp/__init__.py | 1 +
.../src/main/python/ambari_stomp/__main__.py | 1 +
.../main/python/ambari_stomp/adapter/__init__.py | 1 +
.../main/python/ambari_stomp/adapter/multicast.py | 1 +
.../main/python/ambari_stomp/adapter/websocket.py | 1 +
.../src/main/python/ambari_stomp/backward.py | 1 +
.../src/main/python/ambari_stomp/backward2.py | 1 +
.../src/main/python/ambari_stomp/backward3.py | 1 +
.../src/main/python/ambari_stomp/backwardsock.py | 1 +
.../src/main/python/ambari_stomp/backwardsock25.py | 1 +
.../src/main/python/ambari_stomp/backwardsock26.py | 1 +
.../src/main/python/ambari_stomp/colors.py | 1 +
.../src/main/python/ambari_stomp/connect.py | 1 +
.../src/main/python/ambari_stomp/constants.py | 1 +
.../src/main/python/ambari_stomp/exception.py | 1 +
.../src/main/python/ambari_stomp/listener.py | 1 +
.../src/main/python/ambari_stomp/protocol.py | 1 +
.../src/main/python/ambari_stomp/transport.py | 1 +
.../src/main/python/ambari_stomp/utils.py | 1 +
.../src/main/python/ambari_ws4py/__init__.py | 1 +
.../main/python/ambari_ws4py/client/__init__.py | 1 +
.../python/ambari_ws4py/client/geventclient.py | 1 +
.../python/ambari_ws4py/client/threadedclient.py | 1 +
.../python/ambari_ws4py/client/tornadoclient.py | 1 +
.../src/main/python/ambari_ws4py/compat.py | 1 +
ambari-common/src/main/python/ambari_ws4py/exc.py | 1 +
.../src/main/python/ambari_ws4py/framing.py | 1 +
.../src/main/python/ambari_ws4py/manager.py | 1 +
.../src/main/python/ambari_ws4py/messaging.py | 1 +
.../main/python/ambari_ws4py/server/__init__.py | 1 +
.../python/ambari_ws4py/server/cherrypyserver.py | 1 +
.../python/ambari_ws4py/server/geventserver.py | 1 +
.../python/ambari_ws4py/server/wsgirefserver.py | 1 +
.../main/python/ambari_ws4py/server/wsgiutils.py | 1 +
.../src/main/python/ambari_ws4py/streaming.py | 1 +
.../src/main/python/ambari_ws4py/utf8validator.py | 1 +
.../src/main/python/ambari_ws4py/websocket.py | 1 +
.../python/pluggable_stack_definition/__init__.py | 1 +
.../core/providers/packaging.py | 1 +
.../core/providers/windows/__init__.py | 1 +
.../core/providers/windows/service.py | 1 +
.../core/providers/windows/system.py | 1 +
.../core/resources/jcepolicyinfo.py | 1 +
.../main/python/resource_management/core/sudo.py | 1 +
.../libraries/functions/constants.py | 1 -
.../libraries/functions/format_jvm_option.py | 3 +-
.../libraries/functions/install_jdbc_driver.py | 1 +
.../libraries/functions/install_windows_msi.py | 1 +
.../libraries/functions/module_version.py | 1 +
.../libraries/functions/mpack_version.py | 1 +
.../libraries/functions/reload_windows_env.py | 1 +
.../libraries/functions/repository_util.py | 1 +
.../libraries/functions/security_commons.py | 1 +
.../simulate_perf_cluster_alert_behaviour.py | 1 -
.../libraries/functions/solr_cloud_util.py | 1 +
.../libraries/functions/stack_tools.py | 1 -
.../libraries/functions/windows_service_utils.py | 1 +
.../libraries/providers/hdfs_resource.py | 1 +
.../resource_management/libraries/providers/msi.py | 1 +
.../libraries/resources/hdfs_resource.py | 2 +-
.../resource_management/libraries/resources/msi.py | 1 +
.../resource_management/libraries/script/dummy.py | 1 +
.../resource_management/libraries/script/hook.py | 1 -
.../python/urlinfo_processor/urlinfo_processor.py | 1 -
ambari-common/src/test/python/coilmq/__init__.py | 1 +
.../src/test/python/coilmq/auth/__init__.py | 1 +
.../src/test/python/coilmq/auth/simple.py | 1 +
.../src/test/python/coilmq/config/__init__.py | 1 +
ambari-common/src/test/python/coilmq/engine.py | 6 +--
ambari-common/src/test/python/coilmq/exception.py | 1 +
.../src/test/python/coilmq/protocol/__init__.py | 1 +
ambari-common/src/test/python/coilmq/queue.py | 1 +
ambari-common/src/test/python/coilmq/scheduler.py | 1 +
.../src/test/python/coilmq/server/__init__.py | 1 +
.../src/test/python/coilmq/server/socket_server.py | 1 +
ambari-common/src/test/python/coilmq/start.py | 2 +-
.../src/test/python/coilmq/store/__init__.py | 1 +
ambari-common/src/test/python/coilmq/store/dbm.py | 1 +
.../src/test/python/coilmq/store/memory.py | 1 +
ambari-common/src/test/python/coilmq/store/rds.py | 1 +
.../src/test/python/coilmq/store/sa/__init__.py | 1 +
.../src/test/python/coilmq/store/sa/meta.py | 1 +
.../src/test/python/coilmq/store/sa/model.py | 1 +
ambari-common/src/test/python/coilmq/topic.py | 1 +
.../src/test/python/coilmq/util/__init__.py | 1 +
.../src/test/python/coilmq/util/concurrency.py | 1 +
.../src/test/python/coilmq/util/frames.py | 1 +
ambari-common/src/test/python/coilmq/util/six.py | 1 +
ambari-common/src/test/python/mock/__init__.py | 1 +
ambari-common/src/test/python/mock/docs/conf.py | 1 +
ambari-common/src/test/python/mock/extendmock.py | 1 +
ambari-common/src/test/python/mock/mock.py | 1 +
ambari-common/src/test/python/mock/setup.py | 3 +-
.../src/test/python/mock/tests/__init__.py | 1 +
.../src/test/python/mock/tests/_testwith.py | 1 +
.../src/test/python/mock/tests/support.py | 1 +
.../src/test/python/mock/tests/support_with.py | 3 +-
.../src/test/python/mock/tests/testcallable.py | 1 +
.../src/test/python/mock/tests/testhelpers.py | 1 +
.../src/test/python/mock/tests/testmagicmethods.py | 1 +
.../src/test/python/mock/tests/testmock.py | 1 +
.../src/test/python/mock/tests/testpatch.py | 1 +
.../src/test/python/mock/tests/testsentinel.py | 1 +
.../src/test/python/mock/tests/testwith.py | 1 +
ambari-common/src/test/python/only_for_platform.py | 1 +
.../stacks/HDP/2.0.6.1/hooks/dummy-script.py | 1 +
.../stacks/HDP/2.0.6/hooks/dummy-script.py | 1 +
.../2.0.7/services/HBASE/package/dummy-script.py | 1 +
.../2.0.7/services/HDFS/package/dummy-script.py | 1 +
.../stacks/HDP/2.0.8/hooks/dummy-script.py | 1 +
.../2.0.8/services/HDFS/package/dummy-script.py | 1 +
.../1.0/services/HDFS/package/dummy-script.py | 1 +
ambari-server/conf/unix/ambari-env.sh | 1 +
ambari-server/conf/unix/install-helper.sh | 1 +
.../python/ambari-server-state/Configurator.py | 1 +
.../main/python/ambari-server-state/Entities.py | 1 +
.../src/main/python/ambari-server-state/Main.py | 1 +
ambari-server/src/main/python/ambari-server.py | 1 -
.../src/main/python/ambari_server/BackupRestore.py | 1 -
.../src/main/python/ambari_server/ambariPath.py | 4 +-
.../src/main/python/ambari_server/serverUtils.py | 1 -
.../src/main/python/ambari_server/setupMpacks.py | 1 -
.../src/main/python/ambari_server/setupSecurity.py | 1 -
.../main/python/ambari_server/setupTrustedProxy.py | 1 -
.../src/main/python/ambari_server/userInput.py | 1 -
.../src/main/python/azuredb_create_generator.py | 1 -
ambari-server/src/main/python/bootstrap.py | 1 -
ambari-server/src/main/python/os_check_type.py | 3 +-
ambari-server/src/main/python/setupAgent.py | 1 -
.../3.0.0/package/scripts/collection.py | 1 +
.../3.0.0/package/scripts/command_commons.py | 1 +
.../3.0.0/package/scripts/infra_solr.py | 1 +
.../3.0.0/package/scripts/infra_solr_client.py | 1 +
.../3.0.0/package/scripts/migrate.py | 1 +
.../3.0.0/package/scripts/params.py | 1 +
.../3.0.0/package/scripts/service_check.py | 1 +
.../3.0.0/package/scripts/setup_infra_solr.py | 1 +
.../3.0.0/package/scripts/status_params.py | 1 -
.../3.0.0/package/scripts/ams_service.py | 2 +-
.../3.0.0/package/scripts/split_points.py | 2 +-
.../AMBARI_METRICS/3.0.0/package/scripts/status.py | 1 +
.../AMBARI_METRICS/3.0.0/service_advisor.py | 2 +-
.../src/main/resources/scripts/stack_advisor.py | 1 -
.../stack-hooks/after-INSTALL/scripts/hook.py | 1 +
.../stack-hooks/after-INSTALL/scripts/params.py | 1 +
.../after-INSTALL/scripts/shared_initialization.py | 1 +
.../stack-hooks/before-ANY/scripts/hook.py | 1 +
.../stack-hooks/before-ANY/scripts/params.py | 1 +
.../before-ANY/scripts/shared_initialization.py | 1 +
.../stack-hooks/before-INSTALL/scripts/hook.py | 1 +
.../stack-hooks/before-INSTALL/scripts/params.py | 1 +
.../before-INSTALL/scripts/repo_initialization.py | 1 +
.../scripts/shared_initialization.py | 1 +
.../stack-hooks/before-RESTART/scripts/hook.py | 1 +
.../stack-hooks/before-SET_KEYTAB/scripts/hook.py | 1 +
.../before-START/scripts/custom_extensions.py | 1 +
.../stack-hooks/before-START/scripts/hook.py | 1 +
.../stack-hooks/before-START/scripts/params.py | 1 +
.../before-START/scripts/shared_initialization.py | 1 +
.../services/FLINK/package/scripts/flink_client.py | 1 +
.../FLINK/package/scripts/flink_history_server.py | 2 +-
.../FLINK/package/scripts/flink_service.py | 1 -
.../services/FLINK/package/scripts/setup_flink.py | 1 +
.../services/HBASE/package/scripts/upgrade.py | 1 -
.../alerts/alert_datanode_unmounted_data_dir.py | 1 -
.../services/HDFS/package/scripts/__init__.py | 1 +
.../scripts/balancer-emulator/hdfs-command.py | 1 -
.../services/HDFS/package/scripts/datanode.py | 1 +
.../HDFS/package/scripts/datanode_upgrade.py | 1 +
.../3.2.0/services/HDFS/package/scripts/hdfs.py | 1 +
.../services/HDFS/package/scripts/hdfs_client.py | 1 +
.../services/HDFS/package/scripts/hdfs_datanode.py | 1 +
.../services/HDFS/package/scripts/hdfs_namenode.py | 1 +
.../HDFS/package/scripts/hdfs_nfsgateway.py | 1 +
.../HDFS/package/scripts/hdfs_snamenode.py | 1 +
.../HDFS/package/scripts/install_params.py | 1 +
.../services/HDFS/package/scripts/journalnode.py | 1 +
.../HDFS/package/scripts/journalnode_upgrade.py | 1 +
.../services/HDFS/package/scripts/namenode.py | 1 +
.../HDFS/package/scripts/namenode_ha_state.py | 1 +
.../HDFS/package/scripts/namenode_upgrade.py | 1 +
.../services/HDFS/package/scripts/nfsgateway.py | 1 +
.../3.2.0/services/HDFS/package/scripts/params.py | 1 +
.../services/HDFS/package/scripts/params_linux.py | 1 +
.../HDFS/package/scripts/params_windows.py | 1 +
.../services/HDFS/package/scripts/service_check.py | 1 +
.../services/HDFS/package/scripts/snamenode.py | 1 +
.../services/HDFS/package/scripts/status_params.py | 1 +
.../3.2.0/services/HDFS/package/scripts/utils.py | 1 +
.../services/HDFS/package/scripts/zkfc_slave.py | 1 +
.../alerts/alert_hive_interactive_thrift_port.py | 1 -
.../HIVE/package/scripts/hive_server_upgrade.py | 1 +
.../services/HIVE/package/scripts/mysql_utils.py | 3 +-
.../3.2.0/services/HIVE/package/scripts/webhcat.py | 1 +
.../HIVE/package/scripts/webhcat_server.py | 1 +
.../HIVE/package/scripts/webhcat_service.py | 1 +
.../services/KAFKA/package/scripts/kafka_broker.py | 1 +
.../KERBEROS/package/scripts/kerberos_client.py | 1 +
.../services/KERBEROS/package/scripts/params.py | 1 +
.../KERBEROS/package/scripts/service_check.py | 1 +
.../KERBEROS/package/scripts/status_params.py | 1 +
.../alerts/alert_ranger_admin_passwd_check.py | 3 +-
.../3.2.0/services/RANGER/service_advisor.py | 2 +-
.../3.2.0/services/SOLR/package/scripts/params.py | 1 +
.../services/SOLR/package/scripts/service_check.py | 1 +
.../services/SOLR/package/scripts/setup_solr.py | 1 +
.../3.2.0/services/SOLR/package/scripts/solr.py | 1 +
.../scripts/alerts/alert_spark_thrift_port.py | 1 +
.../SPARK/package/scripts/job_history_server.py | 2 +-
.../3.2.0/services/SPARK/package/scripts/params.py | 2 +-
.../SPARK/package/scripts/service_check.py | 1 +
.../services/SPARK/package/scripts/setup_spark.py | 2 +-
.../services/SPARK/package/scripts/spark_client.py | 2 +-
.../SPARK/package/scripts/spark_thrift_server.py | 2 +-
.../services/TEZ/package/scripts/params_windows.py | 1 +
.../services/TEZ/package/scripts/pre_upgrade.py | 1 +
.../services/TEZ/package/scripts/service_check.py | 1 +
.../3.2.0/services/TEZ/package/scripts/tez.py | 1 +
.../services/TEZ/package/scripts/tez_client.py | 1 +
.../package/alerts/alert_nodemanagers_summary.py | 1 -
.../services/YARN/package/scripts/__init__.py | 1 +
.../package/scripts/application_timeline_server.py | 1 +
.../services/YARN/package/scripts/historyserver.py | 1 +
.../YARN/package/scripts/mapred_service_check.py | 1 +
.../YARN/package/scripts/mapreduce2_client.py | 1 +
.../services/YARN/package/scripts/nodemanager.py | 1 +
.../YARN/package/scripts/nodemanager_upgrade.py | 1 +
.../services/YARN/package/scripts/params_linux.py | 1 +
.../YARN/package/scripts/params_windows.py | 1 +
.../YARN/package/scripts/resourcemanager.py | 1 +
.../3.2.0/services/YARN/package/scripts/service.py | 1 +
.../services/YARN/package/scripts/service_check.py | 1 +
.../3.2.0/services/YARN/package/scripts/yarn.py | 1 +
.../services/YARN/package/scripts/yarn_client.py | 1 +
.../package/scripts/alerts/alert_check_zeppelin.py | 1 +
.../ZEPPELIN/package/scripts/service_check.py | 1 +
.../ZEPPELIN/package/scripts/status_params.py | 1 +
.../services/ZOOKEEPER/package/scripts/__init__.py | 1 +
.../services/ZOOKEEPER/package/scripts/params.py | 1 +
.../ZOOKEEPER/package/scripts/params_linux.py | 1 +
.../ZOOKEEPER/package/scripts/params_windows.py | 1 +
.../ZOOKEEPER/package/scripts/service_check.py | 1 +
.../ZOOKEEPER/package/scripts/zookeeper.py | 1 +
.../ZOOKEEPER/package/scripts/zookeeper_client.py | 1 +
.../ZOOKEEPER/package/scripts/zookeeper_server.py | 1 +
.../ZOOKEEPER/package/scripts/zookeeper_service.py | 1 +
.../src/test/python/TestAmbariConfiguration.py | 1 +
ambari-server/src/test/python/TestAmbariServer.py | 1 +
ambari-server/src/test/python/TestBackupRestore.py | 1 +
ambari-server/src/test/python/TestBootstrap.py | 1 +
.../src/test/python/TestClusterBlueprint.py | 1 +
.../src/test/python/TestComponentVersionMapping.py | 3 +-
ambari-server/src/test/python/TestConfigs.py | 1 +
.../src/test/python/TestExecutionCommand.py | 1 +
ambari-server/src/test/python/TestGlobalLock.py | 3 +-
ambari-server/src/test/python/TestMpacks.py | 1 +
ambari-server/src/test/python/TestOSCheck.py | 3 +-
.../src/test/python/TestResourceFilesKeeper.py | 1 +
.../src/test/python/TestSensitiveDataEncryption.py | 1 +
.../src/test/python/TestServerClassPath.py | 1 +
ambari-server/src/test/python/TestServerUpgrade.py | 1 +
ambari-server/src/test/python/TestServerUtils.py | 1 +
.../src/test/python/TestServiceAdvisor.py | 1 +
ambari-server/src/test/python/TestSetupAgent.py | 1 +
ambari-server/src/test/python/TestSetupSso.py | 1 +
.../src/test/python/TestSetupTrustedProxy.py | 1 +
ambari-server/src/test/python/TestStackAdvisor.py | 1 +
ambari-server/src/test/python/TestStackFeature.py | 3 +-
ambari-server/src/test/python/TestStackSelect.py | 3 +-
.../src/test/python/TestUpgradeSummary.py | 3 +-
ambari-server/src/test/python/TestUtils.py | 1 +
.../src/test/python/TestValidateConfigs.py | 1 +
ambari-server/src/test/python/TestVersion.py | 1 +
.../src/test/python/TestVersionSelectUtil.py | 1 +
.../test/python/custom_actions/TestCheckHost.py | 3 +-
.../python/custom_actions/TestInstallPackages.py | 1 -
.../test/python/custom_actions/TestRemoveBits.py | 1 -
.../custom_actions/TestRemoveStackVersion.py | 3 +-
.../python/custom_actions/test_ru_execute_tasks.py | 3 +-
.../custom_actions/test_stack_select_set_all.py | 3 +-
.../test/python/host_scripts/TestAlertUlimit.py | 1 -
.../hooks/after_install.py | 1 -
.../hooks/before_install.py | 1 -
.../hooks/after_install.py | 1 -
.../hooks/after_upgrade.py | 1 -
.../hooks/before_install.py | 1 -
.../hooks/before_upgrade.py | 1 -
ambari-server/src/test/python/stacks/__init__.py | 1 -
.../before-SET_KEYTAB/test_before_set_keytab.py | 1 -
.../src/test/python/stacks/test_stack_adviser.py | 1 +
.../src/test/python/stacks/utils/__init__.py | 1 -
ambari-server/src/test/python/unitTests.py | 1 +
.../HDFS/1.0/package/dummy-script.py | 1 +
.../0.1/services/OOZIE2/package/dummy-script.py | 1 +
.../stacks/HDP/2.0.6.1/hooks/dummy-script.py | 1 +
.../stacks/HDP/2.0.6/hooks/dummy-script.py | 1 +
.../2.0.7/services/HBASE/package/dummy-script.py | 1 +
.../2.0.7/services/HDFS/package/dummy-script.py | 1 +
.../stacks/HDP/2.0.8/hooks/dummy-script.py | 1 +
.../2.0.8/services/HDFS/package/dummy-script.py | 1 +
.../1.0/services/HDFS/package/dummy-script.py | 1 +
.../HDP/0.2/services/HDFS/package/dummy-script.py | 1 +
.../1.0/services/HDFS/package/dummy-script.py | 1 +
.../HDP/0.2/services/HDFS/package/dummy-script.py | 1 +
.../HDP/0.3/services/HDFS/package/dummy-script.py | 1 +
.../HDP/0.4/services/HDFS/package/dummy-script.py | 1 +
ambari-web/app/views/application.js | 27 ++++++++---
.../app/views/main/service/info/metrics_view.js | 55 +++++++++++++---------
.../views/main/service/info/metrics_view_test.js | 27 ++++++-----
.../addons/test/nagios/plugins/test_sys_logger.py | 2 +-
contrib/agent-simulator/cluster.py | 1 +
contrib/agent-simulator/config.py | 1 +
contrib/agent-simulator/data.py | 1 +
contrib/agent-simulator/docker.py | 1 +
contrib/agent-simulator/docker_image/__init__.py | 1 +
.../agent-simulator/docker_image/launcher_agent.py | 1 +
contrib/agent-simulator/launcher_ambari_server.py | 1 +
contrib/agent-simulator/launcher_cluster.py | 1 +
contrib/agent-simulator/launcher_docker.py | 1 +
contrib/agent-simulator/launcher_service_server.py | 1 +
contrib/agent-simulator/log.py | 1 +
contrib/agent-simulator/network/dns_edit.py | 1 +
contrib/agent-simulator/vm.py | 1 +
.../NIFI/1.0.0/package/scripts/alert_check_nifi.py | 2 +-
.../NIFI/1.0.0/package/scripts/nifi.py | 2 +-
.../NIFI/1.0.0/package/scripts/nifi_ca.py | 2 +-
.../NIFI/1.0.0/package/scripts/nifi_ca_util.py | 2 +-
.../NIFI/1.0.0/package/scripts/nifi_constants.py | 2 +-
.../NIFI/1.0.0/package/scripts/params.py | 2 +-
.../NIFI/1.0.0/package/scripts/service_check.py | 4 +-
.../1.0.0/package/scripts/setup_ranger_nifi.py | 4 +-
.../NIFI/1.0.0/package/scripts/status_params.py | 2 +-
.../src/main/resources/hooks/after_install.py | 3 +-
.../HDF/2.0/hooks/after-INSTALL/scripts/hook.py | 1 +
.../HDF/2.0/hooks/after-INSTALL/scripts/params.py | 1 +
.../after-INSTALL/scripts/shared_initialization.py | 1 +
.../HDF/2.0/hooks/before-ANY/scripts/hook.py | 1 +
.../HDF/2.0/hooks/before-ANY/scripts/params.py | 1 +
.../before-ANY/scripts/shared_initialization.py | 1 +
.../HDF/2.0/hooks/before-INSTALL/scripts/hook.py | 1 +
.../HDF/2.0/hooks/before-INSTALL/scripts/params.py | 1 +
.../before-INSTALL/scripts/repo_initialization.py | 1 +
.../scripts/shared_initialization.py | 1 +
.../HDF/2.0/hooks/before-RESTART/scripts/hook.py | 1 +
.../hooks/before-START/files/topology_script.py | 2 +-
.../HDF/2.0/hooks/before-START/scripts/hook.py | 1 +
.../HDF/2.0/hooks/before-START/scripts/params.py | 1 +
.../hooks/before-START/scripts/rack_awareness.py | 3 +-
.../before-START/scripts/shared_initialization.py | 1 +
.../ONEFS/1.0.0/package/scripts/__init__.py | 1 +
.../ONEFS/1.0.0/package/scripts/onefs_client.py | 1 +
.../ONEFS/1.0.0/package/scripts/params.py | 1 +
.../ONEFS/1.0.0/package/scripts/params_linux.py | 1 +
.../ONEFS/1.0.0/package/scripts/params_windows.py | 1 +
.../ONEFS/1.0.0/package/scripts/service_check.py | 1 +
.../ONEFS/1.0.0/package/scripts/status_params.py | 1 +
.../addon-services/ONEFS/1.0.0/service_advisor.py | 2 +-
.../src/main/tools/hdfs_to_onefs_convert.py | 1 +
.../src/test/python/TestServiceAdvisor.py | 1 +
.../src/test/python/unitTests.py | 2 +-
.../8.0.5/package/scripts/microsoft_r_server.py | 2 +-
.../8.0.5/package/scripts/params.py | 1 +
.../8.0.5/package/scripts/params_linux.py | 1 +
.../8.0.5/package/scripts/params_windows.py | 1 +
.../8.0.5/package/scripts/service_check.py | 1 +
.../ODPi/2.0/hooks/after-INSTALL/scripts/hook.py | 1 +
.../ODPi/2.0/hooks/after-INSTALL/scripts/params.py | 1 +
.../after-INSTALL/scripts/shared_initialization.py | 1 +
.../ODPi/2.0/hooks/before-ANY/scripts/hook.py | 1 +
.../ODPi/2.0/hooks/before-ANY/scripts/params.py | 1 +
.../before-ANY/scripts/shared_initialization.py | 1 +
.../ODPi/2.0/hooks/before-INSTALL/scripts/hook.py | 1 +
.../2.0/hooks/before-INSTALL/scripts/params.py | 1 +
.../before-INSTALL/scripts/repo_initialization.py | 1 +
.../scripts/shared_initialization.py | 1 +
.../ODPi/2.0/hooks/before-RESTART/scripts/hook.py | 1 +
.../hooks/before-START/files/topology_script.py | 2 +-
.../ODPi/2.0/hooks/before-START/scripts/hook.py | 1 +
.../ODPi/2.0/hooks/before-START/scripts/params.py | 1 +
.../hooks/before-START/scripts/rack_awareness.py | 3 +-
.../before-START/scripts/shared_initialization.py | 1 +
.../alerts/alert_hive_interactive_thrift_port.py | 5 +-
.../HIVE/package/alerts/alert_hive_metastore.py | 3 +-
.../HIVE/package/alerts/alert_hive_thrift_port.py | 3 +-
.../HIVE/package/alerts/alert_llap_app_status.py | 5 +-
.../HIVE/package/alerts/alert_webhcat_server.py | 3 +-
.../2.0/services/HIVE/package/scripts/__init__.py | 2 +-
.../ODPi/2.0/services/HIVE/package/scripts/hcat.py | 2 +-
.../services/HIVE/package/scripts/hcat_client.py | 2 +-
.../HIVE/package/scripts/hcat_service_check.py | 2 +-
.../ODPi/2.0/services/HIVE/package/scripts/hive.py | 2 +-
.../services/HIVE/package/scripts/hive_client.py | 2 +-
.../HIVE/package/scripts/hive_interactive.py | 2 +-
.../HIVE/package/scripts/hive_metastore.py | 2 +-
.../services/HIVE/package/scripts/hive_server.py | 2 +-
.../package/scripts/hive_server_interactive.py | 4 +-
.../HIVE/package/scripts/hive_server_upgrade.py | 1 +
.../services/HIVE/package/scripts/hive_service.py | 2 +-
.../package/scripts/hive_service_interactive.py | 2 +-
.../services/HIVE/package/scripts/mysql_server.py | 2 +-
.../services/HIVE/package/scripts/mysql_service.py | 2 +-
.../services/HIVE/package/scripts/mysql_users.py | 2 +-
.../services/HIVE/package/scripts/mysql_utils.py | 4 +-
.../2.0/services/HIVE/package/scripts/params.py | 2 +-
.../services/HIVE/package/scripts/params_linux.py | 2 +-
.../HIVE/package/scripts/params_windows.py | 2 +-
.../services/HIVE/package/scripts/service_check.py | 4 +-
.../HIVE/package/scripts/setup_ranger_hive.py | 2 +-
.../scripts/setup_ranger_hive_interactive.py | 2 +-
.../services/HIVE/package/scripts/status_params.py | 2 +-
.../2.0/services/HIVE/package/scripts/webhcat.py | 1 +
.../HIVE/package/scripts/webhcat_server.py | 1 +
.../HIVE/package/scripts/webhcat_service.py | 1 +
.../HIVE/package/scripts/webhcat_service_check.py | 2 +-
.../package/alerts/alert_nodemanager_health.py | 3 +-
.../package/alerts/alert_nodemanagers_summary.py | 5 +-
.../files/validateYarnComponentStatusWindows.py | 3 +-
.../2.0/services/YARN/package/scripts/__init__.py | 1 +
.../package/scripts/application_timeline_server.py | 1 +
.../services/YARN/package/scripts/historyserver.py | 1 +
.../services/YARN/package/scripts/install_jars.py | 2 +-
.../YARN/package/scripts/mapred_service_check.py | 1 +
.../YARN/package/scripts/mapreduce2_client.py | 1 +
.../services/YARN/package/scripts/nodemanager.py | 1 +
.../YARN/package/scripts/nodemanager_upgrade.py | 1 +
.../2.0/services/YARN/package/scripts/params.py | 2 +-
.../services/YARN/package/scripts/params_linux.py | 1 +
.../YARN/package/scripts/params_windows.py | 1 +
.../YARN/package/scripts/resourcemanager.py | 1 +
.../2.0/services/YARN/package/scripts/service.py | 1 +
.../services/YARN/package/scripts/service_check.py | 1 +
.../YARN/package/scripts/setup_ranger_yarn.py | 2 +-
.../services/YARN/package/scripts/status_params.py | 4 +-
.../ODPi/2.0/services/YARN/package/scripts/yarn.py | 1 +
.../services/YARN/package/scripts/yarn_client.py | 1 +
contrib/nagios-alerts/plugins/ambari_alerts.py | 3 +-
.../plugins/generate_nagios_objects.py | 3 +-
contrib/version-builder/example.py | 1 +
contrib/version-builder/version_builder.py | 1 +
dev-support/docker/docker/bin/__init__.py | 1 +
dev-support/docker/docker/bin/ambaribuild.py | 2 +-
dev-support/docker/docker/bin/test/__init__.py | 1 +
.../docker/docker/bin/test/ambaribuild_test.py | 2 +-
docs/pom.xml | 4 ++
docs/src/site/apt/issue-tracking.apt | 31 ++++++++++++
docs/src/site/site.xml | 19 +-------
636 files changed, 692 insertions(+), 264 deletions(-)
diff --git a/ambari-agent/conf/unix/agent-multiplier.py b/ambari-agent/conf/unix/agent-multiplier.py
index b6d49bacfb..ae1e1d0d89 100644
--- a/ambari-agent/conf/unix/agent-multiplier.py
+++ b/ambari-agent/conf/unix/agent-multiplier.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# 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.
diff --git a/ambari-agent/conf/unix/upgrade_agent_configs.py b/ambari-agent/conf/unix/upgrade_agent_configs.py
index ae5d7b0a0f..0f30b98392 100644
--- a/ambari-agent/conf/unix/upgrade_agent_configs.py
+++ b/ambari-agent/conf/unix/upgrade_agent_configs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/ambari-python-wrap
+#!/usr/bin/env ambari-python-wrap
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -56,4 +56,4 @@ if os.path.isfile(CONFIG_FILE_BACKUP):
else:
print("Values are not updated, configs {0} is not found".format(CONFIG_FILE))
else:
- print("Values are not updated, backup {0} is not found".format(CONFIG_FILE_BACKUP))
\ No newline at end of file
+ print("Values are not updated, backup {0} is not found".format(CONFIG_FILE_BACKUP))
diff --git a/ambari-agent/conf/windows/service_wrapper.py b/ambari-agent/conf/windows/service_wrapper.py
index bf6fa7b33e..fa24d1ec3a 100644
--- a/ambari-agent/conf/windows/service_wrapper.py
+++ b/ambari-agent/conf/windows/service_wrapper.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
index f070a21673..9b1e1d969e 100644
--- a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
+++ b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/main/python/ambari_agent/AgentException.py b/ambari-agent/src/main/python/ambari_agent/AgentException.py
index d7455f54b0..6843895a4c 100644
--- a/ambari-agent/src/main/python/ambari_agent/AgentException.py
+++ b/ambari-agent/src/main/python/ambari_agent/AgentException.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/main/python/ambari_agent/BackgroundCommandExecutionHandle.py b/ambari-agent/src/main/python/ambari_agent/BackgroundCommandExecutionHandle.py
index 6d55d57434..805eb64a17 100644
--- a/ambari-agent/src/main/python/ambari_agent/BackgroundCommandExecutionHandle.py
+++ b/ambari-agent/src/main/python/ambari_agent/BackgroundCommandExecutionHandle.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/main/python/ambari_agent/ClusterCache.py b/ambari-agent/src/main/python/ambari_agent/ClusterCache.py
index 23f108fea1..bf70afc1dc 100644
--- a/ambari-agent/src/main/python/ambari_agent/ClusterCache.py
+++ b/ambari-agent/src/main/python/ambari_agent/ClusterCache.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/main/python/ambari_agent/CommandHooksOrchestrator.py b/ambari-agent/src/main/python/ambari_agent/CommandHooksOrchestrator.py
index 41a21ea348..3c23274746 100644
--- a/ambari-agent/src/main/python/ambari_agent/CommandHooksOrchestrator.py
+++ b/ambari-agent/src/main/python/ambari_agent/CommandHooksOrchestrator.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/main/python/ambari_agent/ComponentStatusExecutor.py b/ambari-agent/src/main/python/ambari_agent/ComponentStatusExecutor.py
index b45aa6b3f7..50b5295274 100644
--- a/ambari-agent/src/main/python/ambari_agent/ComponentStatusExecutor.py
+++ b/ambari-agent/src/main/python/ambari_agent/ComponentStatusExecutor.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/main/python/ambari_agent/ComponentVersionReporter.py b/ambari-agent/src/main/python/ambari_agent/ComponentVersionReporter.py
index eb4358b19d..3e88d2456d 100644
--- a/ambari-agent/src/main/python/ambari_agent/ComponentVersionReporter.py
+++ b/ambari-agent/src/main/python/ambari_agent/ComponentVersionReporter.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/main/python/ambari_agent/ExitHelper.py b/ambari-agent/src/main/python/ambari_agent/ExitHelper.py
index bf3b799143..6f7c3a1e91 100644
--- a/ambari-agent/src/main/python/ambari_agent/ExitHelper.py
+++ b/ambari-agent/src/main/python/ambari_agent/ExitHelper.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/main/python/ambari_agent/Facter.py b/ambari-agent/src/main/python/ambari_agent/Facter.py
index c83cb79461..a5bda8d5b3 100644
--- a/ambari-agent/src/main/python/ambari_agent/Facter.py
+++ b/ambari-agent/src/main/python/ambari_agent/Facter.py
@@ -1,5 +1,4 @@
#!/usr/bin/env ambari-python-wrap
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/main/python/ambari_agent/Grep.py b/ambari-agent/src/main/python/ambari_agent/Grep.py
index 70bc4b9e0b..014de1fdd7 100644
--- a/ambari-agent/src/main/python/ambari_agent/Grep.py
+++ b/ambari-agent/src/main/python/ambari_agent/Grep.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# 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.
diff --git a/ambari-agent/src/main/python/ambari_agent/HostStatusReporter.py b/ambari-agent/src/main/python/ambari_agent/HostStatusReporter.py
index c82fa9bcd3..7bde1c8242 100644
--- a/ambari-agent/src/main/python/ambari_agent/HostStatusReporter.py
+++ b/ambari-agent/src/main/python/ambari_agent/HostStatusReporter.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/main/python/ambari_agent/NetUtil.py b/ambari-agent/src/main/python/ambari_agent/NetUtil.py
index 2338a6cf84..16be86a1b6 100644
--- a/ambari-agent/src/main/python/ambari_agent/NetUtil.py
+++ b/ambari-agent/src/main/python/ambari_agent/NetUtil.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# 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.
diff --git a/ambari-agent/src/main/python/ambari_agent/RecoveryManager.py b/ambari-agent/src/main/python/ambari_agent/RecoveryManager.py
index e07d1b617d..6f3016691c 100644
--- a/ambari-agent/src/main/python/ambari_agent/RecoveryManager.py
+++ b/ambari-agent/src/main/python/ambari_agent/RecoveryManager.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# 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.
diff --git a/ambari-agent/src/main/python/ambari_agent/RemoteDebugUtils.py b/ambari-agent/src/main/python/ambari_agent/RemoteDebugUtils.py
index 1e81d465dc..3b201b8958 100644
--- a/ambari-agent/src/main/python/ambari_agent/RemoteDebugUtils.py
+++ b/ambari-agent/src/main/python/ambari_agent/RemoteDebugUtils.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/main/python/ambari_agent/StaleAlertsMonitor.py b/ambari-agent/src/main/python/ambari_agent/StaleAlertsMonitor.py
index 2d4dde2baa..652861a1cd 100644
--- a/ambari-agent/src/main/python/ambari_agent/StaleAlertsMonitor.py
+++ b/ambari-agent/src/main/python/ambari_agent/StaleAlertsMonitor.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
# 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.
diff --git a/ambari-agent/src/main/python/ambari_agent/Utils.py b/ambari-agent/src/main/python/ambari_agent/Utils.py
index 256d505cfc..ada5698106 100644
--- a/ambari-agent/src/main/python/ambari_agent/Utils.py
+++ b/ambari-agent/src/main/python/ambari_agent/Utils.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/__init__.py b/ambari-agent/src/main/python/ambari_agent/alerts/__init__.py
index 0a0e1ca9c2..416b098c9a 100644
--- a/ambari-agent/src/main/python/ambari_agent/alerts/__init__.py
+++ b/ambari-agent/src/main/python/ambari_agent/alerts/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/collector.py b/ambari-agent/src/main/python/ambari_agent/alerts/collector.py
index 68fd2dce4e..4673822f4b 100644
--- a/ambari-agent/src/main/python/ambari_agent/alerts/collector.py
+++ b/ambari-agent/src/main/python/ambari_agent/alerts/collector.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -91,7 +90,4 @@ class AlertCollector():
self.__buckets.clear()
return alerts
finally:
- self.__lock.release()
-
-
-
\ No newline at end of file
+ self.__lock.release()
\ No newline at end of file
diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/__init__.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/__init__.py
index 71cc53dbb8..c240920a9f 100644
--- a/ambari-agent/src/main/python/ambari_agent/apscheduler/__init__.py
+++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
version_info = (2, 1, 2)
version = '.'.join(str(n) for n in version_info[:3])
release = '.'.join(str(n) for n in version_info)
diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/events.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/events.py
index 80bde8e653..205d039f91 100644
--- a/ambari-agent/src/main/python/ambari_agent/apscheduler/events.py
+++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/events.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
__all__ = ('EVENT_SCHEDULER_START', 'EVENT_SCHEDULER_SHUTDOWN',
'EVENT_JOBSTORE_ADDED', 'EVENT_JOBSTORE_REMOVED',
'EVENT_JOBSTORE_JOB_ADDED', 'EVENT_JOBSTORE_JOB_REMOVED',
diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/job.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/job.py
index cfc09a2f5b..6689a7c349 100644
--- a/ambari-agent/src/main/python/ambari_agent/apscheduler/job.py
+++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/job.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Jobs represent scheduled tasks.
"""
diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/__init__.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/__init__.py
index e69de29bb2..e5a0d9b483 100644
--- a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/__init__.py
+++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/__init__.py
@@ -0,0 +1 @@
+#!/usr/bin/env python3
diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/base.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/base.py
index f0a16ddb61..c24ef60241 100644
--- a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/base.py
+++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/base.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Abstract base class that provides the interface needed by all job stores.
Job store methods are also documented here.
diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/mongodb_store.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/mongodb_store.py
index 4aedffa275..7ac042b38f 100644
--- a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/mongodb_store.py
+++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/mongodb_store.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Stores jobs in a MongoDB database.
"""
diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/ram_store.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/ram_store.py
index 60458fbab8..799ffc26b9 100644
--- a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/ram_store.py
+++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/ram_store.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Stores jobs in an array in RAM. Provides no persistence support.
"""
diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/redis_store.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/redis_store.py
index 7a3ee0372e..90062feae6 100644
--- a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/redis_store.py
+++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/redis_store.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Stores jobs in a Redis database.
"""
diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/shelve_store.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/shelve_store.py
index d1be58f911..57ec350d60 100644
--- a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/shelve_store.py
+++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/shelve_store.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Stores jobs in a file governed by the :mod:`shelve` module.
"""
diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/sqlalchemy_store.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/sqlalchemy_store.py
index 5b64a35a68..705ee11883 100644
--- a/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/sqlalchemy_store.py
+++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/jobstores/sqlalchemy_store.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Stores jobs in a database table using SQLAlchemy.
"""
diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py
index 23ba7350b2..a949e9f1d3 100644
--- a/ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py
+++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/scheduler.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
This module is the main part of the library. It houses the Scheduler class
and related exceptions.
diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py
index 51eb2864bc..eaccb2e38c 100644
--- a/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py
+++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/threadpool.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Generic thread pool class. Modeled after Java's ThreadPoolExecutor.
Please note that this ThreadPool does *not* fully implement the PEP 3148
diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/__init__.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/__init__.py
index 74a978845b..6445bd211e 100644
--- a/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/__init__.py
+++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
from apscheduler.triggers.cron import CronTrigger
from apscheduler.triggers.interval import IntervalTrigger
from apscheduler.triggers.simple import SimpleTrigger
diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/cron/__init__.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/cron/__init__.py
index 9e69f720ff..f813f29939 100644
--- a/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/cron/__init__.py
+++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/cron/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
from datetime import date, datetime
from apscheduler.triggers.cron.fields import *
diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/cron/expressions.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/cron/expressions.py
index b5d2919547..6c190fe939 100644
--- a/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/cron/expressions.py
+++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/cron/expressions.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
This module contains the expressions applicable for CronTrigger's fields.
"""
diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/cron/fields.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/cron/fields.py
index be5e5e33ef..1c916f99da 100644
--- a/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/cron/fields.py
+++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/cron/fields.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Fields represent CronTrigger options which map to :class:`~datetime.datetime`
fields.
diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/interval.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/interval.py
index dd16d777a1..230c8c9b14 100644
--- a/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/interval.py
+++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/interval.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
from datetime import datetime, timedelta
from math import ceil
diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/simple.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/simple.py
index ea61b3f1e3..3753e9ae4b 100644
--- a/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/simple.py
+++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/triggers/simple.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
from apscheduler.util import convert_to_datetime
diff --git a/ambari-agent/src/main/python/ambari_agent/apscheduler/util.py b/ambari-agent/src/main/python/ambari_agent/apscheduler/util.py
index 9ce531c655..bb4a1e69de 100644
--- a/ambari-agent/src/main/python/ambari_agent/apscheduler/util.py
+++ b/ambari-agent/src/main/python/ambari_agent/apscheduler/util.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
This module contains several handy functions primarily meant for internal use.
"""
diff --git a/ambari-agent/src/main/python/ambari_agent/debug.py b/ambari-agent/src/main/python/ambari_agent/debug.py
index a8ec5e6e95..9fc9885da8 100644
--- a/ambari-agent/src/main/python/ambari_agent/debug.py
+++ b/ambari-agent/src/main/python/ambari_agent/debug.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -47,5 +46,4 @@ def main():
debug_process(pid)
if __name__=='__main__':
- main()
-
\ No newline at end of file
+ main()
\ No newline at end of file
diff --git a/ambari-agent/src/main/python/ambari_agent/listeners/CommandsEventListener.py b/ambari-agent/src/main/python/ambari_agent/listeners/CommandsEventListener.py
index 92745ae178..b21e36e013 100644
--- a/ambari-agent/src/main/python/ambari_agent/listeners/CommandsEventListener.py
+++ b/ambari-agent/src/main/python/ambari_agent/listeners/CommandsEventListener.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/main/python/ambari_agent/listeners/ConfigurationEventListener.py b/ambari-agent/src/main/python/ambari_agent/listeners/ConfigurationEventListener.py
index dcd39b2301..b908b77f04 100644
--- a/ambari-agent/src/main/python/ambari_agent/listeners/ConfigurationEventListener.py
+++ b/ambari-agent/src/main/python/ambari_agent/listeners/ConfigurationEventListener.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/main/python/ambari_agent/listeners/HostLevelParamsEventListener.py b/ambari-agent/src/main/python/ambari_agent/listeners/HostLevelParamsEventListener.py
index 25173082fe..8039b6e82b 100644
--- a/ambari-agent/src/main/python/ambari_agent/listeners/HostLevelParamsEventListener.py
+++ b/ambari-agent/src/main/python/ambari_agent/listeners/HostLevelParamsEventListener.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/main/python/ambari_agent/listeners/MetadataEventListener.py b/ambari-agent/src/main/python/ambari_agent/listeners/MetadataEventListener.py
index f3a3503d77..1504c028ed 100644
--- a/ambari-agent/src/main/python/ambari_agent/listeners/MetadataEventListener.py
+++ b/ambari-agent/src/main/python/ambari_agent/listeners/MetadataEventListener.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/main/python/ambari_agent/listeners/TopologyEventListener.py b/ambari-agent/src/main/python/ambari_agent/listeners/TopologyEventListener.py
index 15e622c475..fc9d5d4246 100644
--- a/ambari-agent/src/main/python/ambari_agent/listeners/TopologyEventListener.py
+++ b/ambari-agent/src/main/python/ambari_agent/listeners/TopologyEventListener.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/main/python/ambari_agent/models/__init__.py b/ambari-agent/src/main/python/ambari_agent/models/__init__.py
index 53ed4d36c2..95e26abb27 100644
--- a/ambari-agent/src/main/python/ambari_agent/models/__init__.py
+++ b/ambari-agent/src/main/python/ambari_agent/models/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/main/python/ambari_agent/models/commands.py b/ambari-agent/src/main/python/ambari_agent/models/commands.py
index e9ea2c8b0c..7d6c4d811e 100644
--- a/ambari-agent/src/main/python/ambari_agent/models/commands.py
+++ b/ambari-agent/src/main/python/ambari_agent/models/commands.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/main/python/ambari_agent/models/hooks.py b/ambari-agent/src/main/python/ambari_agent/models/hooks.py
index f9183bd494..9ae47c8dfa 100644
--- a/ambari-agent/src/main/python/ambari_agent/models/hooks.py
+++ b/ambari-agent/src/main/python/ambari_agent/models/hooks.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/main/python/setup.py b/ambari-agent/src/main/python/setup.py
index 41c2097830..247f11ceb3 100644
--- a/ambari-agent/src/main/python/setup.py
+++ b/ambari-agent/src/main/python/setup.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# 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.
diff --git a/ambari-agent/src/test/python/ambari_agent/BaseStompServerTestCase.py b/ambari-agent/src/test/python/ambari_agent/BaseStompServerTestCase.py
index 4465695693..7e94cd9f32 100644
--- a/ambari-agent/src/test/python/ambari_agent/BaseStompServerTestCase.py
+++ b/ambari-agent/src/test/python/ambari_agent/BaseStompServerTestCase.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/ambari_agent/TestCommandHooksOrchestrator.py b/ambari-agent/src/test/python/ambari_agent/TestCommandHooksOrchestrator.py
index f16dfbcced..44fe9af895 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestCommandHooksOrchestrator.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestCommandHooksOrchestrator.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/ambari_agent/TestKerberosCommon.py b/ambari-agent/src/test/python/ambari_agent/TestKerberosCommon.py
index aa4858ed04..9297ac368b 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestKerberosCommon.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestKerberosCommon.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/ambari_agent/TestMain.py b/ambari-agent/src/test/python/ambari_agent/TestMain.py
index a2422bf7da..6700934a46 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestMain.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestMain.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/ambari_agent/TestPortAlert.py b/ambari-agent/src/test/python/ambari_agent/TestPortAlert.py
index 0a47f3b8a5..845a8cf277 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestPortAlert.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestPortAlert.py
@@ -393,7 +393,7 @@ class TestPortAlert(TestCase):
alert.set_cluster(cluster, cluster_id, host)
alert.configuration_builder = MagicMock()
s = socket()
- s.recv.return_value = "imok"
+ s.recv.return_value = "imok".encode()
def collector_side_effect(clus, data):
self.assertEqual(data['name'], alert_meta['name'])
@@ -451,7 +451,7 @@ class TestPortAlert(TestCase):
alert.set_cluster(cluster, cluster_id, host)
alert.configuration_builder = MagicMock()
s = socket()
- s.recv.return_value = "imok"
+ s.recv.return_value = "imok".encode()
def collector_side_effect(clus, data):
self.assertEqual(data['name'], alert_meta['name'])
@@ -510,7 +510,7 @@ class TestPortAlert(TestCase):
alert.configuration_builder = MagicMock()
s = socket()
- s.recv.return_value = "imok"
+ s.recv.return_value = "imok".encode()
def collector_side_effect(clus, data):
self.assertEqual(data['name'], alert_meta['name'])
diff --git a/ambari-agent/src/test/python/resource_management/TestContentSources.py b/ambari-agent/src/test/python/resource_management/TestContentSources.py
index b3fcb493d2..92ae59c270 100644
--- a/ambari-agent/src/test/python/resource_management/TestContentSources.py
+++ b/ambari-agent/src/test/python/resource_management/TestContentSources.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/resource_management/TestDataStructureUtils.py b/ambari-agent/src/test/python/resource_management/TestDataStructureUtils.py
index 406d413587..7b242b4498 100644
--- a/ambari-agent/src/test/python/resource_management/TestDataStructureUtils.py
+++ b/ambari-agent/src/test/python/resource_management/TestDataStructureUtils.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/resource_management/TestDatanodeHelper.py b/ambari-agent/src/test/python/resource_management/TestDatanodeHelper.py
index 9eb6e90c76..e6b8408ecf 100644
--- a/ambari-agent/src/test/python/resource_management/TestDatanodeHelper.py
+++ b/ambari-agent/src/test/python/resource_management/TestDatanodeHelper.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/resource_management/TestDirectoryResource.py b/ambari-agent/src/test/python/resource_management/TestDirectoryResource.py
index 16b1db2869..2842c7db5b 100644
--- a/ambari-agent/src/test/python/resource_management/TestDirectoryResource.py
+++ b/ambari-agent/src/test/python/resource_management/TestDirectoryResource.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/resource_management/TestEncryption.py b/ambari-agent/src/test/python/resource_management/TestEncryption.py
index 175fa349f9..2208bd0bec 100644
--- a/ambari-agent/src/test/python/resource_management/TestEncryption.py
+++ b/ambari-agent/src/test/python/resource_management/TestEncryption.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/resource_management/TestExecuteHadoopResource.py b/ambari-agent/src/test/python/resource_management/TestExecuteHadoopResource.py
index 29387951cf..44e8245fa6 100644
--- a/ambari-agent/src/test/python/resource_management/TestExecuteHadoopResource.py
+++ b/ambari-agent/src/test/python/resource_management/TestExecuteHadoopResource.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/resource_management/TestExecuteResource.py b/ambari-agent/src/test/python/resource_management/TestExecuteResource.py
index 8330e6e44d..16388700e6 100644
--- a/ambari-agent/src/test/python/resource_management/TestExecuteResource.py
+++ b/ambari-agent/src/test/python/resource_management/TestExecuteResource.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/resource_management/TestFcntlBasedProcessLock.py b/ambari-agent/src/test/python/resource_management/TestFcntlBasedProcessLock.py
index 2b0b66360c..b58d479016 100644
--- a/ambari-agent/src/test/python/resource_management/TestFcntlBasedProcessLock.py
+++ b/ambari-agent/src/test/python/resource_management/TestFcntlBasedProcessLock.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/resource_management/TestFileResource.py b/ambari-agent/src/test/python/resource_management/TestFileResource.py
index faba3e296e..629fbf62e1 100644
--- a/ambari-agent/src/test/python/resource_management/TestFileResource.py
+++ b/ambari-agent/src/test/python/resource_management/TestFileResource.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/resource_management/TestFileSystem.py b/ambari-agent/src/test/python/resource_management/TestFileSystem.py
index e2f7ed8c5e..cd8614a948 100644
--- a/ambari-agent/src/test/python/resource_management/TestFileSystem.py
+++ b/ambari-agent/src/test/python/resource_management/TestFileSystem.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/resource_management/TestGetPathFromUrl.py b/ambari-agent/src/test/python/resource_management/TestGetPathFromUrl.py
index 96744376a5..5a4d978348 100644
--- a/ambari-agent/src/test/python/resource_management/TestGetPathFromUrl.py
+++ b/ambari-agent/src/test/python/resource_management/TestGetPathFromUrl.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/resource_management/TestGroupResource.py b/ambari-agent/src/test/python/resource_management/TestGroupResource.py
index efbf89db78..b3c5e901db 100644
--- a/ambari-agent/src/test/python/resource_management/TestGroupResource.py
+++ b/ambari-agent/src/test/python/resource_management/TestGroupResource.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/resource_management/TestLibraryFunctions.py b/ambari-agent/src/test/python/resource_management/TestLibraryFunctions.py
index 1e635bf249..2a30e0a62b 100644
--- a/ambari-agent/src/test/python/resource_management/TestLibraryFunctions.py
+++ b/ambari-agent/src/test/python/resource_management/TestLibraryFunctions.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/resource_management/TestLinkResource.py b/ambari-agent/src/test/python/resource_management/TestLinkResource.py
index 6a1377beb9..70646208cd 100644
--- a/ambari-agent/src/test/python/resource_management/TestLinkResource.py
+++ b/ambari-agent/src/test/python/resource_management/TestLinkResource.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/resource_management/TestMonitorWebserverResource.py b/ambari-agent/src/test/python/resource_management/TestMonitorWebserverResource.py
index a982390c55..b16fc716b6 100644
--- a/ambari-agent/src/test/python/resource_management/TestMonitorWebserverResource.py
+++ b/ambari-agent/src/test/python/resource_management/TestMonitorWebserverResource.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/resource_management/TestPackageResource.py b/ambari-agent/src/test/python/resource_management/TestPackageResource.py
index 43d17ab97f..8f45545add 100644
--- a/ambari-agent/src/test/python/resource_management/TestPackageResource.py
+++ b/ambari-agent/src/test/python/resource_management/TestPackageResource.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/resource_management/TestRepositoryResource.py b/ambari-agent/src/test/python/resource_management/TestRepositoryResource.py
index 9cc118ee3e..85fe73e0d6 100644
--- a/ambari-agent/src/test/python/resource_management/TestRepositoryResource.py
+++ b/ambari-agent/src/test/python/resource_management/TestRepositoryResource.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/resource_management/TestSecurityCommons.py b/ambari-agent/src/test/python/resource_management/TestSecurityCommons.py
index b68ce705fb..24d3cc7d1e 100644
--- a/ambari-agent/src/test/python/resource_management/TestSecurityCommons.py
+++ b/ambari-agent/src/test/python/resource_management/TestSecurityCommons.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/resource_management/TestServiceResource.py b/ambari-agent/src/test/python/resource_management/TestServiceResource.py
index d4a57435f9..c7a41c3b87 100644
--- a/ambari-agent/src/test/python/resource_management/TestServiceResource.py
+++ b/ambari-agent/src/test/python/resource_management/TestServiceResource.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/resource_management/TestTarArchive.py b/ambari-agent/src/test/python/resource_management/TestTarArchive.py
index 66d8f2e261..91284b080e 100644
--- a/ambari-agent/src/test/python/resource_management/TestTarArchive.py
+++ b/ambari-agent/src/test/python/resource_management/TestTarArchive.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/resource_management/TestTemplateConfigResource.py b/ambari-agent/src/test/python/resource_management/TestTemplateConfigResource.py
index eb49c8e885..7976eec77d 100644
--- a/ambari-agent/src/test/python/resource_management/TestTemplateConfigResource.py
+++ b/ambari-agent/src/test/python/resource_management/TestTemplateConfigResource.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/resource_management/TestUserResource.py b/ambari-agent/src/test/python/resource_management/TestUserResource.py
index 1c5bcd7192..02e2f9e894 100644
--- a/ambari-agent/src/test/python/resource_management/TestUserResource.py
+++ b/ambari-agent/src/test/python/resource_management/TestUserResource.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/resource_management/TestUtils.py b/ambari-agent/src/test/python/resource_management/TestUtils.py
index 0335e3ce1d..78d8a70efe 100644
--- a/ambari-agent/src/test/python/resource_management/TestUtils.py
+++ b/ambari-agent/src/test/python/resource_management/TestUtils.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-agent/src/test/python/unitTests.py b/ambari-agent/src/test/python/unitTests.py
index 0a6b8cc3af..7c047566b6 100644
--- a/ambari-agent/src/test/python/unitTests.py
+++ b/ambari-agent/src/test/python/unitTests.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -37,6 +36,7 @@ $(pwd)/ambari-common/src/test/python:
$(pwd)/ambari-agent/src/test/python/ambari_agent:
$(pwd)/ambari-common/src/main/python:
$(pwd)/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/files:
+$(pwd)/ambari-server/src/test/python:
$(pwd)/ambari-agent/src/test/python/resource_management:
$(pwd)/ambari-common/src/main/python/ambari_jinja2
"""
diff --git a/ambari-common/src/main/python/ambari_commons/ambari_service.py b/ambari-common/src/main/python/ambari_commons/ambari_service.py
index 8e7e7aabeb..d46aa9e9bf 100644
--- a/ambari-common/src/main/python/ambari_commons/ambari_service.py
+++ b/ambari-common/src/main/python/ambari_commons/ambari_service.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_commons/buffered_queue.py b/ambari-common/src/main/python/ambari_commons/buffered_queue.py
index 23643eff0f..091bd46b7d 100644
--- a/ambari-common/src/main/python/ambari_commons/buffered_queue.py
+++ b/ambari-common/src/main/python/ambari_commons/buffered_queue.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_commons/kerberos/kerberos_common.py b/ambari-common/src/main/python/ambari_commons/kerberos/kerberos_common.py
index 9fe23e0a9d..8cf929af1d 100644
--- a/ambari-common/src/main/python/ambari_commons/kerberos/kerberos_common.py
+++ b/ambari-common/src/main/python/ambari_commons/kerberos/kerberos_common.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_commons/kerberos/utils.py b/ambari-common/src/main/python/ambari_commons/kerberos/utils.py
index ee2e039909..f90b8dc97d 100644
--- a/ambari-common/src/main/python/ambari_commons/kerberos/utils.py
+++ b/ambari-common/src/main/python/ambari_commons/kerberos/utils.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_commons/libs/__init__.py b/ambari-common/src/main/python/ambari_commons/libs/__init__.py
index 280aaf81b7..f98787116d 100644
--- a/ambari-common/src/main/python/ambari_commons/libs/__init__.py
+++ b/ambari-common/src/main/python/ambari_commons/libs/__init__.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_commons/libs/ppc64le/__init__.py b/ambari-common/src/main/python/ambari_commons/libs/ppc64le/__init__.py
index 280aaf81b7..f98787116d 100644
--- a/ambari-common/src/main/python/ambari_commons/libs/ppc64le/__init__.py
+++ b/ambari-common/src/main/python/ambari_commons/libs/ppc64le/__init__.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_commons/libs/x86_64/__init__.py b/ambari-common/src/main/python/ambari_commons/libs/x86_64/__init__.py
index 280aaf81b7..f98787116d 100644
--- a/ambari-common/src/main/python/ambari_commons/libs/x86_64/__init__.py
+++ b/ambari-common/src/main/python/ambari_commons/libs/x86_64/__init__.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_commons/os_family_impl.py b/ambari-common/src/main/python/ambari_commons/os_family_impl.py
index 65a502aec5..53bc67baa3 100644
--- a/ambari-common/src/main/python/ambari_commons/os_family_impl.py
+++ b/ambari-common/src/main/python/ambari_commons/os_family_impl.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_commons/os_linux.py b/ambari-common/src/main/python/ambari_commons/os_linux.py
index b7deb1ffc2..d76e373165 100644
--- a/ambari-common/src/main/python/ambari_commons/os_linux.py
+++ b/ambari-common/src/main/python/ambari_commons/os_linux.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_commons/os_utils.py b/ambari-common/src/main/python/ambari_commons/os_utils.py
index 6afcd9308a..fe5d20ca98 100644
--- a/ambari-common/src/main/python/ambari_commons/os_utils.py
+++ b/ambari-common/src/main/python/ambari_commons/os_utils.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_commons/os_windows.py b/ambari-common/src/main/python/ambari_commons/os_windows.py
index f14814e213..062353cf40 100644
--- a/ambari-common/src/main/python/ambari_commons/os_windows.py
+++ b/ambari-common/src/main/python/ambari_commons/os_windows.py
@@ -1,5 +1,4 @@
-# !/usr/bin/env python
-
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_commons/parallel_processing.py b/ambari-common/src/main/python/ambari_commons/parallel_processing.py
index a2490102bc..7c4c62ffd3 100644
--- a/ambari-common/src/main/python/ambari_commons/parallel_processing.py
+++ b/ambari-common/src/main/python/ambari_commons/parallel_processing.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_commons/repo_manager/__init__.py b/ambari-common/src/main/python/ambari_commons/repo_manager/__init__.py
index f3a540453a..4f36f252ba 100644
--- a/ambari-common/src/main/python/ambari_commons/repo_manager/__init__.py
+++ b/ambari-common/src/main/python/ambari_commons/repo_manager/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_commons/repo_manager/apt_manager.py b/ambari-common/src/main/python/ambari_commons/repo_manager/apt_manager.py
index 81ea855a7a..71ac391718 100644
--- a/ambari-common/src/main/python/ambari_commons/repo_manager/apt_manager.py
+++ b/ambari-common/src/main/python/ambari_commons/repo_manager/apt_manager.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_commons/repo_manager/apt_parser.py b/ambari-common/src/main/python/ambari_commons/repo_manager/apt_parser.py
index 29f1a655c2..6043c1f31e 100644
--- a/ambari-common/src/main/python/ambari_commons/repo_manager/apt_parser.py
+++ b/ambari-common/src/main/python/ambari_commons/repo_manager/apt_parser.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_commons/repo_manager/choco_manager.py b/ambari-common/src/main/python/ambari_commons/repo_manager/choco_manager.py
index edace06fae..c9b8d5f5e1 100644
--- a/ambari-common/src/main/python/ambari_commons/repo_manager/choco_manager.py
+++ b/ambari-common/src/main/python/ambari_commons/repo_manager/choco_manager.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_commons/repo_manager/generic_manager.py b/ambari-common/src/main/python/ambari_commons/repo_manager/generic_manager.py
index 3b6056cc47..c429fad8df 100644
--- a/ambari-common/src/main/python/ambari_commons/repo_manager/generic_manager.py
+++ b/ambari-common/src/main/python/ambari_commons/repo_manager/generic_manager.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_commons/repo_manager/generic_parser.py b/ambari-common/src/main/python/ambari_commons/repo_manager/generic_parser.py
index 2941646dc8..fd0609a931 100644
--- a/ambari-common/src/main/python/ambari_commons/repo_manager/generic_parser.py
+++ b/ambari-common/src/main/python/ambari_commons/repo_manager/generic_parser.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_commons/repo_manager/repo_manager_helper.py b/ambari-common/src/main/python/ambari_commons/repo_manager/repo_manager_helper.py
index 91d86a69ba..b95db5513d 100644
--- a/ambari-common/src/main/python/ambari_commons/repo_manager/repo_manager_helper.py
+++ b/ambari-common/src/main/python/ambari_commons/repo_manager/repo_manager_helper.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_commons/repo_manager/yum_manager.py b/ambari-common/src/main/python/ambari_commons/repo_manager/yum_manager.py
index 21250b25ae..e9a4031d67 100644
--- a/ambari-common/src/main/python/ambari_commons/repo_manager/yum_manager.py
+++ b/ambari-common/src/main/python/ambari_commons/repo_manager/yum_manager.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_commons/repo_manager/yum_parser.py b/ambari-common/src/main/python/ambari_commons/repo_manager/yum_parser.py
index b3f3dca8ac..fb2fa6787d 100644
--- a/ambari-common/src/main/python/ambari_commons/repo_manager/yum_parser.py
+++ b/ambari-common/src/main/python/ambari_commons/repo_manager/yum_parser.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_commons/repo_manager/zypper_manager.py b/ambari-common/src/main/python/ambari_commons/repo_manager/zypper_manager.py
index 9d76d04833..a99c63f32e 100644
--- a/ambari-common/src/main/python/ambari_commons/repo_manager/zypper_manager.py
+++ b/ambari-common/src/main/python/ambari_commons/repo_manager/zypper_manager.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_commons/repo_manager/zypper_parser.py b/ambari-common/src/main/python/ambari_commons/repo_manager/zypper_parser.py
index 43feabc797..769dc3dfdb 100644
--- a/ambari-common/src/main/python/ambari_commons/repo_manager/zypper_parser.py
+++ b/ambari-common/src/main/python/ambari_commons/repo_manager/zypper_parser.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_commons/shell.py b/ambari-common/src/main/python/ambari_commons/shell.py
index 445ebef508..c2c4468e0f 100644
--- a/ambari-common/src/main/python/ambari_commons/shell.py
+++ b/ambari-common/src/main/python/ambari_commons/shell.py
@@ -1,5 +1,4 @@
-# !/usr/bin/env python
-
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_commons/unicode_tolerant_fs.py b/ambari-common/src/main/python/ambari_commons/unicode_tolerant_fs.py
index dac9663659..e96d4fde0f 100644
--- a/ambari-common/src/main/python/ambari_commons/unicode_tolerant_fs.py
+++ b/ambari-common/src/main/python/ambari_commons/unicode_tolerant_fs.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_commons/xml_utils.py b/ambari-common/src/main/python/ambari_commons/xml_utils.py
index 31b2968c54..3c98af18b7 100644
--- a/ambari-common/src/main/python/ambari_commons/xml_utils.py
+++ b/ambari-common/src/main/python/ambari_commons/xml_utils.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# 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
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/__init__.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/__init__.py
index d02aab22ed..783d3ff1c0 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/__init__.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/__init__.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/__init__.py
index 8dfcb71971..2fd739b543 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/__init__.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
markupsafe
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/_bundle.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/_bundle.py
index 724b1340af..6ab250a5c9 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/_bundle.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/_bundle.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2._markupsafe._bundle
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/_constants.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/_constants.py
index 919bf03c50..e9cd496848 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/_constants.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/_constants.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
markupsafe._constants
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/_native.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/_native.py
index 454058cb86..b4afa07280 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/_native.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/_native.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
markupsafe._native
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/tests.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/tests.py
index d66b404983..ef2ea88403 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/tests.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_markupsafe/tests.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
import gc
import unittest
from ambari_jinja2._markupsafe import Markup, escape, escape_silent
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_stringdefs.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_stringdefs.py
index 9cd8400ece..33212ce180 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_stringdefs.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/_stringdefs.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2._stringdefs
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/bccache.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/bccache.py
index e3fb34f6aa..021b567775 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/bccache.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/bccache.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.bccache
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/compiler.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/compiler.py
index 529eced589..fe691ad403 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/compiler.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/compiler.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.compiler
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/constants.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/constants.py
index ec0aafd47f..1cdedee9c9 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/constants.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/constants.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
jinja.constants
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/debug.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/debug.py
index 34788db264..4593288677 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/debug.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/debug.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.debug
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/defaults.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/defaults.py
index f5ad177489..550ce4b6de 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/defaults.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/defaults.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.defaults
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/environment.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/environment.py
index 057f803a99..84a17eed09 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/environment.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/environment.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.environment
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/exceptions.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/exceptions.py
index 21baad8b0d..54ab1d86ff 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/exceptions.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/exceptions.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.exceptions
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/ext.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/ext.py
index 1750c371b5..1a5421e1a9 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/ext.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/ext.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.ext
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/filters.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/filters.py
index 23e26f41a0..25674e99a9 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/filters.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/filters.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.filters
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/lexer.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/lexer.py
index e073311dfe..200551ffdd 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/lexer.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/lexer.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.lexer
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/loaders.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/loaders.py
index ef9f6cdc45..2a6071e67b 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/loaders.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/loaders.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.loaders
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/meta.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/meta.py
index 3067fcb83f..b0bdb79416 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/meta.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/meta.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.meta
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/nodes.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/nodes.py
index 7bf0393a08..443e4ecd0b 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/nodes.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/nodes.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.nodes
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/optimizer.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/optimizer.py
index b014396afe..b95295ee9b 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/optimizer.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/optimizer.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.optimizer
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/parser.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/parser.py
index a14c055604..ab043870e7 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/parser.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/parser.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.parser
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/runtime.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/runtime.py
index 8bdb19c3a1..c1931be103 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/runtime.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/runtime.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.runtime
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/sandbox.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/sandbox.py
index ccc06377da..53a19e5a84 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/sandbox.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/sandbox.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.sandbox
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/tests.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/tests.py
index 0793e956f6..df10b49879 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/tests.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/tests.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.tests
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/__init__.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/__init__.py
index f125cffc21..bb71e084dc 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/__init__.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.testsuite
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/api.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/api.py
index e3c51a2233..01e3442454 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/api.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/api.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.testsuite.api
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/core_tags.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/core_tags.py
index 37e3c50b65..b748cf2203 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/core_tags.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/core_tags.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.testsuite.core_tags
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/debug.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/debug.py
index 55be94ae73..3226b35c98 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/debug.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/debug.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.testsuite.debug
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/doctests.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/doctests.py
index 72ddde5d5b..721a9dada8 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/doctests.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/doctests.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.testsuite.doctests
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/ext.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/ext.py
index 55e9442c36..de0ce59d1d 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/ext.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/ext.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.testsuite.ext
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/filters.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/filters.py
index 18ff197ac0..2af1b08197 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/filters.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/filters.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.testsuite.filters
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/imports.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/imports.py
index 10d7d587e9..24ce073695 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/imports.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/imports.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.testsuite.imports
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/inheritance.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/inheritance.py
index 676da825be..54bec31a6c 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/inheritance.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/inheritance.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.testsuite.inheritance
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/lexnparse.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/lexnparse.py
index 6edf31d4bb..93f2ccf033 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/lexnparse.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/lexnparse.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.testsuite.lexnparse
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/loader.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/loader.py
index 8f574bff47..009b7b077f 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/loader.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/loader.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.testsuite.loader
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/regression.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/regression.py
index e18113f33f..20e5b580d3 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/regression.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/regression.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.testsuite.regression
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/security.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/security.py
index 06ca79209b..840c93abc6 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/security.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/security.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.testsuite.security
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/tests.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/tests.py
index 2f7b7922ce..46789fa576 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/tests.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/tests.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.testsuite.tests
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/utils.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/utils.py
index fd2872e57d..c9e32bf936 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/utils.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite/utils.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.testsuite.utils
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/utils.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/utils.py
index 984a915467..54446e56a6 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/utils.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/utils.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.utils
diff --git a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/visitor.py b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/visitor.py
index 0561adfa85..25d3bf9b8b 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/visitor.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/visitor.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ambari_jinja2.visitor
diff --git a/ambari-common/src/main/python/ambari_jinja2/custom_fixers/fix_alt_unicode.py b/ambari-common/src/main/python/ambari_jinja2/custom_fixers/fix_alt_unicode.py
index 96a81c16eb..f61bebea88 100644
--- a/ambari-common/src/main/python/ambari_jinja2/custom_fixers/fix_alt_unicode.py
+++ b/ambari-common/src/main/python/ambari_jinja2/custom_fixers/fix_alt_unicode.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
from lib2to3 import fixer_base
from lib2to3.fixer_util import Name, BlankLine
diff --git a/ambari-common/src/main/python/ambari_jinja2/custom_fixers/fix_broken_reraising.py b/ambari-common/src/main/python/ambari_jinja2/custom_fixers/fix_broken_reraising.py
index fd0ea6881e..1fb573d207 100644
--- a/ambari-common/src/main/python/ambari_jinja2/custom_fixers/fix_broken_reraising.py
+++ b/ambari-common/src/main/python/ambari_jinja2/custom_fixers/fix_broken_reraising.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
from lib2to3 import fixer_base, pytree
from lib2to3.fixer_util import Name, BlankLine, Name, Attr, ArgList
diff --git a/ambari-common/src/main/python/ambari_jinja2/custom_fixers/fix_xrange2.py b/ambari-common/src/main/python/ambari_jinja2/custom_fixers/fix_xrange2.py
index 5d35e50514..8ad87ff675 100644
--- a/ambari-common/src/main/python/ambari_jinja2/custom_fixers/fix_xrange2.py
+++ b/ambari-common/src/main/python/ambari_jinja2/custom_fixers/fix_xrange2.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
from lib2to3 import fixer_base
from lib2to3.fixer_util import Name, BlankLine
diff --git a/ambari-common/src/main/python/ambari_jinja2/docs/cache_extension.py b/ambari-common/src/main/python/ambari_jinja2/docs/cache_extension.py
index d3703e3813..0212d2420a 100644
--- a/ambari-common/src/main/python/ambari_jinja2/docs/cache_extension.py
+++ b/ambari-common/src/main/python/ambari_jinja2/docs/cache_extension.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
from ambari_jinja2 import nodes
from ambari_jinja2.ext import Extension
diff --git a/ambari-common/src/main/python/ambari_jinja2/docs/conf.py b/ambari-common/src/main/python/ambari_jinja2/docs/conf.py
index ba90c49a6b..7a494698c4 100644
--- a/ambari-common/src/main/python/ambari_jinja2/docs/conf.py
+++ b/ambari-common/src/main/python/ambari_jinja2/docs/conf.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Jinja2 documentation build configuration file, created by
diff --git a/ambari-common/src/main/python/ambari_jinja2/docs/jinjaext.py b/ambari-common/src/main/python/ambari_jinja2/docs/jinjaext.py
index bdc7afd392..67f1a1f47b 100644
--- a/ambari-common/src/main/python/ambari_jinja2/docs/jinjaext.py
+++ b/ambari-common/src/main/python/ambari_jinja2/docs/jinjaext.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Jinja Documentation Extensions
diff --git a/ambari-common/src/main/python/ambari_jinja2/examples/basic/cycle.py b/ambari-common/src/main/python/ambari_jinja2/examples/basic/cycle.py
index eaf840dcb4..3437cbe372 100644
--- a/ambari-common/src/main/python/ambari_jinja2/examples/basic/cycle.py
+++ b/ambari-common/src/main/python/ambari_jinja2/examples/basic/cycle.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
from ambari_jinja2 import Environment
diff --git a/ambari-common/src/main/python/ambari_jinja2/examples/basic/debugger.py b/ambari-common/src/main/python/ambari_jinja2/examples/basic/debugger.py
index 707fe1e7df..8fc69f5ecb 100644
--- a/ambari-common/src/main/python/ambari_jinja2/examples/basic/debugger.py
+++ b/ambari-common/src/main/python/ambari_jinja2/examples/basic/debugger.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
from ambari_jinja2 import Environment
from ambari_jinja2.loaders import FileSystemLoader
diff --git a/ambari-common/src/main/python/ambari_jinja2/examples/basic/inheritance.py b/ambari-common/src/main/python/ambari_jinja2/examples/basic/inheritance.py
index 6b0b81ea93..306538ef83 100644
--- a/ambari-common/src/main/python/ambari_jinja2/examples/basic/inheritance.py
+++ b/ambari-common/src/main/python/ambari_jinja2/examples/basic/inheritance.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
from ambari_jinja2 import Environment
from ambari_jinja2.loaders import DictLoader
diff --git a/ambari-common/src/main/python/ambari_jinja2/examples/basic/test.py b/ambari-common/src/main/python/ambari_jinja2/examples/basic/test.py
index 5af89d7150..b0cd24fbfa 100644
--- a/ambari-common/src/main/python/ambari_jinja2/examples/basic/test.py
+++ b/ambari-common/src/main/python/ambari_jinja2/examples/basic/test.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
from ambari_jinja2 import Environment
from ambari_jinja2.loaders import DictLoader
diff --git a/ambari-common/src/main/python/ambari_jinja2/examples/basic/test_filter_and_linestatements.py b/ambari-common/src/main/python/ambari_jinja2/examples/basic/test_filter_and_linestatements.py
index 52e10c392a..87b537d4af 100644
--- a/ambari-common/src/main/python/ambari_jinja2/examples/basic/test_filter_and_linestatements.py
+++ b/ambari-common/src/main/python/ambari_jinja2/examples/basic/test_filter_and_linestatements.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
from ambari_jinja2 import Environment
diff --git a/ambari-common/src/main/python/ambari_jinja2/examples/basic/test_loop_filter.py b/ambari-common/src/main/python/ambari_jinja2/examples/basic/test_loop_filter.py
index 852add9bf8..65982603d6 100644
--- a/ambari-common/src/main/python/ambari_jinja2/examples/basic/test_loop_filter.py
+++ b/ambari-common/src/main/python/ambari_jinja2/examples/basic/test_loop_filter.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
from ambari_jinja2 import Environment
tmpl = Environment().from_string("""\
diff --git a/ambari-common/src/main/python/ambari_jinja2/examples/basic/translate.py b/ambari-common/src/main/python/ambari_jinja2/examples/basic/translate.py
index 9ec5b976ca..35946efbda 100644
--- a/ambari-common/src/main/python/ambari_jinja2/examples/basic/translate.py
+++ b/ambari-common/src/main/python/ambari_jinja2/examples/basic/translate.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
from ambari_jinja2 import Environment
print(Environment(extensions=['ambari_jinja2.i18n.TransExtension']).from_string("""\
diff --git a/ambari-common/src/main/python/ambari_jinja2/examples/bench.py b/ambari-common/src/main/python/ambari_jinja2/examples/bench.py
index a61074b9ee..034103b9bc 100644
--- a/ambari-common/src/main/python/ambari_jinja2/examples/bench.py
+++ b/ambari-common/src/main/python/ambari_jinja2/examples/bench.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""\
This benchmark compares some python templating engines with Jinja 2 so
that we get a picture of how fast Jinja 2 is for a semi real world
diff --git a/ambari-common/src/main/python/ambari_jinja2/examples/profile.py b/ambari-common/src/main/python/ambari_jinja2/examples/profile.py
index 4b45227781..20be3de54c 100644
--- a/ambari-common/src/main/python/ambari_jinja2/examples/profile.py
+++ b/ambari-common/src/main/python/ambari_jinja2/examples/profile.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
try:
from cProfile import Profile
except ImportError:
diff --git a/ambari-common/src/main/python/ambari_jinja2/examples/rwbench/djangoext.py b/ambari-common/src/main/python/ambari_jinja2/examples/rwbench/djangoext.py
index 9e9fa6cf0d..94edb4f35d 100644
--- a/ambari-common/src/main/python/ambari_jinja2/examples/rwbench/djangoext.py
+++ b/ambari-common/src/main/python/ambari_jinja2/examples/rwbench/djangoext.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from rwbench import ROOT
from os.path import join
diff --git a/ambari-common/src/main/python/ambari_jinja2/examples/rwbench/rwbench.py b/ambari-common/src/main/python/ambari_jinja2/examples/rwbench/rwbench.py
index 1d3854ed16..368dbe4ae4 100644
--- a/ambari-common/src/main/python/ambari_jinja2/examples/rwbench/rwbench.py
+++ b/ambari-common/src/main/python/ambari_jinja2/examples/rwbench/rwbench.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
RealWorldish Benchmark
diff --git a/ambari-common/src/main/python/ambari_jinja2/ext/django2jinja/django2jinja.py b/ambari-common/src/main/python/ambari_jinja2/ext/django2jinja/django2jinja.py
index 6418b1e2fe..93eb054968 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ext/django2jinja/django2jinja.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ext/django2jinja/django2jinja.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Django to Jinja
diff --git a/ambari-common/src/main/python/ambari_jinja2/ext/django2jinja/example.py b/ambari-common/src/main/python/ambari_jinja2/ext/django2jinja/example.py
index 2d4ab9add8..06e883f812 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ext/django2jinja/example.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ext/django2jinja/example.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
from django.conf import settings
settings.configure(TEMPLATE_DIRS=['templates'], TEMPLATE_DEBUG=True)
diff --git a/ambari-common/src/main/python/ambari_jinja2/ext/djangojinja2.py b/ambari-common/src/main/python/ambari_jinja2/ext/djangojinja2.py
index 93c364ecf9..deb6c5e100 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ext/djangojinja2.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ext/djangojinja2.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
djangoambari_jinja2
diff --git a/ambari-common/src/main/python/ambari_jinja2/ext/inlinegettext.py b/ambari-common/src/main/python/ambari_jinja2/ext/inlinegettext.py
index ba585f3e32..df09c5af4d 100644
--- a/ambari-common/src/main/python/ambari_jinja2/ext/inlinegettext.py
+++ b/ambari-common/src/main/python/ambari_jinja2/ext/inlinegettext.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Inline Gettext
diff --git a/ambari-common/src/main/python/ambari_jinja2/setup.py b/ambari-common/src/main/python/ambari_jinja2/setup.py
index 7a7c242bc2..4698a7019e 100644
--- a/ambari-common/src/main/python/ambari_jinja2/setup.py
+++ b/ambari-common/src/main/python/ambari_jinja2/setup.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Jinja2
diff --git a/ambari-common/src/main/python/ambari_pbkdf2/__init__.py b/ambari-common/src/main/python/ambari_pbkdf2/__init__.py
index e69de29bb2..e5a0d9b483 100644
--- a/ambari-common/src/main/python/ambari_pbkdf2/__init__.py
+++ b/ambari-common/src/main/python/ambari_pbkdf2/__init__.py
@@ -0,0 +1 @@
+#!/usr/bin/env python3
diff --git a/ambari-common/src/main/python/ambari_pbkdf2/pbkdf2.py b/ambari-common/src/main/python/ambari_pbkdf2/pbkdf2.py
index 0360403123..58fd4e7913 100644
--- a/ambari-common/src/main/python/ambari_pbkdf2/pbkdf2.py
+++ b/ambari-common/src/main/python/ambari_pbkdf2/pbkdf2.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
# -*- coding: ascii -*-
###########################################################################
# pbkdf2 - PKCS#5 v2.0 Password-Based Key Derivation
diff --git a/ambari-common/src/main/python/ambari_pyaes/__init__.py b/ambari-common/src/main/python/ambari_pyaes/__init__.py
index 5712f794a7..504326bef8 100644
--- a/ambari-common/src/main/python/ambari_pyaes/__init__.py
+++ b/ambari-common/src/main/python/ambari_pyaes/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# The MIT License (MIT)
#
# Copyright (c) 2014 Richard Moore
diff --git a/ambari-common/src/main/python/ambari_pyaes/aes.py b/ambari-common/src/main/python/ambari_pyaes/aes.py
index 4ebb7eddc3..99527bfa0a 100644
--- a/ambari-common/src/main/python/ambari_pyaes/aes.py
+++ b/ambari-common/src/main/python/ambari_pyaes/aes.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# The MIT License (MIT)
#
# Copyright (c) 2014 Richard Moore
diff --git a/ambari-common/src/main/python/ambari_pyaes/blockfeeder.py b/ambari-common/src/main/python/ambari_pyaes/blockfeeder.py
index f4113c37f9..e775aff277 100644
--- a/ambari-common/src/main/python/ambari_pyaes/blockfeeder.py
+++ b/ambari-common/src/main/python/ambari_pyaes/blockfeeder.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# The MIT License (MIT)
#
# Copyright (c) 2014 Richard Moore
diff --git a/ambari-common/src/main/python/ambari_pyaes/util.py b/ambari-common/src/main/python/ambari_pyaes/util.py
index 081a37594f..3a63b0e9ad 100644
--- a/ambari-common/src/main/python/ambari_pyaes/util.py
+++ b/ambari-common/src/main/python/ambari_pyaes/util.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# The MIT License (MIT)
#
# Copyright (c) 2014 Richard Moore
diff --git a/ambari-common/src/main/python/ambari_simplejson/__init__.py b/ambari-common/src/main/python/ambari_simplejson/__init__.py
index 152ad451ed..fa52cd9722 100644
--- a/ambari-common/src/main/python/ambari_simplejson/__init__.py
+++ b/ambari-common/src/main/python/ambari_simplejson/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of
JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data
interchange format.
diff --git a/ambari-common/src/main/python/ambari_simplejson/_speedups/__init__.py b/ambari-common/src/main/python/ambari_simplejson/_speedups/__init__.py
index e69de29bb2..e5a0d9b483 100644
--- a/ambari-common/src/main/python/ambari_simplejson/_speedups/__init__.py
+++ b/ambari-common/src/main/python/ambari_simplejson/_speedups/__init__.py
@@ -0,0 +1 @@
+#!/usr/bin/env python3
diff --git a/ambari-common/src/main/python/ambari_simplejson/_speedups/posix/__init__.py b/ambari-common/src/main/python/ambari_simplejson/_speedups/posix/__init__.py
index e69de29bb2..e5a0d9b483 100644
--- a/ambari-common/src/main/python/ambari_simplejson/_speedups/posix/__init__.py
+++ b/ambari-common/src/main/python/ambari_simplejson/_speedups/posix/__init__.py
@@ -0,0 +1 @@
+#!/usr/bin/env python3
diff --git a/ambari-common/src/main/python/ambari_simplejson/_speedups/posix/usc2/__init__.py b/ambari-common/src/main/python/ambari_simplejson/_speedups/posix/usc2/__init__.py
index e69de29bb2..e5a0d9b483 100644
--- a/ambari-common/src/main/python/ambari_simplejson/_speedups/posix/usc2/__init__.py
+++ b/ambari-common/src/main/python/ambari_simplejson/_speedups/posix/usc2/__init__.py
@@ -0,0 +1 @@
+#!/usr/bin/env python3
diff --git a/ambari-common/src/main/python/ambari_simplejson/_speedups/posix/usc4/__init__.py b/ambari-common/src/main/python/ambari_simplejson/_speedups/posix/usc4/__init__.py
index e69de29bb2..e5a0d9b483 100644
--- a/ambari-common/src/main/python/ambari_simplejson/_speedups/posix/usc4/__init__.py
+++ b/ambari-common/src/main/python/ambari_simplejson/_speedups/posix/usc4/__init__.py
@@ -0,0 +1 @@
+#!/usr/bin/env python3
diff --git a/ambari-common/src/main/python/ambari_simplejson/_speedups/ppc/__init__.py b/ambari-common/src/main/python/ambari_simplejson/_speedups/ppc/__init__.py
index e69de29bb2..e5a0d9b483 100644
--- a/ambari-common/src/main/python/ambari_simplejson/_speedups/ppc/__init__.py
+++ b/ambari-common/src/main/python/ambari_simplejson/_speedups/ppc/__init__.py
@@ -0,0 +1 @@
+#!/usr/bin/env python3
diff --git a/ambari-common/src/main/python/ambari_simplejson/_speedups/win/__init__.py b/ambari-common/src/main/python/ambari_simplejson/_speedups/win/__init__.py
index e69de29bb2..e5a0d9b483 100644
--- a/ambari-common/src/main/python/ambari_simplejson/_speedups/win/__init__.py
+++ b/ambari-common/src/main/python/ambari_simplejson/_speedups/win/__init__.py
@@ -0,0 +1 @@
+#!/usr/bin/env python3
diff --git a/ambari-common/src/main/python/ambari_simplejson/c_extension.py b/ambari-common/src/main/python/ambari_simplejson/c_extension.py
index 0a0171f957..00dc6b3188 100644
--- a/ambari-common/src/main/python/ambari_simplejson/c_extension.py
+++ b/ambari-common/src/main/python/ambari_simplejson/c_extension.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_simplejson/compat.py b/ambari-common/src/main/python/ambari_simplejson/compat.py
index 5fc1412844..22b63ce4fd 100644
--- a/ambari-common/src/main/python/ambari_simplejson/compat.py
+++ b/ambari-common/src/main/python/ambari_simplejson/compat.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""Python 3 compatibility shims
"""
import sys
diff --git a/ambari-common/src/main/python/ambari_simplejson/decoder.py b/ambari-common/src/main/python/ambari_simplejson/decoder.py
index 33fcf1cc76..6bde1b6207 100644
--- a/ambari-common/src/main/python/ambari_simplejson/decoder.py
+++ b/ambari-common/src/main/python/ambari_simplejson/decoder.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""Implementation of JSONDecoder
"""
diff --git a/ambari-common/src/main/python/ambari_simplejson/encoder.py b/ambari-common/src/main/python/ambari_simplejson/encoder.py
index de14a30d63..5b993dafa7 100644
--- a/ambari-common/src/main/python/ambari_simplejson/encoder.py
+++ b/ambari-common/src/main/python/ambari_simplejson/encoder.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""Implementation of JSONEncoder
"""
diff --git a/ambari-common/src/main/python/ambari_simplejson/errors.py b/ambari-common/src/main/python/ambari_simplejson/errors.py
index b97ab1e913..b1dcdd1826 100644
--- a/ambari-common/src/main/python/ambari_simplejson/errors.py
+++ b/ambari-common/src/main/python/ambari_simplejson/errors.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""Error classes used by simplejson
"""
__all__ = ['JSONDecodeError']
diff --git a/ambari-common/src/main/python/ambari_simplejson/ordered_dict.py b/ambari-common/src/main/python/ambari_simplejson/ordered_dict.py
index 2c9d213b32..324968005f 100644
--- a/ambari-common/src/main/python/ambari_simplejson/ordered_dict.py
+++ b/ambari-common/src/main/python/ambari_simplejson/ordered_dict.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""Drop-in replacement for collections.OrderedDict by Raymond Hettinger
http://code.activestate.com/recipes/576693/
diff --git a/ambari-common/src/main/python/ambari_simplejson/raw_json.py b/ambari-common/src/main/python/ambari_simplejson/raw_json.py
index 2071a70206..7b65e574ac 100644
--- a/ambari-common/src/main/python/ambari_simplejson/raw_json.py
+++ b/ambari-common/src/main/python/ambari_simplejson/raw_json.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""Implementation of RawJSON
"""
diff --git a/ambari-common/src/main/python/ambari_simplejson/scanner.py b/ambari-common/src/main/python/ambari_simplejson/scanner.py
index ab399ec1fa..9813529142 100644
--- a/ambari-common/src/main/python/ambari_simplejson/scanner.py
+++ b/ambari-common/src/main/python/ambari_simplejson/scanner.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""JSON token scanner
"""
import re
diff --git a/ambari-common/src/main/python/ambari_stomp/__init__.py b/ambari-common/src/main/python/ambari_stomp/__init__.py
index 3654cee57a..fee63e158d 100644
--- a/ambari-common/src/main/python/ambari_stomp/__init__.py
+++ b/ambari-common/src/main/python/ambari_stomp/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""stomp.py provides connectivity to a message broker supporting the STOMP protocol.
Protocol versions 1.0, 1.1 and 1.2 are supported.
diff --git a/ambari-common/src/main/python/ambari_stomp/__main__.py b/ambari-common/src/main/python/ambari_stomp/__main__.py
index 2fc1c36ec8..13463073a4 100644
--- a/ambari-common/src/main/python/ambari_stomp/__main__.py
+++ b/ambari-common/src/main/python/ambari_stomp/__main__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""The stomp.py command line client (used for testing or simple STOMP command scripting).
"""
diff --git a/ambari-common/src/main/python/ambari_stomp/adapter/__init__.py b/ambari-common/src/main/python/ambari_stomp/adapter/__init__.py
index 7ae47b0213..6030cf969e 100644
--- a/ambari-common/src/main/python/ambari_stomp/adapter/__init__.py
+++ b/ambari-common/src/main/python/ambari_stomp/adapter/__init__.py
@@ -1,2 +1,3 @@
+#!/usr/bin/env python3
"""Non-standard adapters.
"""
diff --git a/ambari-common/src/main/python/ambari_stomp/adapter/multicast.py b/ambari-common/src/main/python/ambari_stomp/adapter/multicast.py
index 1d3a5172f7..d426ebb427 100644
--- a/ambari-common/src/main/python/ambari_stomp/adapter/multicast.py
+++ b/ambari-common/src/main/python/ambari_stomp/adapter/multicast.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""Multicast transport for stomp.py.
Obviously not a typical message broker, but convenient if you don't have a broker, but still want to use stomp.py
diff --git a/ambari-common/src/main/python/ambari_stomp/adapter/websocket.py b/ambari-common/src/main/python/ambari_stomp/adapter/websocket.py
index 7b9dd29229..371f670884 100644
--- a/ambari-common/src/main/python/ambari_stomp/adapter/websocket.py
+++ b/ambari-common/src/main/python/ambari_stomp/adapter/websocket.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/ambari_stomp/backward.py b/ambari-common/src/main/python/ambari_stomp/backward.py
index 0d8a0ebb29..4f9cd7ca18 100644
--- a/ambari-common/src/main/python/ambari_stomp/backward.py
+++ b/ambari-common/src/main/python/ambari_stomp/backward.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
import sys
"""Functions to support backwards compatibility.
diff --git a/ambari-common/src/main/python/ambari_stomp/backward2.py b/ambari-common/src/main/python/ambari_stomp/backward2.py
index 80bf6b886d..b391980614 100644
--- a/ambari-common/src/main/python/ambari_stomp/backward2.py
+++ b/ambari-common/src/main/python/ambari_stomp/backward2.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Python2-specific versions of various functions used by stomp.py
"""
diff --git a/ambari-common/src/main/python/ambari_stomp/backward3.py b/ambari-common/src/main/python/ambari_stomp/backward3.py
index 50d59bc7cf..4c6db7d8cf 100644
--- a/ambari-common/src/main/python/ambari_stomp/backward3.py
+++ b/ambari-common/src/main/python/ambari_stomp/backward3.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Python3-specific versions of various functions used by stomp.py
"""
diff --git a/ambari-common/src/main/python/ambari_stomp/backwardsock.py b/ambari-common/src/main/python/ambari_stomp/backwardsock.py
index ee6d4bf430..a90a570fee 100644
--- a/ambari-common/src/main/python/ambari_stomp/backwardsock.py
+++ b/ambari-common/src/main/python/ambari_stomp/backwardsock.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""Networking functions to support backwards compatibility.
Distinct from the backward(2/3) functions to handle ipv6 changes between Python versions 2.5 and 2.6.
diff --git a/ambari-common/src/main/python/ambari_stomp/backwardsock25.py b/ambari-common/src/main/python/ambari_stomp/backwardsock25.py
index 8306d75691..9b4941ee39 100644
--- a/ambari-common/src/main/python/ambari_stomp/backwardsock25.py
+++ b/ambari-common/src/main/python/ambari_stomp/backwardsock25.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Python2.5 (and lower) specific versions of various networking (ipv6) functions used by stomp.py
"""
diff --git a/ambari-common/src/main/python/ambari_stomp/backwardsock26.py b/ambari-common/src/main/python/ambari_stomp/backwardsock26.py
index 14d86d4ed8..d6c77c6ace 100644
--- a/ambari-common/src/main/python/ambari_stomp/backwardsock26.py
+++ b/ambari-common/src/main/python/ambari_stomp/backwardsock26.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Python2.6 (and greater) specific versions of various networking (ipv6) functions used by stomp.py
"""
diff --git a/ambari-common/src/main/python/ambari_stomp/colors.py b/ambari-common/src/main/python/ambari_stomp/colors.py
index 65d24b123f..e7c7f29c2c 100644
--- a/ambari-common/src/main/python/ambari_stomp/colors.py
+++ b/ambari-common/src/main/python/ambari_stomp/colors.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""Color 'constants' used by the command line client.
"""
diff --git a/ambari-common/src/main/python/ambari_stomp/connect.py b/ambari-common/src/main/python/ambari_stomp/connect.py
index e5c78f94be..46e8fa8e2c 100644
--- a/ambari-common/src/main/python/ambari_stomp/connect.py
+++ b/ambari-common/src/main/python/ambari_stomp/connect.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""Main entry point for clients to create a STOMP connection.
Provides connection classes for `1.0 <http://stomp.github.io/stomp-specification-1.0.html>`_,
diff --git a/ambari-common/src/main/python/ambari_stomp/constants.py b/ambari-common/src/main/python/ambari_stomp/constants.py
index 87e8acceda..fa6a3062f3 100644
--- a/ambari-common/src/main/python/ambari_stomp/constants.py
+++ b/ambari-common/src/main/python/ambari_stomp/constants.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""The STOMP command and header name strings.
"""
diff --git a/ambari-common/src/main/python/ambari_stomp/exception.py b/ambari-common/src/main/python/ambari_stomp/exception.py
index 398096bbb0..34608a468c 100644
--- a/ambari-common/src/main/python/ambari_stomp/exception.py
+++ b/ambari-common/src/main/python/ambari_stomp/exception.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""Errors thrown by stomp.py connections.
"""
diff --git a/ambari-common/src/main/python/ambari_stomp/listener.py b/ambari-common/src/main/python/ambari_stomp/listener.py
index 9ed040af64..3533a24df2 100644
--- a/ambari-common/src/main/python/ambari_stomp/listener.py
+++ b/ambari-common/src/main/python/ambari_stomp/listener.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""Various listeners for using with stomp.py connections.
"""
diff --git a/ambari-common/src/main/python/ambari_stomp/protocol.py b/ambari-common/src/main/python/ambari_stomp/protocol.py
index 44e83cc1c9..0c763bd2a4 100644
--- a/ambari-common/src/main/python/ambari_stomp/protocol.py
+++ b/ambari-common/src/main/python/ambari_stomp/protocol.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""Provides the 1.0, 1.1 and 1.2 protocol classes.
"""
diff --git a/ambari-common/src/main/python/ambari_stomp/transport.py b/ambari-common/src/main/python/ambari_stomp/transport.py
index d79f094075..7c6a507155 100644
--- a/ambari-common/src/main/python/ambari_stomp/transport.py
+++ b/ambari-common/src/main/python/ambari_stomp/transport.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""Provides the underlying transport functionality (for stomp message transmission) - (mostly) independent from the actual STOMP protocol
"""
diff --git a/ambari-common/src/main/python/ambari_stomp/utils.py b/ambari-common/src/main/python/ambari_stomp/utils.py
index 204fb16fe9..6aaaf166ab 100644
--- a/ambari-common/src/main/python/ambari_stomp/utils.py
+++ b/ambari-common/src/main/python/ambari_stomp/utils.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""General utility functions.
"""
diff --git a/ambari-common/src/main/python/ambari_ws4py/__init__.py b/ambari-common/src/main/python/ambari_ws4py/__init__.py
index bcd60f998f..1d824b5008 100644
--- a/ambari-common/src/main/python/ambari_ws4py/__init__.py
+++ b/ambari-common/src/main/python/ambari_ws4py/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Redistribution and use in source and binary forms, with or without
diff --git a/ambari-common/src/main/python/ambari_ws4py/client/__init__.py b/ambari-common/src/main/python/ambari_ws4py/client/__init__.py
index ce1c98fbbf..04ac4e4a66 100644
--- a/ambari-common/src/main/python/ambari_ws4py/client/__init__.py
+++ b/ambari-common/src/main/python/ambari_ws4py/client/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from base64 import b64encode
from hashlib import sha1
diff --git a/ambari-common/src/main/python/ambari_ws4py/client/geventclient.py b/ambari-common/src/main/python/ambari_ws4py/client/geventclient.py
index ace6fcc015..c80acd37f5 100644
--- a/ambari-common/src/main/python/ambari_ws4py/client/geventclient.py
+++ b/ambari-common/src/main/python/ambari_ws4py/client/geventclient.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import copy
diff --git a/ambari-common/src/main/python/ambari_ws4py/client/threadedclient.py b/ambari-common/src/main/python/ambari_ws4py/client/threadedclient.py
index dc7b2e01ee..db53f2791c 100644
--- a/ambari-common/src/main/python/ambari_ws4py/client/threadedclient.py
+++ b/ambari-common/src/main/python/ambari_ws4py/client/threadedclient.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import threading
diff --git a/ambari-common/src/main/python/ambari_ws4py/client/tornadoclient.py b/ambari-common/src/main/python/ambari_ws4py/client/tornadoclient.py
index 5f4d67d2d7..290bb8ccd9 100644
--- a/ambari-common/src/main/python/ambari_ws4py/client/tornadoclient.py
+++ b/ambari-common/src/main/python/ambari_ws4py/client/tornadoclient.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import ssl
diff --git a/ambari-common/src/main/python/ambari_ws4py/compat.py b/ambari-common/src/main/python/ambari_ws4py/compat.py
index 5d19699a06..c6abc521be 100644
--- a/ambari-common/src/main/python/ambari_ws4py/compat.py
+++ b/ambari-common/src/main/python/ambari_ws4py/compat.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__doc__ = """
This compatibility module is inspired by the one found
diff --git a/ambari-common/src/main/python/ambari_ws4py/exc.py b/ambari-common/src/main/python/ambari_ws4py/exc.py
index bfefea4b60..6e09428877 100644
--- a/ambari-common/src/main/python/ambari_ws4py/exc.py
+++ b/ambari-common/src/main/python/ambari_ws4py/exc.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__all__ = ['WebSocketException', 'FrameTooLargeException', 'ProtocolException',
diff --git a/ambari-common/src/main/python/ambari_ws4py/framing.py b/ambari-common/src/main/python/ambari_ws4py/framing.py
index a7f62c8c04..baf627388d 100644
--- a/ambari-common/src/main/python/ambari_ws4py/framing.py
+++ b/ambari-common/src/main/python/ambari_ws4py/framing.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from struct import pack, unpack
diff --git a/ambari-common/src/main/python/ambari_ws4py/manager.py b/ambari-common/src/main/python/ambari_ws4py/manager.py
index 386f8a2778..fc5a6b57e0 100644
--- a/ambari-common/src/main/python/ambari_ws4py/manager.py
+++ b/ambari-common/src/main/python/ambari_ws4py/manager.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__doc__ = """
The manager module provides a selected classes to
diff --git a/ambari-common/src/main/python/ambari_ws4py/messaging.py b/ambari-common/src/main/python/ambari_ws4py/messaging.py
index f8a86adf09..cce3ce22d6 100644
--- a/ambari-common/src/main/python/ambari_ws4py/messaging.py
+++ b/ambari-common/src/main/python/ambari_ws4py/messaging.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import struct
diff --git a/ambari-common/src/main/python/ambari_ws4py/server/__init__.py b/ambari-common/src/main/python/ambari_ws4py/server/__init__.py
index e69de29bb2..e5a0d9b483 100644
--- a/ambari-common/src/main/python/ambari_ws4py/server/__init__.py
+++ b/ambari-common/src/main/python/ambari_ws4py/server/__init__.py
@@ -0,0 +1 @@
+#!/usr/bin/env python3
diff --git a/ambari-common/src/main/python/ambari_ws4py/server/cherrypyserver.py b/ambari-common/src/main/python/ambari_ws4py/server/cherrypyserver.py
index 98e26d417c..0459139f85 100644
--- a/ambari-common/src/main/python/ambari_ws4py/server/cherrypyserver.py
+++ b/ambari-common/src/main/python/ambari_ws4py/server/cherrypyserver.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__doc__ = """
WebSocket within CherryPy is a tricky bit since CherryPy is
diff --git a/ambari-common/src/main/python/ambari_ws4py/server/geventserver.py b/ambari-common/src/main/python/ambari_ws4py/server/geventserver.py
index 239f86c1eb..cf828e3b59 100644
--- a/ambari-common/src/main/python/ambari_ws4py/server/geventserver.py
+++ b/ambari-common/src/main/python/ambari_ws4py/server/geventserver.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__doc__ = """
WSGI entities to support WebSocket from within gevent.
diff --git a/ambari-common/src/main/python/ambari_ws4py/server/wsgirefserver.py b/ambari-common/src/main/python/ambari_ws4py/server/wsgirefserver.py
index 3973dd69ac..358e55b4e6 100644
--- a/ambari-common/src/main/python/ambari_ws4py/server/wsgirefserver.py
+++ b/ambari-common/src/main/python/ambari_ws4py/server/wsgirefserver.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__doc__ = """
Add WebSocket support to the built-in WSGI server
diff --git a/ambari-common/src/main/python/ambari_ws4py/server/wsgiutils.py b/ambari-common/src/main/python/ambari_ws4py/server/wsgiutils.py
index b3eac11b74..121ec43253 100644
--- a/ambari-common/src/main/python/ambari_ws4py/server/wsgiutils.py
+++ b/ambari-common/src/main/python/ambari_ws4py/server/wsgiutils.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__doc__ = """
This module provides a WSGI application suitable
diff --git a/ambari-common/src/main/python/ambari_ws4py/streaming.py b/ambari-common/src/main/python/ambari_ws4py/streaming.py
index 5f075082b7..2dfd2965e3 100644
--- a/ambari-common/src/main/python/ambari_ws4py/streaming.py
+++ b/ambari-common/src/main/python/ambari_ws4py/streaming.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import struct
from struct import unpack
diff --git a/ambari-common/src/main/python/ambari_ws4py/utf8validator.py b/ambari-common/src/main/python/ambari_ws4py/utf8validator.py
index 50b19e5d07..7127ee6a1d 100644
--- a/ambari-common/src/main/python/ambari_ws4py/utf8validator.py
+++ b/ambari-common/src/main/python/ambari_ws4py/utf8validator.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# coding=utf-8
###############################################################################
diff --git a/ambari-common/src/main/python/ambari_ws4py/websocket.py b/ambari-common/src/main/python/ambari_ws4py/websocket.py
index 53f1a438b2..05ed3911f3 100644
--- a/ambari-common/src/main/python/ambari_ws4py/websocket.py
+++ b/ambari-common/src/main/python/ambari_ws4py/websocket.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import logging
import socket
diff --git a/ambari-common/src/main/python/pluggable_stack_definition/__init__.py b/ambari-common/src/main/python/pluggable_stack_definition/__init__.py
index 0a0e1ca9c2..416b098c9a 100644
--- a/ambari-common/src/main/python/pluggable_stack_definition/__init__.py
+++ b/ambari-common/src/main/python/pluggable_stack_definition/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/resource_management/core/providers/packaging.py b/ambari-common/src/main/python/resource_management/core/providers/packaging.py
index 19f8d465e7..b59df7ab60 100644
--- a/ambari-common/src/main/python/resource_management/core/providers/packaging.py
+++ b/ambari-common/src/main/python/resource_management/core/providers/packaging.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/resource_management/core/providers/windows/__init__.py b/ambari-common/src/main/python/resource_management/core/providers/windows/__init__.py
index b0b988b18b..6b1f9423de 100644
--- a/ambari-common/src/main/python/resource_management/core/providers/windows/__init__.py
+++ b/ambari-common/src/main/python/resource_management/core/providers/windows/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/resource_management/core/providers/windows/service.py b/ambari-common/src/main/python/resource_management/core/providers/windows/service.py
index e6de8236e9..e9b8ebd135 100644
--- a/ambari-common/src/main/python/resource_management/core/providers/windows/service.py
+++ b/ambari-common/src/main/python/resource_management/core/providers/windows/service.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/resource_management/core/providers/windows/system.py b/ambari-common/src/main/python/resource_management/core/providers/windows/system.py
index ee64250b46..a3b7ef9504 100644
--- a/ambari-common/src/main/python/resource_management/core/providers/windows/system.py
+++ b/ambari-common/src/main/python/resource_management/core/providers/windows/system.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/resource_management/core/resources/jcepolicyinfo.py b/ambari-common/src/main/python/resource_management/core/resources/jcepolicyinfo.py
index 4d1c5e225a..06a7f500b2 100644
--- a/ambari-common/src/main/python/resource_management/core/resources/jcepolicyinfo.py
+++ b/ambari-common/src/main/python/resource_management/core/resources/jcepolicyinfo.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/resource_management/core/sudo.py b/ambari-common/src/main/python/resource_management/core/sudo.py
index a5949a075b..e55f9f3b0b 100644
--- a/ambari-common/src/main/python/resource_management/core/sudo.py
+++ b/ambari-common/src/main/python/resource_management/core/sudo.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/constants.py b/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
index 7b5fedbaf1..b149147b06 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/format_jvm_option.py b/ambari-common/src/main/python/resource_management/libraries/functions/format_jvm_option.py
index 74694e291f..bc769fd068 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/format_jvm_option.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/format_jvm_option.py
@@ -43,5 +43,4 @@ def format_jvm_option(name, default_value):
else:
return default_value
else:
- return default_value
-
\ No newline at end of file
+ return default_value
\ No newline at end of file
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/install_jdbc_driver.py b/ambari-common/src/main/python/resource_management/libraries/functions/install_jdbc_driver.py
index be77cfd3f5..a67f45db58 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/install_jdbc_driver.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/install_jdbc_driver.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/install_windows_msi.py b/ambari-common/src/main/python/resource_management/libraries/functions/install_windows_msi.py
index c878ce7e6a..228b243ed9 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/install_windows_msi.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/install_windows_msi.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/module_version.py b/ambari-common/src/main/python/resource_management/libraries/functions/module_version.py
index d8307b8db9..194161382a 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/module_version.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/module_version.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/mpack_version.py b/ambari-common/src/main/python/resource_management/libraries/functions/mpack_version.py
index 4c9816f02f..0fc836eea5 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/mpack_version.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/mpack_version.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/reload_windows_env.py b/ambari-common/src/main/python/resource_management/libraries/functions/reload_windows_env.py
index d574c56a41..e913a0a826 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/reload_windows_env.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/reload_windows_env.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/repository_util.py b/ambari-common/src/main/python/resource_management/libraries/functions/repository_util.py
index 7fa60cfe77..beb740edd7 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/repository_util.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/repository_util.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/security_commons.py b/ambari-common/src/main/python/resource_management/libraries/functions/security_commons.py
index 1f6ed179cd..b2a2ba63da 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/security_commons.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/security_commons.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/simulate_perf_cluster_alert_behaviour.py b/ambari-common/src/main/python/resource_management/libraries/functions/simulate_perf_cluster_alert_behaviour.py
index 1d901aac6d..7201f0d38f 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/simulate_perf_cluster_alert_behaviour.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/simulate_perf_cluster_alert_behaviour.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/solr_cloud_util.py b/ambari-common/src/main/python/resource_management/libraries/functions/solr_cloud_util.py
index 35183e9d1a..a67bb7e3ca 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/solr_cloud_util.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/solr_cloud_util.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/stack_tools.py b/ambari-common/src/main/python/resource_management/libraries/functions/stack_tools.py
index c578b1171e..3cf11b84fa 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/stack_tools.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/stack_tools.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/windows_service_utils.py b/ambari-common/src/main/python/resource_management/libraries/functions/windows_service_utils.py
index 019a32686d..06ab4de297 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/windows_service_utils.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/windows_service_utils.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py
index a6b0c3d797..699cc0e90d 100644
--- a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py
+++ b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# !/usr/bin/env python
"""
Licensed to the Apache Software Foundation (ASF) under one
diff --git a/ambari-common/src/main/python/resource_management/libraries/providers/msi.py b/ambari-common/src/main/python/resource_management/libraries/providers/msi.py
index 8048fa3c46..103b2597de 100644
--- a/ambari-common/src/main/python/resource_management/libraries/providers/msi.py
+++ b/ambari-common/src/main/python/resource_management/libraries/providers/msi.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/resource_management/libraries/resources/hdfs_resource.py b/ambari-common/src/main/python/resource_management/libraries/resources/hdfs_resource.py
index 6d44800eaf..1f13e65491 100644
--- a/ambari-common/src/main/python/resource_management/libraries/resources/hdfs_resource.py
+++ b/ambari-common/src/main/python/resource_management/libraries/resources/hdfs_resource.py
@@ -1,4 +1,4 @@
-# !/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/resource_management/libraries/resources/msi.py b/ambari-common/src/main/python/resource_management/libraries/resources/msi.py
index 72d06c5d55..e343997a0a 100644
--- a/ambari-common/src/main/python/resource_management/libraries/resources/msi.py
+++ b/ambari-common/src/main/python/resource_management/libraries/resources/msi.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/resource_management/libraries/script/dummy.py b/ambari-common/src/main/python/resource_management/libraries/script/dummy.py
index a1608ad93c..745a0c6e06 100644
--- a/ambari-common/src/main/python/resource_management/libraries/script/dummy.py
+++ b/ambari-common/src/main/python/resource_management/libraries/script/dummy.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/resource_management/libraries/script/hook.py b/ambari-common/src/main/python/resource_management/libraries/script/hook.py
index 6a112effff..dabedb30c7 100644
--- a/ambari-common/src/main/python/resource_management/libraries/script/hook.py
+++ b/ambari-common/src/main/python/resource_management/libraries/script/hook.py
@@ -1,5 +1,4 @@
#!/usr/bin/env ambari-python-wrap
-
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/main/python/urlinfo_processor/urlinfo_processor.py b/ambari-common/src/main/python/urlinfo_processor/urlinfo_processor.py
index 4934b79b67..e90dc20143 100644
--- a/ambari-common/src/main/python/urlinfo_processor/urlinfo_processor.py
+++ b/ambari-common/src/main/python/urlinfo_processor/urlinfo_processor.py
@@ -1,5 +1,4 @@
#!/usr/bin/env ambari-python-wrap
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-common/src/test/python/coilmq/__init__.py b/ambari-common/src/test/python/coilmq/__init__.py
index c7010e0a36..e79bc2dda8 100644
--- a/ambari-common/src/test/python/coilmq/__init__.py
+++ b/ambari-common/src/test/python/coilmq/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Top-level CoilMQ package.
"""
diff --git a/ambari-common/src/test/python/coilmq/auth/__init__.py b/ambari-common/src/test/python/coilmq/auth/__init__.py
index dc9b243771..1942d44ed3 100644
--- a/ambari-common/src/test/python/coilmq/auth/__init__.py
+++ b/ambari-common/src/test/python/coilmq/auth/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Authentication providers.
diff --git a/ambari-common/src/test/python/coilmq/auth/simple.py b/ambari-common/src/test/python/coilmq/auth/simple.py
index b6d8b83f18..518f1158dd 100644
--- a/ambari-common/src/test/python/coilmq/auth/simple.py
+++ b/ambari-common/src/test/python/coilmq/auth/simple.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
A simple config-file based authentication module.
"""
diff --git a/ambari-common/src/test/python/coilmq/config/__init__.py b/ambari-common/src/test/python/coilmq/config/__init__.py
index 37f18368c2..41d471a3b1 100644
--- a/ambari-common/src/test/python/coilmq/config/__init__.py
+++ b/ambari-common/src/test/python/coilmq/config/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Configuration support functionality.
diff --git a/ambari-common/src/test/python/coilmq/engine.py b/ambari-common/src/test/python/coilmq/engine.py
index 8ac1a6bd71..b8abe5e428 100644
--- a/ambari-common/src/test/python/coilmq/engine.py
+++ b/ambari-common/src/test/python/coilmq/engine.py
@@ -1,7 +1,4 @@
-
-
-from coilmq.protocol import STOMP10
-
+#!/usr/bin/env python3
"""
Core STOMP server logic, abstracted from socket transport implementation.
@@ -21,6 +18,7 @@ Patrick Hurley and Lionel Bouton. See http://stompserver.rubyforge.org/
"""
import logging
from collections import defaultdict
+from coilmq.protocol import STOMP10
__authors__ = ['"Hans Lellelid" <ha...@xmpl.org>']
__copyright__ = "Copyright 2009 Hans Lellelid"
diff --git a/ambari-common/src/test/python/coilmq/exception.py b/ambari-common/src/test/python/coilmq/exception.py
index 75f476c4a8..1910b06bf8 100644
--- a/ambari-common/src/test/python/coilmq/exception.py
+++ b/ambari-common/src/test/python/coilmq/exception.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Exception classes used by CoilMQ.
diff --git a/ambari-common/src/test/python/coilmq/protocol/__init__.py b/ambari-common/src/test/python/coilmq/protocol/__init__.py
index 878f9e0b7f..7e75f0f1a3 100644
--- a/ambari-common/src/test/python/coilmq/protocol/__init__.py
+++ b/ambari-common/src/test/python/coilmq/protocol/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
import abc
import uuid
import socket
diff --git a/ambari-common/src/test/python/coilmq/queue.py b/ambari-common/src/test/python/coilmq/queue.py
index 0a1160b2a4..6a1a52c726 100644
--- a/ambari-common/src/test/python/coilmq/queue.py
+++ b/ambari-common/src/test/python/coilmq/queue.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Queue manager, queue implementation, and supporting classes.
diff --git a/ambari-common/src/test/python/coilmq/scheduler.py b/ambari-common/src/test/python/coilmq/scheduler.py
index 1a9faf5f6c..2833064c1a 100644
--- a/ambari-common/src/test/python/coilmq/scheduler.py
+++ b/ambari-common/src/test/python/coilmq/scheduler.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Classes that provide delivery scheduler implementations.
diff --git a/ambari-common/src/test/python/coilmq/server/__init__.py b/ambari-common/src/test/python/coilmq/server/__init__.py
index 67fe35776b..5f5587c9ba 100644
--- a/ambari-common/src/test/python/coilmq/server/__init__.py
+++ b/ambari-common/src/test/python/coilmq/server/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Package of available server implementations and shared functionality/interfaces.
diff --git a/ambari-common/src/test/python/coilmq/server/socket_server.py b/ambari-common/src/test/python/coilmq/server/socket_server.py
index e062de4cc5..1e57d2025c 100644
--- a/ambari-common/src/test/python/coilmq/server/socket_server.py
+++ b/ambari-common/src/test/python/coilmq/server/socket_server.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
The default/recommended SocketServer-based server implementation.
"""
diff --git a/ambari-common/src/test/python/coilmq/start.py b/ambari-common/src/test/python/coilmq/start.py
index f894bab471..4dc4662926 100644
--- a/ambari-common/src/test/python/coilmq/start.py
+++ b/ambari-common/src/test/python/coilmq/start.py
@@ -1,4 +1,4 @@
-#!python
+#!/usr/bin/env python3
"""
Entrypoint for starting the application.
"""
diff --git a/ambari-common/src/test/python/coilmq/store/__init__.py b/ambari-common/src/test/python/coilmq/store/__init__.py
index e731960670..1fed7cf43b 100644
--- a/ambari-common/src/test/python/coilmq/store/__init__.py
+++ b/ambari-common/src/test/python/coilmq/store/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Storage containers for durable queues and (planned) durable topics.
"""
diff --git a/ambari-common/src/test/python/coilmq/store/dbm.py b/ambari-common/src/test/python/coilmq/store/dbm.py
index fea771bb17..01711b51b8 100644
--- a/ambari-common/src/test/python/coilmq/store/dbm.py
+++ b/ambari-common/src/test/python/coilmq/store/dbm.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Queue storage module that stores the queue information and frames in a DBM-style database.
diff --git a/ambari-common/src/test/python/coilmq/store/memory.py b/ambari-common/src/test/python/coilmq/store/memory.py
index 783967c0e0..4c4d9a31e0 100644
--- a/ambari-common/src/test/python/coilmq/store/memory.py
+++ b/ambari-common/src/test/python/coilmq/store/memory.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Queue storage module that uses thread-safe, in-memory data structures.
"""
diff --git a/ambari-common/src/test/python/coilmq/store/rds.py b/ambari-common/src/test/python/coilmq/store/rds.py
index 585619f538..7f2119126e 100644
--- a/ambari-common/src/test/python/coilmq/store/rds.py
+++ b/ambari-common/src/test/python/coilmq/store/rds.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
try:
import redis
except ImportError: # pragma: no cover
diff --git a/ambari-common/src/test/python/coilmq/store/sa/__init__.py b/ambari-common/src/test/python/coilmq/store/sa/__init__.py
index 77c6ce9c56..cdbb4e2e68 100644
--- a/ambari-common/src/test/python/coilmq/store/sa/__init__.py
+++ b/ambari-common/src/test/python/coilmq/store/sa/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Queue storage module that uses SQLAlchemy to access queue information and frames in a database.
diff --git a/ambari-common/src/test/python/coilmq/store/sa/meta.py b/ambari-common/src/test/python/coilmq/store/sa/meta.py
index bf47ca9471..f25e650531 100644
--- a/ambari-common/src/test/python/coilmq/store/sa/meta.py
+++ b/ambari-common/src/test/python/coilmq/store/sa/meta.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Module to hold shared SQLAlchemy state.
diff --git a/ambari-common/src/test/python/coilmq/store/sa/model.py b/ambari-common/src/test/python/coilmq/store/sa/model.py
index 43e5009d51..6493ae3505 100644
--- a/ambari-common/src/test/python/coilmq/store/sa/model.py
+++ b/ambari-common/src/test/python/coilmq/store/sa/model.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Definition of the datamodel required for SA storage backend.
"""
diff --git a/ambari-common/src/test/python/coilmq/topic.py b/ambari-common/src/test/python/coilmq/topic.py
index d6436be2dc..32b3bc8c5c 100644
--- a/ambari-common/src/test/python/coilmq/topic.py
+++ b/ambari-common/src/test/python/coilmq/topic.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Non-durable topic support functionality.
diff --git a/ambari-common/src/test/python/coilmq/util/__init__.py b/ambari-common/src/test/python/coilmq/util/__init__.py
index ae25f742b5..ab8427a2bd 100644
--- a/ambari-common/src/test/python/coilmq/util/__init__.py
+++ b/ambari-common/src/test/python/coilmq/util/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
CoilMQ utility modules.
"""
diff --git a/ambari-common/src/test/python/coilmq/util/concurrency.py b/ambari-common/src/test/python/coilmq/util/concurrency.py
index 0ad54c942d..96496ca5f5 100644
--- a/ambari-common/src/test/python/coilmq/util/concurrency.py
+++ b/ambari-common/src/test/python/coilmq/util/concurrency.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Tools to facilitate developing thread-safe components.
"""
diff --git a/ambari-common/src/test/python/coilmq/util/frames.py b/ambari-common/src/test/python/coilmq/util/frames.py
index a593409a90..3a3580e8b4 100644
--- a/ambari-common/src/test/python/coilmq/util/frames.py
+++ b/ambari-common/src/test/python/coilmq/util/frames.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
from functools import partial
import re
import logging
diff --git a/ambari-common/src/test/python/coilmq/util/six.py b/ambari-common/src/test/python/coilmq/util/six.py
index a0c6c9d772..b3907cff6e 100644
--- a/ambari-common/src/test/python/coilmq/util/six.py
+++ b/ambari-common/src/test/python/coilmq/util/six.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
import sys
PY3 = sys.version_info[0] == 3
diff --git a/ambari-common/src/test/python/mock/__init__.py b/ambari-common/src/test/python/mock/__init__.py
index 3c61c755b2..cd29cff7dd 100644
--- a/ambari-common/src/test/python/mock/__init__.py
+++ b/ambari-common/src/test/python/mock/__init__.py
@@ -1 +1,2 @@
+#!/usr/bin/env python3
__author__ = 'Michael Foord'
diff --git a/ambari-common/src/test/python/mock/docs/conf.py b/ambari-common/src/test/python/mock/docs/conf.py
index 51ca069900..f8d2208739 100644
--- a/ambari-common/src/test/python/mock/docs/conf.py
+++ b/ambari-common/src/test/python/mock/docs/conf.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Mock documentation build configuration file, created by
diff --git a/ambari-common/src/test/python/mock/extendmock.py b/ambari-common/src/test/python/mock/extendmock.py
index 0550d9fdda..f12ce4fae8 100644
--- a/ambari-common/src/test/python/mock/extendmock.py
+++ b/ambari-common/src/test/python/mock/extendmock.py
@@ -1 +1,2 @@
+#!/usr/bin/env python3
# merged into mock.py in Mock 0.7
diff --git a/ambari-common/src/test/python/mock/mock.py b/ambari-common/src/test/python/mock/mock.py
index 880c1cb033..211c80c0d4 100644
--- a/ambari-common/src/test/python/mock/mock.py
+++ b/ambari-common/src/test/python/mock/mock.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# mock.py
# Test tools for mocking and patching.
# Copyright (C) 2007-2012 Michael Foord & the mock team
diff --git a/ambari-common/src/test/python/mock/setup.py b/ambari-common/src/test/python/mock/setup.py
index 1f9ef7c03a..efa8558b0b 100644
--- a/ambari-common/src/test/python/mock/setup.py
+++ b/ambari-common/src/test/python/mock/setup.py
@@ -1,5 +1,4 @@
-#! /usr/bin/env python
-
+#!/usr/bin/env python3
# Copyright (C) 2007-2012 Michael Foord & the mock team
# E-mail: fuzzyman AT voidspace DOT org DOT uk
# http://www.voidspace.org.uk/python/mock/
diff --git a/ambari-common/src/test/python/mock/tests/__init__.py b/ambari-common/src/test/python/mock/tests/__init__.py
index 54ddf2ecc1..7b7aa4dc68 100644
--- a/ambari-common/src/test/python/mock/tests/__init__.py
+++ b/ambari-common/src/test/python/mock/tests/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# Copyright (C) 2007-2012 Michael Foord & the mock team
# E-mail: fuzzyman AT voidspace DOT org DOT uk
# http://www.voidspace.org.uk/python/mock/
diff --git a/ambari-common/src/test/python/mock/tests/_testwith.py b/ambari-common/src/test/python/mock/tests/_testwith.py
index 09949d98eb..4c14a781bf 100644
--- a/ambari-common/src/test/python/mock/tests/_testwith.py
+++ b/ambari-common/src/test/python/mock/tests/_testwith.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# Copyright (C) 2007-2012 Michael Foord & the mock team
# E-mail: fuzzyman AT voidspace DOT org DOT uk
# http://www.voidspace.org.uk/python/mock/
diff --git a/ambari-common/src/test/python/mock/tests/support.py b/ambari-common/src/test/python/mock/tests/support.py
index 173585e8a9..8c124def6e 100644
--- a/ambari-common/src/test/python/mock/tests/support.py
+++ b/ambari-common/src/test/python/mock/tests/support.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
import sys
info = sys.version_info
diff --git a/ambari-common/src/test/python/mock/tests/support_with.py b/ambari-common/src/test/python/mock/tests/support_with.py
index f787f81281..156d1a9eb7 100644
--- a/ambari-common/src/test/python/mock/tests/support_with.py
+++ b/ambari-common/src/test/python/mock/tests/support_with.py
@@ -1,5 +1,4 @@
-
-
+#!/usr/bin/env python3
import sys
__all__ = ['nested', 'catch_warnings', 'examine_warnings']
diff --git a/ambari-common/src/test/python/mock/tests/testcallable.py b/ambari-common/src/test/python/mock/tests/testcallable.py
index f7dcd5e1df..0c973381c2 100644
--- a/ambari-common/src/test/python/mock/tests/testcallable.py
+++ b/ambari-common/src/test/python/mock/tests/testcallable.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# Copyright (C) 2007-2012 Michael Foord & the mock team
# E-mail: fuzzyman AT voidspace DOT org DOT uk
# http://www.voidspace.org.uk/python/mock/
diff --git a/ambari-common/src/test/python/mock/tests/testhelpers.py b/ambari-common/src/test/python/mock/tests/testhelpers.py
index e788da8447..f570f2889d 100644
--- a/ambari-common/src/test/python/mock/tests/testhelpers.py
+++ b/ambari-common/src/test/python/mock/tests/testhelpers.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# Copyright (C) 2007-2012 Michael Foord & the mock team
# E-mail: fuzzyman AT voidspace DOT org DOT uk
# http://www.voidspace.org.uk/python/mock/
diff --git a/ambari-common/src/test/python/mock/tests/testmagicmethods.py b/ambari-common/src/test/python/mock/tests/testmagicmethods.py
index b8b143af61..09cb986f53 100644
--- a/ambari-common/src/test/python/mock/tests/testmagicmethods.py
+++ b/ambari-common/src/test/python/mock/tests/testmagicmethods.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# Copyright (C) 2007-2012 Michael Foord & the mock team
# E-mail: fuzzyman AT voidspace DOT org DOT uk
# http://www.voidspace.org.uk/python/mock/
diff --git a/ambari-common/src/test/python/mock/tests/testmock.py b/ambari-common/src/test/python/mock/tests/testmock.py
index c8f65207ad..b5a905a670 100644
--- a/ambari-common/src/test/python/mock/tests/testmock.py
+++ b/ambari-common/src/test/python/mock/tests/testmock.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# Copyright (C) 2007-2012 Michael Foord & the mock team
# E-mail: fuzzyman AT voidspace DOT org DOT uk
# http://www.voidspace.org.uk/python/mock/
diff --git a/ambari-common/src/test/python/mock/tests/testpatch.py b/ambari-common/src/test/python/mock/tests/testpatch.py
index a0b6878e4c..66752f3913 100644
--- a/ambari-common/src/test/python/mock/tests/testpatch.py
+++ b/ambari-common/src/test/python/mock/tests/testpatch.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# Copyright (C) 2007-2012 Michael Foord & the mock team
# E-mail: fuzzyman AT voidspace DOT org DOT uk
# http://www.voidspace.org.uk/python/mock/
diff --git a/ambari-common/src/test/python/mock/tests/testsentinel.py b/ambari-common/src/test/python/mock/tests/testsentinel.py
index 981171a450..03e0b9ae0b 100644
--- a/ambari-common/src/test/python/mock/tests/testsentinel.py
+++ b/ambari-common/src/test/python/mock/tests/testsentinel.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# Copyright (C) 2007-2012 Michael Foord & the mock team
# E-mail: fuzzyman AT voidspace DOT org DOT uk
# http://www.voidspace.org.uk/python/mock/
diff --git a/ambari-common/src/test/python/mock/tests/testwith.py b/ambari-common/src/test/python/mock/tests/testwith.py
index 34529eb9fc..31f3d6684a 100644
--- a/ambari-common/src/test/python/mock/tests/testwith.py
+++ b/ambari-common/src/test/python/mock/tests/testwith.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
import sys
if sys.version_info[:2] >= (2, 5):
diff --git a/ambari-common/src/test/python/only_for_platform.py b/ambari-common/src/test/python/only_for_platform.py
index cc2d13ea59..6f62c58741 100644
--- a/ambari-common/src/test/python/only_for_platform.py
+++ b/ambari-common/src/test/python/only_for_platform.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-funtest/src/test/resources/stacks/HDP/2.0.6.1/hooks/dummy-script.py b/ambari-funtest/src/test/resources/stacks/HDP/2.0.6.1/hooks/dummy-script.py
index 35de4bb1d7..ec4a97c676 100644
--- a/ambari-funtest/src/test/resources/stacks/HDP/2.0.6.1/hooks/dummy-script.py
+++ b/ambari-funtest/src/test/resources/stacks/HDP/2.0.6.1/hooks/dummy-script.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-funtest/src/test/resources/stacks/HDP/2.0.6/hooks/dummy-script.py b/ambari-funtest/src/test/resources/stacks/HDP/2.0.6/hooks/dummy-script.py
index 35de4bb1d7..ec4a97c676 100644
--- a/ambari-funtest/src/test/resources/stacks/HDP/2.0.6/hooks/dummy-script.py
+++ b/ambari-funtest/src/test/resources/stacks/HDP/2.0.6/hooks/dummy-script.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-funtest/src/test/resources/stacks/HDP/2.0.7/services/HBASE/package/dummy-script.py b/ambari-funtest/src/test/resources/stacks/HDP/2.0.7/services/HBASE/package/dummy-script.py
index 35de4bb1d7..ec4a97c676 100644
--- a/ambari-funtest/src/test/resources/stacks/HDP/2.0.7/services/HBASE/package/dummy-script.py
+++ b/ambari-funtest/src/test/resources/stacks/HDP/2.0.7/services/HBASE/package/dummy-script.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-funtest/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/dummy-script.py b/ambari-funtest/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/dummy-script.py
index 35de4bb1d7..ec4a97c676 100644
--- a/ambari-funtest/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/dummy-script.py
+++ b/ambari-funtest/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/dummy-script.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-funtest/src/test/resources/stacks/HDP/2.0.8/hooks/dummy-script.py b/ambari-funtest/src/test/resources/stacks/HDP/2.0.8/hooks/dummy-script.py
index 35de4bb1d7..ec4a97c676 100644
--- a/ambari-funtest/src/test/resources/stacks/HDP/2.0.8/hooks/dummy-script.py
+++ b/ambari-funtest/src/test/resources/stacks/HDP/2.0.8/hooks/dummy-script.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-funtest/src/test/resources/stacks/HDP/2.0.8/services/HDFS/package/dummy-script.py b/ambari-funtest/src/test/resources/stacks/HDP/2.0.8/services/HDFS/package/dummy-script.py
index 35de4bb1d7..ec4a97c676 100644
--- a/ambari-funtest/src/test/resources/stacks/HDP/2.0.8/services/HDFS/package/dummy-script.py
+++ b/ambari-funtest/src/test/resources/stacks/HDP/2.0.8/services/HDFS/package/dummy-script.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-funtest/src/test/resources/stacks/OTHER/1.0/services/HDFS/package/dummy-script.py b/ambari-funtest/src/test/resources/stacks/OTHER/1.0/services/HDFS/package/dummy-script.py
index 35de4bb1d7..ec4a97c676 100644
--- a/ambari-funtest/src/test/resources/stacks/OTHER/1.0/services/HDFS/package/dummy-script.py
+++ b/ambari-funtest/src/test/resources/stacks/OTHER/1.0/services/HDFS/package/dummy-script.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/conf/unix/ambari-env.sh b/ambari-server/conf/unix/ambari-env.sh
index cb226eef56..d080f46fc7 100644
--- a/ambari-server/conf/unix/ambari-env.sh
+++ b/ambari-server/conf/unix/ambari-env.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
# 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.
diff --git a/ambari-server/conf/unix/install-helper.sh b/ambari-server/conf/unix/install-helper.sh
index f3ac20a23a..22c01fb3e4 100644
--- a/ambari-server/conf/unix/install-helper.sh
+++ b/ambari-server/conf/unix/install-helper.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
# 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 rega4rding copyright ownership.
diff --git a/ambari-server/src/main/python/ambari-server-state/Configurator.py b/ambari-server/src/main/python/ambari-server-state/Configurator.py
index b7c155ebb3..1f40f7764c 100644
--- a/ambari-server/src/main/python/ambari-server-state/Configurator.py
+++ b/ambari-server/src/main/python/ambari-server-state/Configurator.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
from Entities import *
from os.path import exists
import xml.dom.minidom
diff --git a/ambari-server/src/main/python/ambari-server-state/Entities.py b/ambari-server/src/main/python/ambari-server-state/Entities.py
index b9f61c3175..ffb320910c 100644
--- a/ambari-server/src/main/python/ambari-server-state/Entities.py
+++ b/ambari-server/src/main/python/ambari-server-state/Entities.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# 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
diff --git a/ambari-server/src/main/python/ambari-server-state/Main.py b/ambari-server/src/main/python/ambari-server-state/Main.py
index 8bc1146944..d4d529b9c7 100644
--- a/ambari-server/src/main/python/ambari-server-state/Main.py
+++ b/ambari-server/src/main/python/ambari-server-state/Main.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
from Configurator import *
diff --git a/ambari-server/src/main/python/ambari-server.py b/ambari-server/src/main/python/ambari-server.py
index 87b12204a6..6009725b0c 100755
--- a/ambari-server/src/main/python/ambari-server.py
+++ b/ambari-server/src/main/python/ambari-server.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/python/ambari_server/BackupRestore.py b/ambari-server/src/main/python/ambari_server/BackupRestore.py
index 0ae59eca7d..c194f6555a 100644
--- a/ambari-server/src/main/python/ambari_server/BackupRestore.py
+++ b/ambari-server/src/main/python/ambari_server/BackupRestore.py
@@ -1,5 +1,4 @@
#!/usr/bin/env ambari-python-wrap
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/python/ambari_server/ambariPath.py b/ambari-server/src/main/python/ambari_server/ambariPath.py
index 20f460397e..3265723f3b 100644
--- a/ambari-server/src/main/python/ambari_server/ambariPath.py
+++ b/ambari-server/src/main/python/ambari_server/ambariPath.py
@@ -36,6 +36,4 @@ class AmbariPath():
Not ambari paths like /var/run/postgresql SHOULD NOT wrapped by this call though.
"""
#return os.path.realpath(AmbariPath.root_directory + os.sep + path) # realpath won't replace slashes for python2.6
- return re.sub('/+', '/', AmbariPath.root_directory + os.sep + path)
-
-
\ No newline at end of file
+ return re.sub('/+', '/', AmbariPath.root_directory + os.sep + path)
\ No newline at end of file
diff --git a/ambari-server/src/main/python/ambari_server/serverUtils.py b/ambari-server/src/main/python/ambari_server/serverUtils.py
index bd3a603406..d48422eb84 100644
--- a/ambari-server/src/main/python/ambari_server/serverUtils.py
+++ b/ambari-server/src/main/python/ambari_server/serverUtils.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/python/ambari_server/setupMpacks.py b/ambari-server/src/main/python/ambari_server/setupMpacks.py
index 934aac589e..4319f84b8a 100755
--- a/ambari-server/src/main/python/ambari_server/setupMpacks.py
+++ b/ambari-server/src/main/python/ambari_server/setupMpacks.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/python/ambari_server/setupSecurity.py b/ambari-server/src/main/python/ambari_server/setupSecurity.py
index 514ac92d6e..370f04272e 100644
--- a/ambari-server/src/main/python/ambari_server/setupSecurity.py
+++ b/ambari-server/src/main/python/ambari_server/setupSecurity.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/python/ambari_server/setupTrustedProxy.py b/ambari-server/src/main/python/ambari_server/setupTrustedProxy.py
index d9fc268e7f..4b259348c0 100644
--- a/ambari-server/src/main/python/ambari_server/setupTrustedProxy.py
+++ b/ambari-server/src/main/python/ambari_server/setupTrustedProxy.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/python/ambari_server/userInput.py b/ambari-server/src/main/python/ambari_server/userInput.py
index 69182bf962..32125bf60a 100644
--- a/ambari-server/src/main/python/ambari_server/userInput.py
+++ b/ambari-server/src/main/python/ambari_server/userInput.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/python/azuredb_create_generator.py b/ambari-server/src/main/python/azuredb_create_generator.py
index 4dc2be009f..fddc77506e 100755
--- a/ambari-server/src/main/python/azuredb_create_generator.py
+++ b/ambari-server/src/main/python/azuredb_create_generator.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/python/bootstrap.py b/ambari-server/src/main/python/bootstrap.py
index 9136f7ce25..7b3e36bd78 100755
--- a/ambari-server/src/main/python/bootstrap.py
+++ b/ambari-server/src/main/python/bootstrap.py
@@ -1,5 +1,4 @@
#!/usr/bin/env ambari-python-wrap
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/python/os_check_type.py b/ambari-server/src/main/python/os_check_type.py
index 1e74687b01..ce359adbed 100644
--- a/ambari-server/src/main/python/os_check_type.py
+++ b/ambari-server/src/main/python/os_check_type.py
@@ -1,5 +1,4 @@
-#!/usr/bin/ambari-python-wrap
-
+#!/usr/bin/env ambari-python-wrap
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/python/setupAgent.py b/ambari-server/src/main/python/setupAgent.py
index 3ee26050eb..ebc4a2e9c7 100755
--- a/ambari-server/src/main/python/setupAgent.py
+++ b/ambari-server/src/main/python/setupAgent.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/collection.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/collection.py
index d643f54b51..07b0a53477 100755
--- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/collection.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/collection.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/command_commons.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/command_commons.py
index fcb343918a..235a10c7d7 100755
--- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/command_commons.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/command_commons.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/infra_solr.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/infra_solr.py
index 2fd43216b0..a4a190b766 100755
--- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/infra_solr.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/infra_solr.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/infra_solr_client.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/infra_solr_client.py
index 2ff997fad1..331c5f6cff 100755
--- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/infra_solr_client.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/infra_solr_client.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/migrate.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/migrate.py
index 832587afd5..f488f27e7e 100755
--- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/migrate.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/migrate.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/params.py
index 6bb6c1ce90..3cbc6a21c4 100755
--- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/params.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/service_check.py
index f98379c340..b7f7d3f318 100755
--- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/service_check.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/setup_infra_solr.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/setup_infra_solr.py
index 2937d2a58d..249275f9bd 100755
--- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/setup_infra_solr.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/setup_infra_solr.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/status_params.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/status_params.py
index 309cf55154..b3997e52d9 100755
--- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/status_params.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/3.0.0/package/scripts/status_params.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/package/scripts/ams_service.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/package/scripts/ams_service.py
index 875211f031..8f16982571 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/package/scripts/ams_service.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/package/scripts/ams_service.py
@@ -1,4 +1,4 @@
-# !/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/package/scripts/split_points.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/package/scripts/split_points.py
index 906fed07a4..ea539d14ef 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/package/scripts/split_points.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/package/scripts/split_points.py
@@ -1,4 +1,4 @@
-# !/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/package/scripts/status.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/package/scripts/status.py
index 0b24ac0314..ce7dc9b3d6 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/package/scripts/status.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/package/scripts/status.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/service_advisor.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/service_advisor.py
index b64d5f0fd8..bcc20fb8a1 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/service_advisor.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/3.0.0/service_advisor.py
@@ -766,4 +766,4 @@ class AMBARI_METRICSValidator(service_advisor.ServiceAdvisor):
grafana_pwd_length_item = self.getErrorItem("Grafana password length should be at least 4.")
pass
validationItems.extend([{"config-name":'metrics_grafana_password', "item": grafana_pwd_length_item }])
- return self.toConfigurationValidationProblems(validationItems, "ams-site")
\ No newline at end of file
+ return self.toConfigurationValidationProblems(validationItems, "ams-site")
diff --git a/ambari-server/src/main/resources/scripts/stack_advisor.py b/ambari-server/src/main/resources/scripts/stack_advisor.py
index 03896fc225..edfddae0d6 100755
--- a/ambari-server/src/main/resources/scripts/stack_advisor.py
+++ b/ambari-server/src/main/resources/scripts/stack_advisor.py
@@ -1,5 +1,4 @@
#!/usr/bin/env ambari-python-wrap
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/hook.py b/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/hook.py
index 39546b1f7a..0597bc3dbf 100644
--- a/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/hook.py
+++ b/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/hook.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/params.py b/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/params.py
index 6f93a694b7..91214248a5 100644
--- a/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/params.py
+++ b/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/params.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/shared_initialization.py b/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/shared_initialization.py
index 6605d2d349..e6a79f512b 100644
--- a/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/shared_initialization.py
+++ b/ambari-server/src/main/resources/stack-hooks/after-INSTALL/scripts/shared_initialization.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/hook.py b/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/hook.py
index e9f4b1d08b..4fbd12205b 100644
--- a/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/hook.py
+++ b/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/hook.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/params.py b/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/params.py
index 41751383ec..03a82594ec 100644
--- a/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/params.py
+++ b/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/params.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/shared_initialization.py b/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/shared_initialization.py
index 0f800a68f3..fc9966fc18 100644
--- a/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/shared_initialization.py
+++ b/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/shared_initialization.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/hook.py b/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/hook.py
index c4709657f7..ea3761e435 100644
--- a/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/hook.py
+++ b/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/hook.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/params.py b/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/params.py
index 15b51d11c9..ff76483e99 100644
--- a/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/params.py
+++ b/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/params.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/repo_initialization.py b/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/repo_initialization.py
index f6f2a1255c..35396865e1 100644
--- a/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/repo_initialization.py
+++ b/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/repo_initialization.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/shared_initialization.py b/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/shared_initialization.py
index 6de7300d13..e0dc473654 100644
--- a/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/shared_initialization.py
+++ b/ambari-server/src/main/resources/stack-hooks/before-INSTALL/scripts/shared_initialization.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stack-hooks/before-RESTART/scripts/hook.py b/ambari-server/src/main/resources/stack-hooks/before-RESTART/scripts/hook.py
index f7f4f1c975..4a0b1e3fb4 100644
--- a/ambari-server/src/main/resources/stack-hooks/before-RESTART/scripts/hook.py
+++ b/ambari-server/src/main/resources/stack-hooks/before-RESTART/scripts/hook.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stack-hooks/before-SET_KEYTAB/scripts/hook.py b/ambari-server/src/main/resources/stack-hooks/before-SET_KEYTAB/scripts/hook.py
index 289475bf5c..bcc038cc98 100644
--- a/ambari-server/src/main/resources/stack-hooks/before-SET_KEYTAB/scripts/hook.py
+++ b/ambari-server/src/main/resources/stack-hooks/before-SET_KEYTAB/scripts/hook.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stack-hooks/before-START/scripts/custom_extensions.py b/ambari-server/src/main/resources/stack-hooks/before-START/scripts/custom_extensions.py
index b01b4de60f..ee1b6db6de 100644
--- a/ambari-server/src/main/resources/stack-hooks/before-START/scripts/custom_extensions.py
+++ b/ambari-server/src/main/resources/stack-hooks/before-START/scripts/custom_extensions.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stack-hooks/before-START/scripts/hook.py b/ambari-server/src/main/resources/stack-hooks/before-START/scripts/hook.py
index 2f68cb14fb..7d0fdd3f70 100644
--- a/ambari-server/src/main/resources/stack-hooks/before-START/scripts/hook.py
+++ b/ambari-server/src/main/resources/stack-hooks/before-START/scripts/hook.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stack-hooks/before-START/scripts/params.py b/ambari-server/src/main/resources/stack-hooks/before-START/scripts/params.py
index 99781d124c..f7402827ef 100644
--- a/ambari-server/src/main/resources/stack-hooks/before-START/scripts/params.py
+++ b/ambari-server/src/main/resources/stack-hooks/before-START/scripts/params.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stack-hooks/before-START/scripts/shared_initialization.py b/ambari-server/src/main/resources/stack-hooks/before-START/scripts/shared_initialization.py
index efceede77e..69c2de7644 100644
--- a/ambari-server/src/main/resources/stack-hooks/before-START/scripts/shared_initialization.py
+++ b/ambari-server/src/main/resources/stack-hooks/before-START/scripts/shared_initialization.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/flink_client.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/flink_client.py
index 83316bcac8..3e79fe85fe 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/flink_client.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/flink_client.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/flink_history_server.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/flink_history_server.py
index 0851464f9e..825e9a27d1 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/flink_history_server.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/flink_history_server.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/flink_service.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/flink_service.py
index 8d615c4232..d7d1819136 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/flink_service.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/flink_service.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/setup_flink.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/setup_flink.py
index 2a6d666ea4..d33a1aab1f 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/setup_flink.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/FLINK/package/scripts/setup_flink.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/package/scripts/upgrade.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/package/scripts/upgrade.py
index b08beadf25..7d04e3f106 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/package/scripts/upgrade.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HBASE/package/scripts/upgrade.py
@@ -1,4 +1,3 @@
-
#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/alerts/alert_datanode_unmounted_data_dir.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/alerts/alert_datanode_unmounted_data_dir.py
index 422751678a..b96acf4e86 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/alerts/alert_datanode_unmounted_data_dir.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/alerts/alert_datanode_unmounted_data_dir.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/__init__.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/__init__.py
index 35de4bb1d7..ec4a97c676 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/__init__.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/balancer-emulator/hdfs-command.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/balancer-emulator/hdfs-command.py
index 92bde08d63..b39080d79a 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/balancer-emulator/hdfs-command.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/balancer-emulator/hdfs-command.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/datanode.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/datanode.py
index c0abb15d72..b64cbcc503 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/datanode.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/datanode.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/datanode_upgrade.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/datanode_upgrade.py
index c1b02961e5..1a529d28e5 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/datanode_upgrade.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/datanode_upgrade.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs.py
index 8b59f4f7d5..31664c9744 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_client.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_client.py
index f2e96c3e63..a5cb26f416 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_client.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_client.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_datanode.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_datanode.py
index 56aa3c16be..bfc796f720 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_datanode.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_datanode.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_namenode.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_namenode.py
index 5df7afc665..26944fd3cd 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_namenode.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_namenode.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_nfsgateway.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_nfsgateway.py
index 9944e24bab..0a047dd939 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_nfsgateway.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_nfsgateway.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_snamenode.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_snamenode.py
index 1a0fa23c7c..e959a95f67 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_snamenode.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/hdfs_snamenode.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/install_params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/install_params.py
index c2bf847c1c..b3069f4eb6 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/install_params.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/install_params.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/journalnode.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/journalnode.py
index 1adba1c152..4e53d82998 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/journalnode.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/journalnode.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/journalnode_upgrade.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/journalnode_upgrade.py
index bb903933b9..fd625dd716 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/journalnode_upgrade.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/journalnode_upgrade.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/namenode.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/namenode.py
index d25c2e4677..3e31518808 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/namenode.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/namenode.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/namenode_ha_state.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/namenode_ha_state.py
index 5199b29824..a93075c5e2 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/namenode_ha_state.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/namenode_ha_state.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/namenode_upgrade.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/namenode_upgrade.py
index 1bd5b7adb0..251394ee87 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/namenode_upgrade.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/namenode_upgrade.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/nfsgateway.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/nfsgateway.py
index f16e260fe7..938820ef13 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/nfsgateway.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/nfsgateway.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params.py
index 838510c2a6..718955c471 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params_linux.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params_linux.py
index 45eb8a3d7e..d4618067f7 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params_linux.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params_windows.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params_windows.py
index fe5d3d47fe..1e7a646b94 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params_windows.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/params_windows.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/service_check.py
index 67e005fcc8..7173ff54f7 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/service_check.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/snamenode.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/snamenode.py
index 3d387b4bad..10423620e0 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/snamenode.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/snamenode.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/status_params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/status_params.py
index ef18659d6b..634b7f46eb 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/status_params.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/status_params.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/utils.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/utils.py
index 5be4199e71..5ce8598bf5 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/utils.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/utils.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/zkfc_slave.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/zkfc_slave.py
index 6d0921d9a4..3042405e18 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/zkfc_slave.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HDFS/package/scripts/zkfc_slave.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/alerts/alert_hive_interactive_thrift_port.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/alerts/alert_hive_interactive_thrift_port.py
index 72ce0359dc..de03c4f4d5 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/alerts/alert_hive_interactive_thrift_port.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/alerts/alert_hive_interactive_thrift_port.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/hive_server_upgrade.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/hive_server_upgrade.py
index 3ddd0379e3..aafbe23a4c 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/hive_server_upgrade.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/hive_server_upgrade.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/mysql_utils.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/mysql_utils.py
index 6db85b8afd..3828dac9ff 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/mysql_utils.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/mysql_utils.py
@@ -38,5 +38,4 @@ def mysql_configure():
)
# this also will start mysql-server
- mysql_users.mysql_adduser()
-
\ No newline at end of file
+ mysql_users.mysql_adduser()
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/webhcat.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/webhcat.py
index 78146e3802..138e91964e 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/webhcat.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/webhcat.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/webhcat_server.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/webhcat_server.py
index 50323123ec..1d2939cb25 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/webhcat_server.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/webhcat_server.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/webhcat_service.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/webhcat_service.py
index d933a6c10b..2874b7c1d3 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/webhcat_service.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/webhcat_service.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/package/scripts/kafka_broker.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/package/scripts/kafka_broker.py
index 74cd303db4..ba0442e288 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/package/scripts/kafka_broker.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/package/scripts/kafka_broker.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/kerberos_client.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/kerberos_client.py
index ef0f5d89a9..a4e91d5d46 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/kerberos_client.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/kerberos_client.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/params.py
index a65adf07cd..9a99725e39 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/params.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/service_check.py
index 4c3a068ec9..05be1f4391 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/service_check.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/status_params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/status_params.py
index cfec53d1a8..9e1c275bbe 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/status_params.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KERBEROS/package/scripts/status_params.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/alerts/alert_ranger_admin_passwd_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/alerts/alert_ranger_admin_passwd_check.py
index fd6230e2d4..e5c2fb6451 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/alerts/alert_ranger_admin_passwd_check.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/alerts/alert_ranger_admin_passwd_check.py
@@ -1,5 +1,4 @@
-#!/usr/bin/env python
-
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/service_advisor.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/service_advisor.py
index 365b22b10e..eccd644458 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/service_advisor.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/service_advisor.py
@@ -841,4 +841,4 @@ class RangerValidator(service_advisor.ServiceAdvisor):
if not bool(re.search(r'^(?=.*[0-9])(?=.*[a-zA-Z]).{8,}$', password)) or bool(re.search('[\\\`"\']', password)):
validationItems.append({"config-name": password_property, "item": self.getNotApplicableItem("Password should be minimum 8 characters with minimum one alphabet and one numeric. Unsupported special characters are \" ' \ `")})
- return self.toConfigurationValidationProblems(validationItems, "ranger-env")
\ No newline at end of file
+ return self.toConfigurationValidationProblems(validationItems, "ranger-env")
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/params.py
index 0396bf1cc7..5ecd1c0259 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/params.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/service_check.py
index 5562dcc410..f47fce0886 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/service_check.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/setup_solr.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/setup_solr.py
index 5ba810d91a..cebb233bff 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/setup_solr.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/setup_solr.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/solr.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/solr.py
index d0eef6aa4b..6744fe964f 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/solr.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SOLR/package/scripts/solr.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/alerts/alert_spark_thrift_port.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/alerts/alert_spark_thrift_port.py
index 97cb1c8e20..0a50d0c28a 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/alerts/alert_spark_thrift_port.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/alerts/alert_spark_thrift_port.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/job_history_server.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/job_history_server.py
index bf181495cc..5873f556f7 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/job_history_server.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/job_history_server.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/params.py
index 745716cf51..a37cb11fb4 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/params.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/service_check.py
index d6fd3c4862..74c72252d0 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/service_check.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/setup_spark.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/setup_spark.py
index 2724f18c9a..a48c2da8c2 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/setup_spark.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/setup_spark.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/spark_client.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/spark_client.py
index 6cf1abe6d6..d53e465a93 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/spark_client.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/spark_client.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/spark_thrift_server.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/spark_thrift_server.py
index f9468c439c..a2760caa56 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/spark_thrift_server.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/spark_thrift_server.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/params_windows.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/params_windows.py
index f00c6a0828..f77f174117 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/params_windows.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/params_windows.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/pre_upgrade.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/pre_upgrade.py
index d182efeed2..bc8d2cd3b3 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/pre_upgrade.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/pre_upgrade.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/service_check.py
index 1490392a90..234037a66d 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/service_check.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/tez.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/tez.py
index 0e1d2ecdd1..de11c3516a 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/tez.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/tez.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/tez_client.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/tez_client.py
index e91ad261e0..4cd2655fc0 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/tez_client.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TEZ/package/scripts/tez_client.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/alerts/alert_nodemanagers_summary.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/alerts/alert_nodemanagers_summary.py
index b009de6426..88c79511c8 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/alerts/alert_nodemanagers_summary.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/alerts/alert_nodemanagers_summary.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/__init__.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/__init__.py
index 35de4bb1d7..ec4a97c676 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/__init__.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/application_timeline_server.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/application_timeline_server.py
index 2aec6baa14..a7816d221d 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/application_timeline_server.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/application_timeline_server.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/historyserver.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/historyserver.py
index e703682f7c..9846b95954 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/historyserver.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/historyserver.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/mapred_service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/mapred_service_check.py
index d91d60a2dd..517c3033f7 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/mapred_service_check.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/mapred_service_check.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/mapreduce2_client.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/mapreduce2_client.py
index 234e93174e..bbb2e4a61b 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/mapreduce2_client.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/mapreduce2_client.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/nodemanager.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/nodemanager.py
index 280fc2fe8e..81ae53dccf 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/nodemanager.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/nodemanager.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/nodemanager_upgrade.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/nodemanager_upgrade.py
index 22cd8cc7f4..7e90aeeaa4 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/nodemanager_upgrade.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/nodemanager_upgrade.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/params_linux.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/params_linux.py
index c486df5257..bd9eda5466 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/params_linux.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/params_windows.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/params_windows.py
index 549872c760..0d5a044545 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/params_windows.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/params_windows.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/resourcemanager.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/resourcemanager.py
index 99ad69f269..f315c5279a 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/resourcemanager.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/resourcemanager.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/service.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/service.py
index 99f78c0c48..537906177f 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/service.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/service.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/service_check.py
index f9092ce3f2..617336e2bf 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/service_check.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/yarn.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/yarn.py
index 8e20be898c..db0d75003a 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/yarn.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/yarn.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/yarn_client.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/yarn_client.py
index b6a89b4a37..c9d7440be5 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/yarn_client.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/package/scripts/yarn_client.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/package/scripts/alerts/alert_check_zeppelin.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/package/scripts/alerts/alert_check_zeppelin.py
index caa80e540f..79d24436aa 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/package/scripts/alerts/alert_check_zeppelin.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/package/scripts/alerts/alert_check_zeppelin.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/package/scripts/service_check.py
index d796ae9609..714050d0ff 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/package/scripts/service_check.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/package/scripts/status_params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/package/scripts/status_params.py
index 35360c6f9e..1a5803a930 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/package/scripts/status_params.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZEPPELIN/package/scripts/status_params.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/__init__.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/__init__.py
index b0b988b18b..6b1f9423de 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/__init__.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/params.py
index fbefec907f..a0a61e062c 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/params.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/params_linux.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/params_linux.py
index 2005ff810d..d931d8a124 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/params_linux.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/params_windows.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/params_windows.py
index 87d82c2073..031605f58b 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/params_windows.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/params_windows.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/service_check.py
index 7ddcfb1997..e2d85edd1f 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/service_check.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper.py
index d936263e8c..bd611f1f1b 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper_client.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper_client.py
index 3086e26e47..5703d6d272 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper_client.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper_client.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper_server.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper_server.py
index f0e4ab919a..a4e0d71625 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper_server.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper_server.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper_service.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper_service.py
index 441483f3bf..1a5934bcbf 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper_service.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/ZOOKEEPER/package/scripts/zookeeper_service.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestAmbariConfiguration.py b/ambari-server/src/test/python/TestAmbariConfiguration.py
index 5125e29eef..2c969fed81 100644
--- a/ambari-server/src/test/python/TestAmbariConfiguration.py
+++ b/ambari-server/src/test/python/TestAmbariConfiguration.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestAmbariServer.py b/ambari-server/src/test/python/TestAmbariServer.py
index 168bb0ff0e..c863b211b3 100644
--- a/ambari-server/src/test/python/TestAmbariServer.py
+++ b/ambari-server/src/test/python/TestAmbariServer.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestBackupRestore.py b/ambari-server/src/test/python/TestBackupRestore.py
index ab37ca1b6c..64be6ed48b 100644
--- a/ambari-server/src/test/python/TestBackupRestore.py
+++ b/ambari-server/src/test/python/TestBackupRestore.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestBootstrap.py b/ambari-server/src/test/python/TestBootstrap.py
index 5771ee28e4..494ac72e4e 100644
--- a/ambari-server/src/test/python/TestBootstrap.py
+++ b/ambari-server/src/test/python/TestBootstrap.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestClusterBlueprint.py b/ambari-server/src/test/python/TestClusterBlueprint.py
index 86f429061a..46460b3fe3 100644
--- a/ambari-server/src/test/python/TestClusterBlueprint.py
+++ b/ambari-server/src/test/python/TestClusterBlueprint.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestComponentVersionMapping.py b/ambari-server/src/test/python/TestComponentVersionMapping.py
index 76fd8ed80d..2721f6000e 100644
--- a/ambari-server/src/test/python/TestComponentVersionMapping.py
+++ b/ambari-server/src/test/python/TestComponentVersionMapping.py
@@ -1,5 +1,4 @@
-# !/usr/bin/env python
-
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestConfigs.py b/ambari-server/src/test/python/TestConfigs.py
index fd31890113..0b2c1cb619 100644
--- a/ambari-server/src/test/python/TestConfigs.py
+++ b/ambari-server/src/test/python/TestConfigs.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestExecutionCommand.py b/ambari-server/src/test/python/TestExecutionCommand.py
index bd3fef4c98..6d4307ed47 100644
--- a/ambari-server/src/test/python/TestExecutionCommand.py
+++ b/ambari-server/src/test/python/TestExecutionCommand.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestGlobalLock.py b/ambari-server/src/test/python/TestGlobalLock.py
index 3851de60a6..4c904e23ab 100644
--- a/ambari-server/src/test/python/TestGlobalLock.py
+++ b/ambari-server/src/test/python/TestGlobalLock.py
@@ -1,5 +1,4 @@
-# !/usr/bin/env python
-
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestMpacks.py b/ambari-server/src/test/python/TestMpacks.py
index ceb27e9967..3136399528 100644
--- a/ambari-server/src/test/python/TestMpacks.py
+++ b/ambari-server/src/test/python/TestMpacks.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestOSCheck.py b/ambari-server/src/test/python/TestOSCheck.py
index c2327809b8..e4a6490a36 100644
--- a/ambari-server/src/test/python/TestOSCheck.py
+++ b/ambari-server/src/test/python/TestOSCheck.py
@@ -1,5 +1,4 @@
-# !/usr/bin/env python
-
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestResourceFilesKeeper.py b/ambari-server/src/test/python/TestResourceFilesKeeper.py
index 6a66bbdd34..1633c7782d 100644
--- a/ambari-server/src/test/python/TestResourceFilesKeeper.py
+++ b/ambari-server/src/test/python/TestResourceFilesKeeper.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestSensitiveDataEncryption.py b/ambari-server/src/test/python/TestSensitiveDataEncryption.py
index 194178c77a..64699341d3 100644
--- a/ambari-server/src/test/python/TestSensitiveDataEncryption.py
+++ b/ambari-server/src/test/python/TestSensitiveDataEncryption.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestServerClassPath.py b/ambari-server/src/test/python/TestServerClassPath.py
index 90dab2d00a..907b8098d3 100644
--- a/ambari-server/src/test/python/TestServerClassPath.py
+++ b/ambari-server/src/test/python/TestServerClassPath.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestServerUpgrade.py b/ambari-server/src/test/python/TestServerUpgrade.py
index c41bd362a8..e89156e254 100644
--- a/ambari-server/src/test/python/TestServerUpgrade.py
+++ b/ambari-server/src/test/python/TestServerUpgrade.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestServerUtils.py b/ambari-server/src/test/python/TestServerUtils.py
index 59c2841f73..9c1fa4ea48 100644
--- a/ambari-server/src/test/python/TestServerUtils.py
+++ b/ambari-server/src/test/python/TestServerUtils.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestServiceAdvisor.py b/ambari-server/src/test/python/TestServiceAdvisor.py
index 6318f0a575..a42919dd7a 100644
--- a/ambari-server/src/test/python/TestServiceAdvisor.py
+++ b/ambari-server/src/test/python/TestServiceAdvisor.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestSetupAgent.py b/ambari-server/src/test/python/TestSetupAgent.py
index 0b33e9faa8..06e87e8e90 100644
--- a/ambari-server/src/test/python/TestSetupAgent.py
+++ b/ambari-server/src/test/python/TestSetupAgent.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestSetupSso.py b/ambari-server/src/test/python/TestSetupSso.py
index a1b05448b2..872a80da64 100644
--- a/ambari-server/src/test/python/TestSetupSso.py
+++ b/ambari-server/src/test/python/TestSetupSso.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestSetupTrustedProxy.py b/ambari-server/src/test/python/TestSetupTrustedProxy.py
index cfdfa71653..949719ef9a 100644
--- a/ambari-server/src/test/python/TestSetupTrustedProxy.py
+++ b/ambari-server/src/test/python/TestSetupTrustedProxy.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestStackAdvisor.py b/ambari-server/src/test/python/TestStackAdvisor.py
index ea0f85d31d..a6af1cb24f 100644
--- a/ambari-server/src/test/python/TestStackAdvisor.py
+++ b/ambari-server/src/test/python/TestStackAdvisor.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestStackFeature.py b/ambari-server/src/test/python/TestStackFeature.py
index 8e584b1109..d6d3a87e76 100644
--- a/ambari-server/src/test/python/TestStackFeature.py
+++ b/ambari-server/src/test/python/TestStackFeature.py
@@ -1,5 +1,4 @@
-# !/usr/bin/env python
-
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestStackSelect.py b/ambari-server/src/test/python/TestStackSelect.py
index 462d3a04d5..01b7e8a361 100644
--- a/ambari-server/src/test/python/TestStackSelect.py
+++ b/ambari-server/src/test/python/TestStackSelect.py
@@ -1,5 +1,4 @@
-# !/usr/bin/env python
-
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestUpgradeSummary.py b/ambari-server/src/test/python/TestUpgradeSummary.py
index e2bc2c5286..673faf74b7 100644
--- a/ambari-server/src/test/python/TestUpgradeSummary.py
+++ b/ambari-server/src/test/python/TestUpgradeSummary.py
@@ -1,5 +1,4 @@
-# !/usr/bin/env python
-
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestUtils.py b/ambari-server/src/test/python/TestUtils.py
index f1eabf8c01..98ebe39c70 100644
--- a/ambari-server/src/test/python/TestUtils.py
+++ b/ambari-server/src/test/python/TestUtils.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestValidateConfigs.py b/ambari-server/src/test/python/TestValidateConfigs.py
index f26f22927a..f2e8141038 100644
--- a/ambari-server/src/test/python/TestValidateConfigs.py
+++ b/ambari-server/src/test/python/TestValidateConfigs.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestVersion.py b/ambari-server/src/test/python/TestVersion.py
index c42ea4a5fb..3ae85146ab 100644
--- a/ambari-server/src/test/python/TestVersion.py
+++ b/ambari-server/src/test/python/TestVersion.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/TestVersionSelectUtil.py b/ambari-server/src/test/python/TestVersionSelectUtil.py
index ed7549f055..e3489af5ac 100644
--- a/ambari-server/src/test/python/TestVersionSelectUtil.py
+++ b/ambari-server/src/test/python/TestVersionSelectUtil.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/custom_actions/TestCheckHost.py b/ambari-server/src/test/python/custom_actions/TestCheckHost.py
index c01183ba06..044c7febfc 100644
--- a/ambari-server/src/test/python/custom_actions/TestCheckHost.py
+++ b/ambari-server/src/test/python/custom_actions/TestCheckHost.py
@@ -1,5 +1,4 @@
-# !/usr/bin/env python
-
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/custom_actions/TestInstallPackages.py b/ambari-server/src/test/python/custom_actions/TestInstallPackages.py
index cebf1e8036..b3981260a2 100644
--- a/ambari-server/src/test/python/custom_actions/TestInstallPackages.py
+++ b/ambari-server/src/test/python/custom_actions/TestInstallPackages.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/custom_actions/TestRemoveBits.py b/ambari-server/src/test/python/custom_actions/TestRemoveBits.py
index 9f375d4afb..66b1e2bf51 100644
--- a/ambari-server/src/test/python/custom_actions/TestRemoveBits.py
+++ b/ambari-server/src/test/python/custom_actions/TestRemoveBits.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/custom_actions/TestRemoveStackVersion.py b/ambari-server/src/test/python/custom_actions/TestRemoveStackVersion.py
index 4f0076c7e5..30e5fdb29d 100644
--- a/ambari-server/src/test/python/custom_actions/TestRemoveStackVersion.py
+++ b/ambari-server/src/test/python/custom_actions/TestRemoveStackVersion.py
@@ -1,5 +1,4 @@
-# !/usr/bin/env python
-
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py b/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py
index f77a95b992..730083c08c 100644
--- a/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py
+++ b/ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py
@@ -1,5 +1,4 @@
-# !/usr/bin/env python
-
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/custom_actions/test_stack_select_set_all.py b/ambari-server/src/test/python/custom_actions/test_stack_select_set_all.py
index 591c6d5bb4..53fc392d53 100644
--- a/ambari-server/src/test/python/custom_actions/test_stack_select_set_all.py
+++ b/ambari-server/src/test/python/custom_actions/test_stack_select_set_all.py
@@ -1,5 +1,4 @@
-# !/usr/bin/env python
-
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/host_scripts/TestAlertUlimit.py b/ambari-server/src/test/python/host_scripts/TestAlertUlimit.py
index a6785bdcc4..cc4cafad4b 100644
--- a/ambari-server/src/test/python/host_scripts/TestAlertUlimit.py
+++ b/ambari-server/src/test/python/host_scripts/TestAlertUlimit.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.0/hooks/after_install.py b/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.0/hooks/after_install.py
index 280aaf81b7..f98787116d 100644
--- a/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.0/hooks/after_install.py
+++ b/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.0/hooks/after_install.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.0/hooks/before_install.py b/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.0/hooks/before_install.py
index 280aaf81b7..f98787116d 100644
--- a/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.0/hooks/before_install.py
+++ b/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.0/hooks/before_install.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/after_install.py b/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/after_install.py
index 280aaf81b7..f98787116d 100644
--- a/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/after_install.py
+++ b/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/after_install.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/after_upgrade.py b/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/after_upgrade.py
index 280aaf81b7..f98787116d 100644
--- a/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/after_upgrade.py
+++ b/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/after_upgrade.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/before_install.py b/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/before_install.py
index 280aaf81b7..f98787116d 100644
--- a/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/before_install.py
+++ b/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/before_install.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/before_upgrade.py b/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/before_upgrade.py
index 280aaf81b7..f98787116d 100644
--- a/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/before_upgrade.py
+++ b/ambari-server/src/test/python/mpacks/mystack-ambari-mpack-1.0.0.1/hooks/before_upgrade.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/stacks/__init__.py b/ambari-server/src/test/python/stacks/__init__.py
index 280aaf81b7..f98787116d 100644
--- a/ambari-server/src/test/python/stacks/__init__.py
+++ b/ambari-server/src/test/python/stacks/__init__.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/stacks/stack-hooks/before-SET_KEYTAB/test_before_set_keytab.py b/ambari-server/src/test/python/stacks/stack-hooks/before-SET_KEYTAB/test_before_set_keytab.py
index 91a7c5bdee..6443034794 100644
--- a/ambari-server/src/test/python/stacks/stack-hooks/before-SET_KEYTAB/test_before_set_keytab.py
+++ b/ambari-server/src/test/python/stacks/stack-hooks/before-SET_KEYTAB/test_before_set_keytab.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/stacks/test_stack_adviser.py b/ambari-server/src/test/python/stacks/test_stack_adviser.py
index f7a16bc88e..7b2224f395 100644
--- a/ambari-server/src/test/python/stacks/test_stack_adviser.py
+++ b/ambari-server/src/test/python/stacks/test_stack_adviser.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/stacks/utils/__init__.py b/ambari-server/src/test/python/stacks/utils/__init__.py
index 280aaf81b7..f98787116d 100644
--- a/ambari-server/src/test/python/stacks/utils/__init__.py
+++ b/ambari-server/src/test/python/stacks/utils/__init__.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
-
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/python/unitTests.py b/ambari-server/src/test/python/unitTests.py
index 8c0d59a157..450e67cb09 100644
--- a/ambari-server/src/test/python/unitTests.py
+++ b/ambari-server/src/test/python/unitTests.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/resources/common-services/HDFS/1.0/package/dummy-script.py b/ambari-server/src/test/resources/common-services/HDFS/1.0/package/dummy-script.py
index 35de4bb1d7..ec4a97c676 100644
--- a/ambari-server/src/test/resources/common-services/HDFS/1.0/package/dummy-script.py
+++ b/ambari-server/src/test/resources/common-services/HDFS/1.0/package/dummy-script.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/resources/extensions/EXT/0.1/services/OOZIE2/package/dummy-script.py b/ambari-server/src/test/resources/extensions/EXT/0.1/services/OOZIE2/package/dummy-script.py
index 35de4bb1d7..ec4a97c676 100644
--- a/ambari-server/src/test/resources/extensions/EXT/0.1/services/OOZIE2/package/dummy-script.py
+++ b/ambari-server/src/test/resources/extensions/EXT/0.1/services/OOZIE2/package/dummy-script.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/hooks/dummy-script.py b/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/hooks/dummy-script.py
index 35de4bb1d7..ec4a97c676 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/hooks/dummy-script.py
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.6.1/hooks/dummy-script.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.6/hooks/dummy-script.py b/ambari-server/src/test/resources/stacks/HDP/2.0.6/hooks/dummy-script.py
index 35de4bb1d7..ec4a97c676 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.0.6/hooks/dummy-script.py
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.6/hooks/dummy-script.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HBASE/package/dummy-script.py b/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HBASE/package/dummy-script.py
index 35de4bb1d7..ec4a97c676 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HBASE/package/dummy-script.py
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HBASE/package/dummy-script.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/dummy-script.py b/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/dummy-script.py
index 35de4bb1d7..ec4a97c676 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/dummy-script.py
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HDFS/package/dummy-script.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.8/hooks/dummy-script.py b/ambari-server/src/test/resources/stacks/HDP/2.0.8/hooks/dummy-script.py
index 35de4bb1d7..ec4a97c676 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.0.8/hooks/dummy-script.py
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.8/hooks/dummy-script.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/resources/stacks/HDP/2.0.8/services/HDFS/package/dummy-script.py b/ambari-server/src/test/resources/stacks/HDP/2.0.8/services/HDFS/package/dummy-script.py
index 35de4bb1d7..ec4a97c676 100644
--- a/ambari-server/src/test/resources/stacks/HDP/2.0.8/services/HDFS/package/dummy-script.py
+++ b/ambari-server/src/test/resources/stacks/HDP/2.0.8/services/HDFS/package/dummy-script.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/resources/stacks/OTHER/1.0/services/HDFS/package/dummy-script.py b/ambari-server/src/test/resources/stacks/OTHER/1.0/services/HDFS/package/dummy-script.py
index 35de4bb1d7..ec4a97c676 100644
--- a/ambari-server/src/test/resources/stacks/OTHER/1.0/services/HDFS/package/dummy-script.py
+++ b/ambari-server/src/test/resources/stacks/OTHER/1.0/services/HDFS/package/dummy-script.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/resources/stacks_with_common_services/HDP/0.2/services/HDFS/package/dummy-script.py b/ambari-server/src/test/resources/stacks_with_common_services/HDP/0.2/services/HDFS/package/dummy-script.py
index 35de4bb1d7..ec4a97c676 100644
--- a/ambari-server/src/test/resources/stacks_with_common_services/HDP/0.2/services/HDFS/package/dummy-script.py
+++ b/ambari-server/src/test/resources/stacks_with_common_services/HDP/0.2/services/HDFS/package/dummy-script.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/resources/stacks_with_cycle/OTHER/1.0/services/HDFS/package/dummy-script.py b/ambari-server/src/test/resources/stacks_with_cycle/OTHER/1.0/services/HDFS/package/dummy-script.py
index 35de4bb1d7..ec4a97c676 100644
--- a/ambari-server/src/test/resources/stacks_with_cycle/OTHER/1.0/services/HDFS/package/dummy-script.py
+++ b/ambari-server/src/test/resources/stacks_with_cycle/OTHER/1.0/services/HDFS/package/dummy-script.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/resources/stacks_with_extensions/HDP/0.2/services/HDFS/package/dummy-script.py b/ambari-server/src/test/resources/stacks_with_extensions/HDP/0.2/services/HDFS/package/dummy-script.py
index 35de4bb1d7..ec4a97c676 100644
--- a/ambari-server/src/test/resources/stacks_with_extensions/HDP/0.2/services/HDFS/package/dummy-script.py
+++ b/ambari-server/src/test/resources/stacks_with_extensions/HDP/0.2/services/HDFS/package/dummy-script.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/resources/stacks_with_extensions/HDP/0.3/services/HDFS/package/dummy-script.py b/ambari-server/src/test/resources/stacks_with_extensions/HDP/0.3/services/HDFS/package/dummy-script.py
index 35de4bb1d7..ec4a97c676 100644
--- a/ambari-server/src/test/resources/stacks_with_extensions/HDP/0.3/services/HDFS/package/dummy-script.py
+++ b/ambari-server/src/test/resources/stacks_with_extensions/HDP/0.3/services/HDFS/package/dummy-script.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/test/resources/stacks_with_extensions/HDP/0.4/services/HDFS/package/dummy-script.py b/ambari-server/src/test/resources/stacks_with_extensions/HDP/0.4/services/HDFS/package/dummy-script.py
index 35de4bb1d7..ec4a97c676 100644
--- a/ambari-server/src/test/resources/stacks_with_extensions/HDP/0.4/services/HDFS/package/dummy-script.py
+++ b/ambari-server/src/test/resources/stacks_with_extensions/HDP/0.4/services/HDFS/package/dummy-script.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-web/app/views/application.js b/ambari-web/app/views/application.js
index b88309c7d2..9c52a3503d 100644
--- a/ambari-web/app/views/application.js
+++ b/ambari-web/app/views/application.js
@@ -48,13 +48,26 @@ App.ApplicationView = Em.View.extend({
*/
initNavigationBar: function () {
if (App.get('router.mainController.isClusterDataLoaded')) {
- $('body').on('DOMNodeInserted', '.navigation-bar', () => {
- $('.navigation-bar').navigationBar({
- fitHeight: true,
- collapseNavBarClass: 'icon-double-angle-left',
- expandNavBarClass: 'icon-double-angle-right'
- });
- $('body').off('DOMNodeInserted', '.navigation-bar');
+ const observer = new MutationObserver(mutations => {
+ var targetNode
+ if (mutations.some((mutation) => mutation.type === 'childList' && (targetNode = $('.navigation-bar')).length)) {
+ observer.disconnect();
+ targetNode.navigationBar({
+ fitHeight: true,
+ collapseNavBarClass: 'icon-double-angle-left',
+ expandNavBarClass: 'icon-double-angle-right',
+ });
+ }
+ });
+
+ setTimeout(() => {
+ // remove observer if selected element is not found in 10secs.
+ observer.disconnect();
+ }, 10000)
+
+ observer.observe(document.body, {
+ childList: true,
+ subtree: true
});
}
}.observes('App.router.mainController.isClusterDataLoaded')
diff --git a/ambari-web/app/views/main/service/info/metrics_view.js b/ambari-web/app/views/main/service/info/metrics_view.js
index e61a62883d..b4c3cbac0a 100644
--- a/ambari-web/app/views/main/service/info/metrics_view.js
+++ b/ambari-web/app/views/main/service/info/metrics_view.js
@@ -280,27 +280,40 @@ App.MainServiceInfoMetricsView = Em.View.extend(App.Persist, App.TimeRangeMixin,
makeSortable: function (selector, isNSLayout) {
var self = this;
var controller = this.get('controller');
- $('html').on('DOMNodeInserted', selector, function () {
- $(this).sortable({
- items: "> div",
- cursor: "move",
- tolerance: "pointer",
- scroll: false,
- update: function () {
- var layout = isNSLayout ? controller.get('selectedNSWidgetLayout') : controller.get('activeWidgetLayout');
- var widgets = misc.sortByOrder($(selector + " .widget").map(function () {
- return this.id;
- }), layout.get('widgets').toArray());
- controller.saveWidgetLayout(widgets, layout);
- },
- activate: function () {
- self.set('isMoving', true);
- },
- deactivate: function () {
- self.set('isMoving', false);
- }
- }).disableSelection();
- $('html').off('DOMNodeInserted', selector);
+ const observer = new MutationObserver(mutations => {
+ var targetNode
+ if (mutations.some((mutation) => mutation.type === 'childList' && (targetNode = $(selector)).length)) {
+ observer.disconnect();
+ $(targetNode).sortable({
+ items: "> div",
+ cursor: "move",
+ tolerance: "pointer",
+ scroll: false,
+ update: function () {
+ var layout = isNSLayout ? controller.get('selectedNSWidgetLayout') : controller.get('activeWidgetLayout');
+ var widgets = misc.sortByOrder($(selector + " .widget").map(function () {
+ return this.id;
+ }), layout.get('widgets').toArray());
+ controller.saveWidgetLayout(widgets, layout);
+ },
+ activate: function () {
+ self.set('isMoving', true);
+ },
+ deactivate: function () {
+ self.set('isMoving', false);
+ }
+ }).disableSelection();
+ }
+ });
+
+ setTimeout(() => {
+ // remove observer if selected element is not found in 10secs.
+ observer.disconnect();
+ }, 10000)
+
+ observer.observe(document.body, {
+ childList: true,
+ subtree: true
});
}
});
diff --git a/ambari-web/test/views/main/service/info/metrics_view_test.js b/ambari-web/test/views/main/service/info/metrics_view_test.js
index 99442f17f8..3c49044b6e 100644
--- a/ambari-web/test/views/main/service/info/metrics_view_test.js
+++ b/ambari-web/test/views/main/service/info/metrics_view_test.js
@@ -214,19 +214,20 @@ describe('App.MainServiceInfoMetricsView', function() {
mock.sortable.restore();
});
- it("on() should be called", function() {
+ it("MutationObserver callback should be called", function() {
view.makeSortable('#widget_layout');
- expect(mock.on.calledWith('DOMNodeInserted', '#widget_layout')).to.be.true;
- });
-
- it("sortable() should be called", function() {
- view.makeSortable('#widget_layout');
- expect(mock.sortable.called).to.be.true;
- });
-
- it("off() should be called", function() {
- view.makeSortable('#widget_layout');
- expect(mock.off.calledWith('DOMNodeInserted', '#widget_layout')).to.be.true;
+ const callback = function () {
+ expect(true).to.be.true;
+ expect(document.querySelector('#widget_layout')).to.not.be.null;
+ observer.disconnect();
+ done();
+ };
+ const observer = new MutationObserver(callback);
+ const body = document.body;
+ observer.observe(body, { childList: true });
+ const elementWidget = document.createElement('div');
+ elementWidget.id='widget_layout';
+ body.appendChild(elementWidget);
});
});
@@ -333,4 +334,4 @@ describe('App.MainServiceInfoMetricsView', function() {
});
});
-});
\ No newline at end of file
+});
diff --git a/contrib/addons/test/nagios/plugins/test_sys_logger.py b/contrib/addons/test/nagios/plugins/test_sys_logger.py
index 08339e30fd..b63058eb62 100644
--- a/contrib/addons/test/nagios/plugins/test_sys_logger.py
+++ b/contrib/addons/test/nagios/plugins/test_sys_logger.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
# 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.
diff --git a/contrib/agent-simulator/cluster.py b/contrib/agent-simulator/cluster.py
index 832f5ae613..af17bc1c17 100644
--- a/contrib/agent-simulator/cluster.py
+++ b/contrib/agent-simulator/cluster.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/agent-simulator/config.py b/contrib/agent-simulator/config.py
index 8d67340077..7188e42b48 100644
--- a/contrib/agent-simulator/config.py
+++ b/contrib/agent-simulator/config.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/agent-simulator/data.py b/contrib/agent-simulator/data.py
index b469f331b1..e74539347e 100644
--- a/contrib/agent-simulator/data.py
+++ b/contrib/agent-simulator/data.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/agent-simulator/docker.py b/contrib/agent-simulator/docker.py
index 0dd38c0690..858f7e53f0 100644
--- a/contrib/agent-simulator/docker.py
+++ b/contrib/agent-simulator/docker.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/agent-simulator/docker_image/__init__.py b/contrib/agent-simulator/docker_image/__init__.py
index 67bb99de4d..031d1982e5 100644
--- a/contrib/agent-simulator/docker_image/__init__.py
+++ b/contrib/agent-simulator/docker_image/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/agent-simulator/docker_image/launcher_agent.py b/contrib/agent-simulator/docker_image/launcher_agent.py
index 1d3c87d678..ea4e609000 100644
--- a/contrib/agent-simulator/docker_image/launcher_agent.py
+++ b/contrib/agent-simulator/docker_image/launcher_agent.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/agent-simulator/launcher_ambari_server.py b/contrib/agent-simulator/launcher_ambari_server.py
index a722bdb9c5..a76ebada6e 100644
--- a/contrib/agent-simulator/launcher_ambari_server.py
+++ b/contrib/agent-simulator/launcher_ambari_server.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/agent-simulator/launcher_cluster.py b/contrib/agent-simulator/launcher_cluster.py
index d43291ac3f..91d3ceab8f 100644
--- a/contrib/agent-simulator/launcher_cluster.py
+++ b/contrib/agent-simulator/launcher_cluster.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/agent-simulator/launcher_docker.py b/contrib/agent-simulator/launcher_docker.py
index 42943fa723..9ce667ad0b 100644
--- a/contrib/agent-simulator/launcher_docker.py
+++ b/contrib/agent-simulator/launcher_docker.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/agent-simulator/launcher_service_server.py b/contrib/agent-simulator/launcher_service_server.py
index 8a77b82261..0d19fbcdd9 100644
--- a/contrib/agent-simulator/launcher_service_server.py
+++ b/contrib/agent-simulator/launcher_service_server.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/agent-simulator/log.py b/contrib/agent-simulator/log.py
index b8c87ad534..825188b469 100644
--- a/contrib/agent-simulator/log.py
+++ b/contrib/agent-simulator/log.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/agent-simulator/network/dns_edit.py b/contrib/agent-simulator/network/dns_edit.py
index 237654a9f5..3c766ada42 100644
--- a/contrib/agent-simulator/network/dns_edit.py
+++ b/contrib/agent-simulator/network/dns_edit.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/agent-simulator/vm.py b/contrib/agent-simulator/vm.py
index 9c49eca3e3..86f7946b53 100644
--- a/contrib/agent-simulator/vm.py
+++ b/contrib/agent-simulator/vm.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/alert_check_nifi.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/alert_check_nifi.py
index d74c676b54..5dc4d33c15 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/alert_check_nifi.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/alert_check_nifi.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi.py
index 6936dce753..0c95809287 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_ca.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_ca.py
index bc343e4e3b..8f8d618af1 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_ca.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_ca.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_ca_util.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_ca_util.py
index 20ef81ce6e..2fd7b613bb 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_ca_util.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_ca_util.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_constants.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_constants.py
index 632a4733de..f7faef88fe 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_constants.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/nifi_constants.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/params.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/params.py
index def8f45a6d..b59823e1ed 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/params.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/params.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/service_check.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/service_check.py
index 535592f7d6..5e6c32b021 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/service_check.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/service_check.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -72,4 +72,4 @@ class NifiServiceCheck(Script):
raise Fail("Error connecting to {0}. Reason - Timeout".format(url))
if __name__ == "__main__":
- NifiServiceCheck().execute()
\ No newline at end of file
+ NifiServiceCheck().execute()
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/setup_ranger_nifi.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/setup_ranger_nifi.py
index 91a6885255..890ffb32e3 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/setup_ranger_nifi.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/setup_ranger_nifi.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -65,4 +65,4 @@ def setup_ranger_nifi(upgrade_type=None):
File(os.path.join(params.nifi_config_dir, 'ranger-policymgr-ssl.xml'), owner=params.nifi_user, group=params.nifi_group, mode=0400)
else:
- Logger.info('Ranger admin not installed')
\ No newline at end of file
+ Logger.info('Ranger admin not installed')
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/status_params.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/status_params.py
index 9748661c3f..65130d8c96 100755
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/status_params.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/status_params.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/hooks/after_install.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/hooks/after_install.py
index 8f0743b10d..6cc1e765b1 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/hooks/after_install.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/hooks/after_install.py
@@ -1,5 +1,4 @@
-#!/usr/bin/env python
-
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/after-INSTALL/scripts/hook.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/after-INSTALL/scripts/hook.py
index 8bae9e689e..7395731b53 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/after-INSTALL/scripts/hook.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/after-INSTALL/scripts/hook.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/after-INSTALL/scripts/params.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/after-INSTALL/scripts/params.py
index d4dc349ef5..e511389842 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/after-INSTALL/scripts/params.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/after-INSTALL/scripts/params.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/after-INSTALL/scripts/shared_initialization.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/after-INSTALL/scripts/shared_initialization.py
index 18014b640e..6969f3057f 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/after-INSTALL/scripts/shared_initialization.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/after-INSTALL/scripts/shared_initialization.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/hook.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/hook.py
index c34be0b1ed..87edbe5a65 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/hook.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/hook.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/params.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/params.py
index 6d518f1db2..61e04881b6 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/params.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/params.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/shared_initialization.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/shared_initialization.py
index e8e8b08ad7..ee8770bef0 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/shared_initialization.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-ANY/scripts/shared_initialization.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/hook.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/hook.py
index ce17776b20..1c96037827 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/hook.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/hook.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/params.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/params.py
index 6193c11c22..304cfdd15f 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/params.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/params.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/repo_initialization.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/repo_initialization.py
index c37c6bdbf1..0e22228330 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/repo_initialization.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/repo_initialization.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/shared_initialization.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/shared_initialization.py
index f07aea5069..f10499dd58 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/shared_initialization.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-INSTALL/scripts/shared_initialization.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-RESTART/scripts/hook.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-RESTART/scripts/hook.py
index 14b9d99058..42f81db092 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-RESTART/scripts/hook.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-RESTART/scripts/hook.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/files/topology_script.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/files/topology_script.py
index e026ba7737..449fd7d19c 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/files/topology_script.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/files/topology_script.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/hook.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/hook.py
index f21e4b1f80..f16a3a3b22 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/hook.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/hook.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/params.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/params.py
index 77df21f275..a0c3194111 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/params.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/params.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/rack_awareness.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/rack_awareness.py
index 548f051914..5029d1d3c7 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/rack_awareness.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/rack_awareness.py
@@ -1,5 +1,4 @@
-#!/usr/bin/env python
-
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/shared_initialization.py b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/shared_initialization.py
index 01e55c0a64..013816560e 100644
--- a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/shared_initialization.py
+++ b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/hooks/before-START/scripts/shared_initialization.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/__init__.py b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/__init__.py
index 35de4bb1d7..ec4a97c676 100644
--- a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/__init__.py
+++ b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/onefs_client.py b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/onefs_client.py
index b8ae3def9a..ceb93d5c23 100644
--- a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/onefs_client.py
+++ b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/onefs_client.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/params.py b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/params.py
index 838510c2a6..718955c471 100644
--- a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/params.py
+++ b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/params.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/params_linux.py b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/params_linux.py
index b0433bd605..ee36fdc904 100644
--- a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/params_linux.py
+++ b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/params_linux.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/params_windows.py b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/params_windows.py
index 8587c49ad0..1a11fa728b 100644
--- a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/params_windows.py
+++ b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/params_windows.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/service_check.py b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/service_check.py
index 4c92866cd0..78998032ea 100644
--- a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/service_check.py
+++ b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/service_check.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/status_params.py b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/status_params.py
index 466c2af66e..fb9cd7dc05 100644
--- a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/status_params.py
+++ b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/package/scripts/status_params.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/service_advisor.py b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/service_advisor.py
index 37d1a008e0..c58f67204d 100644
--- a/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/service_advisor.py
+++ b/contrib/management-packs/isilon-onefs-mpack/src/main/resources/addon-services/ONEFS/1.0.0/service_advisor.py
@@ -143,4 +143,4 @@ else:
validation_errors.extend(self.toConfigurationValidationProblems(HdfsSite(services).validate(), 'hdfs-site'))
except KeyError as e:
self.logger.info('Cannot get OneFS properties from config. KeyError: %s' % e)
- return validation_errors
\ No newline at end of file
+ return validation_errors
diff --git a/contrib/management-packs/isilon-onefs-mpack/src/main/tools/hdfs_to_onefs_convert.py b/contrib/management-packs/isilon-onefs-mpack/src/main/tools/hdfs_to_onefs_convert.py
index ad8f8e78f6..b093792282 100644
--- a/contrib/management-packs/isilon-onefs-mpack/src/main/tools/hdfs_to_onefs_convert.py
+++ b/contrib/management-packs/isilon-onefs-mpack/src/main/tools/hdfs_to_onefs_convert.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/isilon-onefs-mpack/src/test/python/TestServiceAdvisor.py b/contrib/management-packs/isilon-onefs-mpack/src/test/python/TestServiceAdvisor.py
index 26714b3954..a77bbb0e4d 100644
--- a/contrib/management-packs/isilon-onefs-mpack/src/test/python/TestServiceAdvisor.py
+++ b/contrib/management-packs/isilon-onefs-mpack/src/test/python/TestServiceAdvisor.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/isilon-onefs-mpack/src/test/python/unitTests.py b/contrib/management-packs/isilon-onefs-mpack/src/test/python/unitTests.py
index 03bc923a8d..e26708cf75 100644
--- a/contrib/management-packs/isilon-onefs-mpack/src/test/python/unitTests.py
+++ b/contrib/management-packs/isilon-onefs-mpack/src/test/python/unitTests.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/microsoft_r_server.py b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/microsoft_r_server.py
index 223cbd8871..ba2671d90d 100644
--- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/microsoft_r_server.py
+++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/microsoft_r_server.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/params.py b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/params.py
index aa207979f1..9654dba6e1 100644
--- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/params.py
+++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/params.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/params_linux.py b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/params_linux.py
index 71f17b6664..e9023026a3 100644
--- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/params_linux.py
+++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/params_linux.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/params_windows.py b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/params_windows.py
index 3eca213611..940ae20f0e 100644
--- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/params_windows.py
+++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/params_windows.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/service_check.py b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/service_check.py
index 57b668180e..5ee7d93ea8 100644
--- a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/service_check.py
+++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R_SERVER/8.0.5/package/scripts/service_check.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/after-INSTALL/scripts/hook.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/after-INSTALL/scripts/hook.py
index 8bae9e689e..7395731b53 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/after-INSTALL/scripts/hook.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/after-INSTALL/scripts/hook.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/after-INSTALL/scripts/params.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/after-INSTALL/scripts/params.py
index bb04178235..ba3af73ed7 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/after-INSTALL/scripts/params.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/after-INSTALL/scripts/params.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/after-INSTALL/scripts/shared_initialization.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/after-INSTALL/scripts/shared_initialization.py
index 9fe45273e5..a39074afac 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/after-INSTALL/scripts/shared_initialization.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/after-INSTALL/scripts/shared_initialization.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-ANY/scripts/hook.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-ANY/scripts/hook.py
index c34be0b1ed..87edbe5a65 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-ANY/scripts/hook.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-ANY/scripts/hook.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-ANY/scripts/params.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-ANY/scripts/params.py
index 554408587a..2e46770a96 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-ANY/scripts/params.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-ANY/scripts/params.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-ANY/scripts/shared_initialization.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-ANY/scripts/shared_initialization.py
index 1a7d21a35a..49c846f608 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-ANY/scripts/shared_initialization.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-ANY/scripts/shared_initialization.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/hook.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/hook.py
index ce17776b20..1c96037827 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/hook.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/hook.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/params.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/params.py
index 6193c11c22..304cfdd15f 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/params.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/params.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/repo_initialization.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/repo_initialization.py
index a35dce757e..32355da029 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/repo_initialization.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/repo_initialization.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/shared_initialization.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/shared_initialization.py
index 1609050409..2eff237af0 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/shared_initialization.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-INSTALL/scripts/shared_initialization.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-RESTART/scripts/hook.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-RESTART/scripts/hook.py
index 14b9d99058..42f81db092 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-RESTART/scripts/hook.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-RESTART/scripts/hook.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/files/topology_script.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/files/topology_script.py
index e026ba7737..449fd7d19c 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/files/topology_script.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/files/topology_script.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/hook.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/hook.py
index f21e4b1f80..f16a3a3b22 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/hook.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/hook.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/params.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/params.py
index d8debdf6a7..1bb39961de 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/params.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/params.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/rack_awareness.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/rack_awareness.py
index 548f051914..5029d1d3c7 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/rack_awareness.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/rack_awareness.py
@@ -1,5 +1,4 @@
-#!/usr/bin/env python
-
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/shared_initialization.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/shared_initialization.py
index 01e55c0a64..013816560e 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/shared_initialization.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/hooks/before-START/scripts/shared_initialization.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_hive_interactive_thrift_port.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_hive_interactive_thrift_port.py
index 6917160885..30bf7484e3 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_hive_interactive_thrift_port.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_hive_interactive_thrift_port.py
@@ -1,5 +1,4 @@
-#!/usr/bin/env python
-
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -213,4 +212,4 @@ def execute(configurations={}, parameters={}, host_name=None):
@OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY)
def execute(configurations={}, parameters={}, host_name=None):
- pass
\ No newline at end of file
+ pass
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_hive_metastore.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_hive_metastore.py
index e02ed5a753..bb40d1e122 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_hive_metastore.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_hive_metastore.py
@@ -1,5 +1,4 @@
-#!/usr/bin/env python
-
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_hive_thrift_port.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_hive_thrift_port.py
index 32da1cc79b..ff79df06bf 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_hive_thrift_port.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_hive_thrift_port.py
@@ -1,5 +1,4 @@
-#!/usr/bin/env python
-
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_llap_app_status.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_llap_app_status.py
index 095be3f934..e3fd21ba3e 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_llap_app_status.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_llap_app_status.py
@@ -1,5 +1,4 @@
-#!/usr/bin/env python
-
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -296,4 +295,4 @@ def make_valid_json(output):
scanned_output = '\n'.join(splits)
llap_app_info = json.loads(scanned_output)
- return llap_app_info
\ No newline at end of file
+ return llap_app_info
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_webhcat_server.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_webhcat_server.py
index c9575c00e2..788df82fac 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_webhcat_server.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/alerts/alert_webhcat_server.py
@@ -1,5 +1,4 @@
-#!/usr/bin/env python
-
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/__init__.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/__init__.py
index 5561e1087b..152033a3be 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/__init__.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/__init__.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hcat.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hcat.py
index 5e2c709c8c..b1a26084ed 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hcat.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hcat.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hcat_client.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hcat_client.py
index b37698e9cf..d8feb04c66 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hcat_client.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hcat_client.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hcat_service_check.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hcat_service_check.py
index 07b40955f5..607260f8d8 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hcat_service_check.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hcat_service_check.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive.py
index 3ef600957e..1e535e37f8 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_client.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_client.py
index 55cf61ab68..a109bcff80 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_client.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_client.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_interactive.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_interactive.py
index 6009cb6f83..29777b9e5d 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_interactive.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_interactive.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_metastore.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_metastore.py
index a69460e82e..cba2a06bb0 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_metastore.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_metastore.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_server.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_server.py
index 6aeaf803e6..4bbeeb8986 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_server.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_server.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_server_interactive.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_server_interactive.py
index beb1220c72..c8bea6cc48 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_server_interactive.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_server_interactive.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -531,4 +531,4 @@ class HiveServerInteractiveWindows(HiveServerInteractive):
pass
if __name__ == "__main__":
- HiveServerInteractive().execute()
\ No newline at end of file
+ HiveServerInteractive().execute()
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_server_upgrade.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_server_upgrade.py
index 9aa3d96983..cac175c0a4 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_server_upgrade.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_server_upgrade.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_service.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_service.py
index 05b395dfab..987f5b1db4 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_service.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_service.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_service_interactive.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_service_interactive.py
index eaf95ad5db..b035b7bcdf 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_service_interactive.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/hive_service_interactive.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_server.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_server.py
index 851dc02c41..07c9a2a5d8 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_server.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_server.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_service.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_service.py
index 8b98ed1d59..b34917e5fd 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_service.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_service.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_users.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_users.py
index c023548093..818bc6db5c 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_users.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_users.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_utils.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_utils.py
index 5006b56c4e..57cf2fbabd 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_utils.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/mysql_utils.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -32,4 +32,4 @@ def mysql_configure():
# this also will start mysql-server
mysql_users.mysql_adduser()
-
\ No newline at end of file
+
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/params.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/params.py
index f10a3f3997..d192c55ef2 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/params.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/params.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/params_linux.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/params_linux.py
index ea386be953..43fae80b4a 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/params_linux.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/params_linux.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/params_windows.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/params_windows.py
index 880fdb567b..30eb4d25be 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/params_windows.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/params_windows.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/service_check.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/service_check.py
index 1836d0f3ce..956b7bc64c 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/service_check.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/service_check.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -187,4 +187,4 @@ class HiveServiceCheckDefault(HiveServiceCheck):
logoutput=True)
if __name__ == "__main__":
- HiveServiceCheck().execute()
\ No newline at end of file
+ HiveServiceCheck().execute()
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/setup_ranger_hive.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/setup_ranger_hive.py
index 81a4e3e80c..b732528719 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/setup_ranger_hive.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/setup_ranger_hive.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/setup_ranger_hive_interactive.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/setup_ranger_hive_interactive.py
index 0b5d5dbed0..5bd5efa018 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/setup_ranger_hive_interactive.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/setup_ranger_hive_interactive.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/status_params.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/status_params.py
index a7b2e3fbc2..e4d4952fe4 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/status_params.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/status_params.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat.py
index fe3f34a2b5..42c7f517a0 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat_server.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat_server.py
index ee9087d6ef..28ffa8e7c8 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat_server.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat_server.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat_service.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat_service.py
index c24db4c2ff..2a9276d065 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat_service.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat_service.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat_service_check.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat_service_check.py
index 8e80d4868a..7b2eb92681 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat_service_check.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/HIVE/package/scripts/webhcat_service_check.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/alerts/alert_nodemanager_health.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/alerts/alert_nodemanager_health.py
index d7159e4eb0..eff631b99d 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/alerts/alert_nodemanager_health.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/alerts/alert_nodemanager_health.py
@@ -1,5 +1,4 @@
-#!/usr/bin/env python
-
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/alerts/alert_nodemanagers_summary.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/alerts/alert_nodemanagers_summary.py
index adf27ecc30..e2c8ae7302 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/alerts/alert_nodemanagers_summary.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/alerts/alert_nodemanagers_summary.py
@@ -1,5 +1,4 @@
-#!/usr/bin/env python
-
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -216,4 +215,4 @@ def find_value_in_jmx(data_dict, jmx_property, query):
raise Exception("Unable to find {0} in JSON from {1} ".format(jmx_property, query))
json_data = jmx_prop_list_item
- return json_data[jmx_property]
\ No newline at end of file
+ return json_data[jmx_property]
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/files/validateYarnComponentStatusWindows.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/files/validateYarnComponentStatusWindows.py
index 5e2b4d9119..ff403c4a10 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/files/validateYarnComponentStatusWindows.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/files/validateYarnComponentStatusWindows.py
@@ -1,5 +1,4 @@
-#!/usr/bin/env python
-
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/__init__.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/__init__.py
index 35de4bb1d7..ec4a97c676 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/__init__.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/application_timeline_server.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/application_timeline_server.py
index e3a81cf04b..d037cea029 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/application_timeline_server.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/application_timeline_server.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/historyserver.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/historyserver.py
index f933e91725..cbc6a74cc2 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/historyserver.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/historyserver.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/install_jars.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/install_jars.py
index 44015bfb28..36e3e8f718 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/install_jars.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/install_jars.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/mapred_service_check.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/mapred_service_check.py
index 5fc498d558..6991812bac 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/mapred_service_check.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/mapred_service_check.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/mapreduce2_client.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/mapreduce2_client.py
index 8de9d566af..1d8210ec4b 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/mapreduce2_client.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/mapreduce2_client.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/nodemanager.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/nodemanager.py
index 4f3eecb23a..0141bf6923 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/nodemanager.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/nodemanager.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/nodemanager_upgrade.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/nodemanager_upgrade.py
index 1c886f9406..30abb59c38 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/nodemanager_upgrade.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/nodemanager_upgrade.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/params.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/params.py
index 073e84f5e2..b6c84bb5f0 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/params.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/params.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/params_linux.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/params_linux.py
index 7db9ea9e4e..eb725de877 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/params_linux.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/params_linux.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/params_windows.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/params_windows.py
index cac93ee121..fea6c2fc80 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/params_windows.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/params_windows.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/resourcemanager.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/resourcemanager.py
index 12c279a8d9..bf23d68705 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/resourcemanager.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/resourcemanager.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/service.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/service.py
index b1179b9bda..fb723085c3 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/service.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/service.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/service_check.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/service_check.py
index daa8e7e25a..c21999e4a2 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/service_check.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/service_check.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/setup_ranger_yarn.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/setup_ranger_yarn.py
index 6ea7f82775..2907120644 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/setup_ranger_yarn.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/setup_ranger_yarn.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/status_params.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/status_params.py
index c2e9d92a04..828b488151 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/status_params.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/status_params.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -58,4 +58,4 @@ else:
kinit_path_local = functions.get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None))
security_enabled = config['configurations']['cluster-env']['security_enabled']
-stack_name = default("/hostLevelParams/stack_name", None)
\ No newline at end of file
+stack_name = default("/hostLevelParams/stack_name", None)
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/yarn.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/yarn.py
index a6cc6fa27a..6fb149ae84 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/yarn.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/yarn.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/yarn_client.py b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/yarn_client.py
index 5cd2e69f6a..23ccacf2ed 100755
--- a/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/yarn_client.py
+++ b/contrib/management-packs/odpi-ambari-mpack/src/main/resources/stacks/ODPi/2.0/services/YARN/package/scripts/yarn_client.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/nagios-alerts/plugins/ambari_alerts.py b/contrib/nagios-alerts/plugins/ambari_alerts.py
index 182bf3d39b..63f4791e96 100644
--- a/contrib/nagios-alerts/plugins/ambari_alerts.py
+++ b/contrib/nagios-alerts/plugins/ambari_alerts.py
@@ -1,5 +1,4 @@
-#!/usr/bin/python
-
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/nagios-alerts/plugins/generate_nagios_objects.py b/contrib/nagios-alerts/plugins/generate_nagios_objects.py
index 6c00402bbd..f7c40018dc 100644
--- a/contrib/nagios-alerts/plugins/generate_nagios_objects.py
+++ b/contrib/nagios-alerts/plugins/generate_nagios_objects.py
@@ -1,5 +1,4 @@
-#!/usr/bin/python
-
+#!/usr/bin/env python3
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/version-builder/example.py b/contrib/version-builder/example.py
index 8f87981ad3..fac6fa102e 100644
--- a/contrib/version-builder/example.py
+++ b/contrib/version-builder/example.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/contrib/version-builder/version_builder.py b/contrib/version-builder/version_builder.py
index 2abf6170f6..a4ab02a84e 100644
--- a/contrib/version-builder/version_builder.py
+++ b/contrib/version-builder/version_builder.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/dev-support/docker/docker/bin/__init__.py b/dev-support/docker/docker/bin/__init__.py
index fac912ea71..0d211fc142 100755
--- a/dev-support/docker/docker/bin/__init__.py
+++ b/dev-support/docker/docker/bin/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# Licensed 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
diff --git a/dev-support/docker/docker/bin/ambaribuild.py b/dev-support/docker/docker/bin/ambaribuild.py
index 7cadb2f3e6..e613190359 100755
--- a/dev-support/docker/docker/bin/ambaribuild.py
+++ b/dev-support/docker/docker/bin/ambaribuild.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
# coding: utf-8
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/dev-support/docker/docker/bin/test/__init__.py b/dev-support/docker/docker/bin/test/__init__.py
index fac912ea71..0d211fc142 100755
--- a/dev-support/docker/docker/bin/test/__init__.py
+++ b/dev-support/docker/docker/bin/test/__init__.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# Licensed 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
diff --git a/dev-support/docker/docker/bin/test/ambaribuild_test.py b/dev-support/docker/docker/bin/test/ambaribuild_test.py
index a324f5fe9e..79b638177d 100755
--- a/dev-support/docker/docker/bin/test/ambaribuild_test.py
+++ b/dev-support/docker/docker/bin/test/ambaribuild_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
# coding: utf-8
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/docs/pom.xml b/docs/pom.xml
index ee2e5c5638..8be2c08c07 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -1746,7 +1746,11 @@
<reports>
<report>project-team</report>
<report>mailing-list</report>
+<!-- we have our own page until we can integrate the
+ security reporting page in the project-info-reports plugin
+ https://issues.apache.org/jira/browse/MNG-7905
<report>issue-tracking</report>
+-->
<report>license</report>
<!-- for now
<report>modules</report>
diff --git a/docs/src/site/apt/issue-tracking.apt b/docs/src/site/apt/issue-tracking.apt
new file mode 100644
index 0000000000..77a3d8905e
--- /dev/null
+++ b/docs/src/site/apt/issue-tracking.apt
@@ -0,0 +1,31 @@
+~~ 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.
+~~
+
+Reporting security issues
+
+ The Apache Software Foundation takes a very active stance in eliminating security problems and denial of service attacks against its products.
+
+ We strongly encourage folks to report such problems to our private security mailing list first, before disclosing them in a public forum.
+
+ Please note that the security mailing list should only be used for reporting undisclosed security vulnerabilities and managing the process of fixing such vulnerabilities. We cannot accept regular bug reports or other queries at this address. All mail sent to this address that does not relate to an undisclosed security problem in our source code will be ignored.
+
+ The private security mailing address is: {{{mailto:security@ambari.apache.org}security@ambari.apache.org}}
+
+ If you are interested there is a {{{https://www.apache.org/security/committers.html}more detailed description of the process}}.
+
+Issue Tracking
+
+ Issues, bugs, and feature requests should be submitted to the following issue tracking system for this project: {{{https://issues.apache.org/jira/browse/AMBARI}https://issues.apache.org/jira/browse/AMBARI}}
diff --git a/docs/src/site/site.xml b/docs/src/site/site.xml
index 6447477577..4d9d090a2c 100644
--- a/docs/src/site/site.xml
+++ b/docs/src/site/site.xml
@@ -44,23 +44,6 @@
<body>
<head>
- <!-- Start of Google analytics -->
- <script type="text/javascript">
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-27188762-1']);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script');
- ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ?
- 'https://ssl' : 'http://www') +
- '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0];
- s.parentNode.insertBefore(ga, s);
- })();
- </script>
- <!-- End of Google analytics -->
<style>
.well.sidebar-nav {
background-color: #fff;
@@ -201,7 +184,7 @@
<item name="Events" href="https://www.apache.org/events/current-event" />
<item name="License" href="https://www.apache.org/licenses/" />
<item name="Sponsorship" href="https://www.apache.org/foundation/sponsorship" />
- <item name="Security" href="https://www.apache.org/security" />
+ <item name="Security" href="https://ambari.apache.org/issue-tracking.html" />
<item name="Thanks" href="https://www.apache.org/foundation/thanks" />
<item name="Code of Conduct" href="https://www.apache.org/foundation/policies/conduct" />
</menu>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org
(ambari) 09/22: add livy
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch eee
in repository https://gitbox.apache.org/repos/asf/ambari.git
commit 03c1c2d0b06a53ead45a5856737ffe46a9cceddc
Author: jialiang <ji...@gmail.com>
AuthorDate: Fri Sep 6 17:16:03 2024 +0800
add livy
---
.../BIGTOP/3.2.0/properties/stack_packages.json | 26 ++++
.../stacks/BIGTOP/3.2.0/services/LIVY/alerts.json | 30 ++++
.../LIVY/configuration/livy-client-conf.xml | 30 ++++
.../services/LIVY/configuration/livy-conf.xml | 129 +++++++++++++++++
.../3.2.0/services/LIVY/configuration/livy-env.xml | 108 +++++++++++++++
.../LIVY/configuration/livy-log4j-properties.xml | 41 ++++++
.../LIVY/configuration/livy-spark-blacklist.xml | 52 +++++++
.../BIGTOP/3.2.0/services/LIVY/kerberos.json | 52 +++++++
.../stacks/BIGTOP/3.2.0/services/LIVY/metainfo.xml | 124 +++++++++++++++++
.../LIVY/package/scripts/alerts/alert_livy_port.py | 154 +++++++++++++++++++++
.../services/LIVY/package/scripts/livy_server.py | 149 ++++++++++++++++++++
.../services/LIVY/package/scripts/livy_service.py | 45 ++++++
.../{SPARK => LIVY}/package/scripts/params.py | 58 +++++++-
.../services/LIVY/package/scripts/service_check.py | 56 ++++++++
.../services/LIVY/package/scripts/setup_livy.py | 102 ++++++++++++++
.../services/LIVY/package/scripts/status_params.py | 45 ++++++
.../package/templates/input.config-livy.json.j2} | 27 +---
.../3.2.0/services/LIVY/role_command_order.json | 8 ++
.../3.2.0/services/LIVY/themes/directories.json | 89 ++++++++++++
.../3.2.0/services/SPARK/package/scripts/params.py | 13 +-
.../services/SPARK/package/scripts/setup_spark.py | 15 +-
.../package/templates/input.config-spark.json.j2 | 3 +-
.../stacks/BIGTOP/3.3.0/services/LIVY/metainfo.xml | 27 ++++
23 files changed, 1339 insertions(+), 44 deletions(-)
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/properties/stack_packages.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/properties/stack_packages.json
index 5f5f64980e..3b3545005a 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/properties/stack_packages.json
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/properties/stack_packages.json
@@ -415,6 +415,32 @@
]
}
},
+ "LIVY": {
+ "LIVY_CLIENT": {
+ "STACK-SELECT-PACKAGE": "livy-client",
+ "INSTALL": [
+ "livy-client"
+ ],
+ "PATCH": [
+ "livy-client"
+ ],
+ "STANDARD": [
+ "livy-client"
+ ]
+ },
+ "LIVY_SERVER": {
+ "STACK-SELECT-PACKAGE": "livy-server",
+ "INSTALL": [
+ "livy-server"
+ ],
+ "PATCH": [
+ "livy-server"
+ ],
+ "STANDARD": [
+ "livy-server",
+ ]
+ }
+ },
"FLINK": {
"FLINK_CLIENT": {
"STACK-SELECT-PACKAGE": "flink-client",
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/alerts.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/alerts.json
new file mode 100644
index 0000000000..2e753dcd30
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/alerts.json
@@ -0,0 +1,30 @@
+{
+ "SPARK": {
+ "service": [],
+ "LIVY_SERVER": [
+ {
+ "name": "livy_server_status",
+ "label": "Spark Livy Server",
+ "description": "This host-level alert is triggered if the Livy2 Server cannot be determined to be up.",
+ "interval": 1,
+ "scope": "ANY",
+ "source": {
+ "type": "SCRIPT",
+ "path": "BIGTOP/3.2.0/services/LIVY/package/scripts/alerts/alert_livy_port.py",
+ "parameters": [
+ {
+ "name": "check.command.timeout",
+ "display_name": "Command Timeout",
+ "value": 60.0,
+ "type": "NUMERIC",
+ "description": "The maximum time before check command will be killed by timeout",
+ "units": "seconds",
+ "threshold": "CRITICAL"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/configuration/livy-client-conf.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/configuration/livy-client-conf.xml
new file mode 100644
index 0000000000..d761f412a8
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/configuration/livy-client-conf.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/**
+ * 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="true">
+ <property>
+ <name>livy.rsc.launcher.address</name>
+ <value> </value>
+ <description>
+ Address for the RSC driver to connect back with it's connection info.
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/configuration/livy-conf.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/configuration/livy-conf.xml
new file mode 100644
index 0000000000..a0521c360f
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/configuration/livy-conf.xml
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/**
+ * 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="true">
+ <property>
+ <name>livy.environment</name>
+ <value>production</value>
+ <description>
+ Specifies Livy's environment. May either be "production" or "development". In "development"
+ mode, Livy will enable debugging options, such as reporting possible routes on a 404.
+ defaults to development
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>livy.server.port</name>
+ <value>8999</value>
+ <description>
+ What port to start the server on. Defaults to 8999.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>livy.server.session.timeout</name>
+ <value>3600000</value>
+ <description>
+ Time in milliseconds on how long Livy will wait before timing out an idle session.
+ Default is one hour.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>livy.impersonation.enabled</name>
+ <value>true</value>
+ <description>
+ If livy should use proxy users when submitting a job.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>livy.impersonation.enabled</name>
+ <value>true</value>
+ <description>
+ If livy should use proxy users when submitting a job.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>livy.server.csrf_protection.enabled</name>
+ <value>true</value>
+ <description>
+ Whether to enable csrf protection for livy's rest api.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>livy.spark.master</name>
+ <value>yarn</value>
+ <description>
+ spark.master property for spark engine
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>livy.spark.deploy-mode</name>
+ <value>cluster</value>
+ <description>
+ spark.deploy-mode property for spark engine
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>livy.repl.enableHiveContext</name>
+ <value>true</value>
+ <description>
+ Whether to enable HiveContext in livy interpreter
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>livy.server.recovery.mode</name>
+ <value>recovery</value>
+ <description>
+ Recovery mode for livy, either be "off" or "recovery".
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>livy.server.recovery.state-store</name>
+ <value>filesystem</value>
+ <description>
+ Where Livy should store state for recovery.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>livy.server.recovery.state-store.url</name>
+ <value>/livy-recovery</value>
+ <description>
+ Where Livy should store state for recovery.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>livy.server.access-control.enabled</name>
+ <value>true</value>
+ <description>
+ Property to configure Livy user access.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/configuration/livy-env.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/configuration/livy-env.xml
new file mode 100644
index 0000000000..0b27bed3ff
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/configuration/livy-env.xml
@@ -0,0 +1,108 @@
+<?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>livy_user</name>
+ <display-name>Livy User</display-name>
+ <value>livy</value>
+ <property-type>USER</property-type>
+ <value-attributes>
+ <type>user</type>
+ <overridable>false</overridable>
+ <user-groups>
+ <property>
+ <type>cluster-env</type>
+ <name>user_group</name>
+ </property>
+ <property>
+ <type>livy-env</type>
+ <name>livy_group</name>
+ </property>
+ </user-groups>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>livy_group</name>
+ <display-name>Livy Group</display-name>
+ <value>livy</value>
+ <property-type>GROUP</property-type>
+ <description>livy group</description>
+ <value-attributes>
+ <type>user</type>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>livy_log_dir</name>
+ <display-name>Livy Log directory</display-name>
+ <value>/var/log/livy</value>
+ <description>Livy Log Dir</description>
+ <value-attributes>
+ <type>directory</type>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>livy_pid_dir</name>
+ <display-name>Livy PID directory</display-name>
+ <value>/var/run/livy</value>
+ <value-attributes>
+ <type>directory</type>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>spark_home</name>
+ <value>/usr/bigtop/current/spark-client</value>
+ <value-attributes>
+ <type>directory</type>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <!-- livy-env.sh -->
+ <property>
+ <name>content</name>
+ <description>This is the jinja template for livy-env.sh file</description>
+ <value>
+ #!/usr/bin/env bash
+
+ # - SPARK_HOME Spark which you would like to use in livy
+ # - SPARK_CONF_DIR Directory containing the Spark configuration to use.
+ # - HADOOP_CONF_DIR Directory containing the Hadoop / YARN configuration to use.
+ # - LIVY_LOG_DIR Where log files are stored. (Default: ${LIVY_HOME}/logs)
+ # - LIVY_PID_DIR Where the pid file is stored. (Default: /tmp)
+ # - LIVY_SERVER_JAVA_OPTS Java Opts for running livy server (You can set jvm related setting here, like jvm memory/gc algorithm and etc.)
+ export SPARK_HOME=/usr/bigtop/current/spark-client
+ export SPARK_CONF_DIR=/etc/spark/conf
+ export JAVA_HOME={{java_home}}
+ export HADOOP_CONF_DIR=/etc/hadoop/conf
+ export LIVY_LOG_DIR={{livy_log_dir}}
+ export LIVY_PID_DIR={{livy_pid_dir}}
+ export LIVY_SERVER_JAVA_OPTS="-Xmx2g"
+ </value>
+ <value-attributes>
+ <type>content</type>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/configuration/livy-log4j-properties.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/configuration/livy-log4j-properties.xml
new file mode 100644
index 0000000000..fc15c7f6b9
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/configuration/livy-log4j-properties.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/**
+ * 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>Livy-log4j-Properties</description>
+ <value>
+ # Set everything to be logged to the console
+ log4j.rootCategory=INFO, console
+ log4j.appender.console=org.apache.log4j.ConsoleAppender
+ log4j.appender.console.target=System.err
+ log4j.appender.console.layout=org.apache.log4j.PatternLayout
+ log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{1}: %m%n
+
+ log4j.logger.org.eclipse.jetty=WARN
+ </value>
+ <value-attributes>
+ <type>content</type>
+ <show-property-name>false</show-property-name>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/configuration/livy-spark-blacklist.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/configuration/livy-spark-blacklist.xml
new file mode 100644
index 0000000000..84c899c1e0
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/configuration/livy-spark-blacklist.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/**
+ * 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>spark-blacklist.properties</description>
+ <value>
+ #
+ # Configuration override / blacklist. Defines a list of properties that users are not allowed
+ # to override when starting Spark sessions.
+ #
+ # This file takes a list of property names (one per line). Empty lines and lines starting with "#"
+ # are ignored.
+ #
+
+ # Disallow overriding the master and the deploy mode.
+ spark.master
+ spark.submit.deployMode
+
+ # Disallow overriding the location of Spark cached jars.
+ spark.yarn.jar
+ spark.yarn.jars
+ spark.yarn.archive
+
+ # Don't allow users to override the RSC timeout.
+ livy.rsc.server.idle_timeout
+ </value>
+ <value-attributes>
+ <type>content</type>
+ <show-property-name>false</show-property-name>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/kerberos.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/kerberos.json
new file mode 100644
index 0000000000..5a6ca1590c
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/kerberos.json
@@ -0,0 +1,52 @@
+{
+ "services": [
+ {
+ "name": "LIVY_SERVER",
+ "identities": [
+ {
+ "name": "hdfs",
+ "reference": "/HDFS/NAMENODE/hdfs"
+ },
+ {
+ "name": "livyuser",
+ "principal": {
+ "value": "${livy-env/livy_user}/_HOST@${realm}",
+ "type": "service",
+ "configuration": "livy-conf/livy.server.launch.kerberos.principal",
+ "local_username": "${livy-env/livy_user}"
+ },
+ "keytab": {
+ "file": "${keytab_dir}/livy.service.keytab",
+ "owner": {
+ "name": "${livy-env/livy_user}",
+ "access": "r"
+ },
+ "group": {
+ "name": "${cluster-env/user_group}",
+ "access": ""
+ },
+ "configuration": "livy-conf/livy.server.launch.kerberos.keytab"
+ }
+ },
+ {
+ "name": "livy_spnego",
+ "reference": "/spnego",
+ "principal": {
+ "configuration": "livy-conf/livy.server.auth.kerberos.principal"
+ },
+ "keytab": {
+ "configuration": "livy-conf/livy.server.auth.kerberos.keytab"
+ }
+ }
+ ],
+ "configurations": [
+ {
+ "livy-conf": {
+ "livy.server.auth.type": "kerberos",
+ "livy.impersonation.enabled": "true"
+ }
+ }
+ ]
+ }
+ ]
+ }
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/metainfo.xml
new file mode 100644
index 0000000000..fece912b2c
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/metainfo.xml
@@ -0,0 +1,124 @@
+<?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>LIVY</name>
+ <displayName>Livy</displayName>
+ <comment>Apache Livy is a service that enables easy interaction with a Spark cluster over a REST interface. </comment>
+ <version>0.7.1-1</version>
+ <components>
+ <component>
+ <name>LIVY_SERVER</name>
+ <displayName>Livy Server</displayName>
+ <category>MASTER</category>
+ <cardinality>1+</cardinality>
+ <versionAdvertised>true</versionAdvertised>
+ <dependencies>
+ <dependency>
+ <name>SPARK/SPARK_CLIENT</name>
+ <scope>host</scope>
+ <auto-deploy>
+ <enabled>true</enabled>
+ </auto-deploy>
+ </dependency>
+ <dependency>
+ <name>HDFS/HDFS_CLIENT</name>
+ <scope>host</scope>
+ <auto-deploy>
+ <enabled>true</enabled>
+ </auto-deploy>
+ </dependency>
+ <dependency>
+ <name>YARN/YARN_CLIENT</name>
+ <scope>host</scope>
+ <auto-deploy>
+ <enabled>true</enabled>
+ </auto-deploy>
+ </dependency>
+ </dependencies>
+ <commandScript>
+ <script>scripts/livy_server.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>600</timeout>
+ </commandScript>
+ <logs>
+ <log>
+ <logId>livy_server</logId>
+ <primary>true</primary>
+ </log>
+ </logs>
+ </component>
+ </components>
+
+ <configuration-dependencies>
+ <config-type>core-site</config-type>
+ <config-type>spark-defaults</config-type>
+ <config-type>spark-env</config-type>
+ <config-type>spark-log4j-properties</config-type>
+ <config-type>spark-metrics-properties</config-type>
+ <config-type>spark-hive-site-override</config-type>
+ <config-type>spark-thrift-fairscheduler</config-type>
+ <config-type>livy-client-conf</config-type>
+ <config-type>livy-conf</config-type>
+ <config-type>livy-env</config-type>
+ <config-type>livy-log4j-properties</config-type>
+ <config-type>livy-spark-blacklist</config-type>
+ </configuration-dependencies>
+
+ <commandScript>
+ <script>scripts/service_check.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>300</timeout>
+ </commandScript>
+
+ <requiredServices>
+ <service>HDFS</service>
+ <service>YARN</service>
+ <service>SPARK</service>
+ </requiredServices>
+
+ <osSpecifics>
+ <osSpecific>
+ <osFamily>redhat7</osFamily>
+ <packages>
+ <package>
+ <name>spark_${stack_version}-core</name>
+ </package>
+ <package>
+ <name>spark_${stack_version}-python</name>
+ </package>
+ <package>
+ <name>livy_${stack_version}</name>
+ </package>
+ </packages>
+ </osSpecific>
+ </osSpecifics>
+
+ <themes>
+ <theme>
+ <fileName>directories.json</fileName>
+ <default>true</default>
+ </theme>
+ </themes>
+
+ </service>
+ </services>
+</metainfo>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/package/scripts/alerts/alert_livy_port.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/package/scripts/alerts/alert_livy_port.py
new file mode 100644
index 0000000000..50d3791a20
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/package/scripts/alerts/alert_livy_port.py
@@ -0,0 +1,154 @@
+#!/usr/bin/env python3
+"""
+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 time
+import logging
+import traceback
+import socket
+from resource_management import *
+from resource_management.libraries.functions import format
+from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
+from resource_management.libraries.script.script import Script
+from resource_management.core.resources import Execute
+from resource_management.core.logger import Logger
+from resource_management.core import global_lock
+from resource_management.libraries.functions import get_kinit_path
+
+
+OK_MESSAGE = "TCP OK - {0:.3f}s response on port {1}"
+CRITICAL_MESSAGE = "Connection failed on host {0}:{1} ({2})"
+
+logger = logging.getLogger('ambari_alerts')
+
+LIVY_SERVER_HOST_KEY = '{{livy-conf/livy.server.host}}'
+
+LIVY_SERVER_PORT_KEY = '{{livy-conf/livy.server.port}}'
+
+LIVYUSER_DEFAULT = 'livy'
+
+CHECK_COMMAND_TIMEOUT_KEY = 'check.command.timeout'
+CHECK_COMMAND_TIMEOUT_DEFAULT = 60.0
+
+SECURITY_ENABLED_KEY = '{{cluster-env/security_enabled}}'
+SMOKEUSER_KEYTAB_KEY = '{{cluster-env/smokeuser_keytab}}'
+SMOKEUSER_PRINCIPAL_KEY = '{{cluster-env/smokeuser_principal_name}}'
+SMOKEUSER_KEY = '{{cluster-env/smokeuser}}'
+LIVY_SSL_ENABLED_KEY = '{{livy-conf/livy.keystore}}'
+
+# The configured Kerberos executable search paths, if any
+KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY = '{{kerberos-env/executable_search_paths}}'
+
+
+@OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT)
+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 (LIVY_SERVER_HOST_KEY,LIVY_SERVER_PORT_KEY,LIVYUSER_DEFAULT,SECURITY_ENABLED_KEY,SMOKEUSER_KEYTAB_KEY,SMOKEUSER_PRINCIPAL_KEY,SMOKEUSER_KEY,LIVY_SSL_ENABLED_KEY)
+
+@OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT)
+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
+ """
+
+ if configurations is None:
+ return ('UNKNOWN', ['There were no configurations supplied to the script.'])
+
+ LIVY_PORT_DEFAULT = 8999
+
+ port = LIVY_PORT_DEFAULT
+ if LIVY_SERVER_PORT_KEY in configurations:
+ port = int(configurations[LIVY_SERVER_PORT_KEY])
+
+ if LIVY_SERVER_HOST_KEY in configurations:
+ host_name = str(configurations[LIVY_SERVER_HOST_KEY])
+
+ if host_name is None:
+ host_name = socket.getfqdn()
+
+ livyuser = configurations[SMOKEUSER_KEY]
+
+ security_enabled = False
+ if SECURITY_ENABLED_KEY in configurations:
+ security_enabled = str(configurations[SECURITY_ENABLED_KEY]).upper() == 'TRUE'
+
+ smokeuser_kerberos_keytab = None
+ if SMOKEUSER_KEYTAB_KEY in configurations:
+ smokeuser_kerberos_keytab = configurations[SMOKEUSER_KEYTAB_KEY]
+
+ if host_name is None:
+ host_name = socket.getfqdn()
+
+ smokeuser_principal = None
+ if SMOKEUSER_PRINCIPAL_KEY in configurations:
+ smokeuser_principal = configurations[SMOKEUSER_PRINCIPAL_KEY]
+ smokeuser_principal = smokeuser_principal.replace('_HOST',host_name.lower())
+
+ # Get the configured Kerberos executable search paths, if any
+ if KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY in configurations:
+ kerberos_executable_search_paths = configurations[KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY]
+ else:
+ kerberos_executable_search_paths = None
+
+ kinit_path_local = get_kinit_path(kerberos_executable_search_paths)
+
+ if security_enabled:
+ kinitcmd = format("{kinit_path_local} -kt {smokeuser_kerberos_keytab} {smokeuser_principal}; ")
+ # prevent concurrent kinit
+ kinit_lock = global_lock.get_lock(global_lock.LOCK_TYPE_KERBEROS)
+ kinit_lock.acquire()
+ try:
+ Execute(kinitcmd, user=livyuser)
+ finally:
+ kinit_lock.release()
+
+ http_scheme = 'https' if LIVY_SSL_ENABLED_KEY in configurations else 'http'
+ result_code = None
+ try:
+ start_time = time.time()
+ try:
+ livy_livyserver_host = str(host_name)
+
+ livy_cmd = format("curl -s -o /dev/null -w'%{{http_code}}' --negotiate -u: -k {http_scheme}://{livy_livyserver_host}:{port}/sessions | grep 200 ")
+
+ Execute(livy_cmd,
+ tries=3,
+ try_sleep=1,
+ logoutput=True,
+ user=livyuser
+ )
+
+ total_time = time.time() - start_time
+ result_code = 'OK'
+ label = OK_MESSAGE.format(total_time, port)
+ except:
+ result_code = 'CRITICAL'
+ label = CRITICAL_MESSAGE.format(host_name, port, traceback.format_exc())
+ except:
+ label = traceback.format_exc()
+ result_code = 'UNKNOWN'
+
+ return (result_code, [label])
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/package/scripts/livy_server.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/package/scripts/livy_server.py
new file mode 100644
index 0000000000..a123a5bf66
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/package/scripts/livy_server.py
@@ -0,0 +1,149 @@
+#!/usr/bin/env python3
+"""
+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.check_process_status import check_process_status
+from resource_management.libraries.functions.stack_features import check_stack_feature
+from resource_management.libraries.functions.constants import StackFeature
+from resource_management.core.exceptions import Fail
+from resource_management.core.resources.system import Execute
+from resource_management.libraries.providers.hdfs_resource import WebHDFSUtil
+from resource_management.libraries.providers.hdfs_resource import HdfsResourceProvider
+from resource_management import is_empty
+from resource_management import shell
+from resource_management.libraries.functions.decorator import retry
+from resource_management.core.logger import Logger
+from resource_management.libraries.functions.format import format
+from resource_management.libraries.functions import stack_select
+from resource_management.libraries.functions import namenode_ha_utils
+
+from livy_service import livy_service
+from setup_livy import setup_livy
+
+class LivyServer(Script):
+
+ def install(self, env):
+ import params
+ env.set_params(params)
+
+ self.install_packages(env)
+
+ def configure(self, env, upgrade_type=None, config_dir=None):
+ import params
+ env.set_params(params)
+
+ setup_livy(env, 'server', upgrade_type=upgrade_type, action = 'config')
+
+ def start(self, env, upgrade_type=None):
+ import params
+ env.set_params(params)
+
+ if params.has_ats and params.has_livyserver:
+ Logger.info("Verifying DFS directories where ATS stores time line data for active and completed applications.")
+ self.wait_for_dfs_directories_created([params.entity_groupfs_store_dir, params.entity_groupfs_active_dir])
+
+ self.configure(env)
+ livy_service('server', upgrade_type=upgrade_type, action='start')
+
+ def stop(self, env, upgrade_type=None):
+ import params
+ env.set_params(params)
+
+ livy_service('server', upgrade_type=upgrade_type, action='stop')
+
+ def status(self, env):
+ import status_params
+ env.set_params(status_params)
+
+ check_process_status(status_params.livy_server_pid_file)
+
+ # TODO move out and compose with similar method in resourcemanager.py
+ def wait_for_dfs_directories_created(self, dirs):
+ import params
+
+ ignored_dfs_dirs = HdfsResourceProvider.get_ignored_resources_list(params.hdfs_resource_ignore_file)
+
+ if params.security_enabled:
+ Execute(format("{kinit_path_local} -kt {livy_kerberos_keytab} {livy_principal}"),
+ user=params.livy_user
+ )
+ Execute(format("{kinit_path_local} -kt {hdfs_user_keytab} {hdfs_principal_name}"),
+ user=params.hdfs_user
+ )
+
+ for dir_path in dirs:
+ self.wait_for_dfs_directory_created(dir_path, ignored_dfs_dirs)
+
+ def get_pid_files(self):
+ import status_params
+ return [status_params.livy_server_pid_file]
+
+
+ @retry(times=8, sleep_time=20, backoff_factor=1, err_class=Fail)
+ def wait_for_dfs_directory_created(self, dir_path, ignored_dfs_dirs):
+ import params
+
+ if not is_empty(dir_path):
+ dir_path = HdfsResourceProvider.parse_path(dir_path)
+
+ if dir_path in ignored_dfs_dirs:
+ Logger.info("Skipping DFS directory '" + dir_path + "' as it's marked to be ignored.")
+ return
+
+ Logger.info("Verifying if DFS directory '" + dir_path + "' exists.")
+
+ dir_exists = None
+
+ nameservices = namenode_ha_utils.get_nameservices(params.hdfs_site)
+ nameservice = None if not nameservices else nameservices[-1]
+
+ if WebHDFSUtil.is_webhdfs_available(params.is_webhdfs_enabled, params.dfs_type):
+ # check with webhdfs is much faster than executing hdfs dfs -test
+ util = WebHDFSUtil(params.hdfs_site, nameservice, params.hdfs_user, params.security_enabled)
+ list_status = util.run_command(dir_path, 'GETFILESTATUS', method='GET', ignore_status_codes=['404'], assertable_result=False)
+ dir_exists = ('FileStatus' in list_status)
+ else:
+ # have to do time expensive hdfs dfs -d check.
+ dfs_ret_code = shell.call(format("hdfs --config {hadoop_conf_dir} dfs -test -d " + dir_path), user=params.livy_user)[0]
+ dir_exists = not dfs_ret_code #dfs -test -d returns 0 in case the dir exists
+
+ if not dir_exists:
+ raise Fail("DFS directory '" + dir_path + "' does not exist !")
+ else:
+ Logger.info("DFS directory '" + dir_path + "' exists.")
+
+ 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):
+ Logger.info("Executing Livy Server Stack Upgrade pre-restart")
+ stack_select.select_packages(params.version)
+
+ def get_log_folder(self):
+ import params
+ return params.livy_log_dir
+
+ def get_user(self):
+ import params
+ return params.livy_user
+if __name__ == "__main__":
+ LivyServer().execute()
+
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/package/scripts/livy_service.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/package/scripts/livy_service.py
new file mode 100644
index 0000000000..55aa1b2902
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/package/scripts/livy_service.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python3
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
+
+from resource_management.libraries.functions import format
+from resource_management.core.resources.system import File, Execute
+from resource_management.libraries.functions import get_user_call_output
+
+
+def livy_service(name, upgrade_type=None, action=None):
+ import params
+
+ # use the livy user to get the PID (it is protected on non-root systems)
+ livy_server_pid = get_user_call_output.get_user_call_output(format("cat {livy_server_pid_file}"),
+ user=params.livy_user, is_checked_call=False)[1]
+ livy_server_pid = livy_server_pid.replace("\n", " ")
+ process_id_exists_command = format("ls {livy_server_pid_file} >/dev/null 2>&1 && ps -p {livy_server_pid} >/dev/null 2>&1")
+
+ if action == 'start':
+ Execute(format('{livy_server_start}'),
+ user=params.livy_user,
+ environment={'JAVA_HOME': params.java_home},
+ not_if=process_id_exists_command)
+ elif action == 'stop':
+ Execute(format('{livy_server_stop}'),
+ user=params.livy_user,
+ only_if=process_id_exists_command,
+ timeout=10,
+ on_timeout=format("! ( {process_id_exists_command} ) || {sudo} -H -E kill -9 {livy_server_pid}"),
+ environment={'JAVA_HOME': params.java_home})
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/package/scripts/params.py
similarity index 81%
copy from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/params.py
copy to ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/package/scripts/params.py
index a37cb11fb4..a38ef7b786 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/package/scripts/params.py
@@ -45,7 +45,9 @@ sudo = AMBARI_SUDO_BINARY
SERVER_ROLE_DIRECTORY_MAP = {
'SPARK_JOBHISTORYSERVER' : 'spark-historyserver',
'SPARK_CLIENT' : 'spark-client',
- 'SPARK_THRIFTSERVER' : 'spark-thriftserver'
+ 'SPARK_THRIFTSERVER' : 'spark-thriftserver',
+ 'LIVY_SERVER' : 'livy-server',
+ 'LIVY_CLIENT' : 'livy-client'
}
HIVE_SERVER_ROLE_DIRECTORY_MAP = {
@@ -241,7 +243,56 @@ has_ats = len(ats_host) > 0
dfs_type = default("/clusterLevelParams/dfs_type", "")
-
+# livy configs
+has_livyserver = False
+
+if stack_version_formatted and "livy-env" in config['configurations']:
+ livy_component_directory = Script.get_component_from_role(SERVER_ROLE_DIRECTORY_MAP, "LIVY_SERVER")
+ livy_conf = format("{stack_root}/current/{livy_component_directory}/conf")
+ livy_log_dir = config['configurations']['livy-env']['livy_log_dir']
+ livy_pid_dir = status_params.livy_pid_dir
+ livy_home = format("{stack_root}/current/{livy_component_directory}")
+ livy_user = status_params.livy_user
+ livy_group = status_params.livy_group
+ user_group = status_params.user_group
+ livy_hdfs_user_dir = format("/user/{livy_user}")
+ livy_server_pid_file = status_params.livy_server_pid_file
+ livy_recovery_dir = default("/configurations/livy-conf/livy.server.recovery.state-store.url", "/livy-recovery")
+ livy_recovery_store = default("/configurations/livy-conf/livy.server.recovery.state-store", "filesystem")
+
+ livy_server_start = format("{livy_home}/bin/livy-server start")
+ livy_server_stop = format("{livy_home}/bin/livy-server stop")
+ livy_logs_dir = format("{livy_home}/logs")
+
+ livy_env_sh = config['configurations']['livy-env']['content']
+ livy_log4j_properties = config['configurations']['livy-log4j-properties']['content']
+ livy_spark_blacklist_properties = config['configurations']['livy-spark-blacklist']['content']
+
+ if 'livy.server.kerberos.keytab' in config['configurations']['livy-conf']:
+ livy_kerberos_keytab = config['configurations']['livy-conf']['livy.server.kerberos.keytab']
+ else:
+ livy_kerberos_keytab = config['configurations']['livy-conf']['livy.server.launch.kerberos.keytab']
+ if 'livy.server.kerberos.principal' in config['configurations']['livy-conf']:
+ livy_kerberos_principal = config['configurations']['livy-conf']['livy.server.kerberos.principal']
+ else:
+ livy_kerberos_principal = config['configurations']['livy-conf']['livy.server.launch.kerberos.principal']
+
+ livy_livyserver_hosts = default("/clusterHostInfo/livy_server_hosts", [])
+ livy_http_scheme = 'https' if 'livy.keystore' in config['configurations']['livy-conf'] else 'http'
+
+ # ats 1.5 properties
+ entity_groupfs_active_dir = config['configurations']['yarn-site']['yarn.timeline-service.entity-group-fs-store.active-dir']
+ entity_groupfs_active_dir_mode = 0o1777
+ entity_groupfs_store_dir = config['configurations']['yarn-site']['yarn.timeline-service.entity-group-fs-store.done-dir']
+ entity_groupfs_store_dir_mode = 0o700
+ is_webhdfs_enabled = hdfs_site['dfs.webhdfs.enabled']
+
+ if len(livy_livyserver_hosts) > 0:
+ has_livyserver = True
+ if security_enabled:
+ livy_principal = livy_kerberos_principal.replace('_HOST', config['agentLevelParams']['hostname'].lower())
+
+ livy_livyserver_port = default('configurations/livy-conf/livy.server.port',8999)
import functools
#create partial functions with common arguments for every HdfsResource call
@@ -260,5 +311,4 @@ HdfsResource = functools.partial(
default_fs = default_fs,
immutable_paths = get_not_managed_resources(),
dfs_type = dfs_type
-)
-
+)
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/package/scripts/service_check.py
new file mode 100644
index 0000000000..cfadd034e8
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/package/scripts/service_check.py
@@ -0,0 +1,56 @@
+#!/usr/bin/env python3
+"""
+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 agree 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 subprocess
+import time
+import os
+
+from resource_management.core.exceptions import Fail
+from resource_management.libraries.script.script import Script
+from resource_management.libraries.functions.format import format
+from resource_management.core.resources.system import Execute
+from resource_management.core.logger import Logger
+
+CHECK_COMMAND_TIMEOUT_DEFAULT = 60.0
+
+class LivyServiceCheck(Script):
+ def service_check(self, env):
+ import params
+ env.set_params(params)
+
+ if params.has_livyserver:
+ live_livyserver_host = ""
+ for livyserver_host in params.livy_livyserver_hosts:
+ try:
+ Execute(format("curl -s -o /dev/null -w'%{{http_code}}' --negotiate -u: -k {livy_http_scheme}://{livyserver_host}:{livy_livyserver_port}/sessions | grep 200"),
+ tries=3,
+ try_sleep=1,
+ logoutput=True,
+ user=params.smoke_user
+ )
+ live_livyserver_host = livyserver_host
+ break
+ except:
+ pass
+ if len(params.livy_livyserver_hosts) > 0 and live_livyserver_host == "":
+ raise Fail("Connection to all Livy servers failed")
+
+
+if __name__ == "__main__":
+ LivyServiceCheck().execute()
+
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/package/scripts/setup_livy.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/package/scripts/setup_livy.py
new file mode 100644
index 0000000000..b169cdd6a6
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/package/scripts/setup_livy.py
@@ -0,0 +1,102 @@
+#!/usr/bin/env python3
+"""
+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.default import default
+from resource_management.libraries.functions.generate_logfeeder_input_config import generate_logfeeder_input_config
+from resource_management import Directory, File, PropertiesFile, Template, InlineTemplate, format
+
+
+def setup_livy(env, type, upgrade_type = None, action = None):
+ import params
+
+ Directory([params.livy_pid_dir, params.livy_log_dir],
+ owner=params.livy_user,
+ group=params.user_group,
+ mode=0o775,
+ cd_access='a',
+ create_parents=True
+ )
+ if type == 'server' and action == 'config':
+ params.HdfsResource(params.livy_hdfs_user_dir,
+ type="directory",
+ action="create_on_execute",
+ owner=params.livy_user,
+ mode=0o775
+ )
+ params.HdfsResource(None, action="execute")
+
+ if params.livy_recovery_store == 'filesystem':
+ params.HdfsResource(params.livy_recovery_dir,
+ type="directory",
+ action="create_on_execute",
+ owner=params.livy_user,
+ mode=0o700
+ )
+ params.HdfsResource(None, action="execute")
+
+ generate_logfeeder_input_config('livy', Template("input.config-livy.json.j2", extra_imports=[default]))
+
+ # create livy-env.sh in etc/conf dir
+ File(os.path.join(params.livy_conf, 'livy-env.sh'),
+ owner=params.livy_user,
+ group=params.livy_group,
+ content=InlineTemplate(params.livy_env_sh),
+ mode=0o644,
+ )
+
+ # create livy-client.conf in etc/conf dir
+ PropertiesFile(format("{livy_conf}/livy-client.conf"),
+ properties = params.config['configurations']['livy-client-conf'],
+ key_value_delimiter = " ",
+ owner=params.livy_user,
+ group=params.livy_group,
+ )
+
+ # create livy.conf in etc/conf dir
+ PropertiesFile(format("{livy_conf}/livy.conf"),
+ properties = params.config['configurations']['livy-conf'],
+ key_value_delimiter = " ",
+ owner=params.livy_user,
+ group=params.livy_group,
+ )
+
+ # create log4j.properties in etc/conf dir
+ File(os.path.join(params.livy_conf, 'log4j.properties'),
+ owner=params.livy_user,
+ group=params.livy_group,
+ content=params.livy_log4j_properties,
+ mode=0o644,
+ )
+
+ # create spark-blacklist.properties in etc/conf dir
+ File(os.path.join(params.livy_conf, 'spark-blacklist.conf'),
+ owner=params.livy_user,
+ group=params.livy_group,
+ content=params.livy_spark_blacklist_properties,
+ mode=0o644,
+ )
+
+ Directory(params.livy_logs_dir,
+ owner=params.livy_user,
+ group=params.livy_group,
+ mode=0o755,
+ )
+
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/package/scripts/status_params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/package/scripts/status_params.py
new file mode 100644
index 0000000000..da308ac05d
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/package/scripts/status_params.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python3
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""
+
+from resource_management.libraries.functions.format import format
+from resource_management.libraries.script.script import Script
+from resource_management.libraries.functions.default import default
+
+config = Script.get_config()
+
+spark_user = config['configurations']['spark-env']['spark_user']
+spark_group = config['configurations']['spark-env']['spark_group']
+user_group = config['configurations']['cluster-env']['user_group']
+
+if 'hive-env' in config['configurations']:
+ hive_user = config['configurations']['hive-env']['hive_user']
+else:
+ hive_user = "hive"
+
+spark_pid_dir = config['configurations']['spark-env']['spark_pid_dir']
+spark_history_server_pid_file = format("{spark_pid_dir}/spark-{spark_user}-org.apache.spark.deploy.history.HistoryServer-1.pid")
+spark_thrift_server_pid_file = format("{spark_pid_dir}/spark-{spark_user}-org.apache.spark.sql.hive.thriftserver.HiveThriftServer2-1.pid")
+stack_name = default("/clusterLevelParams/stack_name", None)
+
+if "livy-env" in config['configurations']:
+ livy_user = config['configurations']['livy-env']['livy_user']
+ livy_group = config['configurations']['livy-env']['livy_group']
+ livy_pid_dir = config['configurations']['livy-env']['livy_pid_dir']
+ livy_server_pid_file = format("{livy_pid_dir}/livy-{livy_user}-server.pid")
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/templates/input.config-spark.json.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/package/templates/input.config-livy.json.j2
similarity index 53%
copy from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/templates/input.config-spark.json.j2
copy to ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/package/templates/input.config-livy.json.j2
index 089897b978..96df20410e 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/templates/input.config-spark.json.j2
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/package/templates/input.config-livy.json.j2
@@ -18,14 +18,9 @@
{
"input":[
{
- "type":"spark_jobhistory_server",
+ "type":"livy_server",
"rowtype":"service",
- "path":"{{default('/configurations/spark-env/spark_log_dir', '/var/log/spark')}}/spark-*-org.apache.spark.deploy.history.HistoryServer*.out"
- },
- {
- "type":"spark_thriftserver",
- "rowtype":"service",
- "path":"{{default('/configurations/spark-env/spark_log_dir', '/var/log/spark')}}/spark-*-org.apache.spark.sql.hive.thriftserver.HiveThriftServer2*.out"
+ "path":"{{default('/configurations/livy-env/livy_log_dir', '/var/log/livy')}}/livy-{{default('/configurations/livy-env/livy_user', 'livy')}}-server.out"
}
],
"filter":[
@@ -34,25 +29,17 @@
"conditions":{
"fields":{
"type":[
- "spark_jobhistory_server",
- "spark_thriftserver",
- "livy2_server"
+ "livy_server"
]
}
},
- "log4j_format":"",
- "multiline_pattern":"^(%{SPARK_DATESTAMP:logtime}%{SPACE}%{LOGLEVEL:level})",
- "message_pattern":"(?m)^%{SPARK_DATESTAMP:logtime}%{SPACE}%{LOGLEVEL:level}%{SPACE}%{JAVAFILE:file}:%{SPACE}%{GREEDYDATA:log_message}",
+ "log4j_format":"%d{ISO8601} %-5p [%t]: %c{2} (%F:%M(%L)) - %m%n",
+ "multiline_pattern":"^(%{TIMESTAMP_ISO8601:logtime})",
+ "message_pattern":"(?m)^%{TIMESTAMP_ISO8601:logtime}%{SPACE}%{LOGLEVEL:level}%{SPACE}\\[%{DATA:thread_name}\\]:%{SPACE}%{JAVACLASS:logger_name}%{SPACE}\\((%{JAVAFILE:file})?:(%{JAVAMETHOD:method})?\\((%{INT:line_number})?\\)\\)%{SPACE}-%{SPACE}%{GREEDYDATA:log_message}",
"post_map_values":{
"logtime":{
"map_date":{
- "target_date_pattern":"yy/MM/dd HH:mm:ss"
- }
- },
- "level":{
- "map_field_value":{
- "pre_value":"WARNING",
- "post_value":"WARN"
+ "target_date_pattern":"yyyy-MM-dd'T'HH:mm:ss,SSS"
}
}
}
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/role_command_order.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/role_command_order.json
new file mode 100644
index 0000000000..55a24334a3
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/role_command_order.json
@@ -0,0 +1,8 @@
+{
+ "general_deps" : {
+ "_comment" : "dependencies for LIVY",
+ "LIVY_SERVER-START" : ["SPARK_JOBHISTORYSERVER-START"],
+ "LIVY_SERVICE_CHECK-SERVICE_CHECK" : ["LIVY_SERVER-START"]
+ }
+}
+
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/themes/directories.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/themes/directories.json
new file mode 100644
index 0000000000..08eec0ec3f
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/LIVY/themes/directories.json
@@ -0,0 +1,89 @@
+{
+ "name": "directories",
+ "description": "Directories theme for LIVY service",
+ "configuration": {
+ "layouts": [
+ {
+ "name": "directories",
+ "tabs": [
+ {
+ "name": "directories",
+ "display-name": "Directories",
+ "layout": {
+ "tab-columns": "1",
+ "tab-rows": "4",
+ "sections": [
+ {
+ "name": "subsection-log-dirs",
+ "display-name": "LOG DIRS",
+ "row-index": "0",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "1",
+ "section-columns": "1",
+ "section-rows": "1",
+ "subsections": [
+ {
+ "name": "subsection-log-dirs",
+ "row-index": "0",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "1"
+ }
+ ]
+ },
+ {
+ "name": "subsection-pid-dirs",
+ "display-name": "PID DIRS",
+ "row-index": "1",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "1",
+ "section-columns": "1",
+ "section-rows": "1",
+ "subsections": [
+ {
+ "name": "subsection-pid-dirs",
+ "row-index": "0",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "1"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ],
+ "placement": {
+ "configuration-layout": "default",
+ "configs": [
+ {
+ "config": "livy-env/livy_log_dir",
+ "subsection-name": "subsection-log-dirs"
+ },
+ {
+ "config": "livy-env/livy_pid_dir",
+ "subsection-name": "subsection-pid-dirs"
+ }
+ ]
+ },
+ "widgets": [
+ {
+ "config": "livy-env/livy_log_dir",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "livy-env/livy_pid_dir",
+ "widget": {
+ "type": "text-field"
+ }
+ }
+ ]
+ }
+ }
+
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/params.py
index a37cb11fb4..f4fbc8f7c3 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/params.py
@@ -206,16 +206,9 @@ elif spark_transport_mode.lower() == 'http':
spark_thrift_endpoint = default("configurations/spark-hive-site-override/hive.server2.http.endpoint", "cliservice")
# thrift server support
-spark_thrift_sparkconf = None
-spark_thrift_cmd_opts_properties = ''
-spark_thrift_fairscheduler_content = None
-
-if has_spark_thriftserver and 'spark-defaults' in config['configurations']:
- spark_thrift_sparkconf = config['configurations']['spark-defaults']
- spark_thrift_cmd_opts_properties = config['configurations']['spark-env']['spark_thrift_cmd_opts']
-
- if 'spark-thrift-fairscheduler' in config['configurations'] and 'fairscheduler_content' in config['configurations']['spark-thrift-fairscheduler']:
- spark_thrift_fairscheduler_content = config['configurations']['spark-thrift-fairscheduler']['fairscheduler_content']
+spark_thrift_sparkconf = config['configurations']['spark-defaults']
+spark_thrift_cmd_opts_properties = config['configurations']['spark-env']['spark_thrift_cmd_opts']
+spark_thrift_fairscheduler_content = config['configurations']['spark-thrift-fairscheduler']['fairscheduler_content']
if is_hive_installed:
# update default metastore client properties (async wait for metastore component) it is useful in case of
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/setup_spark.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/setup_spark.py
index a48c2da8c2..5577211af4 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/setup_spark.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/scripts/setup_spark.py
@@ -141,14 +141,13 @@ def setup_spark(env, type, upgrade_type = None, action = None):
group=params.spark_group,
mode=0o644)
- if params.spark_thrift_fairscheduler_content:
- # create spark-thrift-fairscheduler.xml
- File(os.path.join(params.spark_conf_dir,"spark-thrift-fairscheduler.xml"),
- owner=params.spark_user,
- group=params.spark_group,
- mode=0o755,
- content=InlineTemplate(params.spark_thrift_fairscheduler_content)
- )
+ # create spark-thrift-fairscheduler.xml
+ File(os.path.join(params.spark_conf_dir,"spark-thrift-fairscheduler.xml"),
+ owner=params.spark_user,
+ group=params.spark_group,
+ mode=0o755,
+ content=InlineTemplate(params.spark_thrift_fairscheduler_content)
+ )
if type == "client":
Logger.info('Spark client config.')
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/templates/input.config-spark.json.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/templates/input.config-spark.json.j2
index 089897b978..06a280b7a6 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/templates/input.config-spark.json.j2
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/SPARK/package/templates/input.config-spark.json.j2
@@ -35,8 +35,7 @@
"fields":{
"type":[
"spark_jobhistory_server",
- "spark_thriftserver",
- "livy2_server"
+ "spark_thriftserver"
]
}
},
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/LIVY/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/LIVY/metainfo.xml
new file mode 100644
index 0000000000..61f32e92f9
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/LIVY/metainfo.xml
@@ -0,0 +1,27 @@
+<?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>LIVY</name>
+ <version>0.8.0-1</version>
+ </service>
+ </services>
+</metainfo>
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org
(ambari) 21/22: fix
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch eee
in repository https://gitbox.apache.org/repos/asf/ambari.git
commit 0760696708de0dc0d32f4eef78d6801fca9c7706
Author: jialiang <ji...@gmail.com>
AuthorDate: Sat Sep 7 16:46:31 2024 +0800
fix
---
ambari-admin/pom.xml | 4 ++--
.../stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/params.py | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/ambari-admin/pom.xml b/ambari-admin/pom.xml
index d0c1bef4a5..4e1c278cd8 100644
--- a/ambari-admin/pom.xml
+++ b/ambari-admin/pom.xml
@@ -135,7 +135,7 @@
<commandlineArgs>${args.shell} ${basedir}${dirsep}set-ambari-version.${fileextension.shell} ${ambariVersion}</commandlineArgs>
</configuration>
</execution>
- <execution>
+<!-- <execution>
<id>unit test</id>
<phase>test</phase>
<goals>
@@ -149,7 +149,7 @@
<argument>test-single-run</argument>
</arguments>
</configuration>
- </execution>
+ </execution>-->
</executions>
</plugin>
<plugin>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/params.py
index 108f6dc981..ba04ef0b25 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/HIVE/package/scripts/params.py
@@ -227,6 +227,7 @@ if hive_jdbc_driver == "com.microsoft.sqlserver.jdbc.SQLServerDriver":
hive_previous_jdbc_jar_name = default("/ambariLevelParams/previous_custom_mssql_jdbc_name", None)
elif hive_jdbc_driver == "com.mysql.jdbc.Driver":
jdbc_jar_name = default("/ambariLevelParams/custom_mysql_jdbc_name", None)
+ hive_previous_jdbc_jar_name = default("/ambariLevelParams/previous_custom_mysql_jdbc_name", None)
elif hive_jdbc_driver == "com.mysql.cj.jdbc.Driver":
jdbc_jar_name = default("/ambariLevelParams/custom_mysql_jdbc_name", None)
hive_previous_jdbc_jar_name = default("/ambariLevelParams/previous_custom_mysql_jdbc_name", None)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org
(ambari) 10/22: ranger py3
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch eee
in repository https://gitbox.apache.org/repos/asf/ambari.git
commit 9ca07921d3c866f42a8f9f787e2dcc08a7251163
Author: jialiang <ji...@gmail.com>
AuthorDate: Fri Sep 6 17:17:44 2024 +0800
ranger py3
---
.../BIGTOP/3.2.0/services/KAFKA/package/scripts/setup_ranger_kafka.py | 2 +-
.../stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/params.py | 2 +-
.../BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_admin.py | 2 +-
.../BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_service.py | 2 +-
.../BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_tagsync.py | 2 +-
.../BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_usersync.py | 2 +-
.../BIGTOP/3.3.0/services/RANGER/package/scripts/service_check.py | 1 +
.../BIGTOP/3.3.0/services/RANGER/package/scripts/setup_ranger_xml.py | 2 +-
.../BIGTOP/3.3.0/services/RANGER/package/scripts/status_params.py | 2 +-
.../stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/upgrade.py | 3 +--
.../stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/kms.py | 2 +-
.../BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/kms_server.py | 2 +-
.../BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/kms_service.py | 2 +-
.../stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/params.py | 2 +-
.../BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/service_check.py | 2 +-
.../BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/status_params.py | 2 +-
.../stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/upgrade.py | 2 +-
17 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/package/scripts/setup_ranger_kafka.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/package/scripts/setup_ranger_kafka.py
index 55daf2df33..a82bb9ad3e 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/package/scripts/setup_ranger_kafka.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/package/scripts/setup_ranger_kafka.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/params.py
index f56c861998..8904093cef 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/params.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_admin.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_admin.py
index 509b9cd236..7f1a38d132 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_admin.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_admin.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_service.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_service.py
index a44ba264e0..fb7bfc6f25 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_service.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_service.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_tagsync.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_tagsync.py
index 96021c9150..87d0f5f1fe 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_tagsync.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_tagsync.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_usersync.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_usersync.py
index 896547e158..69f2dcf646 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_usersync.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_usersync.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/service_check.py
index fb6af95456..ff2728ae98 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/service_check.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/setup_ranger_xml.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/setup_ranger_xml.py
index 79401d7eaf..51251f42c8 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/setup_ranger_xml.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/setup_ranger_xml.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/status_params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/status_params.py
index 2fd95f6f87..38d3496aaa 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/status_params.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/status_params.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/upgrade.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/upgrade.py
index 77d52ac5b8..ec05bc9ba2 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/upgrade.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/upgrade.py
@@ -1,5 +1,4 @@
-
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/kms.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/kms.py
index 30c9d05bb5..2ad6cc1790 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/kms.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/kms.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/kms_server.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/kms_server.py
index b07677e5b4..a1d4b0ea4a 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/kms_server.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/kms_server.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/kms_service.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/kms_service.py
index 2ff48c3e97..f4df4df5c7 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/kms_service.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/kms_service.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/params.py
index 5d372aa5ab..9ef7204e0c 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/params.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/service_check.py
index 84e4e737d0..3f7126de9e 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/service_check.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/status_params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/status_params.py
index 2f6f505d82..1c285a135f 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/status_params.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/status_params.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/upgrade.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/upgrade.py
index 465d54e5ad..a2fc2b72e2 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/upgrade.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/upgrade.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org
(ambari) 04/22: AMBARI-26121: Fix Python3 compilation error when packaging Ambari on CentOS 7
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch eee
in repository https://gitbox.apache.org/repos/asf/ambari.git
commit db4d38fc5782ca5f0abed65c4bb848a313910b62
Author: jialiang <ji...@gmail.com>
AuthorDate: Fri Sep 6 16:59:21 2024 +0800
AMBARI-26121: Fix Python3 compilation error when packaging Ambari on CentOS 7
---
ambari-agent/pom.xml | 3 +++
ambari-server/pom.xml | 3 +++
2 files changed, 6 insertions(+)
diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml
index 1ecbab8c42..ab24424c4d 100644
--- a/ambari-agent/pom.xml
+++ b/ambari-agent/pom.xml
@@ -314,6 +314,9 @@
<license>2012, Apache Software Foundation</license>
<group>Development</group>
<description>Maven Recipe: RPM Package.</description>
+ <defineStatements>
+ <defineStatement>__python 3</defineStatement>
+ </defineStatements>
<requires>
<require>${rpm.dependency.list}</require>
</requires>
diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml
index c2f11db578..47f169a7bd 100644
--- a/ambari-server/pom.xml
+++ b/ambari-server/pom.xml
@@ -529,6 +529,9 @@
<license>2012, Apache Software Foundation</license>
<group>Development</group>
<description>Maven Recipe: RPM Package.</description>
+ <defineStatements>
+ <defineStatement>__python 3</defineStatement>
+ </defineStatements>
<autoRequires>no</autoRequires>
<prefix>/</prefix>
<requires>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org
(ambari) 13/22: add knox
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch eee
in repository https://gitbox.apache.org/repos/asf/ambari.git
commit 41b63c327baa5174567e1b98002dbe712b0ccf2a
Author: jialiang <ji...@gmail.com>
AuthorDate: Sat Sep 7 10:58:51 2024 +0800
add knox
---
.../stacks/BIGTOP/3.2.0/services/KNOX/alerts.json | 32 ++
.../services/KNOX/configuration/admin-topology.xml | 105 ++++
.../services/KNOX/configuration/gateway-log4j.xml | 110 ++++
.../services/KNOX/configuration/gateway-log4j2.xml | 117 +++++
.../services/KNOX/configuration/gateway-site.xml | 99 ++++
.../3.2.0/services/KNOX/configuration/knox-env.xml | 93 ++++
.../services/KNOX/configuration/knoxcli-log4j2.xml | 71 +++
.../KNOX/configuration/knoxsso-topology.xml | 122 +++++
.../services/KNOX/configuration/ldap-log4j.xml | 93 ++++
.../services/KNOX/configuration/ldap-log4j2.xml | 73 +++
.../KNOX/configuration/ranger-knox-audit.xml | 132 +++++
.../ranger-knox-plugin-properties.xml | 132 +++++
.../configuration/ranger-knox-policymgr-ssl.xml | 72 +++
.../KNOX/configuration/ranger-knox-security.xml | 64 +++
.../services/KNOX/configuration/shell-log4j2.xml | 71 +++
.../3.2.0/services/KNOX/configuration/topology.xml | 180 +++++++
.../services/KNOX/configuration/users-ldif.xml | 155 ++++++
.../BIGTOP/3.2.0/services/KNOX/kerberos.json | 70 +++
.../stacks/BIGTOP/3.2.0/services/KNOX/metainfo.xml | 132 +++++
.../KNOX/package/files/validateKnoxStatus.py | 43 ++
.../3.2.0/services/KNOX/package/scripts/knox.py | 232 +++++++++
.../services/KNOX/package/scripts/knox_gateway.py | 215 ++++++++
.../services/KNOX/package/scripts/knox_ldap.py | 59 +++
.../3.2.0/services/KNOX/package/scripts/params.py | 29 ++
.../services/KNOX/package/scripts/params_linux.py | 577 +++++++++++++++++++++
.../KNOX/package/scripts/params_windows.py | 71 +++
.../services/KNOX/package/scripts/service_check.py | 96 ++++
.../KNOX/package/scripts/setup_ranger_knox.py | 149 ++++++
.../services/KNOX/package/scripts/status_params.py | 59 +++
.../3.2.0/services/KNOX/package/scripts/upgrade.py | 148 ++++++
.../package/templates/input.config-knox.json.j2 | 60 +++
.../KNOX/package/templates/krb5JAASLogin.conf.j2 | 27 +
.../3.2.0/services/KNOX/quicklinks/quicklinks.json | 23 +
.../3.2.0/services/KNOX/role_command_order.json | 7 +
.../BIGTOP/3.2.0/services/KNOX/service_advisor.py | 255 +++++++++
.../3.2.0/services/KNOX/themes/credentials.json | 38 ++
.../3.2.0/services/KNOX/themes/directories.json | 88 ++++
37 files changed, 4099 insertions(+)
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/alerts.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/alerts.json
new file mode 100755
index 0000000000..4986e04a08
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/alerts.json
@@ -0,0 +1,32 @@
+{
+ "KNOX": {
+ "service": [],
+ "KNOX_GATEWAY": [
+ {
+ "name": "knox_gateway_process",
+ "label": "Knox Gateway Process",
+ "description": "This host-level alert is triggered if the Knox Gateway cannot be determined to be up.",
+ "interval": 1,
+ "scope": "HOST",
+ "source": {
+ "type": "PORT",
+ "uri": "{{gateway-site/gateway.port}}",
+ "default_port": 8443,
+ "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
+ }
+ }
+ }
+ }
+ ]
+ }
+}
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/admin-topology.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/admin-topology.xml
new file mode 100755
index 0000000000..14f2e5972a
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/admin-topology.xml
@@ -0,0 +1,105 @@
+<?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">
+ <!-- topology file -->
+ <property>
+ <name>content</name>
+ <display-name>admin-topology template</display-name>
+ <value>
+ <topology>
+
+ <gateway>
+
+ <provider>
+ <role>authentication</role>
+ <name>ShiroProvider</name>
+ <enabled>true</enabled>
+ <param>
+ <name>sessionTimeout</name>
+ <value>30</value>
+ </param>
+ <param>
+ <name>main.ldapRealm</name>
+ <value>org.apache.hadoop.gateway.shirorealm.KnoxLdapRealm</value>
+ </param>
+ <param>
+ <name>main.ldapRealm.userDnTemplate</name>
+ <value>uid={0},ou=people,dc=hadoop,dc=apache,dc=org</value>
+ </param>
+ <param>
+ <name>main.ldapRealm.contextFactory.url</name>
+ <value>ldap://{{knox_host_name}}:33389</value>
+ </param>
+ <param>
+ <name>main.ldapRealm.contextFactory.authenticationMechanism</name>
+ <value>simple</value>
+ </param>
+ <param>
+ <name>urls./**</name>
+ <value>authcBasic</value>
+ </param>
+ </provider>
+
+ <provider>
+ <role>authorization</role>
+ <name>AclsAuthz</name>
+ <enabled>true</enabled>
+ <param>
+ <name>knox.acl.mode</name>
+ <value>OR</value>
+ </param>
+ <param>
+ <name>knox.acl</name>
+ <value>KNOX_ADMIN_USERS;KNOX_ADMIN_GROUPS;*</value>
+ </param>
+ </provider>
+
+ <provider>
+ <role>identity-assertion</role>
+ <name>HadoopGroupProvider</name>
+ <enabled>true</enabled>
+ <param>
+ <name>CENTRAL_GROUP_CONFIG_PREFIX</name>
+ <value>gateway.group.config.</value>
+ </param>
+ </provider>
+
+ </gateway>
+
+ <service>
+ <role>KNOX</role>
+ </service>
+
+ </topology>
+
+ </value>
+ <description>
+ The configuration specifies the Knox admin API configuration and access details. The authentication provider should be configured to match your deployment details.
+ </description>
+ <value-attributes>
+ <type>content</type>
+ <empty-value-valid>true</empty-value-valid>
+ <show-property-name>false</show-property-name>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/gateway-log4j.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/gateway-log4j.xml
new file mode 100755
index 0000000000..5165754059
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/gateway-log4j.xml
@@ -0,0 +1,110 @@
+<?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="false">
+ <property>
+ <name>knox_gateway_log_maxfilesize</name>
+ <value>256</value>
+ <description>The maximum size of backup file before the log is rotated</description>
+ <display-name>Knox Gateway Log: backup file size</display-name>
+ <value-attributes>
+ <unit>MB</unit>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>knox_gateway_log_maxbackupindex</name>
+ <value>20</value>
+ <description>The number of backup files</description>
+ <display-name>Knox Gateway Log: # of backup files</display-name>
+ <value-attributes>
+ <type>int</type>
+ <minimum>0</minimum>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>content</name>
+ <display-name>gateway-log4j template</display-name>
+ <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.
+
+ app.log.dir=${launcher.dir}/../logs
+ app.log.file=${launcher.name}.log
+ app.audit.file=${launcher.name}-audit.log
+
+ log4j.rootLogger=ERROR, drfa
+
+ log4j.logger.org.apache.knox.gateway=INFO
+ #log4j.logger.org.apache.knox.gateway=DEBUG
+
+ #log4j.logger.org.eclipse.jetty=DEBUG
+ #log4j.logger.org.apache.shiro=DEBUG
+ #log4j.logger.org.apache.http=DEBUG
+ #log4j.logger.org.apache.http.client=DEBUG
+ #log4j.logger.org.apache.http.headers=DEBUG
+ #log4j.logger.org.apache.http.wire=DEBUG
+
+ log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+ log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+ log4j.appender.stdout.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n
+
+ log4j.appender.drfa=org.apache.log4j.DailyRollingFileAppender
+ log4j.appender.drfa.File=${app.log.dir}/${app.log.file}
+ log4j.appender.drfa.DatePattern=.yyyy-MM-dd
+ log4j.appender.drfa.layout=org.apache.log4j.PatternLayout
+ log4j.appender.drfa.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n
+ log4j.appender.drfa.MaxFileSize = {{knox_gateway_log_maxfilesize}}MB
+ log4j.appender.drfa.MaxBackupIndex = {{knox_gateway_log_maxbackupindex}}
+
+ log4j.logger.audit=INFO, auditfile
+ log4j.appender.auditfile=org.apache.log4j.DailyRollingFileAppender
+ log4j.appender.auditfile.File=${app.log.dir}/${app.audit.file}
+ log4j.appender.auditfile.Append = true
+ log4j.appender.auditfile.DatePattern = '.'yyyy-MM-dd
+ log4j.appender.auditfile.layout = org.apache.hadoop.gateway.audit.log4j.layout.AuditLayout
+
+ </value>
+ <description>
+ content for log4j.properties file for Knox.
+ </description>
+ <value-attributes>
+ <type>content</type>
+ <show-property-name>false</show-property-name>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/gateway-log4j2.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/gateway-log4j2.xml
new file mode 100755
index 0000000000..f35a4f0a9d
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/gateway-log4j2.xml
@@ -0,0 +1,117 @@
+<?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>content</name>
+ <description>gateway-log4j2.xml</description>
+ <value><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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>
+ <Properties>
+ <Property name="app.log.dir">${sys:launcher.dir}/../logs</Property>
+ <Property name="app.log.file">${sys:launcher.name}.log</Property>
+ <Property name="app.audit.file">${sys:launcher.name}-audit.log</Property>
+ </Properties>
+
+ <Appenders>
+ <RollingFile name="auditfile" fileName="${app.log.dir}/${app.audit.file}" filePattern="${app.log.dir}/${app.audit.file}.%d{yyyy-MM-dd}">
+ <AuditLayout />
+ <TimeBasedTriggeringPolicy />
+ </RollingFile>
+ <Console name="stdout" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n" />
+ </Console>
+ <RollingFile name="drfa" fileName="${app.log.dir}/${app.log.file}" filePattern="${app.log.dir}/${app.log.file}.%d{yyyy-MM-dd}">
+ <!-- Same as ISO8601 format but without the 'T' (log4j1 compatible) -->
+ <PatternLayout pattern="%d{yyyy-MM-dd' 'HH:mm:ss,SSS} %X{trace_id} %-5p %c{2} (%F:%M(%L)) - %m%n" />
+ <TimeBasedTriggeringPolicy />
+ </RollingFile>
+<!-- <RollingFile name="httpclient" fileName="${app.log.dir}/${launcher.name}-http-client.log" filePattern="${app.log.dir}/${launcher.name}-http-client.log.%d{yyyy-MM-dd}">-->
+<!-- <PatternLayout pattern="%d{ISO8601}|%t|%m%n" />-->
+<!-- <TimeBasedTriggeringPolicy />-->
+<!-- </RollingFile>-->
+<!-- <RollingFile name="httpaccess" fileName="${app.log.dir}/${launcher.name}-http-access.log" filePattern="${app.log.dir}/${launcher.name}-http-access.log.%d{yyyy-MM-dd}">-->
+<!-- <PatternLayout pattern="%d{ISO8601}|%t|%m%n" />-->
+<!-- <TimeBasedTriggeringPolicy />-->
+<!-- </RollingFile>-->
+<!-- <RollingFile name="httpserver" fileName="${app.log.dir}/${launcher.name}-http-server.log" filePattern="${app.log.dir}/${launcher.name}-http-server.log.%d{yyyy-MM-dd}">-->
+<!-- <PatternLayout pattern="%d{ISO8601}|%t|%m%n" />-->
+<!-- <TimeBasedTriggeringPolicy />-->
+<!-- </RollingFile>-->
+ </Appenders>
+ <Loggers>
+ <Logger name="audit" level="INFO">
+ <AppenderRef ref="auditfile" />
+ </Logger>
+ <Logger name="org.apache.knox.gateway" level="INFO" />
+ <Root level="ERROR">
+ <AppenderRef ref="drfa" />
+ </Root>
+<!-- <Logger name="org.apache.knox.gateway.websockets" level="DEBUG" />-->
+<!-- <Logger name="org.springframework" level="DEBUG" />-->
+<!-- <Logger name="org.apache.knox.gateway.http.request.body" level="OFF" />-->
+<!-- <Logger name="org.apache.knox.gateway.http" level="TRACE">-->
+<!-- <AppenderRef ref="httpserver" />-->
+<!-- </Logger>-->
+<!-- <Logger name="org.apache.shiro" level="DEBUG" />-->
+<!-- <Logger name="org.apache.knox.gateway.http.response.body" level="OFF" />-->
+<!-- <Logger name="org.apache.http.client" level="DEBUG" />-->
+<!-- <Logger name="org.apache.knox.gateway.http.request.headers" level="OFF" />-->
+<!-- <Logger name="org.apache.http.wire" level="DEBUG">-->
+<!-- <AppenderRef ref="httpclient" />-->
+<!-- </Logger>-->
+<!-- <Logger name="org.apache.knox.gateway.http.response.headers" level="OFF" />-->
+<!-- <Logger name="net.sf.ehcache" level="DEBUG" />-->
+<!-- <Logger name="org.apache.http" level="DEBUG" />-->
+<!-- <Logger name="org.apache.http.headers" level="DEBUG" />-->
+<!-- <Logger name="org.apache.shiro.util.ThreadContext" level="DEBUG" />-->
+<!-- <Logger name="org.apache.knox.gateway" level="DEBUG" />-->
+<!-- <Logger name="org.eclipse.jetty" level="DEBUG" />-->
+<!-- <Logger name="org.apache.knox.gateway.access" level="TRACE">-->
+<!-- <AppenderRef ref="httpaccess" />-->
+<!-- </Logger>-->
+ </Loggers>
+</Configuration>
+
+]]>
+ </value>
+ <value-attributes>
+ <type>content</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/gateway-site.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/gateway-site.xml
new file mode 100755
index 0000000000..25743235a9
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/gateway-site.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<!-- The default settings for Knox. -->
+<!-- Edit gateway-site.xml to change settings for your local -->
+<!-- install. -->
+<configuration supports_final="false">
+ <property>
+ <name>gateway.port</name>
+ <value>8443</value>
+ <description>The HTTP port for the Gateway.</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>gateway.path</name>
+ <value>gateway</value>
+ <description>The default context path for the gateway.</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>gateway.gateway.conf.dir</name>
+ <display-name>Gateway Conf directory</display-name>
+ <value>deployments</value>
+ <description>The directory within GATEWAY_HOME that contains gateway topology files and deployments.</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>gateway.hadoop.kerberos.secured</name>
+ <value>false</value>
+ <description>Boolean flag indicating whether the Hadoop cluster protected by Gateway is secured with Kerberos</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>java.security.krb5.conf</name>
+ <value>/etc/knox/conf/krb5.conf</value>
+ <description>Absolute path to krb5.conf file</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>java.security.auth.login.config</name>
+ <value>/etc/knox/conf/krb5JAASLogin.conf</value>
+ <description>Absolute path to JASS login config file</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>sun.security.krb5.debug</name>
+ <value>false</value>
+ <description>Boolean flag indicating whether to enable debug messages for krb5 authentication</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>gateway.websocket.feature.enabled</name>
+ <value>{{websocket_support}}</value>
+ <description>Enable this if you want websocket support</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>gateway.knox.admin.users</name>
+ <value>admin</value>
+ <description>Comma separated list of usernames to grant access to Knox Admin UI and API</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>gateway.knox.admin.groups</name>
+ <value>admin</value>
+ <description>Comma separated list of groups to grant access to Knox Admin UI and API</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>gateway.dispatch.whitelist.services</name>
+ <value>DATANODE,HBASEUI,HDFSUI,JOBHISTORYUI,NODEUI,YARNUI,knoxauth</value>
+ <description>The comma-delimited list of service roles for which the gateway.dispatch.whitelist should be applied.</description>
+ </property>
+ <property>
+ <name>gateway.dispatch.whitelist</name>
+ <value>DEFAULT</value>
+ <description>The whitelist to be applied for dispatches associated with the service roles specified by gateway.dispatch.whitelist.services. If the value is DEFAULT, a domain-based whitelist will be derived from the Knox host.</description>
+ </property>
+ <property>
+ <name>gateway.read.only.override.topologies</name>
+ <value>admin,knoxsso,default</value>
+ <description>Since Ambari manages these topologies let's make them read-only in the Knox Admin UI so that they don't get overwritten by Ambari on restart.</description>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/knox-env.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/knox-env.xml
new file mode 100755
index 0000000000..18758a5fbf
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/knox-env.xml
@@ -0,0 +1,93 @@
+<?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">
+ <!-- knox-env.sh -->
+ <property require-input="true">
+ <name>knox_master_secret</name>
+ <value/>
+ <display-name>Knox Master Secret</display-name>
+ <property-type>PASSWORD</property-type>
+ <description>password to use as the master secret</description>
+ <value-attributes>
+ <type>password</type>
+ <editable-only-at-install>true</editable-only-at-install>
+ <overridable>false</overridable>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>knox_user</name>
+ <display-name>Knox User</display-name>
+ <value>knox</value>
+ <property-type>USER</property-type>
+ <description>Knox Username.</description>
+ <value-attributes>
+ <type>user</type>
+ <overridable>false</overridable>
+ <user-groups>
+ <property>
+ <type>cluster-env</type>
+ <name>user_group</name>
+ </property>
+ <property>
+ <type>knox-env</type>
+ <name>knox_group</name>
+ </property>
+ </user-groups>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>knox_group</name>
+ <display-name>Knox Group</display-name>
+ <value>knox</value>
+ <property-type>GROUP</property-type>
+ <description>Knox Group.</description>
+ <value-attributes>
+ <type>user</type>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>knox_pid_dir</name>
+ <value>/var/run/knox</value>
+ <display-name>Knox PID dir</display-name>
+ <description>Knox PID dir.</description>
+ <value-attributes>
+ <type>directory</type>
+ <editable-only-at-install>true</editable-only-at-install>
+ <overridable>false</overridable>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>knox_principal_name</name>
+ <description>Knox principal name</description>
+ <property-type>KERBEROS_PRINCIPAL</property-type>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>knox_keytab_path</name>
+ <description>Knox keytab path</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/knoxcli-log4j2.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/knoxcli-log4j2.xml
new file mode 100755
index 0000000000..9cf34ad66f
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/knoxcli-log4j2.xml
@@ -0,0 +1,71 @@
+<?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>content</name>
+ <description>gateway-log4j2.xml</description>
+ <value><![CDATA[<?xml version="1.0" encoding="utf-8"?>
+<!--
+ 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>
+ <Properties>
+ <Property name="app.log.dir">${sys:launcher.dir}/../logs</Property>
+ <Property name="app.log.file">${sys:launcher.name}.log</Property>
+ </Properties>
+ <Appenders>
+ <Console name="stdout" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n" />
+ </Console>
+ <RollingFile name="drfa" fileName="${app.log.dir}/${app.log.file}" filePattern="${app.log.dir}/${app.log.file}.%d{yyyy-MM-dd}">
+ <PatternLayout pattern="%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n" />
+ <TimeBasedTriggeringPolicy />
+ </RollingFile>
+ </Appenders>
+ <Loggers>
+ <Logger name="org.apache.knox.gateway" level="INFO" />
+ <Root level="ERROR">
+ <AppenderRef ref="drfa" />
+ </Root>
+ </Loggers>
+</Configuration>
+]]>
+ </value>
+ <value-attributes>
+ <type>content</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/knoxsso-topology.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/knoxsso-topology.xml
new file mode 100755
index 0000000000..db26251acd
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/knoxsso-topology.xml
@@ -0,0 +1,122 @@
+<?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">
+ <!-- topology file -->
+ <property>
+ <name>content</name>
+ <display-name>knoxsso-topology template</display-name>
+ <value>
+ <topology>
+ <gateway>
+ <provider>
+ <role>webappsec</role>
+ <name>WebAppSec</name>
+ <enabled>true</enabled>
+ <param><name>xframe.options.enabled</name><value>true</value></param>
+ </provider>
+
+ <provider>
+ <role>authentication</role>
+ <name>ShiroProvider</name>
+ <enabled>true</enabled>
+ <param>
+ <name>sessionTimeout</name>
+ <value>30</value>
+ </param>
+ <param>
+ <name>redirectToUrl</name>
+ <value>/gateway/knoxsso/knoxauth/login.html</value>
+ </param>
+ <param>
+ <name>restrictedCookies</name>
+ <value>rememberme,WWW-Authenticate</value>
+ </param>
+ <param>
+ <name>main.ldapRealm</name>
+ <value>org.apache.hadoop.gateway.shirorealm.KnoxLdapRealm</value>
+ </param>
+ <param>
+ <name>main.ldapContextFactory</name>
+ <value>org.apache.hadoop.gateway.shirorealm.KnoxLdapContextFactory</value>
+ </param>
+ <param>
+ <name>main.ldapRealm.contextFactory</name>
+ <value>$ldapContextFactory</value>
+ </param>
+ <param>
+ <name>main.ldapRealm.userDnTemplate</name>
+ <value>uid={0},ou=people,dc=hadoop,dc=apache,dc=org</value>
+ </param>
+ <param>
+ <name>main.ldapRealm.contextFactory.url</name>
+ <value>ldap://localhost:33389</value>
+ </param>
+ <param>
+ <name>main.ldapRealm.authenticationCachingEnabled</name>
+ <value>false</value>
+ </param>
+ <param>
+ <name>main.ldapRealm.contextFactory.authenticationMechanism</name>
+ <value>simple</value>
+ </param>
+ <param>
+ <name>urls./**</name>
+ <value>authcBasic</value>
+ </param>
+ </provider>
+
+ <provider>
+ <role>identity-assertion</role>
+ <name>Default</name>
+ <enabled>true</enabled>
+ </provider>
+ </gateway>
+
+ <application>
+ <name>knoxauth</name>
+ </application>
+
+ <service>
+ <role>KNOXSSO</role>
+ <param>
+ <name>knoxsso.cookie.secure.only</name>
+ <value>false</value>
+ </param>
+ <param>
+ <name>knoxsso.token.ttl</name>
+ <value>30000</value>
+ </param>
+ </service>
+
+ </topology>
+ </value>
+ <description>
+ The configuration specifies the KnoxSSO provider integration, cookie and token management details.
+ </description>
+ <value-attributes>
+ <type>content</type>
+ <empty-value-valid>true</empty-value-valid>
+ <show-property-name>false</show-property-name>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/ldap-log4j.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/ldap-log4j.xml
new file mode 100755
index 0000000000..57e156cfea
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/ldap-log4j.xml
@@ -0,0 +1,93 @@
+<?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<display-name> template</display-name>
+ * 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="false">
+ <property>
+ <name>knox_ldap_log_maxfilesize</name>
+ <value>256</value>
+ <description>The maximum size of backup file before the log is rotated</description>
+ <display-name>Knox LDAP Log: backup file size</display-name>
+<value-attributes>
+ <unit>MB</unit>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>knox_ldap_log_maxbackupindex</name>
+ <value>20</value>
+ <description>The number of backup files</description>
+ <display-name>Knox LDAP Log: # of backup files</display-name>
+ <value-attributes>
+ <type>int</type>
+ <minimum>0</minimum>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>content</name>
+ <display-name>ldap-log4j template</display-name>
+ <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.
+
+ app.log.dir=${launcher.dir}/../logs
+ app.log.file=${launcher.name}.log
+
+ log4j.rootLogger=ERROR, drfa
+ log4j.logger.org.apache.directory.server.ldap.LdapServer=INFO
+ log4j.logger.org.apache.directory=WARN
+
+ log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+ log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+ log4j.appender.stdout.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n
+
+ log4j.appender.drfa=org.apache.log4j.DailyRollingFileAppender
+ log4j.appender.drfa.File=${app.log.dir}/${app.log.file}
+ log4j.appender.drfa.DatePattern=.yyyy-MM-dd
+ log4j.appender.drfa.layout=org.apache.log4j.PatternLayout
+ log4j.appender.drfa.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n
+ log4j.appender.drfa.MaxFileSize = {{knox_ldap_log_maxfilesize}}MB
+ log4j.appender.drfa.MaxBackupIndex = {{knox_ldap_log_maxbackupindex}}
+
+ </value>
+ <description>
+ content for log4j.properties file for the demo LDAP that comes with Knox.
+ </description>
+ <value-attributes>
+ <type>content</type>
+ <show-property-name>false</show-property-name>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/ldap-log4j2.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/ldap-log4j2.xml
new file mode 100755
index 0000000000..2054bf0134
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/ldap-log4j2.xml
@@ -0,0 +1,73 @@
+<?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>content</name>
+ <description>gateway-log4j2.xml</description>
+ <value><![CDATA[<?xml version="1.0" encoding="utf-8"?>
+<!--
+ 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>
+ <Properties>
+ <Property name="app.log.dir">${sys:launcher.dir}/../logs</Property>
+ <Property name="app.log.file">${sys:launcher.name}.log</Property>
+ </Properties>
+ <Appenders>
+ <Console name="stdout" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n" />
+ </Console>
+ <RollingFile name="drfa" fileName="${app.log.dir}/${app.log.file}" filePattern="${app.log.dir}/${app.log.file}.%d{yyyy-MM-dd}">
+ <PatternLayout pattern="%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n" />
+ <TimeBasedTriggeringPolicy />
+ </RollingFile>
+ </Appenders>
+ <Loggers>
+ <Logger name="org.apache.directory" level="WARN" />
+ <Logger name="org.apache.directory.server.ldap.LdapServer" level="INFO" />
+ <Root level="ERROR">
+ <AppenderRef ref="drfa" />
+ </Root>
+ </Loggers>
+</Configuration>
+
+]]>
+ </value>
+ <value-attributes>
+ <type>content</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/ranger-knox-audit.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/ranger-knox-audit.xml
new file mode 100755
index 0000000000..f3a0f9926c
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/ranger-knox-audit.xml
@@ -0,0 +1,132 @@
+<?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.
+ */
+-->
+<configuration>
+ <property>
+ <name>xasecure.audit.is.enabled</name>
+ <value>true</value>
+ <description>Is Audit enabled?</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>xasecure.audit.destination.hdfs</name>
+ <value>true</value>
+ <display-name>Audit to HDFS</display-name>
+ <description>Is Audit to HDFS enabled?</description>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <depends-on>
+ <property>
+ <type>ranger-env</type>
+ <name>xasecure.audit.destination.hdfs</name>
+ </property>
+ </depends-on>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>xasecure.audit.destination.hdfs.dir</name>
+ <value>hdfs://NAMENODE_HOSTNAME:8020/ranger/audit</value>
+ <description>HDFS folder to write audit to, make sure the service user has requried permissions</description>
+ <depends-on>
+ <property>
+ <type>ranger-env</type>
+ <name>xasecure.audit.destination.hdfs.dir</name>
+ </property>
+ </depends-on>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>xasecure.audit.destination.hdfs.batch.filespool.dir</name>
+ <value>/var/log/knox/audit/hdfs/spool</value>
+ <description>/var/log/knox/audit/hdfs/spool</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>xasecure.audit.destination.solr</name>
+ <value>false</value>
+ <display-name>Audit to SOLR</display-name>
+ <description>Is Solr audit enabled?</description>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <depends-on>
+ <property>
+ <type>ranger-env</type>
+ <name>xasecure.audit.destination.solr</name>
+ </property>
+ </depends-on>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>xasecure.audit.destination.solr.urls</name>
+ <value/>
+ <description>Solr URL</description>
+ <value-attributes>
+ <empty-value-valid>true</empty-value-valid>
+ </value-attributes>
+ <depends-on>
+ <property>
+ <type>ranger-admin-site</type>
+ <name>ranger.audit.solr.urls</name>
+ </property>
+ </depends-on>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>xasecure.audit.destination.solr.zookeepers</name>
+ <value>NONE</value>
+ <description>Solr Zookeeper string</description>
+ <depends-on>
+ <property>
+ <type>ranger-admin-site</type>
+ <name>ranger.audit.solr.zookeepers</name>
+ </property>
+ </depends-on>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>xasecure.audit.destination.solr.batch.filespool.dir</name>
+ <value>/var/log/knox/audit/solr/spool</value>
+ <description>/var/log/knox/audit/solr/spool</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>xasecure.audit.provider.summary.enabled</name>
+ <value>false</value>
+ <display-name>Audit provider summary enabled</display-name>
+ <description>Enable Summary audit?</description>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>ranger.plugin.knox.ambari.cluster.name</name>
+ <value>{{cluster_name}}</value>
+ <description>Capture cluster name from where Ranger knox plugin is enabled.</description>
+ <value-attributes>
+ <empty-value-valid>true</empty-value-valid>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/ranger-knox-plugin-properties.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/ranger-knox-plugin-properties.xml
new file mode 100755
index 0000000000..d8b9d549c4
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/ranger-knox-plugin-properties.xml
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/**
+ * 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="true">
+ <property>
+ <name>policy_user</name>
+ <value>ambari-qa</value>
+ <display-name>Policy user for KNOX</display-name>
+ <description>This user must be system user and also present at Ranger admin portal</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>common.name.for.certificate</name>
+ <value/>
+ <description>Common name for certificate, this value should match what is specified in repo within ranger admin</description>
+ <value-attributes>
+ <empty-value-valid>true</empty-value-valid>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>ranger-knox-plugin-enabled</name>
+ <value>No</value>
+ <display-name>Enable Ranger for KNOX</display-name>
+ <description>Enable ranger knox plugin ?</description>
+ <depends-on>
+ <property>
+ <type>ranger-env</type>
+ <name>ranger-knox-plugin-enabled</name>
+ </property>
+ </depends-on>
+ <value-attributes>
+ <type>boolean</type>
+ <overridable>false</overridable>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>REPOSITORY_CONFIG_USERNAME</name>
+ <value>admin</value>
+ <display-name>Ranger repository config user</display-name>
+ <description>Used for repository creation on ranger admin</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>REPOSITORY_CONFIG_PASSWORD</name>
+ <value>admin-password</value>
+ <property-type>PASSWORD</property-type>
+ <display-name>Ranger repository config password</display-name>
+ <description>Used for repository creation on ranger admin</description>
+ <value-attributes>
+ <type>password</type>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>KNOX_HOME</name>
+ <value>/usr/hdp/current/knox-server</value>
+ <display-name>Knox Home</display-name>
+ <description>Knox home folder</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+
+
+ <property>
+ <name>external_admin_username</name>
+ <value></value>
+ <display-name>External Ranger admin username</display-name>
+ <description>Add ranger default admin username if want to communicate to external ranger</description>
+ <value-attributes>
+ <empty-value-valid>true</empty-value-valid>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>external_admin_password</name>
+ <value></value>
+ <display-name>External Ranger admin password</display-name>
+ <property-type>PASSWORD</property-type>
+ <description>Add ranger default admin password if want to communicate to external ranger</description>
+ <value-attributes>
+ <type>password</type>
+ <empty-value-valid>true</empty-value-valid>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>external_ranger_admin_username</name>
+ <value></value>
+ <display-name>External Ranger Ambari admin username</display-name>
+ <description>Add ranger default ambari admin username if want to communicate to external ranger</description>
+ <value-attributes>
+ <empty-value-valid>true</empty-value-valid>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>external_ranger_admin_password</name>
+ <value></value>
+ <display-name>External Ranger Ambari admin password</display-name>
+ <property-type>PASSWORD</property-type>
+ <description>Add ranger default ambari admin password if want to communicate to external ranger</description>
+ <value-attributes>
+ <type>password</type>
+ <empty-value-valid>true</empty-value-valid>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/ranger-knox-policymgr-ssl.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/ranger-knox-policymgr-ssl.xml
new file mode 100755
index 0000000000..88ec4ad49d
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/ranger-knox-policymgr-ssl.xml
@@ -0,0 +1,72 @@
+<?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.
+ */
+-->
+<configuration>
+ <property>
+ <name>xasecure.policymgr.clientssl.keystore</name>
+ <value/>
+ <description>Java Keystore files</description>
+ <value-attributes>
+ <empty-value-valid>true</empty-value-valid>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>xasecure.policymgr.clientssl.keystore.password</name>
+ <value>myKeyFilePassword</value>
+ <property-type>PASSWORD</property-type>
+ <description>password for keystore</description>
+ <value-attributes>
+ <type>password</type>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>xasecure.policymgr.clientssl.truststore</name>
+ <value/>
+ <description>java truststore file</description>
+ <value-attributes>
+ <empty-value-valid>true</empty-value-valid>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>xasecure.policymgr.clientssl.truststore.password</name>
+ <value>changeit</value>
+ <property-type>PASSWORD</property-type>
+ <description>java truststore password</description>
+ <value-attributes>
+ <type>password</type>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>xasecure.policymgr.clientssl.keystore.credential.file</name>
+ <value>jceks://file{{credential_file}}</value>
+ <description>java keystore credential file</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>xasecure.policymgr.clientssl.truststore.credential.file</name>
+ <value>jceks://file{{credential_file}}</value>
+ <description>java truststore credential file</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/ranger-knox-security.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/ranger-knox-security.xml
new file mode 100755
index 0000000000..37bda4cb2f
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/ranger-knox-security.xml
@@ -0,0 +1,64 @@
+<?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.
+ */
+-->
+<configuration>
+ <property>
+ <name>ranger.plugin.knox.service.name</name>
+ <value>{{repo_name}}</value>
+ <description>Name of the Ranger service containing policies for this Knox instance</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>ranger.plugin.knox.policy.source.impl</name>
+ <value>org.apache.ranger.admin.client.RangerAdminJersey2RESTClient</value>
+ <description>Class to retrieve policies from the source</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>ranger.plugin.knox.policy.rest.url</name>
+ <value>{{policymgr_mgr_url}}</value>
+ <description>URL to Ranger Admin</description>
+ <on-ambari-upgrade add="false"/>
+ <depends-on>
+ <property>
+ <type>admin-properties</type>
+ <name>policymgr_external_url</name>
+ </property>
+ </depends-on>
+ </property>
+ <property>
+ <name>ranger.plugin.knox.policy.rest.ssl.config.file</name>
+ <value>/usr/hdp/current/knox-server/conf/ranger-policymgr-ssl.xml</value>
+ <description>Path to the file containing SSL details to contact Ranger Admin</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>ranger.plugin.knox.policy.pollIntervalMs</name>
+ <value>30000</value>
+ <description>How often to poll for changes in policies?</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>ranger.plugin.knox.policy.cache.dir</name>
+ <value>/etc/ranger/{{repo_name}}/policycache</value>
+ <description>Directory where Ranger policies are cached after successful retrieval from the source</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/shell-log4j2.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/shell-log4j2.xml
new file mode 100755
index 0000000000..0aa87f1025
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/shell-log4j2.xml
@@ -0,0 +1,71 @@
+<?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>content</name>
+ <description>gateway-log4j2.xml</description>
+ <value><![CDATA[<?xml version="1.0" encoding="utf-8"?>
+<!--
+ 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>
+ <Properties>
+ <Property name="app.log.dir">${sys:launcher.dir}/../logs</Property>
+ <Property name="app.log.file">${sys:launcher.name}.log</Property>
+ </Properties>
+ <Appenders>
+ <Console name="stdout" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n" />
+ </Console>
+ <RollingFile name="drfa" fileName="${app.log.dir}/${app.log.file}" filePattern="${app.log.dir}/${app.log.file}.%d{yyyy-MM-dd}">
+ <PatternLayout pattern="%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n" />
+ <TimeBasedTriggeringPolicy />
+ </RollingFile>
+ </Appenders>
+ <Loggers>
+ <Root level="ERROR">
+ <AppenderRef ref="drfa" />
+ </Root>
+ </Loggers>
+</Configuration>
+
+]]>
+ </value>
+ <value-attributes>
+ <type>content</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/topology.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/topology.xml
new file mode 100755
index 0000000000..31b08fdbf5
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/topology.xml
@@ -0,0 +1,180 @@
+<?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">
+ <!-- topology file -->
+ <property>
+ <name>content</name>
+ <display-name>topology template</display-name>
+ <value>
+ <topology>
+
+ <gateway>
+
+ <provider>
+ <role>authentication</role>
+ <name>ShiroProvider</name>
+ <enabled>true</enabled>
+ <param>
+ <name>sessionTimeout</name>
+ <value>30</value>
+ </param>
+ <param>
+ <name>main.ldapRealm</name>
+ <value>org.apache.hadoop.gateway.shirorealm.KnoxLdapRealm</value>
+ </param>
+ <param>
+ <name>main.ldapRealm.userDnTemplate</name>
+ <value>uid={0},ou=people,dc=hadoop,dc=apache,dc=org</value>
+ </param>
+ <param>
+ <name>main.ldapRealm.contextFactory.url</name>
+ <value>ldap://{{knox_host_name}}:33389</value>
+ </param>
+ <param>
+ <name>main.ldapRealm.contextFactory.authenticationMechanism</name>
+ <value>simple</value>
+ </param>
+ <param>
+ <name>urls./**</name>
+ <value>authcBasic</value>
+ </param>
+ </provider>
+
+ <provider>
+ <role>identity-assertion</role>
+ <name>Default</name>
+ <enabled>true</enabled>
+ </provider>
+
+ <provider>
+ <role>authorization</role>
+ <name>AclsAuthz</name>
+ <enabled>true</enabled>
+ </provider>
+
+ </gateway>
+
+ <service>
+ <role>NAMENODE</role>
+ <url>{{namenode_address}}</url>
+ </service>
+
+ <service>
+ <role>JOBTRACKER</role>
+ <url>rpc://{{rm_host}}:{{jt_rpc_port}}</url>
+ </service>
+
+ <service>
+ <role>WEBHDFS</role>
+ {{webhdfs_service_urls}}
+ </service>
+
+ <service>
+ <role>WEBHCAT</role>
+ <url>http://{{webhcat_server_host}}:{{templeton_port}}/templeton</url>
+ </service>
+
+ <service>
+ <role>OOZIE</role>
+ <url>http://{{oozie_server_host}}:{{oozie_server_port}}/oozie</url>
+ </service>
+
+ <service>
+ <role>OOZIEUI</role>
+ <url>http://{{oozie_server_host}}:{{oozie_server_port}}/oozie/</url>
+ </service>
+
+
+ <service>
+ <role>WEBHBASE</role>
+ <url>http://{{hbase_master_host}}:{{hbase_master_port}}</url>
+ </service>
+
+ <service>
+ <role>HIVE</role>
+ <url>http://{{hive_server_host}}:{{hive_http_port}}/{{hive_http_path}}</url>
+ </service>
+
+ <service>
+ <role>RESOURCEMANAGER</role>
+ <url>http://{{rm_host}}:{{rm_port}}/ws</url>
+ </service>
+
+ <service>
+ <role>DRUID-COORDINATOR-UI</role>
+ {{druid_coordinator_urls}}
+ </service>
+
+ <service>
+ <role>DRUID-COORDINATOR</role>
+ {{druid_coordinator_urls}}
+ </service>
+
+ <service>
+ <role>DRUID-OVERLORD-UI</role>
+ {{druid_overlord_urls}}
+ </service>
+
+ <service>
+ <role>DRUID-OVERLORD</role>
+ {{druid_overlord_urls}}
+ </service>
+
+ <service>
+ <role>DRUID-ROUTER</role>
+ {{druid_router_urls}}
+ </service>
+
+ <service>
+ <role>DRUID-BROKER</role>
+ {{druid_broker_urls}}
+ </service>
+
+ <service>
+ <role>ZEPPELINUI</role>
+ {{zeppelin_ui_urls}}
+ </service>
+
+ <service>
+ <role>ZEPPELINWS</role>
+ {{zeppelin_ws_urls}}
+ </service>
+
+ </topology>
+ </value>
+ <description>
+ The configuration specifies the Hadoop cluster services Knox will provide access to.
+ </description>
+ <value-attributes>
+ <type>content</type>
+ <empty-value-valid>true</empty-value-valid>
+ <show-property-name>false</show-property-name>
+ </value-attributes>
+ <depends-on>
+ <property>
+ <type>ranger-knox-plugin-properties</type>
+ <name>ranger-knox-plugin-enabled</name>
+ </property>
+ </depends-on>
+ <on-ambari-upgrade add="false"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/users-ldif.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/users-ldif.xml
new file mode 100755
index 0000000000..352f20b333
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/configuration/users-ldif.xml
@@ -0,0 +1,155 @@
+<?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>
+ <display-name>users-ldif template</display-name>
+ <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.
+
+version: 1
+
+# Please replace with site specific values
+dn: dc=hadoop,dc=apache,dc=org
+objectclass: organization
+objectclass: dcObject
+o: Hadoop
+dc: hadoop
+
+# Entry for a sample people container
+# Please replace with site specific values
+dn: ou=people,dc=hadoop,dc=apache,dc=org
+objectclass:top
+objectclass:organizationalUnit
+ou: people
+
+# Entry for a sample end user
+# Please replace with site specific values
+dn: uid=guest,ou=people,dc=hadoop,dc=apache,dc=org
+objectclass:top
+objectclass:person
+objectclass:organizationalPerson
+objectclass:inetOrgPerson
+cn: Guest
+sn: User
+uid: guest
+userPassword:guest-password
+modifyTimestamp:20230101080000Z
+
+# entry for sample user admin
+dn: uid=admin,ou=people,dc=hadoop,dc=apache,dc=org
+objectclass:top
+objectclass:person
+objectclass:organizationalPerson
+objectclass:inetOrgPerson
+cn: Admin
+sn: Admin
+uid: admin
+userPassword:admin-password
+modifyTimestamp:20230101080000Z
+
+# entry for sample user sam
+dn: uid=sam,ou=people,dc=hadoop,dc=apache,dc=org
+objectclass:top
+objectclass:person
+objectclass:organizationalPerson
+objectclass:inetOrgPerson
+cn: sam
+sn: sam
+uid: sam
+userPassword:sam-password
+modifyTimestamp:20230101080000Z
+
+# entry for sample user tom
+dn: uid=tom,ou=people,dc=hadoop,dc=apache,dc=org
+objectclass:top
+objectclass:person
+objectclass:organizationalPerson
+objectclass:inetOrgPerson
+cn: tom
+sn: tom
+uid: tom
+userPassword:tom-password
+modifyTimestamp:20230101080000Z
+
+# create FIRST Level groups branch
+dn: ou=groups,dc=hadoop,dc=apache,dc=org
+objectclass:top
+objectclass:organizationalUnit
+ou: groups
+description: generic groups branch
+
+# create the analyst group under groups
+dn: cn=analyst,ou=groups,dc=hadoop,dc=apache,dc=org
+objectclass:top
+objectclass: groupofnames
+cn: analyst
+description:analyst group
+member: uid=sam,ou=people,dc=hadoop,dc=apache,dc=org
+member: uid=tom,ou=people,dc=hadoop,dc=apache,dc=org
+modifyTimestamp:20230101080000Z
+
+
+# create the scientist group under groups
+dn: cn=scientist,ou=groups,dc=hadoop,dc=apache,dc=org
+objectclass:top
+objectclass: groupofnames
+cn: scientist
+description: scientist group
+member: uid=sam,ou=people,dc=hadoop,dc=apache,dc=org
+modifyTimestamp:20230101080000Z
+
+# create the admin group under groups
+dn: cn=admin,ou=groups,dc=hadoop,dc=apache,dc=org
+objectclass:top
+objectclass: groupofnames
+cn: admin
+description: admin group
+member: uid=admin,ou=people,dc=hadoop,dc=apache,dc=org
+modifyTimestamp:20230101080000Z
+
+ </value>
+ <description>
+ content for users-ldif file for the demo LDAP that comes with Knox.
+ </description>
+ <value-attributes>
+ <type>content</type>
+ <empty-value-valid>true</empty-value-valid>
+ <show-property-name>false</show-property-name>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/kerberos.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/kerberos.json
new file mode 100755
index 0000000000..5f9914e16c
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/kerberos.json
@@ -0,0 +1,70 @@
+{
+ "services": [
+ {
+ "name": "KNOX",
+ "components": [
+ {
+ "name": "KNOX_GATEWAY",
+ "identities": [
+ {
+ "name": "knox_principal",
+ "principal": {
+ "value": "${knox-env/knox_user}/_HOST@${realm}",
+ "type" : "service",
+ "configuration": "knox-env/knox_principal_name",
+ "local_username": "${knox-env/knox_user}"
+
+ },
+ "keytab": {
+ "file": "${keytab_dir}/knox.service.keytab",
+ "owner": {
+ "name": "${knox-env/knox_user}",
+ "access": "r"
+ },
+ "group": {
+ "name": "${cluster-env/user_group}",
+ "access": ""
+ },
+ "configuration": "knox-env/knox_keytab_path"
+ }
+ },
+ {
+ "name": "knox_knox_gateway_knox_principal",
+ "reference": "/KNOX/KNOX_GATEWAY/knox_principal",
+ "principal": {
+ "configuration": "ranger-knox-audit/xasecure.audit.jaas.Client.option.principal"
+ },
+ "keytab": {
+ "configuration": "ranger-knox-audit/xasecure.audit.jaas.Client.option.keyTab"
+ }
+ }
+ ],
+ "configurations": [
+ {
+ "gateway-site": {
+ "gateway.hadoop.kerberos.secured": "true",
+ "java.security.krb5.conf": "/etc/krb5.conf"
+ }
+ },
+ {
+ "core-site": {
+ "hadoop.proxyuser.${knox-env/knox_user}.groups": "${hadoop-env/proxyuser_group}",
+ "hadoop.proxyuser.${knox-env/knox_user}.hosts": "${clusterHostInfo/knox_gateway_hosts}"
+ }
+ },
+ {
+ "ranger-knox-audit": {
+ "xasecure.audit.jaas.Client.loginModuleName": "com.sun.security.auth.module.Krb5LoginModule",
+ "xasecure.audit.jaas.Client.loginModuleControlFlag": "required",
+ "xasecure.audit.jaas.Client.option.useKeyTab": "true",
+ "xasecure.audit.jaas.Client.option.storeKey": "false",
+ "xasecure.audit.jaas.Client.option.serviceName": "solr",
+ "xasecure.audit.destination.solr.force.use.inmemory.jaas.config": "true"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/metainfo.xml
new file mode 100755
index 0000000000..bce8ff7da1
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/metainfo.xml
@@ -0,0 +1,132 @@
+<?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>KNOX</name>
+ <displayName>Knox</displayName>
+ <comment>Provides a single point of authentication and access for Apache Hadoop services in a cluster</comment>
+ <version>2.0.0</version>
+ <components>
+ <component>
+ <name>KNOX_GATEWAY</name>
+ <displayName>Knox Gateway</displayName>
+ <category>MASTER</category>
+ <cardinality>1+</cardinality>
+ <versionAdvertised>true</versionAdvertised>
+ <commandScript>
+ <script>scripts/knox_gateway.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>1200</timeout>
+ </commandScript>
+ <logs>
+ <log>
+ <logId>knox_gateway</logId>
+ <primary>true</primary>
+ </log>
+ <log>
+ <logId>knox_cli</logId>
+ </log>
+ <log>
+ <logId>knox_ldap</logId>
+ </log>
+ </logs>
+ <customCommands>
+ <customCommand>
+ <name>STARTDEMOLDAP</name>
+ <commandScript>
+ <script>scripts/knox_gateway.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>600</timeout>
+ </commandScript>
+ </customCommand>
+ <customCommand>
+ <name>STOPDEMOLDAP</name>
+ <commandScript>
+ <script>scripts/knox_gateway.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>600</timeout>
+ </commandScript>
+ </customCommand>
+ </customCommands>
+ </component>
+ </components>
+
+ <osSpecifics>
+ <osSpecific>
+ <osFamily>redhat9,redhat8,redhat7,amazonlinux2,redhat6,suse11,suse12</osFamily>
+ <packages>
+ <package>
+ <name>knox_${stack_version}</name>
+ </package>
+ </packages>
+ </osSpecific>
+ <osSpecific>
+ <osFamily>debian7,debian9,ubuntu12,ubuntu14,ubuntu16,ubuntu18</osFamily>
+ <packages>
+ <package>
+ <name>knox-${stack_version}</name>
+ </package>
+ </packages>
+ </osSpecific>
+ </osSpecifics>
+
+ <commandScript>
+ <script>scripts/service_check.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>300</timeout>
+ </commandScript>
+
+ <configuration-dependencies>
+ <config-type>gateway-site</config-type>
+ <config-type>gateway-log4j</config-type>
+ <config-type>topology</config-type>
+ <config-type>admin-topology</config-type>
+ <config-type>knoxsso-topology</config-type>
+ <config-type>ranger-knox-plugin-properties</config-type>
+ <config-type>ranger-knox-audit</config-type>
+ <config-type>ranger-knox-policymgr-ssl</config-type>
+ <config-type>ranger-knox-security</config-type>
+ <config-type>gateway-log4j2</config-type>
+ <config-type>knoxcli-log4j2</config-type>
+ <config-type>ldap-log4j2</config-type>
+ <config-type>shell-log4j2</config-type>
+ </configuration-dependencies>
+
+ <themes>
+ <theme>
+ <fileName>credentials.json</fileName>
+ <default>true</default>
+ </theme>
+ <theme>
+ <fileName>directories.json</fileName>
+ <default>true</default>
+ </theme>
+ </themes>
+
+ <quickLinksConfigurations>
+ <quickLinksConfiguration>
+ <fileName>quicklinks.json</fileName>
+ <default>true</default>
+ </quickLinksConfiguration>
+ </quickLinksConfigurations>
+
+ </service>
+ </services>
+</metainfo>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/files/validateKnoxStatus.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/files/validateKnoxStatus.py
new file mode 100755
index 0000000000..b2d7073f07
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/files/validateKnoxStatus.py
@@ -0,0 +1,43 @@
+#!/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 optparse
+import socket
+
+#
+# Main.
+#
+def main():
+ parser = optparse.OptionParser(usage="usage: %prog [options]")
+ parser.add_option("-p", "--port", dest="port", help="Port for Knox process")
+ parser.add_option("-n", "--hostname", dest="hostname", help="Hostname of Knox Gateway component")
+
+ (options, args) = parser.parse_args()
+ timeout_seconds = 5
+ try:
+ s = socket.create_connection((options.hostname, int(options.port)),timeout=timeout_seconds)
+ print(f"Successfully connected to {options.hostname} on port {options.port}")
+ s.close()
+ except socket.error as e:
+ print(f"Connection to {options.hostname} on port {options.port} failed: {e}")
+ exit(1)
+
+if __name__ == "__main__":
+ main()
+
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/knox.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/knox.py
new file mode 100755
index 0000000000..4434a6144c
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/knox.py
@@ -0,0 +1,232 @@
+"""
+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.script.script import Script
+from resource_management.libraries.resources.xml_config import XmlConfig
+from resource_management.core.resources.service import ServiceConfig
+from resource_management.libraries.functions.default import default
+from resource_management.libraries.functions.format import format
+from resource_management.libraries.functions.get_config import get_config
+from resource_management.libraries.functions.generate_logfeeder_input_config import generate_logfeeder_input_config
+from resource_management.libraries.resources.template_config import TemplateConfig
+from resource_management.core.resources.system import File, Execute, Directory
+from resource_management.core.shell import as_user
+from resource_management.core.source import Template, InlineTemplate
+
+from ambari_commons import OSConst
+from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
+
+from resource_management.libraries.functions.stack_features import check_stack_feature
+from resource_management.libraries.functions import StackFeature
+
+@OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY)
+def knox():
+ import params
+
+ XmlConfig("gateway-site.xml",
+ conf_dir=params.knox_conf_dir,
+ configurations=params.config['configurations']['gateway-site'],
+ configuration_attributes=params.config['configurationAttributes']['gateway-site'],
+ owner=params.knox_user
+ )
+
+ # Manually overriding service logon user & password set by the installation package
+ ServiceConfig(params.knox_gateway_win_service_name,
+ action="change_user",
+ username = params.knox_user,
+ password = Script.get_password(params.knox_user))
+
+ File(os.path.join(params.knox_conf_dir, "gateway-log4j.properties"),
+ owner=params.knox_user,
+ content=params.gateway_log4j
+ )
+
+ File(os.path.join(params.knox_conf_dir, "topologies", "default.xml"),
+ mode=0o600,
+ group=params.knox_group,
+ owner=params.knox_user,
+ content=InlineTemplate(params.topology_template)
+ )
+
+ if params.admin_topology_template:
+ File(os.path.join(params.knox_conf_dir, "topologies", "admin.xml"),
+ mode=0o600,
+ group=params.knox_group,
+ owner=params.knox_user,
+ content=InlineTemplate(params.admin_topology_template)
+ )
+
+ if params.version_formatted and check_stack_feature(StackFeature.KNOX_SSO_TOPOLOGY, params.version_formatted):
+ knoxsso_topology_template_content = get_config("knoxsso-topology")
+ if knoxsso_topology_template_content:
+ File(os.path.join(params.knox_conf_dir, "topologies", "knoxsso.xml"),
+ mode=0o600,
+ group=params.knox_group,
+ owner=params.knox_user,
+ content=InlineTemplate(params.knoxsso_topology_template)
+ )
+
+ if params.security_enabled:
+ TemplateConfig( os.path.join(params.knox_conf_dir, "krb5JAASLogin.conf"),
+ owner = params.knox_user,
+ template_tag = None
+ )
+
+ if not os.path.isfile(params.knox_master_secret_path):
+ cmd = format('cmd /C {knox_client_bin} create-master --master {knox_master_secret!p}')
+ Execute(cmd)
+ cmd = format('cmd /C {knox_client_bin} create-cert --hostname {knox_host_name_in_cluster}')
+ Execute(cmd)
+
+@OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT)
+def knox():
+ import params
+ Directory([params.knox_data_dir, params.knox_logs_dir, params.knox_pid_dir, params.knox_conf_dir, os.path.join(params.knox_conf_dir, "topologies"), params.knox_descriptors_dir, params.knox_shared_providers_dir],
+ owner = params.knox_user,
+ group = params.knox_group,
+ create_parents = True,
+ cd_access = "a",
+ mode = 0o755,
+ recursive_ownership = True,
+ )
+
+ XmlConfig("gateway-site.xml",
+ conf_dir=params.knox_conf_dir,
+ configurations=params.config['configurations']['gateway-site'],
+ configuration_attributes=params.config['configurationAttributes']['gateway-site'],
+ owner=params.knox_user,
+ group=params.knox_group,
+ )
+
+ # start knox 2.0
+ File(format("{params.knox_conf_dir}/gateway-log4j2.xml"),
+ owner=params.knox_user,
+ group=params.knox_group,
+ content=InlineTemplate(params.config['configurations']['gateway-log4j2']['content']),
+ mode=0o644,
+ )
+ File(format("{params.knox_conf_dir}/knoxcli-log4j2.xml"),
+ owner=params.knox_user,
+ group=params.knox_group,
+ content=InlineTemplate(params.config['configurations']['knoxcli-log4j2']['content']),
+ mode=0o644,
+ )
+ File(format("{params.knox_conf_dir}/ldap-log4j2.xml"),
+ owner=params.knox_user,
+ group=params.knox_group,
+ content=InlineTemplate(params.config['configurations']['ldap-log4j2']['content']),
+ mode=0o644,
+ )
+ File(format("{params.knox_conf_dir}/shell-log4j2.xml"),
+ owner=params.knox_user,
+ group=params.knox_group,
+ content=InlineTemplate(params.config['configurations']['shell-log4j2']['content']),
+ mode=0o644,
+ )
+ #end knox 2.0
+
+ File(format("{params.knox_conf_dir}/gateway-log4j.properties"),
+ mode=0o644,
+ group=params.knox_group,
+ owner=params.knox_user,
+ content=InlineTemplate(params.gateway_log4j)
+ )
+
+ File(format("{params.knox_conf_dir}/topologies/default.xml"),
+ mode=0o600,
+ group=params.knox_group,
+ owner=params.knox_user,
+ content=InlineTemplate(params.topology_template)
+ )
+
+ if params.admin_topology_template:
+ File(format("{params.knox_conf_dir}/topologies/admin.xml"),
+ mode=0o600,
+ group=params.knox_group,
+ owner=params.knox_user,
+ content=InlineTemplate(params.admin_topology_template)
+ )
+
+ if params.version_formatted and check_stack_feature(StackFeature.KNOX_SSO_TOPOLOGY, params.version_formatted):
+ knoxsso_topology_template_content = get_config("knoxsso-topology")
+ if knoxsso_topology_template_content:
+ File(os.path.join(params.knox_conf_dir, "topologies", "knoxsso.xml"),
+ mode=0o600,
+ group=params.knox_group,
+ owner=params.knox_user,
+ content=InlineTemplate(params.knoxsso_topology_template)
+ )
+
+ if params.security_enabled:
+ TemplateConfig( format("{knox_conf_dir}/krb5JAASLogin.conf"),
+ owner = params.knox_user,
+ template_tag = None
+ )
+
+ generate_logfeeder_input_config('knox', Template("input.config-knox.json.j2", extra_imports=[default]))
+
+ cmd = format('{knox_client_bin} create-master --master {knox_master_secret!p}')
+ master_secret_exist = as_user(format('test -f {knox_master_secret_path}'), params.knox_user)
+
+ Execute(cmd,
+ user=params.knox_user,
+ environment={'JAVA_HOME': params.java_home},
+ not_if=master_secret_exist,
+ )
+
+ cmd = format('{knox_client_bin} create-cert --hostname {knox_host_name_in_cluster}')
+ cert_store_exist = as_user(format('test -f {knox_cert_store_path}'), params.knox_user)
+
+ Execute(cmd,
+ user=params.knox_user,
+ environment={'JAVA_HOME': params.java_home},
+ not_if=cert_store_exist,
+ )
+
+
+
+@OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY)
+def update_knox_folder_permissions():
+ import params
+ Directory(params.knox_logs_dir,
+ owner = params.knox_user,
+ group = params.knox_group
+ )
+
+
+@OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT)
+def update_knox_logfolder_permissions():
+ """
+ Fix for the bug with rpm/deb packages. During installation of the package, they re-apply permissions to the
+ folders below; such behaviour will affect installations with non-standard user name/group and will put
+ cluster in non-working state
+ """
+ import params
+
+ Directory(params.knox_logs_dir,
+ owner = params.knox_user,
+ group = params.knox_group,
+ create_parents = True,
+ cd_access = "a",
+ mode=0o700,
+ recursive_ownership = True,
+ )
+
+
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/knox_gateway.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/knox_gateway.py
new file mode 100755
index 0000000000..456d6b4472
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/knox_gateway.py
@@ -0,0 +1,215 @@
+"""
+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.script.script import Script
+from resource_management.libraries.functions.check_process_status import check_process_status
+from resource_management.libraries.functions.format import format
+from resource_management.libraries.functions import stack_select
+from resource_management.libraries.functions.constants import Direction
+from resource_management.libraries.functions.security_commons import build_expectations
+from resource_management.libraries.functions.security_commons import cached_kinit_executor
+from resource_management.libraries.functions.security_commons import validate_security_config_properties
+from resource_management.libraries.functions.security_commons import get_params_from_filesystem
+from resource_management.libraries.functions.security_commons import FILE_TYPE_XML
+from resource_management.libraries.functions.show_logs import show_logs
+from resource_management.core.resources.system import File, Execute, Link
+from resource_management.core.resources.service import Service
+from resource_management.core.logger import Logger
+
+
+from ambari_commons import OSConst, OSCheck
+from ambari_commons.os_family_impl import OsFamilyImpl
+
+if OSCheck.is_windows_family():
+ from resource_management.libraries.functions.windows_service_utils import check_windows_service_status
+
+import upgrade
+from knox import knox, update_knox_logfolder_permissions
+from knox_ldap import ldap
+from setup_ranger_knox import setup_ranger_knox
+
+
+class KnoxGateway(Script):
+ def install(self, env):
+ import params
+ env.set_params(params)
+ self.install_packages(env)
+
+ File(os.path.join(params.knox_conf_dir, 'topologies', 'sandbox.xml'),
+ action = "delete",
+ )
+
+ def configure(self, env, upgrade_type=None):
+ import params
+ env.set_params(params)
+ knox()
+ ldap()
+
+ def configureldap(self, env):
+ import params
+ env.set_params(params)
+ ldap()
+
+
+
+@OsFamilyImpl(os_family=OSConst.WINSRV_FAMILY)
+class KnoxGatewayWindows(KnoxGateway):
+ def start(self, env, upgrade_type=None):
+ import params
+ env.set_params(params)
+ self.configure(env)
+ # setup_ranger_knox(env)
+ Service(params.knox_gateway_win_service_name, action="start")
+
+ def stop(self, env, upgrade_type=None):
+ import params
+ env.set_params(params)
+ Service(params.knox_gateway_win_service_name, action="stop")
+
+ def status(self, env):
+ import status_params
+ env.set_params(status_params)
+ check_windows_service_status(status_params.knox_gateway_win_service_name)
+
+ def startdemoldap(self, env):
+ import params
+ env.set_params(params)
+ self.configureldap(env)
+ Service(params.knox_ldap_win_service_name, action="start")
+
+ def stopdemoldap(self, env):
+ import params
+ env.set_params(params)
+ Service(params.knox_ldap_win_service_name, action="stop")
+
+
+
+@OsFamilyImpl(os_family=OsFamilyImpl.DEFAULT)
+class KnoxGatewayDefault(KnoxGateway):
+
+ def pre_upgrade_restart(self, env, upgrade_type=None):
+ import params
+ env.set_params(params)
+
+ # backup the data directory to /tmp/knox-upgrade-backup/knox-data-backup.tar just in case
+ # something happens; Knox is interesting in that they re-generate missing files like
+ # keystores which can cause side effects if the upgrade goes wrong
+ if params.upgrade_direction and params.upgrade_direction == Direction.UPGRADE:
+ absolute_backup_dir = upgrade.backup_data()
+ Logger.info("Knox data was successfully backed up to {0}".format(absolute_backup_dir))
+
+ stack_select.select_packages(params.version)
+
+ # seed the new Knox data directory with the keystores of yesteryear
+ if params.upgrade_direction == Direction.UPGRADE:
+ upgrade.seed_current_data_directory()
+
+
+ def start(self, env, upgrade_type=None):
+ import params
+ env.set_params(params)
+ self.configure(env)
+ daemon_cmd = format('{knox_bin} start')
+ no_op_test = format('ls {knox_pid_file} >/dev/null 2>&1 && ps -p `cat {knox_pid_file}` >/dev/null 2>&1')
+ setup_ranger_knox(upgrade_type=upgrade_type)
+ # Used to setup symlink, needed to update the knox managed symlink, in case of custom locations
+ if os.path.islink(params.knox_managed_pid_symlink):
+ Link(params.knox_managed_pid_symlink,
+ to = params.knox_pid_dir,
+ )
+
+ update_knox_logfolder_permissions()
+
+ try:
+ Execute(daemon_cmd,
+ user=params.knox_user,
+ environment={'JAVA_HOME': params.java_home},
+ not_if=no_op_test
+ )
+ except:
+ show_logs(params.knox_logs_dir, params.knox_user)
+ raise
+
+ def stop(self, env, upgrade_type=None):
+ import params
+ env.set_params(params)
+ daemon_cmd = format('{knox_bin} stop')
+
+ update_knox_logfolder_permissions()
+
+ try:
+ Execute(daemon_cmd,
+ environment={'JAVA_HOME': params.java_home},
+ user=params.knox_user,
+ )
+ except:
+ show_logs(params.knox_logs_dir, params.knox_user)
+ raise
+
+ File(params.knox_pid_file,
+ action="delete",
+ )
+
+ def status(self, env):
+ import status_params
+ env.set_params(status_params)
+ check_process_status(status_params.knox_pid_file)
+
+ def startdemoldap(self, env):
+ import params
+ env.set_params(params)
+ self.configureldap(env)
+ daemon_cmd = format('{ldap_bin} start')
+ no_op_test = format('ls {ldap_pid_file} >/dev/null 2>&1 && ps -p `cat {ldap_pid_file}` >/dev/null 2>&1')
+ Execute(daemon_cmd,
+ user=params.knox_user,
+ environment={'JAVA_HOME': params.java_home},
+ not_if=no_op_test
+ )
+
+ def stopdemoldap(self, env):
+ import params
+ env.set_params(params)
+ self.configureldap(env)
+ daemon_cmd = format('{ldap_bin} stop')
+ Execute(daemon_cmd,
+ environment={'JAVA_HOME': params.java_home},
+ user=params.knox_user,
+ )
+ File(params.ldap_pid_file,
+ action = "delete"
+ )
+
+ def get_log_folder(self):
+ import params
+ return params.knox_logs_dir
+
+ def get_user(self):
+ import params
+ return params.knox_user
+
+ def get_pid_files(self):
+ import status_params
+ return [status_params.knox_pid_file]
+
+
+if __name__ == "__main__":
+ KnoxGateway().execute()
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/knox_ldap.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/knox_ldap.py
new file mode 100755
index 0000000000..b6f1b89d95
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/knox_ldap.py
@@ -0,0 +1,59 @@
+"""
+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.script.script import Script
+from resource_management.core.resources.service import ServiceConfig
+from resource_management.core.resources.system import File
+from ambari_commons import OSConst
+from resource_management.core.source import InlineTemplate
+from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
+
+def _ldap_common():
+ import params
+
+ File(os.path.join(params.knox_conf_dir, 'ldap-log4j.properties'),
+ mode=params.mode,
+ group=params.knox_group,
+ owner=params.knox_user,
+ content=InlineTemplate(params.ldap_log4j)
+ )
+
+ File(os.path.join(params.knox_conf_dir, 'users.ldif'),
+ mode=params.mode,
+ group=params.knox_group,
+ owner=params.knox_user,
+ content=params.users_ldif
+ )
+
+@OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY)
+def ldap():
+ import params
+
+ # Manually overriding service logon user & password set by the installation package
+ ServiceConfig(params.knox_ldap_win_service_name,
+ action="change_user",
+ username = params.knox_user,
+ password = Script.get_password(params.knox_user))
+
+ _ldap_common()
+
+@OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT)
+def ldap():
+ _ldap_common()
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/params.py
new file mode 100755
index 0000000000..ad1a1dc164
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/params.py
@@ -0,0 +1,29 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Ambari Agent
+
+"""
+from ambari_commons import OSCheck
+from resource_management.libraries.functions.default import default
+
+if OSCheck.is_windows_family():
+ from params_windows import *
+else:
+ from params_linux import *
+
+retryAble = default("/commandParams/command_retry_enabled", False)
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/params_linux.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/params_linux.py
new file mode 100755
index 0000000000..5291480bbd
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/params_linux.py
@@ -0,0 +1,577 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Ambari Agent
+
+"""
+import os
+import status_params
+
+from resource_management.core.logger import Logger
+
+import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set.
+from resource_management.libraries.functions import format
+from resource_management.libraries.functions.version import format_stack_version
+from resource_management.libraries.functions.default import default
+from resource_management.libraries.functions.get_port_from_url import get_port_from_url
+from resource_management.libraries.functions.get_stack_version import get_stack_version
+from resource_management.libraries.functions import get_kinit_path
+from resource_management.libraries.script.script import Script
+from status_params import *
+from resource_management.libraries.resources.hdfs_resource import HdfsResource
+from resource_management.libraries.functions import stack_select, conf_select
+from resource_management.libraries.functions.get_not_managed_resources import get_not_managed_resources
+from resource_management.libraries.functions.stack_features import check_stack_feature
+from resource_management.libraries.functions.stack_features import get_stack_feature_version
+from resource_management.libraries.functions import upgrade_summary
+from resource_management.libraries.functions.constants import StackFeature
+from resource_management.libraries.functions import is_empty
+from resource_management.libraries.functions.setup_ranger_plugin_xml import get_audit_configs, generate_ranger_service_config
+
+# server configurations
+config = Script.get_config()
+stack_root = Script.get_stack_root()
+
+tmp_dir = Script.get_tmp_dir()
+stack_name = status_params.stack_name
+upgrade_direction = default("/commandParams/upgrade_direction", None)
+version = default("/commandParams/version", None)
+# E.g., 2.3.2.0
+version_formatted = format_stack_version(version)
+
+# E.g., 2.3
+stack_version_unformatted = config['clusterLevelParams']['stack_version']
+stack_version_formatted = format_stack_version(stack_version_unformatted)
+
+# get the correct version to use for checking stack features
+version_for_stack_feature_checks = get_stack_feature_version(config)
+
+stack_supports_ranger_kerberos = check_stack_feature(StackFeature.RANGER_KERBEROS_SUPPORT, version_for_stack_feature_checks)
+stack_supports_ranger_audit_db = check_stack_feature(StackFeature.RANGER_AUDIT_DB_SUPPORT, version_for_stack_feature_checks)
+stack_supports_core_site_for_ranger_plugin = check_stack_feature(StackFeature.CORE_SITE_FOR_RANGER_PLUGINS_SUPPORT, version_for_stack_feature_checks)
+
+# This is the version whose state is CURRENT. During an RU, this is the source version.
+# DO NOT format it since we need the build number too.
+upgrade_from_version = upgrade_summary.get_source_version()
+
+# server configurations
+# Default value used in HDP 2.3.0.0 and earlier.
+knox_data_dir = '/var/lib/knox/data'
+
+# Important, it has to be strictly greater than 2.3.0.0!!!
+Logger.info(format("Stack version to use is {version_formatted}"))
+if version_formatted and check_stack_feature(StackFeature.KNOX_VERSIONED_DATA_DIR, version_formatted):
+ # This is the current version. In the case of a Rolling Upgrade, it will be the newer version.
+ # In the case of a Downgrade, it will be the version downgrading to.
+ # This is always going to be a symlink to /var/lib/knox/data_${version}
+ knox_data_dir = format('{stack_root}/{version}/knox/data')
+ Logger.info(format("Detected stack with version {version}, will use knox_data_dir = {knox_data_dir}"))
+
+
+knox_master_secret_path = format('{knox_data_dir}/security/master')
+knox_cert_store_path = format('{knox_data_dir}/security/keystores/gateway.jks')
+knox_user = default("/configurations/knox-env/knox_user", "knox")
+
+# server configurations
+knox_data_dir = '/var/lib/knox/data'
+knox_logs_dir = '/var/log/knox'
+
+# default parameters
+knox_bin = '/usr/bin/gateway'
+knox_conf_dir = '/etc/knox/conf'
+ldap_bin = '/usr/lib/knox/bin/ldap.sh'
+knox_client_bin = '/usr/lib/knox/bin/knoxcli.sh'
+
+# HDP 2.2+ parameters
+if stack_version_formatted and check_stack_feature(StackFeature.ROLLING_UPGRADE, stack_version_formatted):
+ knox_bin = format('{stack_root}/current/knox-server/bin/gateway.sh')
+ knox_conf_dir = format('{stack_root}/current/knox-server/conf')
+ ldap_bin = format('{stack_root}/current/knox-server/bin/ldap.sh')
+ knox_client_bin = format('{stack_root}/current/knox-server/bin/knoxcli.sh')
+ knox_master_secret_path = format('{stack_root}/current/knox-server/data/security/master')
+ knox_cert_store_path = format('{stack_root}/current/knox-server/data/security/keystores/gateway.jks')
+ knox_data_dir = format('{stack_root}/current/knox-server/data/')
+
+knox_group = default("/configurations/knox-env/knox_group", "knox")
+mode = 0o644
+
+stack_version_unformatted = config['clusterLevelParams']['stack_version']
+stack_version_formatted = format_stack_version(stack_version_unformatted)
+
+namenode_hosts = default("/clusterHostInfo/namenode_hosts", None)
+has_namenode = bool(namenode_hosts)
+
+dfs_ha_enabled = False
+dfs_ha_nameservices = default('/configurations/hdfs-site/dfs.internal.nameservices', None)
+if dfs_ha_nameservices is None:
+ dfs_ha_nameservices = default('/configurations/hdfs-site/dfs.nameservices', None)
+
+if dfs_ha_nameservices is not None:
+ dfs_ha_nameservices = dfs_ha_nameservices.split(',')[0] # for now knox topology.xml supports working with only one nameservice
+
+dfs_ha_namenode_ids = default(format("/configurations/hdfs-site/dfs.ha.namenodes.{dfs_ha_nameservices}"), None)
+
+namenode_rpc = None
+
+dfs_type = default("/clusterLevelParams/dfs_type", "").lower()
+
+namenode_http_port = "50070"
+namenode_https_port = "50470"
+namenode_rpc_port = "8020"
+namenode_address = ""
+
+if has_namenode:
+ if 'dfs.namenode.http-address' in config['configurations']['hdfs-site']:
+ namenode_http_port = get_port_from_url(config['configurations']['hdfs-site']['dfs.namenode.http-address'])
+ if 'dfs.namenode.https-address' in config['configurations']['hdfs-site']:
+ namenode_https_port = get_port_from_url(config['configurations']['hdfs-site']['dfs.namenode.https-address'])
+ if dfs_ha_enabled and namenode_rpc:
+ namenode_rpc_port = get_port_from_url(namenode_rpc)
+ else:
+ if 'dfs.namenode.rpc-address' in config['configurations']['hdfs-site']:
+ namenode_rpc_port = get_port_from_url(config['configurations']['hdfs-site']['dfs.namenode.rpc-address'])
+
+ namenode_address = format("{dfs_type}://{namenode_hosts[0]}:{namenode_rpc_port}")
+
+if dfs_ha_namenode_ids:
+ dfs_ha_namemodes_ids_list = dfs_ha_namenode_ids.split(",")
+ dfs_ha_namenode_ids_array_len = len(dfs_ha_namemodes_ids_list)
+ if dfs_ha_namenode_ids_array_len > 1:
+ dfs_ha_enabled = True
+
+
+if dfs_ha_enabled:
+ for nn_id in dfs_ha_namemodes_ids_list:
+ nn_host = config['configurations']['hdfs-site'][format('dfs.namenode.rpc-address.{dfs_ha_nameservices}.{nn_id}')]
+ if hostname.lower() in nn_host.lower():
+ namenode_id = nn_id
+ namenode_rpc = nn_host
+ # With HA enabled namenode_address is recomputed
+ namenode_address = format('{dfs_type}://{dfs_ha_nameservices}')
+
+namenode_port_map = {}
+if dfs_ha_enabled:
+ for nn_id in dfs_ha_namemodes_ids_list:
+ nn_host = config['configurations']['hdfs-site'][format('dfs.namenode.http-address.{dfs_ha_nameservices}.{nn_id}')]
+ nn_host_parts = nn_host.split(':')
+ namenode_port_map[nn_host_parts[0]] = nn_host_parts[1]
+
+dfs_http_policy = default('/configurations/hdfs-site/dfs.http.policy', None)
+
+hdfs_https_on = False
+hdfs_scheme = 'http'
+if dfs_http_policy != None :
+ hdfs_https_on = (dfs_http_policy.upper() == 'HTTPS_ONLY')
+ hdfs_scheme = 'http' if not hdfs_https_on else 'https'
+ hdfs_port = str(namenode_http_port) if not hdfs_https_on else str(namenode_https_port)
+ namenode_http_port = hdfs_port
+
+def buildUrlElement(protocol, hdfs_host, port, servicePath) :
+ openTag = "<url>"
+ closeTag = "</url>"
+ proto = protocol + "://"
+ newLine = "\n"
+ if hdfs_host is None or port is None:
+ return ""
+ else:
+ return openTag + proto + hdfs_host + ":" + port + servicePath + closeTag + newLine
+
+namenode_host_keys = list(namenode_port_map.keys());
+webhdfs_service_urls = ""
+if len(namenode_host_keys) > 0:
+ for host in namenode_host_keys:
+ webhdfs_service_urls += buildUrlElement("http", host, namenode_port_map[host], "/webhdfs")
+elif has_namenode:
+ webhdfs_service_urls = buildUrlElement("http", namenode_hosts[0], namenode_http_port, "/webhdfs")
+
+yarn_http_policy = default('/configurations/yarn-site/yarn.http.policy', None )
+yarn_https_on = False
+yarn_scheme = 'http'
+if yarn_http_policy != None :
+ yarn_https_on = ( yarn_http_policy.upper() == 'HTTPS_ONLY')
+ yarn_scheme = 'http' if not yarn_https_on else 'https'
+
+rm_hosts = default("/clusterHostInfo/resourcemanager_hosts", None)
+if type(rm_hosts) is list:
+ rm_host = rm_hosts[0]
+else:
+ rm_host = rm_hosts
+has_rm = not rm_host == None
+
+jt_rpc_port = "8050"
+rm_port = "8080"
+
+if has_rm:
+ if 'yarn.resourcemanager.address' in config['configurations']['yarn-site']:
+ jt_rpc_port = get_port_from_url(config['configurations']['yarn-site']['yarn.resourcemanager.address'])
+
+ if 'yarn.resourcemanager.webapp.address' in config['configurations']['yarn-site']:
+ rm_port = get_port_from_url(config['configurations']['yarn-site']['yarn.resourcemanager.webapp.address'])
+
+hive_http_port = default('/configurations/hive-site/hive.server2.thrift.http.port', "10001")
+hive_http_path = default('/configurations/hive-site/hive.server2.thrift.http.path', "cliservice")
+hive_server_hosts = default("/clusterHostInfo/hive_server_hosts", None)
+if type(hive_server_hosts) is list:
+ hive_server_host = hive_server_hosts[0] if len(hive_server_hosts) > 0 else None
+else:
+ hive_server_host = hive_server_hosts
+
+templeton_port = default('/configurations/webhcat-site/templeton.port', "50111")
+webhcat_server_hosts = default("/clusterHostInfo/webhcat_server_hosts", None)
+if type(webhcat_server_hosts) is list:
+ webhcat_server_host = webhcat_server_hosts[0]
+else:
+ webhcat_server_host = webhcat_server_hosts
+
+hive_scheme = 'http'
+webhcat_scheme = 'http'
+
+hbase_master_scheme = 'http'
+hbase_master_ui_port = default('/configurations/hbase-site/hbase.master.info.port', "16010");
+hbase_master_port = default('/configurations/hbase-site/hbase.rest.port', "8080")
+is_hbase_installed = default("/clusterHostInfo/hbase_master_hosts", None) is not None
+hbase_master_hosts = default("/clusterHostInfo/hbase_master_hosts", None)
+if is_hbase_installed and type(hbase_master_hosts) is list:
+ hbase_master_host = hbase_master_hosts[0]
+else:
+ hbase_master_host = hbase_master_hosts
+
+#
+# Oozie
+#
+oozie_https_port = None
+oozie_scheme = 'http'
+oozie_server_port = "11000"
+oozie_server_hosts = default("/clusterHostInfo/oozie_server_hosts", None)
+
+if type(oozie_server_hosts) is list:
+ oozie_server_host = oozie_server_hosts[0]
+else:
+ oozie_server_host = oozie_server_hosts
+
+has_oozie = not oozie_server_host == None
+
+if has_oozie:
+ oozie_server_port = get_port_from_url(config['configurations']['oozie-site']['oozie.base.url'])
+ oozie_https_port = default("/configurations/oozie-site/oozie.https.port", None)
+
+if oozie_https_port is not None:
+ oozie_scheme = 'https'
+ oozie_server_port = oozie_https_port
+
+#
+# Falcon
+#
+falcon_server_hosts = default("/clusterHostInfo/falcon_server_hosts", None)
+if type(falcon_server_hosts) is list:
+ falcon_server_host = falcon_server_hosts[0]
+else:
+ falcon_server_host = falcon_server_hosts
+
+falcon_scheme = 'http'
+has_falcon = not falcon_server_host == None
+falcon_server_port = "15000"
+
+if has_falcon:
+ falcon_server_port = config['configurations']['falcon-env']['falcon_port']
+
+#
+# Solr
+#
+solr_scheme='http'
+solr_server_hosts = default("/clusterHostInfo/solr_hosts", None)
+if type(solr_server_hosts ) is list:
+ solr_host = solr_server_hosts[0]
+else:
+ solr_host = solr_server_hosts
+solr_port=default("/configuration/solr/solr-env/solr_port","8983")
+
+#
+# Spark
+#
+spark_scheme = 'http'
+spark_historyserver_hosts = default("/clusterHostInfo/spark_jobhistoryserver_hosts", None)
+if type(spark_historyserver_hosts) is list:
+ spark_historyserver_host = spark_historyserver_hosts[0]
+else:
+ spark_historyserver_host = spark_historyserver_hosts
+spark_historyserver_ui_port = default("/configurations/spark-defaults/spark.history.ui.port", "18080")
+
+
+#
+# JobHistory mapreduce
+#
+mr_scheme='http'
+mr_historyserver_address = default("/configurations/mapred-site/mapreduce.jobhistory.webapp.address", None)
+
+#
+# Yarn nodemanager
+#
+nodeui_scheme= 'http'
+nodeui_port = "8042"
+nm_hosts = default("/clusterHostInfo/nodemanager_hosts", None)
+if type(nm_hosts) is list:
+ nm_host = nm_hosts[0]
+else:
+ nm_host = nm_hosts
+
+has_yarn = default("/configurations/yarn-site", None )
+if has_yarn and 'yarn.nodemanager.webapp.address' in config['configurations']['yarn-site']:
+ nodeui_port = get_port_from_url(config['configurations']['yarn-site']['yarn.nodemanager.webapp.address'])
+
+
+#
+# Spark Thrift UI
+#
+spark_thriftserver_scheme = 'http'
+spark_thriftserver_ui_port = 4039
+spark_thriftserver_hosts = default("/clusterHostInfo/spark_thriftserver_hosts", None)
+if type(spark_thriftserver_hosts) is list:
+ spark_thriftserver_host = spark_thriftserver_hosts[0]
+else:
+ spark_thriftserver_host = spark_thriftserver_hosts
+
+
+# Knox managed properties
+knox_managed_pid_symlink= format('{stack_root}/current/knox-server/pids')
+
+#knox log4j
+knox_gateway_log_maxfilesize = default('/configurations/gateway-log4j/knox_gateway_log_maxfilesize',256)
+knox_gateway_log_maxbackupindex = default('/configurations/gateway-log4j/knox_gateway_log_maxbackupindex',20)
+knox_ldap_log_maxfilesize = default('/configurations/ldap-log4j/knox_ldap_log_maxfilesize',256)
+knox_ldap_log_maxbackupindex = default('/configurations/ldap-log4j/knox_ldap_log_maxbackupindex',20)
+
+# server configurations
+knox_master_secret = config['configurations']['knox-env']['knox_master_secret']
+knox_host_name = config['clusterHostInfo']['knox_gateway_hosts'][0]
+knox_host_name_in_cluster = config['agentLevelParams']['hostname']
+knox_host_port = config['configurations']['gateway-site']['gateway.port']
+topology_template = config['configurations']['topology']['content']
+admin_topology_template = default('/configurations/admin-topology/content', None)
+knoxsso_topology_template = config['configurations']['knoxsso-topology']['content']
+gateway_log4j = config['configurations']['gateway-log4j']['content']
+ldap_log4j = config['configurations']['ldap-log4j']['content']
+users_ldif = config['configurations']['users-ldif']['content']
+java_home = config['ambariLevelParams']['java_home']
+security_enabled = config['configurations']['cluster-env']['security_enabled']
+smokeuser = config['configurations']['cluster-env']['smokeuser']
+smokeuser_principal = config['configurations']['cluster-env']['smokeuser_principal_name']
+smoke_user_keytab = config['configurations']['cluster-env']['smokeuser_keytab']
+kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None))
+if security_enabled:
+ knox_keytab_path = config['configurations']['knox-env']['knox_keytab_path']
+ _hostname_lowercase = config['agentLevelParams']['hostname'].lower()
+ knox_principal_name = config['configurations']['knox-env']['knox_principal_name'].replace('_HOST',_hostname_lowercase)
+
+# for curl command in ranger plugin to get db connector
+jdk_location = config['ambariLevelParams']['jdk_location']
+
+# ranger knox plugin start section
+
+# ranger host
+ranger_admin_hosts = default("/clusterHostInfo/ranger_admin_hosts", [])
+has_ranger_admin = not len(ranger_admin_hosts) == 0
+
+# ranger support xml_configuration flag, instead of depending on ranger xml_configurations_supported/ranger-env, using stack feature
+xml_configurations_supported = check_stack_feature(StackFeature.RANGER_XML_CONFIGURATION, version_for_stack_feature_checks)
+
+# ranger knox plugin enabled property
+enable_ranger_knox = default("/configurations/ranger-knox-plugin-properties/ranger-knox-plugin-enabled", "No")
+enable_ranger_knox = True if enable_ranger_knox.lower() == 'yes' else False
+
+# get ranger knox properties if enable_ranger_knox is True
+if enable_ranger_knox:
+ # get ranger policy url
+ policymgr_mgr_url = config['configurations']['admin-properties']['policymgr_external_url']
+ if xml_configurations_supported:
+ policymgr_mgr_url = config['configurations']['ranger-knox-security']['ranger.plugin.knox.policy.rest.url']
+
+ if not is_empty(policymgr_mgr_url) and policymgr_mgr_url.endswith('/'):
+ policymgr_mgr_url = policymgr_mgr_url.rstrip('/')
+
+ # ranger audit db user
+ xa_audit_db_user = default('/configurations/admin-properties/audit_db_user', 'rangerlogger')
+
+ # ranger knox service/repositry name
+ repo_name = str(config['clusterName']) + '_knox'
+ repo_name_value = config['configurations']['ranger-knox-security']['ranger.plugin.knox.service.name']
+ if not is_empty(repo_name_value) and repo_name_value != "{{repo_name}}":
+ repo_name = repo_name_value
+
+ knox_home = config['configurations']['ranger-knox-plugin-properties']['KNOX_HOME']
+ common_name_for_certificate = config['configurations']['ranger-knox-plugin-properties']['common.name.for.certificate']
+ repo_config_username = config['configurations']['ranger-knox-plugin-properties']['REPOSITORY_CONFIG_USERNAME']
+
+ # ranger-env config
+ ranger_env = config['configurations']['ranger-env']
+
+ # create ranger-env config having external ranger credential properties
+ if not has_ranger_admin and enable_ranger_knox:
+ external_admin_username = default('/configurations/ranger-knox-plugin-properties/external_admin_username', 'admin')
+ external_admin_password = default('/configurations/ranger-knox-plugin-properties/external_admin_password', 'admin')
+ external_ranger_admin_username = default('/configurations/ranger-knox-plugin-properties/external_ranger_admin_username', 'amb_ranger_admin')
+ external_ranger_admin_password = default('/configurations/ranger-knox-plugin-properties/external_ranger_admin_password', 'amb_ranger_admin')
+ ranger_env = {}
+ ranger_env['admin_username'] = external_admin_username
+ ranger_env['admin_password'] = external_admin_password
+ ranger_env['ranger_admin_username'] = external_ranger_admin_username
+ ranger_env['ranger_admin_password'] = external_ranger_admin_password
+
+ ranger_plugin_properties = config['configurations']['ranger-knox-plugin-properties']
+ policy_user = config['configurations']['ranger-knox-plugin-properties']['policy_user']
+ repo_config_password = config['configurations']['ranger-knox-plugin-properties']['REPOSITORY_CONFIG_PASSWORD']
+
+ xa_audit_db_password = ''
+ if not is_empty(config['configurations']['admin-properties']['audit_db_password']) and stack_supports_ranger_audit_db and has_ranger_admin:
+ xa_audit_db_password = config['configurations']['admin-properties']['audit_db_password']
+
+ downloaded_custom_connector = None
+ previous_jdbc_jar_name = None
+ driver_curl_source = None
+ driver_curl_target = None
+ previous_jdbc_jar = None
+
+ if has_ranger_admin and stack_supports_ranger_audit_db:
+ xa_audit_db_flavor = config['configurations']['admin-properties']['DB_FLAVOR']
+ jdbc_jar_name, previous_jdbc_jar_name, audit_jdbc_url, jdbc_driver = get_audit_configs(config)
+
+ 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("{stack_root}/current/knox-server/ext/{jdbc_jar_name}") if stack_supports_ranger_audit_db else None
+ previous_jdbc_jar = format("{stack_root}/current/knox-server/ext/{previous_jdbc_jar_name}") if stack_supports_ranger_audit_db else None
+ sql_connector_jar = ''
+
+ knox_ranger_plugin_config = {
+ 'username': repo_config_username,
+ 'password': repo_config_password,
+ 'knox.url': format("https://{knox_host_name}:{knox_host_port}/gateway/admin/api/v1/topologies"),
+ 'commonNameForCertificate': common_name_for_certificate
+ }
+
+ if security_enabled:
+ knox_ranger_plugin_config['policy.download.auth.users'] = knox_user
+ knox_ranger_plugin_config['tag.download.auth.users'] = knox_user
+
+ custom_ranger_service_config = generate_ranger_service_config(ranger_plugin_properties)
+ if len(custom_ranger_service_config) > 0:
+ knox_ranger_plugin_config.update(custom_ranger_service_config)
+
+ knox_ranger_plugin_repo = {
+ 'isEnabled': 'true',
+ 'configs': knox_ranger_plugin_config,
+ 'description': 'knox repo',
+ 'name': repo_name,
+ 'type': 'knox'
+ }
+
+ xa_audit_db_is_enabled = False
+ if xml_configurations_supported and stack_supports_ranger_audit_db:
+ xa_audit_db_is_enabled = config['configurations']['ranger-knox-audit']['xasecure.audit.destination.db']
+
+ xa_audit_hdfs_is_enabled = config['configurations']['ranger-knox-audit']['xasecure.audit.destination.hdfs'] if xml_configurations_supported else False
+ ssl_keystore_password = config['configurations']['ranger-knox-policymgr-ssl']['xasecure.policymgr.clientssl.keystore.password'] if xml_configurations_supported else None
+ ssl_truststore_password = config['configurations']['ranger-knox-policymgr-ssl']['xasecure.policymgr.clientssl.truststore.password'] if xml_configurations_supported else None
+ credential_file = format('/etc/ranger/{repo_name}/cred.jceks')
+
+ # for SQLA explicitly disable audit to DB for Ranger
+ if has_ranger_admin and stack_supports_ranger_audit_db and xa_audit_db_flavor == 'sqla':
+ xa_audit_db_is_enabled = False
+
+# need this to capture cluster name from where ranger knox plugin is enabled
+cluster_name = config['clusterName']
+
+# ranger knox plugin end section
+
+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
+
+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(),
+ dfs_type = dfs_type
+)
+
+druid_coordinator_urls = ""
+if "druid-coordinator" in config['configurations']:
+ port = config['configurations']['druid-coordinator']['druid.port']
+ for host in config['clusterHostInfo']['druid_coordinator_hosts']:
+ druid_coordinator_urls += buildUrlElement("http", host, port, "")
+
+druid_overlord_urls = ""
+if "druid-overlord" in config['configurations']:
+ port = config['configurations']['druid-overlord']['druid.port']
+ for host in config['clusterHostInfo']['druid_overlord_hosts']:
+ druid_overlord_urls += buildUrlElement("http", host, port, "")
+
+druid_broker_urls = ""
+if "druid-broker" in config['configurations']:
+ port = config['configurations']['druid-broker']['druid.port']
+ for host in config['clusterHostInfo']['druid_broker_hosts']:
+ druid_broker_urls += buildUrlElement("http", host, port, "")
+
+druid_router_urls = ""
+if "druid-router" in config['configurations']:
+ port = config['configurations']['druid-router']['druid.port']
+ for host in config['clusterHostInfo']['druid_router_hosts']:
+ druid_router_urls += buildUrlElement("http", host, port, "")
+
+zeppelin_ui_urls = ""
+zeppelin_ws_urls = ""
+websocket_support = "false"
+if "zeppelin-site" in config['configurations']:
+ port = config['configurations']['zeppelin-site']['zeppelin.server.port']
+ protocol = "https" if config['configurations']['zeppelin-site']['zeppelin.ssl'] else "http"
+ host = config['clusterHostInfo']['zeppelin_master_hosts'][0]
+ zeppelin_ui_urls += buildUrlElement(protocol, host, port, "")
+ zeppelin_ws_urls += buildUrlElement("ws", host, port, "/ws")
+ websocket_support = "true"
+
+if "topology" in config['configurations']:
+ if 'ws://' in config['configurations']['topology']['content'] or 'wss://' in config['configurations']['topology']['content']:
+ websocket_support = "true"
+
+# for stack 3.0 +
+knox_descriptors_dir = format('{knox_conf_dir}/descriptors')
+knox_shared_providers_dir = format('{knox_conf_dir}/shared-providers')
+
+mount_table_xml_inclusion_file_full_path = None
+mount_table_content = None
+if 'viewfs-mount-table' in config['configurations']:
+ xml_inclusion_file_name = 'viewfs-mount-table.xml'
+ mount_table = config['configurations']['viewfs-mount-table']
+
+ if 'content' in mount_table and mount_table['content'].strip():
+ mount_table_xml_inclusion_file_full_path = os.path.join(knox_conf_dir, xml_inclusion_file_name)
+ mount_table_content = mount_table['content']
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/params_windows.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/params_windows.py
new file mode 100755
index 0000000000..6c0e940861
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/params_windows.py
@@ -0,0 +1,71 @@
+#!/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
+import os
+from status_params import *
+
+# server configurations
+config = Script.get_config()
+
+stack_root = None
+knox_home = None
+knox_conf_dir = None
+knox_logs_dir = None
+knox_bin = None
+ldap_bin = None
+knox_client_bin = None
+knox_data_dir = None
+
+knox_master_secret_path = None
+knox_cert_store_path = None
+
+try:
+ stack_root = os.path.abspath(os.path.join(os.environ["HADOOP_HOME"],".."))
+ knox_home = os.environ['KNOX_HOME']
+ knox_conf_dir = os.environ['KNOX_CONF_DIR']
+ knox_logs_dir = os.environ['KNOX_LOG_DIR']
+ knox_bin = os.path.join(knox_home, 'bin', 'gateway.exe')
+ ldap_bin = os.path.join(knox_home, 'bin', 'ldap.exe')
+ knox_client_bin = os.path.join(knox_home, 'bin', 'knoxcli.cmd')
+ knox_data_dir = os.path.join(knox_home, 'data')
+
+ knox_master_secret_path = os.path.join(knox_data_dir, 'security', 'master')
+ knox_cert_store_path = os.path.join(knox_data_dir, 'security', 'keystores', 'gateway.jks')
+except:
+ pass
+
+knox_host_port = config['configurations']['gateway-site']['gateway.port']
+knox_host_name = config['clusterHostInfo']['knox_gateway_hosts'][0]
+knox_host_name_in_cluster = config['agentLevelParams']['hostname']
+knox_master_secret = config['configurations']['knox-env']['knox_master_secret']
+topology_template = config['configurations']['topology']['content']
+admin_topology_template = default('/configurations/admin-topology/content', None)
+knoxsso_topology_template = config['configurations']['knoxsso-topology']['content']
+gateway_log4j = config['configurations']['gateway-log4j']['content']
+security_enabled = config['configurations']['cluster-env']['security_enabled']
+ldap_log4j = config['configurations']['ldap-log4j']['content']
+users_ldif = config['configurations']['users-ldif']['content']
+
+hadoop_user = config["configurations"]["cluster-env"]["hadoop.user.name"]
+knox_user = hadoop_user
+hdfs_user = hadoop_user
+knox_group = None
+mode = None
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/service_check.py
new file mode 100755
index 0000000000..01a5256aba
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/service_check.py
@@ -0,0 +1,96 @@
+#!/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.core.resources.system import Execute, File
+from resource_management.libraries.functions.format import format
+from resource_management.core.source import StaticFile
+import sys
+import os
+from ambari_commons import OSConst
+from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
+
+
+class KnoxServiceCheck(Script):
+ def service_check(self, env):
+ pass
+
+
+@OsFamilyImpl(os_family=OSConst.WINSRV_FAMILY)
+class KnoxServiceCheckWindows(KnoxServiceCheck):
+ def service_check(self, env):
+ import params
+ env.set_params(params)
+
+ temp_dir = os.path.join(os.path.dirname(params.knox_home), "temp")
+ validateKnoxFileName = "validateKnoxStatus.py"
+ validateKnoxFilePath = os.path.join(temp_dir, validateKnoxFileName)
+ python_executable = sys.executable
+ validateStatusCmd = "%s %s -p %s -n %s" % (python_executable, validateKnoxFilePath, params.knox_host_port, params.knox_host_name)
+
+ print("Test connectivity to knox server")
+
+ File(validateKnoxFilePath,
+ content=StaticFile(validateKnoxFileName)
+ )
+
+ Execute(validateStatusCmd,
+ tries=3,
+ try_sleep=5,
+ timeout=5,
+ logoutput=True
+ )
+
+
+@OsFamilyImpl(os_family=OsFamilyImpl.DEFAULT)
+class KnoxServiceCheckDefault(KnoxServiceCheck):
+ def service_check(self, env):
+ import params
+ env.set_params(params)
+
+ validateKnoxFileName = "validateKnoxStatus.py"
+ validateKnoxFilePath = format("{tmp_dir}/{validateKnoxFileName}")
+ python_executable = sys.executable
+ validateStatusCmd = format("{python_executable} {validateKnoxFilePath} -p {knox_host_port} -n {knox_host_name}")
+ if params.security_enabled:
+ kinit_cmd = format("{kinit_path_local} -kt {smoke_user_keytab} {smokeuser_principal};")
+ smoke_cmd = format("{kinit_cmd} {validateStatusCmd}")
+ else:
+ smoke_cmd = validateStatusCmd
+
+ print("Test connectivity to knox server")
+
+ File(validateKnoxFilePath,
+ content=StaticFile(validateKnoxFileName),
+ mode=0o755
+ )
+
+ Execute(smoke_cmd,
+ tries=15,
+ try_sleep=5,
+ path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin',
+ user=params.smokeuser,
+ timeout=5,
+ logoutput=True
+ )
+
+
+if __name__ == "__main__":
+ KnoxServiceCheck().execute()
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/setup_ranger_knox.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/setup_ranger_knox.py
new file mode 100755
index 0000000000..193b0142e5
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/setup_ranger_knox.py
@@ -0,0 +1,149 @@
+#!/usr/bin/env python
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""
+from resource_management.core.logger import Logger
+from resource_management.libraries.functions.setup_ranger_plugin_xml import setup_ranger_plugin
+from resource_management.libraries.functions.setup_ranger_plugin_xml import setup_configuration_file_for_required_plugins
+from resource_management.core.resources import File
+from resource_management.libraries.resources.xml_config import XmlConfig
+from resource_management.libraries.functions.format import format
+
+def setup_ranger_knox(upgrade_type=None):
+ import params
+
+ if params.enable_ranger_knox:
+
+ stack_version = None
+ if upgrade_type is not None:
+ stack_version = params.version
+
+ if params.retryAble:
+ Logger.info("Knox: Setup ranger: command retry enables thus retrying if ranger admin is down !")
+ else:
+ Logger.info("Knox: Setup ranger: command retry not enabled thus skipping if ranger admin is down !")
+
+ if params.xa_audit_hdfs_is_enabled:
+ if params.has_namenode:
+ try:
+ params.HdfsResource("/ranger/audit",
+ type="directory",
+ action="create_on_execute",
+ owner=params.hdfs_user,
+ group=params.hdfs_user,
+ mode=0o755,
+ recursive_chmod=True
+ )
+ params.HdfsResource("/ranger/audit/knox",
+ type="directory",
+ action="create_on_execute",
+ owner=params.knox_user,
+ group=params.knox_user,
+ mode=0o700,
+ recursive_chmod=True
+ )
+ params.HdfsResource(None, action="execute")
+ except Exception as err:
+ Logger.exception("Audit directory creation in HDFS for KNOX Ranger plugin failed with error:\n{0}".format(err))
+
+ if params.namenode_hosts is not None and len(params.namenode_hosts) > 1:
+ Logger.info('Ranger Knox plugin is enabled in NameNode HA environment along with audit to Hdfs enabled, creating hdfs-site.xml')
+ XmlConfig("hdfs-site.xml",
+ conf_dir=params.knox_conf_dir,
+ configurations=params.config['configurations']['hdfs-site'],
+ configuration_attributes=params.config['configurationAttributes']['hdfs-site'],
+ owner=params.knox_user,
+ group=params.knox_group,
+ mode=0o644
+ )
+ else:
+ File(format('{knox_conf_dir}/hdfs-site.xml'), action="delete")
+
+ api_version = 'v2'
+
+ setup_ranger_plugin('knox-server', 'knox', params.previous_jdbc_jar,
+ params.downloaded_custom_connector, params.driver_curl_source,
+ params.driver_curl_target, params.java_home,
+ params.repo_name, params.knox_ranger_plugin_repo,
+ params.ranger_env, params.ranger_plugin_properties,
+ params.policy_user, params.policymgr_mgr_url,
+ params.enable_ranger_knox, conf_dict=params.knox_conf_dir,
+ component_user=params.knox_user, component_group=params.knox_group, cache_service_list=['knox'],
+ plugin_audit_properties=params.config['configurations']['ranger-knox-audit'], plugin_audit_attributes=params.config['configurationAttributes']['ranger-knox-audit'],
+ plugin_security_properties=params.config['configurations']['ranger-knox-security'], plugin_security_attributes=params.config['configurationAttributes']['ranger-knox-security'],
+ plugin_policymgr_ssl_properties=params.config['configurations']['ranger-knox-policymgr-ssl'], plugin_policymgr_ssl_attributes=params.config['configurationAttributes']['ranger-knox-policymgr-ssl'],
+ component_list=['knox-server'], audit_db_is_enabled=params.xa_audit_db_is_enabled,
+ credential_file=params.credential_file, xa_audit_db_password=params.xa_audit_db_password,
+ ssl_truststore_password=params.ssl_truststore_password, ssl_keystore_password=params.ssl_keystore_password,
+ stack_version_override = stack_version, skip_if_rangeradmin_down= not params.retryAble,api_version=api_version,
+ is_security_enabled = params.security_enabled,
+ is_stack_supports_ranger_kerberos = params.stack_supports_ranger_kerberos,
+ component_user_principal=params.knox_principal_name if params.security_enabled else None,
+ component_user_keytab=params.knox_keytab_path if params.security_enabled else None)
+
+ if params.stack_supports_core_site_for_ranger_plugin and params.enable_ranger_knox and params.security_enabled:
+ if params.has_namenode:
+ Logger.info("Stack supports core-site.xml creation for Ranger plugin and Namenode is installed, creating create core-site.xml from namenode configurations")
+ setup_configuration_file_for_required_plugins(component_user = params.knox_user, component_group = params.knox_group,
+ create_core_site_path = params.knox_conf_dir, configurations = params.config['configurations']['core-site'],
+ configuration_attributes = params.config['configurationAttributes']['core-site'], file_name='core-site.xml',
+ xml_include_file=params.mount_table_xml_inclusion_file_full_path, xml_include_file_content=params.mount_table_content)
+ else:
+ Logger.info("Stack supports core-site.xml creation for Ranger plugin and Namenode is not installed, creating create core-site.xml from default configurations")
+ setup_configuration_file_for_required_plugins(component_user = params.knox_user, component_group = params.knox_group,
+ create_core_site_path = params.knox_conf_dir, configurations = { 'hadoop.security.authentication' : 'kerberos' if params.security_enabled else 'simple' },
+ configuration_attributes = {}, file_name='core-site.xml')
+ else:
+ Logger.info("Stack does not support core-site.xml creation for Ranger plugin, skipping core-site.xml configurations")
+
+ #fix ranger files not foud
+ ranger_knox_audit = params.config['configurations']['ranger-knox-audit']
+ XmlConfig("ranger-knox-" + params.repo_name + "-audit.xml",
+ conf_dir=params.knox_conf_dir,
+ configurations=ranger_knox_audit,
+ owner=params.knox_user,
+ group=params.knox_group,
+ mode=0o755)
+
+ ranger_knox_policymgr_ssl = params.config['configurations']['ranger-knox-policymgr-ssl']
+ XmlConfig("ranger-knox-audit.xml",
+ conf_dir=params.knox_conf_dir,
+ configurations=ranger_knox_policymgr_ssl,
+ owner=params.knox_user,
+ group=params.knox_group,
+ mode=0o755)
+
+ ranger_knox_policymgr_ssl = params.config['configurations']['ranger-knox-policymgr-ssl']
+ XmlConfig("ranger-knox-" + params.repo_name + "-audit.xml",
+ conf_dir=params.knox_conf_dir,
+ configurations=ranger_knox_policymgr_ssl,
+ owner=params.knox_user,
+ group=params.knox_group,
+ mode=0o755)
+
+ ranger_knox_security = params.config['configurations']['ranger-knox-security']
+ XmlConfig("ranger-knox-" + params.repo_name + "-security.xml",
+ conf_dir=params.knox_conf_dir,
+ configurations=ranger_knox_security,
+ owner=params.knox_user,
+ group=params.knox_group,
+ mode=0o755)
+ else:
+ Logger.info('Ranger Knox plugin is not enabled')
+
+
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/status_params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/status_params.py
new file mode 100755
index 0000000000..2a2697dfe0
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/status_params.py
@@ -0,0 +1,59 @@
+#!/usr/bin/env python
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""
+from resource_management.libraries.functions import format
+from resource_management.libraries.functions.default import default
+from resource_management.libraries.functions import get_kinit_path
+from resource_management.libraries.script.script import Script
+from ambari_commons import OSCheck
+from resource_management.libraries.functions.version import format_stack_version
+from resource_management.libraries.functions.stack_features import check_stack_feature
+from resource_management.libraries.functions import StackFeature
+
+
+config = Script.get_config()
+stack_root = Script.get_stack_root()
+stack_version_unformatted = config['clusterLevelParams']['stack_version']
+stack_version_formatted = format_stack_version(stack_version_unformatted)
+
+if OSCheck.is_windows_family():
+ knox_gateway_win_service_name = "gateway"
+ knox_ldap_win_service_name = "ldap"
+else:
+ knox_conf_dir = '/etc/knox/conf'
+ if stack_version_formatted and check_stack_feature(StackFeature.ROLLING_UPGRADE, stack_version_formatted):
+ knox_conf_dir = format('{stack_root}/current/knox-server/conf')
+ knox_pid_dir = config['configurations']['knox-env']['knox_pid_dir']
+ knox_pid_file = format("{knox_pid_dir}/gateway.pid")
+ ldap_pid_file = format("{knox_pid_dir}/ldap.pid")
+
+ security_enabled = config['configurations']['cluster-env']['security_enabled']
+ if security_enabled:
+ knox_keytab_path = config['configurations']['knox-env']['knox_keytab_path']
+ knox_principal_name = config['configurations']['knox-env']['knox_principal_name']
+ else:
+ knox_keytab_path = None
+ knox_principal_name = None
+
+ hostname = config['agentLevelParams']['hostname'].lower()
+ knox_user = default("/configurations/knox-env/knox_user", "knox")
+ kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None))
+ temp_dir = Script.get_tmp_dir()
+
+stack_name = default("/clusterLevelParams/stack_name", None)
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/upgrade.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/upgrade.py
new file mode 100755
index 0000000000..e9239d7f5c
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/scripts/upgrade.py
@@ -0,0 +1,148 @@
+
+#!/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
+import tempfile
+
+from resource_management.core import sudo
+from resource_management.core.logger import Logger
+from resource_management.core.exceptions import Fail
+from resource_management.libraries.functions import tar_archive
+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.libraries.script.script import Script
+
+
+BACKUP_TEMP_DIR = "knox-upgrade-backup"
+BACKUP_DATA_ARCHIVE = "knox-data-backup.tar"
+STACK_ROOT_DEFAULT = Script.get_stack_root()
+
+
+def backup_data():
+ """
+ Backs up the knox data as part of the upgrade process.
+ :return: Returns the path to the absolute backup directory.
+ """
+ Logger.info('Backing up Knox data directory before upgrade...')
+ directoryMappings = _get_directory_mappings_during_upgrade()
+
+ Logger.info("Directory mappings to backup: {0}".format(str(directoryMappings)))
+
+ absolute_backup_dir = os.path.join(tempfile.gettempdir(), BACKUP_TEMP_DIR)
+ if not os.path.isdir(absolute_backup_dir):
+ os.makedirs(absolute_backup_dir)
+
+ for directory in directoryMappings:
+ if not os.path.isdir(directory):
+ raise Fail("Unable to backup missing directory {0}".format(directory))
+
+ archive = os.path.join(absolute_backup_dir, directoryMappings[directory])
+ Logger.info('Compressing {0} to {1}'.format(directory, archive))
+
+ if os.path.exists(archive):
+ os.remove(archive)
+
+ # backup the directory, following symlinks instead of including them
+ tar_archive.archive_directory_dereference(archive, directory)
+
+ return absolute_backup_dir
+
+
+def copytree(src, dst, exclude_sub_dirs=set(), force_replace=False):
+ """
+ Copy content of directory from source path to the target path with possibility to exclude some directories
+
+ :type src str
+ :type dst str
+ :type exclude_sub_dirs list|set
+ :type force_replace bool
+ """
+
+ def copy(_src, _dst):
+ from resource_management.core import shell
+ # full path is required to avoid usage of system command aliases like 'cp -i', which block overwrite
+ if force_replace:
+ shell.checked_call(["/bin/cp", "-rfp", _src, _dst], sudo=True)
+ else:
+ shell.checked_call(["/bin/cp", "-rp", _src, _dst], sudo=True)
+
+ if not sudo.path_isdir(src) or not sudo.path_isdir(dst):
+ raise Fail("The source or the destination is not a folder")
+
+ sub_dirs_to_copy = sudo.listdir(src)
+ for d in sub_dirs_to_copy:
+ if d not in exclude_sub_dirs:
+ src_path = os.path.join(src, d)
+ copy(src_path, dst)
+
+
+def seed_current_data_directory():
+ """
+ HDP stack example:
+
+ Knox uses "versioned" data directories in some stacks:
+ /usr/hdp/2.2.0.0-1234/knox/data -> /var/lib/knox/data
+ /usr/hdp/2.3.0.0-4567/knox/data -> /var/lib/knox/data-2.3.0.0-4567
+
+ If the stack being upgraded to supports versioned data directories for Knox, then we should
+ seed the data from the prior version. This is mainly because Knox keeps things like keystores
+ in the data directory and if those aren't copied over then it will re-create self-signed
+ versions. This side-effect behavior causes loss of service in clusters where Knox is using
+ custom keystores.
+
+ cp -R -p -f /usr/hdp/<old>/knox-server/data/. /usr/hdp/current/knox-server/data
+ :return:
+ """
+ import params
+
+ if params.version is None or params.upgrade_from_version is None:
+ raise Fail("The source and target versions are required")
+
+ if check_stack_feature(StackFeature.KNOX_VERSIONED_DATA_DIR, params.version):
+ Logger.info("Seeding Knox data from prior version...")
+
+ application_dir_name = "applications"
+ exclude_root_dirs = [application_dir_name, "deployments"]
+ exclude_applications_from_copy = ["admin-ui", "knoxauth"]
+ source_data_dir = os.path.join(params.stack_root, params.upgrade_from_version, "knox", "data")
+ target_data_dir = os.path.join(params.stack_root, "current", "knox-server", "data")
+
+ copytree(source_data_dir, target_data_dir, exclude_root_dirs, True)
+ copytree(os.path.join(source_data_dir, application_dir_name), os.path.join(target_data_dir, application_dir_name),
+ exclude_applications_from_copy, True)
+
+
+def _get_directory_mappings_during_upgrade():
+ """
+ Gets a dictionary of directory to archive name that represents the
+ directories that need to be backed up and their output tarball archive targets
+ :return: the dictionary of directory to tarball mappings
+ """
+ import params
+
+ # the data directory is always a symlink to the "correct" data directory in /var/lib/knox
+ # such as /var/lib/knox/data or /var/lib/knox/data-2.4.0.0-1234
+ knox_data_dir = STACK_ROOT_DEFAULT + '/current/knox-server/data'
+
+ directories = { knox_data_dir: BACKUP_DATA_ARCHIVE }
+
+ Logger.info(format("Knox directories to backup:\n{directories}"))
+ return directories
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/templates/input.config-knox.json.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/templates/input.config-knox.json.j2
new file mode 100755
index 0000000000..6d7cf72576
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/templates/input.config-knox.json.j2
@@ -0,0 +1,60 @@
+{#
+ # 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.
+ #}
+{
+ "input":[
+ {
+ "type":"knox_gateway",
+ "rowtype":"service",
+ "path":"/var/log/knox/gateway.log"
+ },
+ {
+ "type":"knox_cli",
+ "rowtype":"service",
+ "path":"/var/log/knox/knoxcli.log"
+ },
+ {
+ "type":"knox_ldap",
+ "rowtype":"service",
+ "path":"/var/log/knox/ldap.log"
+ }
+ ],
+ "filter":[
+ {
+ "filter":"grok",
+ "conditions":{
+ "fields":{
+ "type":[
+ "knox_gateway",
+ "knox_cli",
+ "knox_ldap"
+ ]
+ }
+ },
+ "log4j_format":"%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n",
+ "multiline_pattern":"^(%{TIMESTAMP_ISO8601:logtime})",
+ "message_pattern":"(?m)^%{TIMESTAMP_ISO8601:logtime}%{SPACE}%{LOGLEVEL:level}%{SPACE}%{JAVACLASS:logger_name}%{SPACE}\\(%{JAVAFILE:file}:%{JAVAMETHOD:method}\\(%{INT:line_number}\\)\\)%{SPACE}-%{SPACE}%{GREEDYDATA:log_message}",
+ "post_map_values":{
+ "logtime":{
+ "map_date":{
+ "target_date_pattern":"yyyy-MM-dd HH:mm:ss,SSS"
+ }
+ }
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/templates/krb5JAASLogin.conf.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/templates/krb5JAASLogin.conf.j2
new file mode 100755
index 0000000000..29b2179a25
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/package/templates/krb5JAASLogin.conf.j2
@@ -0,0 +1,27 @@
+{#
+# 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.
+#}
+com.sun.security.jgss.initiate {
+com.sun.security.auth.module.Krb5LoginModule required
+renewTGT=false
+doNotPrompt=true
+useKeyTab=true
+keyTab="{{knox_keytab_path}}"
+principal="{{knox_principal_name}}"
+storeKey=true
+useTicketCache=false;
+};
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/quicklinks/quicklinks.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/quicklinks/quicklinks.json
new file mode 100755
index 0000000000..17ba16739e
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/quicklinks/quicklinks.json
@@ -0,0 +1,23 @@
+{
+ "name": "default",
+ "description": "default quick links configuration",
+ "configuration": {
+ "protocol": {
+ "type": "HTTPS_ONLY"
+ },
+ "links": [
+ {
+ "name": "knox_admin_ui",
+ "label": "Knox Admin UI",
+ "component_name": "KNOX_GATEWAY",
+ "url": "%@://%@:%@/${gateway-site/gateway.path}/manager/admin-ui",
+ "port": {
+ "https_property": "gateway.port",
+ "https_default_port": "8443",
+ "regex": "^(\\d+)$",
+ "site": "gateway-site"
+ }
+ }
+ ]
+ }
+}
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/role_command_order.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/role_command_order.json
new file mode 100755
index 0000000000..c0475e43cf
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/role_command_order.json
@@ -0,0 +1,7 @@
+{
+ "general_deps" : {
+ "_comment" : "dependencies for KNOX",
+ "KNOX_GATEWAY-START" : ["RANGER_USERSYNC-START", "NAMENODE-START"],
+ "KNOX_SERVICE_CHECK-SERVICE_CHECK" : ["KNOX_GATEWAY-START"]
+ }
+}
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/service_advisor.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/service_advisor.py
new file mode 100755
index 0000000000..c5ab6267ce
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/service_advisor.py
@@ -0,0 +1,255 @@
+#!/usr/bin/env ambari-python-wrap
+"""
+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.
+"""
+
+# Python imports
+import imp
+import os
+import traceback
+import re
+import socket
+import fnmatch
+import xml.etree.ElementTree as ET
+
+
+from resource_management.core.logger import Logger
+
+SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
+STACKS_DIR = os.path.join(SCRIPT_DIR, '../../../../../stacks/')
+PARENT_FILE = os.path.join(STACKS_DIR, 'service_advisor.py')
+
+try:
+ if "BASE_SERVICE_ADVISOR" in os.environ:
+ PARENT_FILE = os.environ["BASE_SERVICE_ADVISOR"]
+ with open(PARENT_FILE, 'rb') as fp:
+ service_advisor = imp.load_module('service_advisor', fp, PARENT_FILE, ('.py', 'rb', imp.PY_SOURCE))
+except Exception as e:
+ traceback.print_exc()
+ print "Failed to load parent"
+
+class KnoxServiceAdvisor(service_advisor.ServiceAdvisor):
+
+ def __init__(self, *args, **kwargs):
+ self.as_super = super(KnoxServiceAdvisor, self)
+ self.as_super.__init__(*args, **kwargs)
+
+ # Always call these methods
+ self.modifyMastersWithMultipleInstances()
+ self.modifyCardinalitiesDict()
+ self.modifyHeapSizeProperties()
+ self.modifyNotValuableComponents()
+ self.modifyComponentsNotPreferableOnServer()
+ self.modifyComponentLayoutSchemes()
+
+ def modifyMastersWithMultipleInstances(self):
+ """
+ Modify the set of masters with multiple instances.
+ Must be overriden in child class.
+ """
+ # Nothing to do
+ pass
+
+ def modifyCardinalitiesDict(self):
+ """
+ Modify the dictionary of cardinalities.
+ Must be overriden in child class.
+ """
+ # Nothing to do
+ pass
+
+ def modifyHeapSizeProperties(self):
+ """
+ Modify the dictionary of heap size properties.
+ Must be overriden in child class.
+ """
+ pass
+
+ def modifyNotValuableComponents(self):
+ """
+ Modify the set of components whose host assignment is based on other services.
+ Must be overriden in child class.
+ """
+ # Nothing to do
+ pass
+
+ def modifyComponentsNotPreferableOnServer(self):
+ """
+ Modify the set of components that are not preferable on the server.
+ Must be overriden in child class.
+ """
+ # Nothing to do
+ pass
+
+ def modifyComponentLayoutSchemes(self):
+ """
+ Modify layout scheme dictionaries for components.
+ The scheme dictionary basically maps the number of hosts to
+ host index where component should exist.
+ Must be overriden in child class.
+ """
+ # Nothing to do
+ pass
+
+ def getServiceComponentLayoutValidations(self, services, hosts):
+ """
+ Get a list of errors.
+ Must be overriden in child class.
+ """
+
+ return self.getServiceComponentCardinalityValidations(services, hosts, "KNOX")
+
+ def getServiceConfigurationRecommendations(self, configurations, clusterData, services, hosts):
+ """
+ Entry point.
+ Must be overriden in child class.
+ """
+ #Logger.info("Class: %s, Method: %s. Recommending Service Configurations." %
+ # (self.__class__.__name__, inspect.stack()[0][3]))
+
+ recommender = KnoxRecommender()
+ recommender.recommendKnoxConfigurationsFromHDP22(configurations, clusterData, services, hosts)
+
+
+
+ def getServiceConfigurationsValidationItems(self, configurations, recommendedDefaults, services, hosts):
+ """
+ Entry point.
+ Validate configurations for the service. Return a list of errors.
+ The code for this function should be the same for each Service Advisor.
+ """
+ #Logger.info("Class: %s, Method: %s. Validating Configurations." %
+ # (self.__class__.__name__, inspect.stack()[0][3]))
+
+ validator = KnoxValidator()
+ # Calls the methods of the validator using arguments,
+ # method(siteProperties, siteRecommendations, configurations, services, hosts)
+ return validator.validateListOfConfigUsingMethod(configurations, recommendedDefaults, services, hosts, validator.validators)
+
+
+
+class KnoxRecommender(service_advisor.ServiceAdvisor):
+ """
+ Knox Recommender suggests properties when adding the service for the first time or modifying configs via the UI.
+ """
+
+ def __init__(self, *args, **kwargs):
+ self.as_super = super(KnoxRecommender, self)
+ self.as_super.__init__(*args, **kwargs)
+
+
+ def recommendKnoxConfigurationsFromHDP22(self, configurations, clusterData, services, hosts):
+ if "ranger-env" in services["configurations"] and "ranger-knox-plugin-properties" in services["configurations"] and \
+ "ranger-knox-plugin-enabled" in services["configurations"]["ranger-env"]["properties"]:
+ putKnoxRangerPluginProperty = self.putProperty(configurations, "ranger-knox-plugin-properties", services)
+ rangerEnvKnoxPluginProperty = services["configurations"]["ranger-env"]["properties"]["ranger-knox-plugin-enabled"]
+ putKnoxRangerPluginProperty("ranger-knox-plugin-enabled", rangerEnvKnoxPluginProperty)
+
+ if 'topology' in services["configurations"] and 'content' in services["configurations"]["topology"]["properties"]:
+ putKnoxTopologyContent = self.putProperty(configurations, "topology", services)
+ rangerPluginEnabled = ''
+ if 'ranger-knox-plugin-properties' in configurations and 'ranger-knox-plugin-enabled' in configurations['ranger-knox-plugin-properties']['properties']:
+ rangerPluginEnabled = configurations['ranger-knox-plugin-properties']['properties']['ranger-knox-plugin-enabled']
+ elif 'ranger-knox-plugin-properties' in services['configurations'] and 'ranger-knox-plugin-enabled' in services['configurations']['ranger-knox-plugin-properties']['properties']:
+ rangerPluginEnabled = services['configurations']['ranger-knox-plugin-properties']['properties']['ranger-knox-plugin-enabled']
+
+ # check if authorization provider already added
+ topologyContent = services["configurations"]["topology"]["properties"]["content"]
+ authorizationProviderExists = False
+ authNameChanged = False
+ root = ET.fromstring(topologyContent)
+ if root is not None:
+ gateway = root.find("gateway")
+ if gateway is not None:
+ for provider in gateway.findall('provider'):
+ role = provider.find('role')
+ if role is not None and role.text and role.text.lower() == "authorization":
+ authorizationProviderExists = True
+
+ name = provider.find('name')
+ if name is not None and name.text == "AclsAuthz" and rangerPluginEnabled \
+ and rangerPluginEnabled.lower() == "Yes".lower():
+ newAuthName = "XASecurePDPKnox"
+ authNameChanged = True
+ elif name is not None and (((not rangerPluginEnabled) or rangerPluginEnabled.lower() != "Yes".lower()) \
+ and name.text == 'XASecurePDPKnox'):
+ newAuthName = "AclsAuthz"
+ authNameChanged = True
+
+ if authNameChanged:
+ name.text = newAuthName
+ putKnoxTopologyContent('content', ET.tostring(root))
+
+ if authorizationProviderExists:
+ break
+
+ if not authorizationProviderExists:
+ if root is not None:
+ gateway = root.find("gateway")
+ if gateway is not None:
+ provider = ET.SubElement(gateway, 'provider')
+
+ role = ET.SubElement(provider, 'role')
+ role.text = "authorization"
+
+ name = ET.SubElement(provider, 'name')
+ if rangerPluginEnabled and rangerPluginEnabled.lower() == "Yes".lower():
+ name.text = "XASecurePDPKnox"
+ else:
+ name.text = "AclsAuthz"
+
+ enabled = ET.SubElement(provider, 'enabled')
+ enabled.text = "true"
+
+ #TODO add pretty format for newly added provider
+ putKnoxTopologyContent('content', ET.tostring(root))
+
+
+
+
+class KnoxValidator(service_advisor.ServiceAdvisor):
+ """
+ Knox Validator checks the correctness of properties whenever the service is first added or the user attempts to
+ change configs via the UI.
+ """
+
+ def __init__(self, *args, **kwargs):
+ self.as_super = super(KnoxValidator, self)
+ self.as_super.__init__(*args, **kwargs)
+
+ self.validators = [("ranger-knox-plugin-properties", self.validateKnoxRangerPluginConfigurationsFromHDP22),
+ ]
+
+ def validateKnoxRangerPluginConfigurationsFromHDP22(self, properties, recommendedDefaults, configurations, services, hosts):
+ validationItems = []
+ servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
+ ranger_plugin_properties = self.getSiteProperties(configurations, "ranger-knox-plugin-properties")
+ ranger_plugin_enabled = ranger_plugin_properties['ranger-knox-plugin-enabled'] if ranger_plugin_properties else 'No'
+ if 'RANGER' in servicesList and ranger_plugin_enabled.lower() == 'yes':
+ # ranger-hdfs-plugin must be enabled in ranger-env
+ ranger_env = self.getServicesSiteProperties(services, 'ranger-env')
+ if not ranger_env or not 'ranger-knox-plugin-enabled' in ranger_env or \
+ ranger_env['ranger-knox-plugin-enabled'].lower() != 'yes':
+ validationItems.append({"config-name": 'ranger-knox-plugin-enabled',
+ "item": self.getWarnItem(
+ "ranger-knox-plugin-properties/ranger-knox-plugin-enabled must correspond ranger-env/ranger-knox-plugin-enabled")})
+ return self.toConfigurationValidationProblems(validationItems, "ranger-knox-plugin-properties")
+
+
+
+
+
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/themes/credentials.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/themes/credentials.json
new file mode 100755
index 0000000000..d1936d7505
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/themes/credentials.json
@@ -0,0 +1,38 @@
+{
+ "name": "credentials",
+ "configuration": {
+ "placement": {
+ "configs": [
+ {
+ "config": "knox-env/knox_master_secret",
+ "subsection-name": "subsection-knox-master-secret"
+ }
+ ],
+ "configuration-layout": "credentials"
+ },
+ "widgets": [],
+ "layouts": [
+ {
+ "name": "credentials",
+ "tabs": [
+ {
+ "name": "credentials",
+ "layout": {
+ "sections": [
+ {
+ "subsections": [
+ {
+ "name": "subsection-knox-master-secret",
+ "display-name": "Knox Master Secret"
+ }
+ ],
+ "name": "credentials"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/themes/directories.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/themes/directories.json
new file mode 100755
index 0000000000..e501ca7cc6
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KNOX/themes/directories.json
@@ -0,0 +1,88 @@
+{
+ "name": "directories",
+ "description": "Directories theme for HIVE service",
+ "configuration": {
+ "layouts": [
+ {
+ "name": "directories",
+ "tabs": [
+ {
+ "name": "directories",
+ "display-name": "Directories",
+ "layout": {
+ "tab-columns": "1",
+ "tab-rows": "4",
+ "sections": [
+ {
+ "name": "subsection-data-dirs",
+ "display-name": "DATA DIRS",
+ "row-index": "0",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "1",
+ "section-columns": "1",
+ "section-rows": "1",
+ "subsections": [
+ {
+ "name": "subsection-data-dirs",
+ "row-index": "0",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "1"
+ }
+ ]
+ },
+ {
+ "name": "subsection-pid-dirs",
+ "display-name": "PID DIRS",
+ "row-index": "2",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "1",
+ "section-columns": "1",
+ "section-rows": "1",
+ "subsections": [
+ {
+ "name": "subsection-pid-dirs",
+ "row-index": "0",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "1"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ],
+ "placement": {
+ "configuration-layout": "default",
+ "configs": [
+ {
+ "config": "gateway-site/gateway.gateway.conf.dir",
+ "subsection-name": "subsection-data-dirs"
+ },
+ {
+ "config": "knox-env/knox_pid_dir",
+ "subsection-name": "subsection-pid-dirs"
+ }
+ ]
+ },
+ "widgets": [
+ {
+ "config": "gateway-site/gateway.gateway.conf.dir",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "knox-env/knox_pid_dir",
+ "widget": {
+ "type": "text-field"
+ }
+ }
+ ]
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org
(ambari) 19/22: fix ranger
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch eee
in repository https://gitbox.apache.org/repos/asf/ambari.git
commit 71de78c2b07d77ac65305f66b8061b8bf91ff213
Author: jialiang <ji...@gmail.com>
AuthorDate: Sat Sep 7 14:47:21 2024 +0800
fix ranger
---
.../stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/kms.py | 4 ++--
.../stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/params.py | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/kms.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/kms.py
index 0c7e35cbb1..2ad6cc1790 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/kms.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/kms.py
@@ -538,10 +538,10 @@ def enable_kms_plugin():
mode=0o744)
if params.xa_audit_db_is_enabled:
- cred_setup = params.cred_setup_prefix + ('-f', params.credential_file, '-k', 'auditDBCred', '-v', PasswordString(params.xa_audit_db_password), '-c', '1')
+ cred_setup = params.cred_setup_prefix + ('-f', params.credential_file, '-k', 'auditDBCred', '-v', PasswordString(params.xa_audit_db_password), '-c', '1')
Execute(cred_setup, environment={'JAVA_HOME': params.java_home}, logoutput=True, sudo=True)
- cred_setup = params.cred_setup_prefix + ('-f', params.credential_file, '-k', 'sslKeyStore', '-v', PasswordString(params.ssl_keystore_password), '-c', '1')
+ cred_setup = params.cred_setup_prefix + ('-f', params.credential_file, '-k', 'sslKeyStore', '-v', PasswordString(params.ssl_keystore_password), '-c', '1')
Execute(cred_setup, environment={'JAVA_HOME': params.java_home}, logoutput=True, sudo=True)
cred_setup = params.cred_setup_prefix + ('-f', params.credential_file, '-k', 'sslTrustStore', '-v', PasswordString(params.ssl_truststore_password), '-c', '1')
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/params.py
index 617513b2f8..9ef7204e0c 100755
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/params.py
@@ -105,7 +105,7 @@ repo_name_value = config['configurations']['ranger-kms-security']['ranger.plugin
if not is_empty(repo_name_value) and repo_name_value != "{{repo_name}}":
repo_name = repo_name_value
cred_lib_path = os.path.join(kms_home,"cred","lib","*")
-cred_setup_prefix = (format('{kms_home}/ranger_credential_helper.py'), '-l', cred_lib_path)
+cred_setup_prefix = ('ambari-python-wrap', format('{kms_home}/ranger_credential_helper.py'), '-l', cred_lib_path)
credential_file = format('/etc/ranger/{repo_name}/cred.jceks')
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org
(ambari) 22/22: fix
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch eee
in repository https://gitbox.apache.org/repos/asf/ambari.git
commit 427156fff2ed6911c168606f5e3068f0e6702ceb
Author: jialiang <ji...@gmail.com>
AuthorDate: Sat Sep 7 17:20:10 2024 +0800
fix
---
.../stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-site.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-site.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-site.xml
index b1017fcaff..876a0dd0bc 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-site.xml
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/YARN/configuration/yarn-site.xml
@@ -498,6 +498,7 @@
</value-attributes>
<on-ambari-upgrade add="true"/>
</property>
+ <property>
<name>yarn.timeline-service.ttl-ms</name>
<description>Time to live for timeline store data in milliseconds.</description>
<value>2678400000</value>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org
(ambari) 20/22: add kafka 3.6
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch eee
in repository https://gitbox.apache.org/repos/asf/ambari.git
commit 55de9c388e8bc87dfc3ed76b21a7ab0487d6a061
Author: jialiang <ji...@gmail.com>
AuthorDate: Sat Sep 7 14:50:23 2024 +0800
add kafka 3.6
---
.../stacks/BIGTOP/3.3.0/services/KAFKA/alerts.json | 32 +
.../services/KAFKA/configuration/kafka-broker.xml | 665 +++++++++++++++++++++
.../services/KAFKA/configuration/kafka-env.xml | 146 +++++
.../services/KAFKA/configuration/kafka-log4j.xml | 170 ++++++
.../KAFKA/configuration/kafka_client_jaas_conf.xml | 43 ++
.../KAFKA/configuration/kafka_jaas_conf.xml | 116 ++++
.../KAFKA/configuration/ranger-kafka-audit.xml | 130 ++++
.../ranger-kafka-plugin-properties.xml | 154 +++++
.../configuration/ranger-kafka-policymgr-ssl.xml | 72 +++
.../KAFKA/configuration/ranger-kafka-security.xml | 64 ++
.../BIGTOP/3.3.0/services/KAFKA/kerberos.json | 102 ++++
.../BIGTOP/3.3.0/services/KAFKA/metainfo.xml | 111 +++-
.../BIGTOP/3.3.0/services/KAFKA/metrics.json | 238 ++++++++
.../3.3.0/services/KAFKA/package/scripts/kafka.py | 296 +++++++++
.../services/KAFKA/package/scripts/kafka_broker.py | 143 +++++
.../3.3.0/services/KAFKA/package/scripts/params.py | 469 +++++++++++++++
.../KAFKA/package/scripts/service_check.py | 89 +++
.../KAFKA/package/scripts/setup_ranger_kafka.py | 146 +++++
.../KAFKA/package/scripts/status_params.py | 26 +
.../services/KAFKA/package/scripts/upgrade.py | 74 +++
.../3.3.0/services/KAFKA/package/scripts/utils.py | 38 ++
.../templates/client_kerberos.properties.j2 | 18 +
.../package/templates/input.config-kafka.json.j2 | 92 +++
.../services/KAFKA/package/templates/kafka.conf.j2 | 35 ++
.../package/templates/kafka_client_jaas.conf.j2 | 32 +
.../KAFKA/package/templates/kafka_jaas.conf.j2 | 99 +++
.../package/templates/tools-log4j.properties.j2 | 21 +
.../3.3.0/services/KAFKA/role_command_order.json | 7 +
.../BIGTOP/3.3.0/services/KAFKA/service_advisor.py | 451 ++++++++++++++
.../3.3.0/services/KAFKA/themes/directories.json | 98 +++
.../BIGTOP/3.3.0/services/KAFKA/widgets.json | 181 ++++++
31 files changed, 4350 insertions(+), 8 deletions(-)
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/alerts.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/alerts.json
new file mode 100755
index 0000000000..19400d8110
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/alerts.json
@@ -0,0 +1,32 @@
+{
+ "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/listeners}}",
+ "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
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/kafka-broker.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/kafka-broker.xml
new file mode 100755
index 0000000000..73ea41b0f3
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/kafka-broker.xml
@@ -0,0 +1,665 @@
+<?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 xmlns:xi="http://www.w3.org/2001/XInclude" supports_final="true">
+ <property>
+ <name>log.dirs</name>
+ <display-name>Log directories</display-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>
+ <on-ambari-upgrade add="false"/>
+ </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>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>zookeeper.connect</name>
+ <value>localhost:2181</value>
+ <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 consumers must use the same connection string.
+ </description>
+ <on-ambari-upgrade add="false" />
+ </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>
+ <on-ambari-upgrade add="false" />
+ </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>
+ <on-ambari-upgrade add="false" />
+ </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>
+ <on-ambari-upgrade add="false" />
+ </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>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>socket.send.buffer.bytes</name>
+ <value>102400</value>
+ <description>
+ The SO_SNDBUFF buffer the server prefers for socket connections.
+ </description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>socket.receive.buffer.bytes</name>
+ <value>102400</value>
+ <description>
+ The SO_RCVBUFF buffer the server prefers for socket connections.
+ </description>
+ <on-ambari-upgrade add="false" />
+ </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>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>num.partitions</name>
+ <value>1</value>
+ <description>
+ The default number of partitions per topic.
+ </description>
+ <on-ambari-upgrade add="false" />
+ </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>
+ <on-ambari-upgrade add="false" />
+ </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>
+ <on-ambari-upgrade add="false" />
+ </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>
+ <on-ambari-upgrade add="false" />
+ </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>
+ <on-ambari-upgrade add="false" />
+ </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>
+ <deleted>true</deleted>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>log.retention.check.interval.ms</name>
+ <value>600000</value>
+ <description>
+ The frequency in milliseconds that the log cleaner checks whether any log segment is eligible for deletion to meet the retention policies.
+ </description>
+ <on-ambari-upgrade add="false" />
+ </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>
+ <on-ambari-upgrade add="false" />
+ </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 ge [...]
+ </description>
+ <on-ambari-upgrade add="false" />
+ </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>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>controller.socket.timeout.ms</name>
+ <value>30000</value>
+ <description>The socket timeout for commands from the partition management controller to the replicas.</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>controller.message.queue.size</name>
+ <value>10</value>
+ <description>The buffer size for controller-to-broker-channels</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>default.replication.factor</name>
+ <value>1</value>
+ <description>The default replication factor for automatically created topics.</description>
+ <on-ambari-upgrade add="false" />
+ </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>
+ <on-ambari-upgrade add="false" />
+ </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>
+ <on-ambari-upgrade add="false" />
+ </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>
+ <on-ambari-upgrade add="false" />
+ </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>
+ <on-ambari-upgrade add="false" />
+ </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>
+ <on-ambari-upgrade add="false" />
+ </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>
+ <on-ambari-upgrade add="false" />
+ </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>
+ <on-ambari-upgrade add="false" />
+ </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>
+ <on-ambari-upgrade add="false" />
+ </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>
+ <on-ambari-upgrade add="false" />
+ </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>
+ <on-ambari-upgrade add="false" />
+ </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>
+ <on-ambari-upgrade add="false" />
+ </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>
+ <on-ambari-upgrade add="false" />
+ </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>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>zookeeper.sync.time.ms</name>
+ <value>2000</value>
+ <description>How far a ZK follower can be behind a ZK leader.</description>
+ <on-ambari-upgrade add="false" />
+ </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>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>controlled.shutdown.retry.backoff.ms</name>
+ <value>5000</value>
+ <description>
+ Backoff time between shutdown retries.
+ </description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>kafka.metrics.reporters</name>
+ <value/>
+ <description>
+ kafka ganglia metrics reporter and kafka timeline metrics reporter
+ </description>
+ <value-attributes>
+ <empty-value-valid>true</empty-value-valid>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>kafka.ganglia.metrics.reporter.enabled</name>
+ <value>true</value>
+ <description>
+ kafka ganglia metrics reporter enable
+ </description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>kafka.ganglia.metrics.host</name>
+ <value>localhost</value>
+ <description> Ganglia host </description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>kafka.ganglia.metrics.port</name>
+ <value>8671</value>
+ <description> Ganglia port </description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>kafka.ganglia.metrics.group</name>
+ <value>kafka</value>
+ <description>Ganglia group name </description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>kafka.timeline.metrics.reporter.enabled</name>
+ <value>true</value>
+ <description>Kafka timeline metrics reporter enable</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>kafka.timeline.metrics.hosts</name>
+ <value>{{ams_collector_hosts}}</value>
+ <description>Timeline host</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>kafka.timeline.metrics.port</name>
+ <value>{{metric_collector_port}}</value>
+ <description>Timeline port</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>kafka.timeline.metrics.protocol</name>
+ <value>{{metric_collector_protocol}}</value>
+ <description>Timeline protocol(http or https)</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>kafka.timeline.metrics.truststore.path</name>
+ <value>{{metric_truststore_path}}</value>
+ <description>Location of the trust store file.</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>kafka.timeline.metrics.truststore.type</name>
+ <value>{{metric_truststore_type}}</value>
+ <description>Optional. Default value is "jks".</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>kafka.timeline.metrics.truststore.password</name>
+ <value>{{metric_truststore_password}}</value>
+ <description>Password to open the trust store file.</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>kafka.timeline.metrics.reporter.sendInterval</name>
+ <value>5900</value>
+ <description>Timeline metrics reporter send interval</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>kafka.timeline.metrics.maxRowCacheSize</name>
+ <value>10000</value>
+ <description>Timeline metrics reporter send interval</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>kafka.timeline.metrics.host_in_memory_aggregation</name>
+ <value>{{host_in_memory_aggregation}}</value>
+ <description>if set to "true" host metrics will be aggregated in memory on each host</description>
+ <on-ambari-upgrade add="true" />
+ </property>
+ <property>
+ <name>kafka.timeline.metrics.host_in_memory_aggregation_port</name>
+ <value>{{host_in_memory_aggregation_port}}</value>
+ <on-ambari-upgrade add="true" />
+ </property>
+ <property>
+ <name>kafka.timeline.metrics.host_in_memory_aggregation_protocol</name>
+ <value>{{host_in_memory_aggregation_protocol}}</value>
+ <on-ambari-upgrade add="true" />
+ </property>
+ <property>
+ <name>listeners</name>
+ <value>PLAINTEXT://localhost:9092</value>
+ <description>host and port where kafka broker will be accepting connections. localhost will be substituted with hostname. This property managed with Ambari and every user-defined listeners need to be placed to raw.listeners property.</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>raw.listeners</name>
+ <value />
+ <value-attributes>
+ <empty-value-valid>true</empty-value-valid>
+ </value-attributes>
+ <description>User-defined listeners that will be unchanged by Ambari. Value of this property will be merged with Ambari-managed listeners.</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>controlled.shutdown.enable</name>
+ <value>true</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>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>auto.leader.rebalance.enable</name>
+ <value>true</value>
+ <description>Enables auto leader balancing. A background thread checks and triggers leader balance if required at regular intervals</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>num.recovery.threads.per.data.dir</name>
+ <value>1</value>
+ <description>The number of threads per data directory to be used for log recovery at startup and flushing at shutdown</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>min.insync.replicas</name>
+ <value>1</value>
+ <description>define the minimum number of replicas in ISR needed to satisfy a produce request with required.acks=-1 (or all)</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>leader.imbalance.per.broker.percentage</name>
+ <value>10</value>
+ <description>The ratio of leader imbalance allowed per broker. The controller would trigger a leader balance if it goes above this value per broker. The value is specified in percentage.</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>leader.imbalance.check.interval.seconds</name>
+ <value>300</value>
+ <description>The frequency with which the partition rebalance check is triggered by the controller</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>offset.metadata.max.bytes</name>
+ <value>4096</value>
+ <description>The maximum size for a metadata entry associated with an offset commit</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>offsets.load.buffer.size</name>
+ <value>5242880</value>
+ <description>Batch size for reading from the offsets segments when loading offsets into the cache.</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>offsets.topic.replication.factor</name>
+ <value>3</value>
+ <description>The replication factor for the offsets topic (set higher to ensure availability).
+ To ensure that the effective replication factor of the offsets topic is the configured value,
+ the number of alive brokers has to be at least the replication factor at the time of the
+ first request for the offsets topic. If not, either the offsets topic creation will fail or it will get a replication factor of min(alive brokers, configured replication factor).</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>offsets.topic.num.partitions</name>
+ <value>50</value>
+ <description>The number of partitions for the offset commit topic (should not change after deployment)</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>offsets.topic.segment.bytes</name>
+ <value>104857600</value>
+ <description>The offsets topic segment bytes should be kept relatively small in order to facilitate faster log compaction and cache loads</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>offsets.topic.compression.codec</name>
+ <value>0</value>
+ <description>Compression codec for the offsets topic - compression may be used to achieve \"atomic\" commits. Default is NoCompression. For Gzip add value 1 , SnappyCompression add value 2, LZ4CompressionCodec 3.
+ </description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>offsets.retention.minutes</name>
+ <value>86400000</value>
+ <description>Log retention window in minutes for offsets topic</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>offsets.retention.check.interval.ms</name>
+ <value>600000</value>
+ <description>Frequency at which to check for stale offsets</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>offsets.commit.timeout.ms</name>
+ <value>5000</value>
+ <description>Offset commit will be delayed until all replicas for the offsets topic receive the commit or this timeout is reached. This is similar to the producer request timeout.</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>offsets.commit.required.acks</name>
+ <value>-1</value>
+ <description>The required acks before the commit can be accepted. In general, the default (-1) should not be overridden</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>delete.topic.enable</name>
+ <value>true</value>
+ <description>Enables delete topic. Delete topic through the admin tool will have no effect if this config is turned off</description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>compression.type</name>
+ <description>Specify the final compression type for a given topic. This configuration accepts the standard compression codecs ('gzip', 'snappy', lz4). It additionally accepts 'uncompressed' which is equivalent to no compression; and 'producer' which means retain the original compression codec set by the producer.</description>
+ <value>producer</value>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>external.kafka.metrics.exclude.prefix</name>
+ <value>kafka.network.RequestMetrics,kafka.server.DelayedOperationPurgatory,kafka.server.BrokerTopicMetrics.BytesRejectedPerSec</value>
+ <description>
+ Exclude metrics starting with these prefixes from being collected.
+ </description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>external.kafka.metrics.include.prefix</name>
+ <value>kafka.network.RequestMetrics.ResponseQueueTimeMs.request.OffsetCommit.98percentile,kafka.network.RequestMetrics.ResponseQueueTimeMs.request.Offsets.95percentile,kafka.network.RequestMetrics.ResponseSendTimeMs.request.Fetch.95percentile,kafka.network.RequestMetrics.RequestsPerSec.request</value>
+ <description>
+ These metrics would be included even if the exclude prefix omits them.
+ </description>
+ <on-ambari-upgrade add="false" />
+ </property>
+ <property>
+ <name>authorizer.class.name</name>
+ <description>
+ Kafka authorizer class
+ </description>
+ <depends-on>
+ <property>
+ <type>ranger-kafka-plugin-properties</type>
+ <name>ranger-kafka-plugin-enabled</name>
+ </property>
+ </depends-on>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>sasl.enabled.mechanisms</name>
+ <value>GSSAPI</value>
+ <description>The list of SASL mechanisms enabled in the Kafka server. The list may contain any mechanism for which a security provider is available. Only GSSAPI is enabled by default.</description>
+ <on-ambari-upgrade add="true" />
+ </property>
+ <property>
+ <name>security.inter.broker.protocol</name>
+ <value>PLAINTEXT</value>
+ <description>Security protocol used to communicate between brokers. Valid values are: PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL. It is an error to set this and inter.broker.listener.name properties at the same time.</description>
+ <on-ambari-upgrade add="true" />
+ </property>
+ <property>
+ <name>sasl.mechanism.inter.broker.protocol</name>
+ <value>GSSAPI</value>
+ <description>SASL mechanism used for inter-broker communication. Default is GSSAPI.</description>
+ <on-ambari-upgrade add="true" />
+ </property>
+ <property>
+ <name>ssl.client.auth</name>
+ <value>none</value>
+ <description>Configures kafka broker to request client authentication.</description>
+ <on-ambari-upgrade add="true" />
+ </property>
+ <property>
+ <name>ssl.key.password</name>
+ <value />
+ <description>The password of private key in the key store file.</description>
+ <value-attributes>
+ <empty-value-valid>true</empty-value-valid>
+ <type>password</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true" />
+ </property>
+ <property>
+ <name>ssl.keystore.location</name>
+ <value />
+ <description>The location of key store file.</description>
+ <value-attributes>
+ <empty-value-valid>true</empty-value-valid>
+ </value-attributes>
+ <on-ambari-upgrade add="true" />
+ </property>
+ <property>
+ <name>ssl.keystore.password</name>
+ <value />
+ <description>The store password for key store file.</description>
+ <value-attributes>
+ <empty-value-valid>true</empty-value-valid>
+ <type>password</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true" />
+ </property>
+ <property>
+ <name>ssl.truststore.location</name>
+ <value />
+ <description>The location of trust store file.</description>
+ <value-attributes>
+ <empty-value-valid>true</empty-value-valid>
+ </value-attributes>
+ <on-ambari-upgrade add="true" />
+ </property>
+ <property>
+ <name>ssl.truststore.password</name>
+ <value />
+ <description>The password for trust store file. If a password is not set access to the truststore is still available, but integrity checking is disabled</description>
+ <value-attributes>
+ <empty-value-valid>true</empty-value-valid>
+ <type>password</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true" />
+ </property>
+ <property>
+ <name>producer.metrics.enable</name>
+ <value>false</value>
+ <on-ambari-upgrade add="false" />
+ <depends-on>
+ <property>
+ <type>streams-messaging-manager-common</type>
+ <name>kafka.bootstrap.servers</name>
+ </property>
+ </depends-on>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/kafka-env.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/kafka-env.xml
new file mode 100755
index 0000000000..e997daf268
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/kafka-env.xml
@@ -0,0 +1,146 @@
+<?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/>
+ <value-attributes>
+ <type>user</type>
+ <overridable>false</overridable>
+ <user-groups>
+ <property>
+ <type>cluster-env</type>
+ <name>user_group</name>
+ </property>
+ </user-groups>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>kafka_keytab</name>
+ <description>Kafka keytab path</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>kafka_principal_name</name>
+ <description>Kafka principal name</description>
+ <property-type>KERBEROS_PRINCIPAL</property-type>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>kafka_user_keytab</name>
+ <description>Kafka user keytab path</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>kafka_user_principal</name>
+ <description>Kafka user principal name</description>
+ <property-type>KERBEROS_PRINCIPAL</property-type>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>kafka_log_dir</name>
+ <display-name>Kafka Log directory</display-name>
+ <value>/var/log/kafka</value>
+ <description/>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>kafka_pid_dir</name>
+ <value>/var/run/kafka</value>
+ <display-name>Kafka PID dir</display-name>
+ <description/>
+ <value-attributes>
+ <type>directory</type>
+ <editable-only-at-install>true</editable-only-at-install>
+ <overridable>false</overridable>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>kafka_user_nofile_limit</name>
+ <value>128000</value>
+ <description>Max open files limit setting for KAFKA user.</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>kerberos_merge_advertised_listeners</name>
+ <value>true</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description>Merge default Ambari-managed "advertised.listeners" value with user defined value.</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>kafka_user_nproc_limit</name>
+ <value>65536</value>
+ <description>Max number of processes limit setting for KAFKA user.</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <!-- kafka-env.sh -->
+ <property>
+ <name>content</name>
+ <display-name>kafka-env template</display-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}}
+{% if kerberos_security_enabled or kafka_other_sasl_enabled %}
+export KAFKA_KERBEROS_PARAMS="-Djavax.security.auth.useSubjectCredsOnly=false {{kafka_kerberos_params}}"
+{% else %}
+export KAFKA_KERBEROS_PARAMS={{kafka_kerberos_params}}
+{% endif %}
+# 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 stack_supports_kafka_env_include_ranger_script %}
+if [ -f /etc/kafka/conf/kafka-ranger-env.sh ]; then
+. /etc/kafka/conf/kafka-ranger-env.sh
+fi
+{% else %}
+ export CLASSPATH=$CLASSPATH:{{conf_dir}}
+{% endif %}
+ </value>
+ <value-attributes>
+ <type>content</type>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>is_supported_kafka_ranger</name>
+ <value>true</value>
+ <on-ambari-upgrade add="false"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/kafka-log4j.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/kafka-log4j.xml
new file mode 100755
index 0000000000..6188a4c8ef
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/kafka-log4j.xml
@@ -0,0 +1,170 @@
+<?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="false">
+ <property>
+ <name>kafka_log_maxfilesize</name>
+ <value>256</value>
+ <description>The maximum size of backup file before the log is rotated</description>
+ <display-name>Kafka Log: backup file size</display-name>
+ <value-attributes>
+ <unit>MB</unit>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>kafka_log_maxbackupindex</name>
+ <value>20</value>
+ <description>The number of backup files</description>
+ <display-name>Kafka Log: # of backup files</display-name>
+ <value-attributes>
+ <type>int</type>
+ <minimum>0</minimum>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>controller_log_maxfilesize</name>
+ <value>256</value>
+ <description>The maximum size of backup file before the log is rotated</description>
+ <display-name>Kafka Controller Log: backup file size</display-name>
+ <value-attributes>
+ <unit>MB</unit>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>controller_log_maxbackupindex</name>
+ <value>20</value>
+ <description>The number of backup files</description>
+ <display-name>Kafka Controller Log: # of backup files</display-name>
+ <value-attributes>
+ <type>int</type>
+ <minimum>0</minimum>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>content</name>
+ <display-name>kafka-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.
+#
+#
+#
+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{ISO8601}] %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{ISO8601}] %p %m (%c)%n
+log4j.appender.kafkaAppender.MaxFileSize = {{kafka_log_maxfilesize}}MB
+log4j.appender.kafkaAppender.MaxBackupIndex = {{kafka_log_maxbackupindex}}
+
+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{ISO8601}] %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{ISO8601}] %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{ISO8601}] %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{ISO8601}] %p %m (%c)%n
+log4j.appender.controllerAppender.MaxFileSize = {{controller_log_maxfilesize}}MB
+log4j.appender.controllerAppender.MaxBackupIndex = {{controller_log_maxbackupindex}}
+# 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>
+ <on-ambari-upgrade add="false"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/kafka_client_jaas_conf.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/kafka_client_jaas_conf.xml
new file mode 100755
index 0000000000..bb77f818ec
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/kafka_client_jaas_conf.xml
@@ -0,0 +1,43 @@
+<?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>
+ <display-name>kafka_client_jaas template</display-name>
+ <description>Kafka client jaas config</description>
+ <value>
+{% if kerberos_security_enabled %}
+KafkaClient {
+com.sun.security.auth.module.Krb5LoginModule required
+useTicketCache=true
+renewTicket=true
+serviceName="{{kafka_bare_jaas_principal}}";
+};
+{% endif %}
+ </value>
+ <value-attributes>
+ <type>content</type>
+ <show-property-name>false</show-property-name>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/kafka_jaas_conf.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/kafka_jaas_conf.xml
new file mode 100755
index 0000000000..5fa5625a98
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/kafka_jaas_conf.xml
@@ -0,0 +1,116 @@
+<?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>
+ <display-name>kafka_jaas template</display-name>
+ <description>Kafka jaas config</description>
+ <value>
+ /**
+ * Example of SASL/PLAIN Configuration
+ *
+ * KafkaServer {
+ * org.apache.kafka.common.security.plain.PlainLoginModule required
+ * username="admin"
+ * password="admin-secret"
+ * user_admin="admin-secret"
+ * user_alice="alice-secret";
+ * };
+ *
+ * Example of SASL/SCRAM
+ *
+ * KafkaServer {
+ * org.apache.kafka.common.security.scram.ScramLoginModule required
+ * username="admin"
+ * password="admin-secret"
+ * };
+ *
+ * Example of Enabling multiple SASL mechanisms in a broker:
+ *
+ * KafkaServer {
+ *
+ * com.sun.security.auth.module.Krb5LoginModule required
+ * useKeyTab=true
+ * storeKey=true
+ * keyTab="/etc/security/keytabs/kafka_server.keytab"
+ * principal="kafka/kafka1.hostname.com@EXAMPLE.COM";
+ *
+ * org.apache.kafka.common.security.plain.PlainLoginModule required
+ * username="admin"
+ * password="admin-secret"
+ * user_admin="admin-secret"
+ * user_alice="alice-secret";
+ *
+ * org.apache.kafka.common.security.scram.ScramLoginModule required
+ * username="scram-admin"
+ * password="scram-admin-secret";
+ * };
+ *
+ **/
+
+ {% if kerberos_security_enabled %}
+
+ KafkaServer {
+ com.sun.security.auth.module.Krb5LoginModule required
+ useKeyTab=true
+ keyTab="{{kafka_keytab_path}}"
+ storeKey=true
+ useTicketCache=false
+ serviceName="{{kafka_bare_jaas_principal}}"
+ principal="{{kafka_jaas_principal}}";
+ };
+ KafkaClient {
+ com.sun.security.auth.module.Krb5LoginModule required
+ useTicketCache=true
+ renewTicket=true
+ serviceName="{{kafka_bare_jaas_principal}}";
+ };
+ Client {
+ com.sun.security.auth.module.Krb5LoginModule required
+ useKeyTab=true
+ keyTab="{{kafka_keytab_path}}"
+ storeKey=true
+ useTicketCache=false
+ serviceName="zookeeper"
+ principal="{{kafka_jaas_principal}}";
+ };
+ com.sun.security.jgss.krb5.initiate {
+ com.sun.security.auth.module.Krb5LoginModule required
+ renewTGT=false
+ doNotPrompt=true
+ useKeyTab=true
+ keyTab="{{kafka_keytab_path}}"
+ storeKey=true
+ useTicketCache=false
+ serviceName="{{kafka_bare_jaas_principal}}"
+ principal="{{kafka_jaas_principal}}";
+ };
+
+ {% endif %}
+ </value>
+ <value-attributes>
+ <type>content</type>
+ <show-property-name>false</show-property-name>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/ranger-kafka-audit.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/ranger-kafka-audit.xml
new file mode 100755
index 0000000000..59e7295a17
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/ranger-kafka-audit.xml
@@ -0,0 +1,130 @@
+<?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.
+ */
+-->
+<configuration>
+ <property>
+ <name>xasecure.audit.is.enabled</name>
+ <value>true</value>
+ <description>Is Audit enabled?</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>xasecure.audit.destination.hdfs</name>
+ <value>true</value>
+ <display-name>Audit to HDFS</display-name>
+ <description>Is Audit to HDFS enabled?</description>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <depends-on>
+ <property>
+ <type>ranger-env</type>
+ <name>xasecure.audit.destination.hdfs</name>
+ </property>
+ </depends-on>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>xasecure.audit.destination.hdfs.dir</name>
+ <value>hdfs://NAMENODE_HOSTNAME:8020/ranger/audit</value>
+ <description>HDFS folder to write audit to, make sure the service user has requried permissions</description>
+ <depends-on>
+ <property>
+ <type>ranger-env</type>
+ <name>xasecure.audit.destination.hdfs.dir</name>
+ </property>
+ </depends-on>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>xasecure.audit.destination.hdfs.batch.filespool.dir</name>
+ <value>/var/log/kafka/audit/hdfs/spool</value>
+ <description>/var/log/kafka/audit/hdfs/spool</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>xasecure.audit.destination.solr</name>
+ <value>false</value>
+ <display-name>Audit to SOLR</display-name>
+ <description>Is Solr audit enabled?</description>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <depends-on>
+ <property>
+ <type>ranger-env</type>
+ <name>xasecure.audit.destination.solr</name>
+ </property>
+ </depends-on>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>xasecure.audit.destination.solr.urls</name>
+ <value/>
+ <description>Solr URL</description>
+ <value-attributes>
+ <empty-value-valid>true</empty-value-valid>
+ </value-attributes>
+ <depends-on>
+ <property>
+ <type>ranger-admin-site</type>
+ <name>ranger.audit.solr.urls</name>
+ </property>
+ </depends-on>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>xasecure.audit.destination.solr.zookeepers</name>
+ <value>NONE</value>
+ <description>Solr Zookeeper string</description>
+ <depends-on>
+ <property>
+ <type>ranger-admin-site</type>
+ <name>ranger.audit.solr.zookeepers</name>
+ </property>
+ </depends-on>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>xasecure.audit.destination.solr.batch.filespool.dir</name>
+ <value>/var/log/kafka/audit/solr/spool</value>
+ <description>/var/log/kafka/audit/solr/spool</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>xasecure.audit.provider.summary.enabled</name>
+ <value>true</value>
+ <display-name>Audit provider summary enabled</display-name>
+ <description>Enable Summary audit?</description>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>ranger.plugin.kafka.ambari.cluster.name</name>
+ <value>{{cluster_name}}</value>
+ <description>Capture cluster name from where Ranger kafka plugin is enabled.</description>
+ <value-attributes>
+ <empty-value-valid>true</empty-value-valid>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/ranger-kafka-plugin-properties.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/ranger-kafka-plugin-properties.xml
new file mode 100755
index 0000000000..42be7d03f3
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/ranger-kafka-plugin-properties.xml
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/**
+ * 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="true">
+ <property>
+ <name>policy_user</name>
+ <value>ambari-qa</value>
+ <display-name>Policy user for KAFKA</display-name>
+ <description>This user must be system user and also present at Ranger admin portal</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>hadoop.rpc.protection</name>
+ <value/>
+ <description>Used for repository creation on ranger admin</description>
+ <value-attributes>
+ <empty-value-valid>true</empty-value-valid>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>common.name.for.certificate</name>
+ <value/>
+ <description>Common name for certificate, this value should match what is specified in repo within ranger admin</description>
+ <value-attributes>
+ <empty-value-valid>true</empty-value-valid>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>zookeeper.connect</name>
+ <value>localhost:2181</value>
+ <description>Used for repository creation on ranger admin</description>
+ <depends-on>
+ <property>
+ <type>zoo.cfg</type>
+ <name>clientPort</name>
+ </property>
+ </depends-on>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>ranger-kafka-plugin-enabled</name>
+ <value>No</value>
+ <display-name>Enable Ranger for KAFKA</display-name>
+ <description>Enable ranger kafka plugin</description>
+ <depends-on>
+ <property>
+ <type>ranger-env</type>
+ <name>ranger-kafka-plugin-enabled</name>
+ </property>
+ </depends-on>
+ <value-attributes>
+ <type>boolean</type>
+ <overridable>false</overridable>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>REPOSITORY_CONFIG_PASSWORD</name>
+ <value>kafka</value>
+ <property-type>PASSWORD</property-type>
+ <display-name>Ranger repository config password</display-name>
+ <description>Used for repository creation on ranger admin</description>
+ <value-attributes>
+ <type>password</type>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+
+
+ <property>
+ <name>external_admin_username</name>
+ <value></value>
+ <display-name>External Ranger admin username</display-name>
+ <description>Add ranger default admin username if want to communicate to external ranger</description>
+ <value-attributes>
+ <empty-value-valid>true</empty-value-valid>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>external_admin_password</name>
+ <value></value>
+ <display-name>External Ranger admin password</display-name>
+ <property-type>PASSWORD</property-type>
+ <description>Add ranger default admin password if want to communicate to external ranger</description>
+ <value-attributes>
+ <type>password</type>
+ <empty-value-valid>true</empty-value-valid>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>external_ranger_admin_username</name>
+ <value></value>
+ <display-name>External Ranger Ambari admin username</display-name>
+ <description>Add ranger default ambari admin username if want to communicate to external ranger</description>
+ <value-attributes>
+ <empty-value-valid>true</empty-value-valid>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+ <property>
+ <name>external_ranger_admin_password</name>
+ <value></value>
+ <display-name>External Ranger Ambari admin password</display-name>
+ <property-type>PASSWORD</property-type>
+ <description>Add ranger default ambari admin password if want to communicate to external ranger</description>
+ <value-attributes>
+ <type>password</type>
+ <empty-value-valid>true</empty-value-valid>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>REPOSITORY_CONFIG_USERNAME</name>
+ <value>kafka</value>
+ <display-name>Ranger repository config user</display-name>
+ <description>Used for repository creation on ranger admin</description>
+ <depends-on>
+ <property>
+ <type>ranger-kafka-plugin-properties</type>
+ <name>ranger-kafka-plugin-enabled</name>
+ </property>
+ <property>
+ <type>kafka-env</type>
+ <name>kafka_user</name>
+ </property>
+ </depends-on>
+ <on-ambari-upgrade add="false"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/ranger-kafka-policymgr-ssl.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/ranger-kafka-policymgr-ssl.xml
new file mode 100755
index 0000000000..56d5211ef3
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/ranger-kafka-policymgr-ssl.xml
@@ -0,0 +1,72 @@
+<?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.
+ */
+-->
+<configuration>
+ <property>
+ <name>xasecure.policymgr.clientssl.keystore</name>
+ <value/>
+ <description>Java Keystore files</description>
+ <value-attributes>
+ <empty-value-valid>true</empty-value-valid>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>xasecure.policymgr.clientssl.keystore.password</name>
+ <value>myKeyFilePassword</value>
+ <property-type>PASSWORD</property-type>
+ <description>password for keystore</description>
+ <value-attributes>
+ <type>password</type>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>xasecure.policymgr.clientssl.truststore</name>
+ <value/>
+ <description>java truststore file</description>
+ <value-attributes>
+ <empty-value-valid>true</empty-value-valid>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>xasecure.policymgr.clientssl.truststore.password</name>
+ <value>changeit</value>
+ <property-type>PASSWORD</property-type>
+ <description>java truststore password</description>
+ <value-attributes>
+ <type>password</type>
+ </value-attributes>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>xasecure.policymgr.clientssl.keystore.credential.file</name>
+ <value>jceks://file/{{credential_file}}</value>
+ <description>java keystore credential file</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>xasecure.policymgr.clientssl.truststore.credential.file</name>
+ <value>jceks://file/{{credential_file}}</value>
+ <description>java truststore credential file</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/ranger-kafka-security.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/ranger-kafka-security.xml
new file mode 100755
index 0000000000..47ea2a80c3
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/configuration/ranger-kafka-security.xml
@@ -0,0 +1,64 @@
+<?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.
+ */
+-->
+<configuration>
+ <property>
+ <name>ranger.plugin.kafka.service.name</name>
+ <value>{{repo_name}}</value>
+ <description>Name of the Ranger service containing policies for this Kafka instance</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>ranger.plugin.kafka.policy.source.impl</name>
+ <value>org.apache.ranger.admin.client.RangerAdminRESTClient</value>
+ <description>Class to retrieve policies from the source</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>ranger.plugin.kafka.policy.rest.url</name>
+ <value>{{policymgr_mgr_url}}</value>
+ <description>URL to Ranger Admin</description>
+ <on-ambari-upgrade add="false"/>
+ <depends-on>
+ <property>
+ <type>admin-properties</type>
+ <name>policymgr_external_url</name>
+ </property>
+ </depends-on>
+ </property>
+ <property>
+ <name>ranger.plugin.kafka.policy.rest.ssl.config.file</name>
+ <value>/etc/kafka/conf/ranger-policymgr-ssl.xml</value>
+ <description>Path to the file containing SSL details to contact Ranger Admin</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>ranger.plugin.kafka.policy.pollIntervalMs</name>
+ <value>30000</value>
+ <description>How often to poll for changes in policies?</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>ranger.plugin.kafka.policy.cache.dir</name>
+ <value>/etc/ranger/{{repo_name}}/policycache</value>
+ <description>Directory where Ranger policies are cached after successful retrieval from the source</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/kerberos.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/kerberos.json
new file mode 100755
index 0000000000..000dbfc395
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/kerberos.json
@@ -0,0 +1,102 @@
+{
+ "services": [
+ {
+ "name": "KAFKA",
+ "identities": [
+ {
+ "name": "kafka_smokeuser",
+ "reference": "/smokeuser"
+ },
+ {
+ "name": "kafka_user",
+ "principal": {
+ "value": "${kafka-env/kafka_user}${principal_suffix}@${realm}",
+ "type" : "user",
+ "local_username" : "${kafka-env/kafka_user}",
+ "configuration": "kafka-env/kafka_user_principal"
+ },
+ "keytab": {
+ "file": "${keytab_dir}/kafka.headless.keytab",
+ "owner": {
+ "name": "${kafka-env/kafka_user}",
+ "access": "r"
+ },
+ "group": {
+ "name": "${cluster-env/user_group}",
+ "access": "r"
+ },
+ "configuration": "kafka-env/kafka_user_keytab"
+ }
+ }
+ ],
+ "configurations": [
+ {
+ "kafka-broker": {
+ "authorizer.class.name": "kafka.security.auth.SimpleAclAuthorizer",
+ "principal.to.local.class":"kafka.security.auth.KerberosPrincipalToLocal",
+ "super.users": "user:${kafka-env/kafka_user}",
+ "security.inter.broker.protocol": "SASL_PLAINTEXT",
+ "zookeeper.set.acl": "true"
+ }
+ },
+ {
+ "ranger-kafka-audit": {
+ "xasecure.audit.jaas.Client.loginModuleName": "com.sun.security.auth.module.Krb5LoginModule",
+ "xasecure.audit.jaas.Client.loginModuleControlFlag": "required",
+ "xasecure.audit.jaas.Client.option.useKeyTab": "true",
+ "xasecure.audit.jaas.Client.option.storeKey": "false",
+ "xasecure.audit.jaas.Client.option.serviceName": "solr",
+ "xasecure.audit.destination.solr.force.use.inmemory.jaas.config": "true"
+ }
+ }
+ ],
+ "auth_to_local_properties" : [
+ "kafka-broker/sasl.kerberos.principal.to.local.rules|comma"
+ ],
+ "components": [
+ {
+ "name": "KAFKA_BROKER",
+ "identities": [
+ {
+ "name": "kafka_broker",
+ "principal": {
+ "value": "${kafka-env/kafka_user}/_HOST@${realm}",
+ "type": "service",
+ "configuration": "kafka-env/kafka_principal_name"
+ },
+ "keytab": {
+ "file": "${keytab_dir}/kafka.service.keytab",
+ "owner": {
+ "name": "${kafka-env/kafka_user}",
+ "access": "r"
+ },
+ "group": {
+ "name": "${cluster-env/user_group}",
+ "access": "r"
+ },
+ "configuration": "kafka-env/kafka_keytab"
+ }
+ },
+ {
+ "name": "kafka_kafka_broker_kafka_broker",
+ "reference": "/KAFKA/KAFKA_BROKER/kafka_broker",
+ "principal": {
+ "configuration": "ranger-kafka-audit/xasecure.audit.jaas.Client.option.principal"
+ },
+ "keytab": {
+ "configuration": "ranger-kafka-audit/xasecure.audit.jaas.Client.option.keyTab"
+ }
+ },
+ {
+ "name": "kafka_kafka_broker_hdfs",
+ "reference": "/HDFS/NAMENODE/hdfs",
+ "when" : {
+ "contains" : ["services", "HDFS"]
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/metainfo.xml
old mode 100644
new mode 100755
index 4e04f4aa99..f2752ee30d
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/metainfo.xml
@@ -16,11 +16,106 @@
limitations under the License.
-->
<metainfo>
- <schemaVersion>2.0</schemaVersion>
- <services>
- <service>
- <name>KAFKA</name>
- <version>2.8.2-1</version>
- </service>
- </services>
-</metainfo>
\ No newline at end of file
+ <schemaVersion>2.0</schemaVersion>
+ <services>
+ <service>
+ <name>KAFKA</name>
+ <displayName>Kafka</displayName>
+ <comment>A high-throughput distributed messaging system</comment>
+ <version>3.6.2</version>
+ <components>
+ <component>
+ <name>KAFKA_BROKER</name>
+ <displayName>Kafka Broker</displayName>
+ <category>MASTER</category>
+ <cardinality>1+</cardinality>
+ <versionAdvertised>true</versionAdvertised>
+ <rollingRestartSupported>true</rollingRestartSupported>
+ <timelineAppid>kafka_broker</timelineAppid>
+ <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>kafka_jaas_conf</config-type>
+ <config-type>kafka_client_jaas_conf</config-type>
+ </configuration-dependencies>
+ <osSpecifics>
+ <osSpecific>
+ <osFamily>redhat9,redhat8,redhat7,amazonlinux2,redhat6,suse11,suse12</osFamily>
+ <packages>
+ <package>
+ <name>kafka_${stack_version}</name>
+ </package>
+ </packages>
+ </osSpecific>
+ <osSpecific>
+ <osFamily>debian7,debian9,ubuntu12,ubuntu14,ubuntu16,ubuntu18</osFamily>
+ <packages>
+ <package>
+ <name>kafka-${stack_version}</name>
+ </package>
+ </packages>
+ </osSpecific>
+ </osSpecifics>
+ <restartRequiredAfterChange>true</restartRequiredAfterChange>
+ <restartRequiredAfterRackChange>true</restartRequiredAfterRackChange>
+
+ <themes>
+ <theme>
+ <fileName>directories.json</fileName>
+ <default>true</default>
+ </theme>
+ </themes>
+
+ </service>
+ </services>
+</metainfo>
+
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/metrics.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/metrics.json
new file mode 100644
index 0000000000..1ad625dcd0
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/metrics.json
@@ -0,0 +1,238 @@
+{
+ "KAFKA_BROKER": {
+ "Component": [
+ {
+ "type": "ganglia",
+ "metrics": {
+ "default": {
+ "metrics/jvm/uptime": {
+ "metric": "jvm.runtime.uptime",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/jvm/heap_usage": {
+ "metric": "jvm.memory.heap_usage",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/jvm/non_heap_usage": {
+ "metric": "jvm.memory.non_heap_usage",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/jvm/thread-states/runnable": {
+ "metric": "jvm.threads.thread-states.runnable",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/jvm/thread-states/blocked": {
+ "metric": "jvm.threads.thread-states.blocked",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/jvm/thread-states/timed_waiting": {
+ "metric": "jvm.threads.thread-states.timed_waiting",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/jvm/thread-states/terminated": {
+ "metric": "jvm.threads.thread-states.terminated",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/jvm/thread_count": {
+ "metric": "jvm.threads.thread_count",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/jvm/daemon_thread_count": {
+ "metric": "jvm.threads.daemon_thread_count",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/kafka/server/BrokerTopicMetrics/AllTopicsMessagesInPerSec/1MinuteRate": {
+ "metric": "kafka.server.BrokerTopicMetrics.MessagesInPerSec.1MinuteRate",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/kafka/server/BrokerTopicMetrics/AllTopicsMessagesInPerSec/5MinuteRate": {
+ "metric": "kafka.server.BrokerTopicMetrics.MessagesInPerSec.5MinuteRate",
+ "pointInTime": false,
+ "temporal": true
+ },
+ "metrics/kafka/server/BrokerTopicMetrics/AllTopicsMessagesInPerSec/15MinuteRate": {
+ "metric": "kafka.server.BrokerTopicMetrics.MessagesInPerSec.15MinuteRate",
+ "pointInTime": false,
+ "temporal": true
+ },
+ "metrics/kafka/server/BrokerTopicMetrics/AllTopicsMessagesInPerSec/meanRate": {
+ "metric": "kafka.server.BrokerTopicMetrics.MessagesInPerSec.meanRate",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/kafka/server/BrokerTopicMetrics/AllTopicsMessagesInPerSec/count": {
+ "metric": "kafka.server.BrokerTopicMetrics.MessagesInPerSec.count",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesInPerSec/1MinuteRate": {
+ "metric": "kafka.server.BrokerTopicMetrics.BytesInPerSec.1MinuteRate",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesInPerSec/5MinuteRate": {
+ "metric": "kafka.server.BrokerTopicMetrics.BytesInPerSec.5MinuteRate",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesInPerSec/15MinuteRate": {
+ "metric": "kafka.server.BrokerTopicMetrics.BytesInPerSec.15MinuteRate",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesInPerSec/meanRate": {
+ "metric": "kafka.server.BrokerTopicMetrics.BytesInPerSec.meanRate",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesInPerSec/count": {
+ "metric": "kafka.server.BrokerTopicMetrics.BytesInPerSec.count",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesOutPerSec/1MinuteRate": {
+ "metric": "kafka.server.BrokerTopicMetrics.BytesOutPerSec.1MinuteRate",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesOutPerSec/5MinuteRate": {
+ "metric": "kafka.server.BrokerTopicMetrics.BytesOutPerSec.5MinuteRate",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesOutPerSec/15MinuteRate": {
+ "metric": "kafka.server.BrokerTopicMetrics.BytesOutPerSec.15MinuteRate",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesOutPerSec/meanRate": {
+ "metric": "kafka.server.BrokerTopicMetrics.BytesOutPerSec.meanRate",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesOutPerSec/count": {
+ "metric": "kafka.server.BrokerTopicMetrics.BytesOutPerSec.count",
+ "pointInTime": true,
+ "temporal": true
+ },
+ "metrics/kafka/controller/KafkaController/ActiveControllerCount": {
+ "metric": "kafka.controller.KafkaController.ActiveControllerCount",
+ "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.MaxLag.clientId.Replica",
+ "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
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/scripts/kafka.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/scripts/kafka.py
new file mode 100755
index 0000000000..a54440ae62
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/scripts/kafka.py
@@ -0,0 +1,296 @@
+#!/usr/bin/env python3
+"""
+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.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.default import default
+from resource_management.libraries.functions import format
+from resource_management.libraries.functions.generate_logfeeder_input_config import generate_logfeeder_input_config
+from resource_management.libraries.functions.stack_features import check_stack_feature
+from resource_management.libraries.functions import StackFeature
+import re
+
+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}"))
+
+ File(os.path.join(params.conf_dir, 'client_kerberos.properties'),
+ owner=params.kafka_user,
+ group=params.user_group,
+ mode=0o755,
+ content=Template("client_kerberos.properties.j2")
+ )
+
+ # 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)
+ kafka_server_config['listeners'] = listeners
+
+ if params.kerberos_security_enabled and params.kafka_kerberos_enabled:
+ Logger.info("Kafka kerberos security is enabled.")
+
+ inter_broker_protocol = kafka_server_config['security.inter.broker.protocol']
+ inter_broker_protocol = replace_sasl_related_config(inter_broker_protocol, True)
+ kafka_server_config['security.inter.broker.protocol'] = inter_broker_protocol
+
+ listeners = kafka_server_config['listeners']
+ listeners = replace_sasl_related_config(listeners)
+ kafka_server_config['listeners'] = listeners
+
+ if 'advertised.listeners' not in kafka_server_config:
+ kafka_server_config['advertised.listeners'] = listeners
+ else:
+ if params.kafka_kerberos_merge_advertised_listeners:
+ Logger.warning("User defined advertised.listeners will be merged with Ambari-managed advertised.listeners value. To leave value as is change kafka-env/kerberos_merge_advertised_listeners to false.")
+ kafka_server_config['advertised.listeners'] = ",".join((listeners, kafka_server_config['advertised.listeners']))
+ elif 'advertised.listeners' in kafka_server_config:
+ advertised_listeners = kafka_server_config['advertised.listeners'].replace("localhost", params.hostname)
+ kafka_server_config['advertised.listeners'] = advertised_listeners
+
+ raw_listeners = kafka_server_config['raw.listeners'] if 'raw.listeners' in kafka_server_config else ""
+ if 'raw.listeners' in kafka_server_config:
+ del kafka_server_config['raw.listeners']
+ if raw_listeners.strip():
+ kafka_server_config['listeners'] = ",".join((kafka_server_config['listeners'], raw_listeners))
+ effective_kafka_listeners = kafka_server_config['listeners']
+ Logger.info("Kafka listeners: "+effective_kafka_listeners)
+ if 'advertised.listeners' in kafka_server_config:
+ effective_advertised_listeners = kafka_server_config['advertised.listeners']
+ Logger.info("Kafka advertised listeners: "+effective_advertised_listeners)
+ else:
+ kafka_server_config['host.name'] = params.hostname
+
+ if params.has_metric_collector:
+ kafka_server_config['kafka.timeline.metrics.hosts'] = params.ams_collector_hosts
+ 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 = [_f for _f in kafka_data_dir.split(",") if _f]
+
+ rack="/default-rack"
+ i=0
+ if len(params.all_racks) > 0:
+ for host in params.all_hosts:
+ if host == params.hostname:
+ rack=params.all_racks[i]
+ break
+ i=i+1
+
+ Directory(kafka_data_dirs,
+ mode=0o755,
+ cd_access='a',
+ owner=params.kafka_user,
+ group=params.user_group,
+ create_parents = True,
+ recursive_ownership = True,
+ )
+
+ PropertiesFile("server.properties",
+ mode=0o640,
+ 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=0o644,
+ group=params.user_group,
+ owner=params.kafka_user,
+ content=InlineTemplate(params.log4j_props)
+ )
+
+ if (params.kerberos_security_enabled and params.kafka_kerberos_enabled) or params.kafka_other_sasl_enabled:
+ if params.kafka_jaas_conf_template:
+ File(format("{conf_dir}/kafka_jaas.conf"),
+ owner=params.kafka_user,
+ content=InlineTemplate(params.kafka_jaas_conf_template)
+ )
+ else:
+ TemplateConfig(format("{conf_dir}/kafka_jaas.conf"),
+ owner=params.kafka_user)
+
+ if params.kafka_client_jaas_conf_template:
+ File(format("{conf_dir}/kafka_client_jaas.conf"),
+ owner=params.kafka_user,
+ content=InlineTemplate(params.kafka_client_jaas_conf_template)
+ )
+ else:
+ 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=0o644,
+ content=Template("kafka.conf.j2")
+ )
+
+ File(os.path.join(params.conf_dir, 'tools-log4j.properties'),
+ owner='root',
+ group='root',
+ mode=0o644,
+ content=Template("tools-log4j.properties.j2")
+ )
+
+ generate_logfeeder_input_config('kafka', Template("input.config-kafka.json.j2", extra_imports=[default]))
+
+ setup_symlink(params.kafka_managed_pid_dir, params.kafka_pid_dir)
+ setup_symlink(params.kafka_managed_log_dir, params.kafka_log_dir)
+
+
+def replace_sasl_related_config(property, only_protocol=False):
+ property = re.sub(r"(^|\b)PLAINTEXTSASL", "SASL_PLAINTEXT", property) if only_protocol else re.sub(r"(^|\b)PLAINTEXTSASL://", "SASL_PLAINTEXT://", property)
+ property = re.sub(r"(^|\b)PLAINTEXT", "SASL_PLAINTEXT", property) if only_protocol else re.sub(r"(^|\b)PLAINTEXT://", "SASL_PLAINTEXT://", property)
+ property = re.sub(r"(^|\b)SSL", "SASL_SSL", property) if only_protocol else re.sub(r"(^|\b)SSL://", "SASL_SSL://", property)
+ return property
+
+
+def mutable_config_dict(kafka_broker_config):
+ kafka_server_config = {}
+ for key, value in kafka_broker_config.items():
+ 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=0o755,
+ 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):
+ if os.path.isdir(os.path.join(backup_folder_path, file)):
+ Execute(('cp', '-r', os.path.join(backup_folder_path, file), kafka_managed_dir),
+ sudo=True)
+ Execute(("chown", "-R", format("{kafka_user}:{user_group}"), os.path.join(kafka_managed_dir, file)),
+ sudo=True)
+ else:
+ 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=0o755,
+ 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):
+ if os.path.isdir(os.path.join(dir_path, file)):
+ Execute(('cp', '-r', os.path.join(dir_path, file), backup_destination_path),
+ sudo=True)
+ Execute(("chown", "-R", format("{kafka_user}:{user_group}"), os.path.join(backup_destination_path, file)),
+ sudo=True)
+ else:
+ 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=0o755,
+ cd_access='a',
+ owner=params.kafka_user,
+ group=params.user_group,
+ create_parents = True,
+ recursive_ownership = True,
+ )
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/scripts/kafka_broker.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/scripts/kafka_broker.py
new file mode 100755
index 0000000000..74cd303db4
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/scripts/kafka_broker.py
@@ -0,0 +1,143 @@
+"""
+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 import sudo
+from resource_management.core.logger import Logger
+from resource_management.core.resources.system import Execute, File
+from resource_management.core.exceptions import ComponentIsNotRunning, Fail
+from resource_management.libraries.functions import stack_select
+from resource_management.libraries.functions import Direction
+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 import upgrade_summary
+from resource_management.libraries.functions.stack_features import check_stack_feature
+from resource_management.libraries.functions.show_logs import show_logs
+from kafka import ensure_base_directories
+from setup_ranger_kafka import setup_ranger_kafka
+import upgrade
+from kafka import kafka
+
+class KafkaBroker(Script):
+
+ 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_packages(params.version)
+
+ # This is extremely important since it should only be called if crossing the HDP 2.3.4.0 boundary.
+ if params.version and params.upgrade_direction:
+ src_version = dst_version = None
+ if params.upgrade_direction == Direction.UPGRADE:
+ src_version = upgrade_summary.get_source_version("KAFKA", default_version = params.version)
+ dst_version = upgrade_summary.get_target_version("KAFKA", default_version = params.version)
+ else:
+ # These represent the original values during the UPGRADE direction
+ src_version = upgrade_summary.get_target_version("KAFKA", default_version = params.version)
+ dst_version = upgrade_summary.get_source_version("KAFKA", default_version = params.version)
+
+ if not check_stack_feature(StackFeature.KAFKA_ACL_MIGRATION_SUPPORT, src_version) and check_stack_feature(StackFeature.KAFKA_ACL_MIGRATION_SUPPORT, dst_version):
+ # 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.kerberos_security_enabled:
+ if params.version and check_stack_feature(StackFeature.KAFKA_KERBEROS, params.version):
+ kafka_kinit_cmd = format("{kinit_path_local} -kt {kafka_keytab_path} {kafka_jaas_principal};")
+ Execute(kafka_kinit_cmd, user=params.kafka_user)
+
+ 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_start_cmd} >>/dev/null 2>>{params.kafka_err_file} & echo $! > {params.kafka_pid_file}')
+ 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_stop_cmd}')
+ try:
+ Execute(daemon_cmd, user=params.kafka_user)
+ except:
+ show_logs(params.kafka_log_dir, params.kafka_user)
+ File(params.kafka_pid_file, action = "delete")
+
+
+
+ def disable_security(self, env):
+ import params
+ if not params.zookeeper_connect:
+ Logger.info("No zookeeper connection string. Skipping reverting ACL")
+ return
+ if not params.secure_acls:
+ Logger.info("The zookeeper.set.acl is false. Skipping reverting ACL")
+ return
+ Execute(
+ "{0} --zookeeper.connect {1} --zookeeper.acl=unsecure".format(params.kafka_security_migrator, params.zookeeper_connect), \
+ user=params.kafka_user, \
+ environment={ 'JAVA_HOME': params.java64_home }, \
+ logoutput=True, \
+ tries=3)
+
+ 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
+
+ def get_pid_files(self):
+ import status_params
+ return [status_params.kafka_pid_file]
+
+if __name__ == "__main__":
+ KafkaBroker().execute()
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/scripts/params.py
new file mode 100755
index 0000000000..087ce5676e
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/scripts/params.py
@@ -0,0 +1,469 @@
+#!/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.stack_features import get_stack_feature_version
+from resource_management.libraries.functions.version import format_stack_version, get_major_version
+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.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 upgrade_summary
+from resource_management.libraries.functions import get_kinit_path
+from resource_management.libraries.functions.get_not_managed_resources import get_not_managed_resources
+from resource_management.libraries.functions.setup_ranger_plugin_xml import get_audit_configs, generate_ranger_service_config
+
+# server configurations
+config = Script.get_config()
+tmp_dir = Script.get_tmp_dir()
+stack_root = Script.get_stack_root()
+stack_name = default("/clusterLevelParams/stack_name", None)
+retryAble = default("/commandParams/command_retry_enabled", False)
+service_name = 'kafka'
+
+# Version being upgraded/downgraded to
+version = default("/commandParams/version", None)
+
+stack_version_unformatted = config['clusterLevelParams']['stack_version']
+stack_version_formatted = format_stack_version(stack_version_unformatted)
+major_stack_version = get_major_version(stack_version_formatted)
+upgrade_direction = default("/commandParams/upgrade_direction", None)
+
+# get the correct version to use for checking stack features
+version_for_stack_feature_checks = get_stack_feature_version(config)
+
+stack_supports_ranger_kerberos = check_stack_feature(StackFeature.RANGER_KERBEROS_SUPPORT, version_for_stack_feature_checks)
+stack_supports_ranger_audit_db = check_stack_feature(StackFeature.RANGER_AUDIT_DB_SUPPORT, version_for_stack_feature_checks)
+stack_supports_core_site_for_ranger_plugin = check_stack_feature(StackFeature.CORE_SITE_FOR_RANGER_PLUGINS_SUPPORT, version_for_stack_feature_checks)
+stack_supports_kafka_env_include_ranger_script = check_stack_feature(StackFeature.KAFKA_ENV_INCLUDE_RANGER_SCRIPT, version_for_stack_feature_checks)
+
+# When downgrading the 'version' is pointing to the downgrade-target version
+# downgrade_from_version provides the source-version the downgrade is happening from
+downgrade_from_version = upgrade_summary.get_downgrade_from_version("KAFKA")
+
+hostname = config['agentLevelParams']['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 = default('/configurations/kafka-env/kafka_user_nofile_limit', 128000)
+kafka_user_nproc_limit = default('/configurations/kafka-env/kafka_user_nproc_limit', 65536)
+
+kafka_delete_topic_enable = default('/configurations/kafka-broker/delete.topic.enable', True)
+
+# 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_start_cmd = format('{kafka_home}/bin/kafka-server-start.sh {conf_dir}/server.properties')
+kafka_stop_cmd = format('{kafka_home}/bin/kafka-server-stop.sh {conf_dir}/server.properties')
+
+
+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"
+kafka_err_file = kafka_log_dir + "/kafka.err"
+# 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['ambariLevelParams']['java_home']
+kafka_env_sh_template = config['configurations']['kafka-env']['content']
+kafka_jaas_conf_template = default("/configurations/kafka_jaas_conf/content", None)
+kafka_client_jaas_conf_template = default("/configurations/kafka_client_jaas_conf/content", None)
+kafka_hosts = config['clusterHostInfo']['kafka_broker_hosts']
+kafka_hosts.sort()
+
+zookeeper_hosts = config['clusterHostInfo']['zookeeper_server_hosts']
+zookeeper_hosts.sort()
+secure_acls = default("/configurations/kafka-broker/zookeeper.set.acl", False)
+kafka_security_migrator = os.path.join(kafka_home, "bin", "zookeeper-security-migration.sh")
+
+all_hosts = default("/clusterHostInfo/all_hosts", [])
+all_racks = default("/clusterHostInfo/all_racks", [])
+
+#Kafka log4j
+kafka_log_maxfilesize = default('/configurations/kafka-log4j/kafka_log_maxfilesize',256)
+kafka_log_maxbackupindex = default('/configurations/kafka-log4j/kafka_log_maxbackupindex',20)
+controller_log_maxfilesize = default('/configurations/kafka-log4j/controller_log_maxfilesize',256)
+controller_log_maxbackupindex = default('/configurations/kafka-log4j/controller_log_maxbackupindex',20)
+
+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_hosts' in config['clusterHostInfo'] and \
+ len(config['clusterHostInfo']['ganglia_server_hosts'])>0:
+ ganglia_installed = True
+ ganglia_server = config['clusterHostInfo']['ganglia_server_hosts'][0]
+ ganglia_report_interval = 60
+else:
+ ganglia_installed = False
+
+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", "")
+
+set_instanceId = "false"
+cluster_name = config["clusterName"]
+
+if 'cluster-env' in config['configurations'] and \
+ 'metrics_collector_external_hosts' in config['configurations']['cluster-env']:
+ ams_collector_hosts = config['configurations']['cluster-env']['metrics_collector_external_hosts']
+ set_instanceId = "true"
+else:
+ ams_collector_hosts = ",".join(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_external_port' in config['configurations']['cluster-env']:
+ metric_collector_port = config['configurations']['cluster-env']['metrics_collector_external_port']
+ else:
+ metric_collector_web_address = default("/configurations/ams-site/timeline.metrics.service.webapp.address", "0.0.0.0: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'
+
+ host_in_memory_aggregation = str(default("/configurations/ams-site/timeline.metrics.host.inmemory.aggregation", True)).lower()
+ host_in_memory_aggregation_port = default("/configurations/ams-site/timeline.metrics.host.inmemory.aggregation.port", 61888)
+ is_aggregation_https_enabled = False
+ if default("/configurations/ams-site/timeline.metrics.host.inmemory.aggregation.http.policy", "HTTP_ONLY") == "HTTPS_ONLY":
+ host_in_memory_aggregation_protocol = 'https'
+ is_aggregation_https_enabled = True
+ else:
+ host_in_memory_aggregation_protocol = 'http'
+ pass
+
+# Security-related params
+kerberos_security_enabled = config['configurations']['cluster-env']['security_enabled']
+kafka_kerberos_merge_advertised_listeners = default('/configurations/kafka-env/kerberos_merge_advertised_listeners', True)
+
+kafka_kerberos_enabled = (('security.inter.broker.protocol' in config['configurations']['kafka-broker']) and
+ (config['configurations']['kafka-broker']['security.inter.broker.protocol'] in ("PLAINTEXTSASL", "SASL_PLAINTEXT", "SASL_SSL")))
+
+kafka_other_sasl_enabled = not kerberos_security_enabled and check_stack_feature(StackFeature.KAFKA_LISTENERS, stack_version_formatted) and \
+ check_stack_feature(StackFeature.KAFKA_EXTENDED_SASL_SUPPORT, format_stack_version(version_for_stack_feature_checks)) and \
+ (("SASL_PLAINTEXT" in config['configurations']['kafka-broker']['listeners']) or
+ ("PLAINTEXTSASL" in config['configurations']['kafka-broker']['listeners']) or #to support backward compability (we'll replace this anyway before we write it to server.properties)
+ ("SASL_SSL" in config['configurations']['kafka-broker']['listeners']))
+
+if kerberos_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['agentLevelParams']['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_user_keytab_path = config['configurations']['kafka-env']['kafka_user_keytab']
+ kafka_user_principal_name = config['configurations']['kafka-env']['kafka_user_principal']
+ kafka_bare_jaas_principal = get_bare_principal(_kafka_principal_name)
+ kafka_kerberos_params = "-Djava.security.auth.login.config="+ conf_dir +"/kafka_jaas.conf"
+elif kafka_other_sasl_enabled:
+ kafka_kerberos_params = "-Djava.security.auth.login.config="+ conf_dir +"/kafka_jaas.conf"
+else:
+ kafka_kerberos_params = ''
+ kafka_jaas_principal = None
+ kafka_keytab_path = None
+ kafka_user_keytab_path = None
+ kafka_user_principal_name = None
+
+# for curl command in ranger plugin to get db connector
+jdk_location = config['ambariLevelParams']['jdk_location']
+
+# kafka_broker
+kafka_broker_hosts = config['clusterHostInfo']['kafka_broker_hosts']
+kafka_broker_port = default('/configurations/kafka-broker/port', None)
+
+# get comma separated lists of kafka_broker hosts from clusterHostInfo
+index = 0
+kafka_broker_quorum = ""
+for host in kafka_broker_hosts:
+ kafka_broker_host = host
+ if kafka_broker_port is not None:
+ kafka_broker_host = host + ":" + str(kafka_broker_port)
+
+ kafka_broker_quorum += kafka_broker_host
+ index += 1
+ if index < len(kafka_broker_hosts):
+ kafka_broker_quorum += ","
+
+# ranger kafka plugin section start
+ranger_plugin_home = format("{kafka_home}/../ranger-{service_name}-plugin")
+
+# ranger host
+ranger_admin_hosts = default("/clusterHostInfo/ranger_admin_hosts", [])
+has_ranger_admin = not len(ranger_admin_hosts) == 0
+
+# ranger support xml_configuration flag, instead of depending on ranger xml_configurations_supported/ranger-env, using stack feature
+xml_configurations_supported = check_stack_feature(StackFeature.RANGER_XML_CONFIGURATION, version_for_stack_feature_checks)
+
+# ranger kafka plugin enabled property
+enable_ranger_kafka = default("configurations/ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled", "No")
+enable_ranger_kafka = True if enable_ranger_kafka.lower() == 'yes' else False
+
+# ranger kafka-plugin supported flag, instead of dependending on is_supported_kafka_ranger/kafka-env.xml, using stack feature
+is_supported_kafka_ranger = check_stack_feature(StackFeature.KAFKA_RANGER_PLUGIN_SUPPORT, version_for_stack_feature_checks)
+
+# ranger kafka properties
+if enable_ranger_kafka and is_supported_kafka_ranger:
+ # get ranger policy url
+ policymgr_mgr_url = config['configurations']['ranger-kafka-security']['ranger.plugin.kafka.policy.rest.url']
+
+ if not is_empty(policymgr_mgr_url) and policymgr_mgr_url.endswith('/'):
+ policymgr_mgr_url = policymgr_mgr_url.rstrip('/')
+
+ # ranger audit db user
+ xa_audit_db_user = default('/configurations/admin-properties/audit_db_user', 'rangerlogger')
+
+ xa_audit_db_password = ''
+ if not is_empty(config['configurations']['admin-properties']['audit_db_password']) and stack_supports_ranger_audit_db and has_ranger_admin:
+ xa_audit_db_password = config['configurations']['admin-properties']['audit_db_password']
+
+ # ranger kafka service/repository name
+ repo_name = str(config['clusterName']) + '_kafka'
+ repo_name_value = config['configurations']['ranger-kafka-security']['ranger.plugin.kafka.service.name']
+ if not is_empty(repo_name_value) and repo_name_value != "{{repo_name}}":
+ repo_name = repo_name_value
+
+ ranger_env = config['configurations']['ranger-env']
+
+ # create ranger-env config having external ranger credential properties
+ if not has_ranger_admin and enable_ranger_kafka:
+ external_admin_username = default('/configurations/ranger-kafka-plugin-properties/external_admin_username', 'admin')
+ external_admin_password = default('/configurations/ranger-kafka-plugin-properties/external_admin_password', 'admin')
+ external_ranger_admin_username = default('/configurations/ranger-kafka-plugin-properties/external_ranger_admin_username', 'amb_ranger_admin')
+ external_ranger_admin_password = default('/configurations/ranger-kafka-plugin-properties/external_ranger_admin_password', 'amb_ranger_admin')
+ ranger_env = {}
+ ranger_env['admin_username'] = external_admin_username
+ ranger_env['admin_password'] = external_admin_password
+ ranger_env['ranger_admin_username'] = external_ranger_admin_username
+ ranger_env['ranger_admin_password'] = external_ranger_admin_password
+
+ ranger_plugin_properties = config['configurations']['ranger-kafka-plugin-properties']
+ ranger_kafka_audit = config['configurations']['ranger-kafka-audit']
+ ranger_kafka_audit_attrs = config['configurationAttributes']['ranger-kafka-audit']
+ ranger_kafka_security = config['configurations']['ranger-kafka-security']
+ ranger_kafka_security_attrs = config['configurationAttributes']['ranger-kafka-security']
+ ranger_kafka_policymgr_ssl = config['configurations']['ranger-kafka-policymgr-ssl']
+ ranger_kafka_policymgr_ssl_attrs = config['configurationAttributes']['ranger-kafka-policymgr-ssl']
+
+ policy_user = config['configurations']['ranger-kafka-plugin-properties']['policy_user']
+
+ kafka_keytab_path_ranger = kafka_user_keytab_path if kafka_user_keytab_path else 'empty'
+ kafka_jaas_principal_ranger = kafka_user_principal_name if kafka_user_principal_name else 'empty'
+
+
+ ranger_plugin_config = {
+ 'username' : config['configurations']['ranger-kafka-plugin-properties']['REPOSITORY_CONFIG_USERNAME'],
+ 'password' : 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'],
+ 'bootstrap.servers' : kafka_broker_quorum,
+ 'security.protocol' : config['configurations']['kafka-broker']['security.inter.broker.protocol'],
+ 'kafka.keytab' : kafka_keytab_path_ranger,
+ 'kafka.principal' : kafka_jaas_principal_ranger,
+ 'sasl.mechanism' : config['configurations']['kafka-broker']['sasl.mechanism.inter.broker.protocol']
+ }
+
+ atlas_server_hosts = default('/clusterHostInfo/atlas_server_hosts', [])
+ has_atlas_server = not len(atlas_server_hosts) == 0
+ hive_server_hosts = default('/clusterHostInfo/hive_server_hosts', [])
+ has_hive_server = not len(hive_server_hosts) == 0
+ hbase_master_hosts = default('/clusterHostInfo/hbase_master_hosts', [])
+ has_hbase_master = not len(hbase_master_hosts) == 0
+ ranger_tagsync_hosts = default('/clusterHostInfo/ranger_tagsync_hosts', [])
+ has_ranger_tagsync = not len(ranger_tagsync_hosts) == 0
+ storm_nimbus_hosts = default('/clusterHostInfo/nimbus_hosts', [])
+ has_storm_nimbus = not len(storm_nimbus_hosts) == 0
+ spark_jobhistoryserver_hosts = default("/clusterHostInfo/spark2_jobhistoryserver_hosts", [])
+ has_jobhistoryserver = not len(spark_jobhistoryserver_hosts) == 0
+
+ if has_atlas_server:
+ atlas_notification_topics = default('/configurations/application-properties/atlas.notification.topics', 'ATLAS_HOOK,ATLAS_ENTITIES')
+ atlas_notification_topics_list = atlas_notification_topics.split(',')
+ hive_user = default('/configurations/hive-env/hive_user', 'hive')
+ hbase_user = default('/configurations/hbase-env/hbase_user', 'hbase')
+ atlas_user = default('/configurations/atlas-env/metadata_user', 'atlas')
+ rangertagsync_user = default('/configurations/ranger-tagsync-site/ranger.tagsync.dest.ranger.username', 'rangertagsync')
+ spark_user = 'spark_atlas'
+ if len(atlas_notification_topics_list) == 2:
+ atlas_hook = atlas_notification_topics_list[0]
+ atlas_entity = atlas_notification_topics_list[1]
+ ranger_plugin_config['setup.additional.default.policies'] = 'true'
+ ranger_plugin_config['default-policy.1.name'] = atlas_hook
+ ranger_plugin_config['default-policy.1.resource.topic'] = atlas_hook
+ hook_policy_user = []
+ if has_hive_server:
+ hook_policy_user.append(hive_user)
+ if has_hbase_master:
+ hook_policy_user.append(hbase_user)
+ if has_storm_nimbus and kerberos_security_enabled:
+ storm_principal_name = config['configurations']['storm-env']['storm_principal_name']
+ storm_bare_principal_name = get_bare_principal(storm_principal_name)
+ hook_policy_user.append(storm_bare_principal_name)
+ if has_jobhistoryserver:
+ hook_policy_user.append(spark_user)
+ if len(hook_policy_user) > 0:
+ ranger_plugin_config['default-policy.1.policyItem.1.users'] = ",".join(hook_policy_user)
+ ranger_plugin_config['default-policy.1.policyItem.1.accessTypes'] = "publish"
+ ranger_plugin_config['default-policy.1.policyItem.2.users'] = atlas_user
+ ranger_plugin_config['default-policy.1.policyItem.2.accessTypes'] = "consume"
+ ranger_plugin_config['default-policy.2.name'] = atlas_entity
+ ranger_plugin_config['default-policy.2.resource.topic'] = atlas_entity
+ ranger_plugin_config['default-policy.2.policyItem.1.users'] = atlas_user
+ ranger_plugin_config['default-policy.2.policyItem.1.accessTypes'] = "publish"
+ if has_ranger_tagsync:
+ ranger_plugin_config['default-policy.2.policyItem.2.users'] = rangertagsync_user
+ ranger_plugin_config['default-policy.2.policyItem.2.accessTypes'] = "consume"
+
+ if kerberos_security_enabled:
+ ranger_plugin_config['policy.download.auth.users'] = kafka_user
+ ranger_plugin_config['tag.download.auth.users'] = kafka_user
+ ranger_plugin_config['security.protocol'] = config['configurations']['kafka-broker']['security.inter.broker.protocol']
+ ranger_plugin_config['kafka.keytab'] = kafka_keytab_path_ranger
+ ranger_plugin_config['kafka.principal'] = kafka_jaas_principal_ranger
+ ranger_plugin_config['sasl.mechanism'] = config['configurations']['kafka-broker']['sasl.mechanism.inter.broker.protocol']
+
+ custom_ranger_service_config = generate_ranger_service_config(ranger_plugin_properties)
+ if len(custom_ranger_service_config) > 0:
+ ranger_plugin_config.update(custom_ranger_service_config)
+
+ kafka_ranger_plugin_repo = {
+ 'isEnabled': 'true',
+ 'configs': ranger_plugin_config,
+ 'description': 'kafka repo',
+ 'name': repo_name,
+ 'repositoryType': 'kafka',
+ 'type': 'kafka',
+ 'assetType': '1'
+ }
+
+ downloaded_custom_connector = None
+ previous_jdbc_jar_name = None
+ driver_curl_source = None
+ driver_curl_target = None
+ previous_jdbc_jar = None
+
+ if has_ranger_admin and stack_supports_ranger_audit_db:
+ xa_audit_db_flavor = config['configurations']['admin-properties']['DB_FLAVOR']
+ jdbc_jar_name, previous_jdbc_jar_name, audit_jdbc_url, jdbc_driver = get_audit_configs(config)
+
+ 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
+ previous_jdbc_jar = format("{kafka_home}/libs/{previous_jdbc_jar_name}") if stack_supports_ranger_audit_db else None
+
+ xa_audit_db_is_enabled = False
+ 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 = default('/configurations/ranger-kafka-audit/xasecure.audit.destination.hdfs', False)
+ ssl_keystore_password = config['configurations']['ranger-kafka-policymgr-ssl']['xasecure.policymgr.clientssl.keystore.password'] if xml_configurations_supported else None
+ ssl_truststore_password = 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')
+
+ 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 has_ranger_admin and stack_supports_ranger_audit_db and xa_audit_db_flavor.lower() == 'sqla':
+ xa_audit_db_is_enabled = False
+
+# need this to capture cluster name from where ranger kafka plugin is enabled
+cluster_name = config['clusterName']
+
+# required when Ranger-KMS is SSL enabled
+ranger_kms_hosts = default('/clusterHostInfo/ranger_kms_server_hosts',[])
+has_ranger_kms = len(ranger_kms_hosts) > 0
+is_ranger_kms_ssl_enabled = default('configurations/ranger-kms-site/ranger.service.https.attrib.ssl.enabled',False)
+
+# ranger kafka plugin section end
+
+namenode_hosts = default("/clusterHostInfo/namenode_hosts", [])
+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))
+dfs_type = default("/clusterLevelParams/dfs_type", "")
+ranger_kafka_plugin_impl_path = format("{kafka_home}/libs/ranger-kafka-plugin-impl")
+ranger_kafka_plugin_core_site_path = format("{ranger_kafka_plugin_impl_path}/core-site.xml")
+ranger_kafka_plugin_hdfs_site_path = format("{ranger_kafka_plugin_impl_path}/hdfs-site.xml")
+mount_table_xml_inclusion_file_full_path = None
+mount_table_content = None
+if 'viewfs-mount-table' in config['configurations']:
+ xml_inclusion_file_name = 'viewfs-mount-table.xml'
+ mount_table = config['configurations']['viewfs-mount-table']
+
+ if 'content' in mount_table and mount_table['content'].strip():
+ mount_table_xml_inclusion_file_full_path = os.path.join(conf_dir, xml_inclusion_file_name)
+ mount_table_content = mount_table['content']
+
+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 = kerberos_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(),
+ dfs_type = dfs_type,
+)
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/scripts/service_check.py
new file mode 100755
index 0000000000..17b09ae2b5
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/scripts/service_check.py
@@ -0,0 +1,89 @@
+#!/usr/bin/env python3
+"""
+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.core import shell
+from resource_management.libraries.functions.format import format
+from resource_management.core.logger import Logger
+from resource_management.core.exceptions import Fail
+from resource_management.core import sudo
+
+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_command_config=""
+ if params.kerberos_security_enabled and params.kafka_kerberos_enabled:
+ Logger.info("Kafka kerberos security is enabled.")
+ kafka_command_config=" --command-config /etc/kafka/conf/client_kerberos.properties"
+
+ kafka_config = self.read_kafka_config()
+ #topic = "ambari_kafka_service_check"
+ topic = "ambari-kafka-service-check"
+ create_topic_cmd_created_output = "Created topic \"ambari-kafka-service-check\"."
+ create_topic_cmd_created_output2 = "Created topic ambari-kafka-service-check."
+ create_topic_cmd_exists_output = "Topic \"ambari-kafka-service-check\" already exists."
+ create_topic_cmd_exists_output2 = "Topic 'ambari-kafka-service-check' already exists."
+ source_cmd = format("source {conf_dir}/kafka-env.sh")
+ topic_exists_cmd = format(source_cmd + " ; " + "{kafka_home}/bin/kafka-topics.sh --bootstrap-server {kafka_broker_quorum} --topic {topic} --list" + kafka_command_config)
+ topic_exists_cmd_code, topic_exists_cmd_out = shell.call(topic_exists_cmd, logoutput=True, quiet=False, user=params.kafka_user)
+
+ if topic_exists_cmd_code > 0:
+ raise Fail("Error encountered when attempting to list topics: {0}".format(topic_exists_cmd_out))
+
+ if not params.kafka_delete_topic_enable:
+ Logger.info('Kafka delete.topic.enable is not enabled. Skipping topic creation: %s' % topic)
+ return
+
+ # 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 --bootstrap-server {kafka_broker_quorum} --create --topic {topic} --partitions 1 --replication-factor 1" + kafka_command_config)
+ command = source_cmd + " ; " + create_topic_cmd
+ Logger.info("Running kafka create topic command 22222 : %s" % command)
+ call_and_match_output(command, format("({create_topic_cmd_created_output})|({create_topic_cmd_created_output2})|({create_topic_cmd_exists_output})|({create_topic_cmd_exists_output})"), "Failed to check that topic exists", user=params.kafka_user)
+
+ under_rep_cmd = format("{kafka_home}/bin/kafka-topics.sh --describe --bootstrap-server {kafka_broker_quorum} --under-replicated-partitions" + kafka_command_config)
+ under_rep_cmd_code, under_rep_cmd_out = shell.call(under_rep_cmd, logoutput=True, quiet=False, user=params.kafka_user)
+
+ if under_rep_cmd_code > 0:
+ raise Fail("Error encountered when attempting find under replicated partitions: {0}".format(under_rep_cmd_out))
+ elif len(under_rep_cmd_out) > 0 and "Topic" in under_rep_cmd_out:
+ Logger.warning("Under replicated partitions found: {0}".format(under_rep_cmd_out))
+
+ def read_kafka_config(self):
+ import params
+
+ kafka_config = {}
+ content = sudo.read_file(params.conf_dir + "/server.properties").decode()
+ 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()
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/scripts/setup_ranger_kafka.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/scripts/setup_ranger_kafka.py
new file mode 100755
index 0000000000..55daf2df33
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/scripts/setup_ranger_kafka.py
@@ -0,0 +1,146 @@
+#!/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.core.logger import Logger
+from resource_management.core.resources import File, Execute, Link
+from resource_management.libraries.functions.format import format
+from resource_management.libraries.functions.setup_ranger_plugin_xml import setup_configuration_file_for_required_plugins
+
+def setup_ranger_kafka():
+ import params
+
+ if params.enable_ranger_kafka:
+ from resource_management.libraries.functions.setup_ranger_plugin_xml import setup_ranger_plugin
+
+ if params.retryAble:
+ Logger.info("Kafka: Setup ranger: command retry enables thus retrying if ranger admin is down !")
+ else:
+ Logger.info("Kafka: Setup ranger: command retry not enabled thus skipping if ranger admin is down !")
+
+ if params.has_namenode and params.xa_audit_hdfs_is_enabled:
+ try:
+ params.HdfsResource("/ranger/audit",
+ type="directory",
+ action="create_on_execute",
+ owner=params.hdfs_user,
+ group=params.hdfs_user,
+ mode=0o755,
+ recursive_chmod=True
+ )
+ params.HdfsResource("/ranger/audit/kafka",
+ type="directory",
+ action="create_on_execute",
+ owner=params.kafka_user,
+ group=params.kafka_user,
+ mode=0o700,
+ recursive_chmod=True
+ )
+ params.HdfsResource(None, action="execute")
+ if params.is_ranger_kms_ssl_enabled:
+ Logger.info('Ranger KMS is ssl enabled, configuring ssl-client for hdfs audits.')
+ setup_configuration_file_for_required_plugins(component_user = params.kafka_user, component_group = params.user_group,
+ create_core_site_path = params.conf_dir, configurations = params.config['configurations']['ssl-client'],
+ configuration_attributes = params.config['configurationAttributes']['ssl-client'], file_name='ssl-client.xml')
+ else:
+ Logger.info('Ranger KMS is not ssl enabled, skipping ssl-client for hdfs audits.')
+ except Exception as err:
+ Logger.exception("Audit directory creation in HDFS for KAFKA Ranger plugin failed with error:\n{0}".format(err))
+
+ setup_ranger_plugin('kafka-broker', params.service_name, params.previous_jdbc_jar,
+ params.downloaded_custom_connector, params.driver_curl_source,
+ params.driver_curl_target, params.java64_home,
+ params.repo_name, params.kafka_ranger_plugin_repo,
+ params.ranger_env, params.ranger_plugin_properties,
+ params.policy_user, params.policymgr_mgr_url,
+ params.enable_ranger_kafka, conf_dict=params.conf_dir,
+ component_user=params.kafka_user, component_group=params.user_group, cache_service_list=['kafka'],
+ plugin_audit_properties=params.ranger_kafka_audit, plugin_audit_attributes=params.ranger_kafka_audit_attrs,
+ plugin_security_properties=params.ranger_kafka_security, plugin_security_attributes=params.ranger_kafka_security_attrs,
+ plugin_policymgr_ssl_properties=params.ranger_kafka_policymgr_ssl, plugin_policymgr_ssl_attributes=params.ranger_kafka_policymgr_ssl_attrs,
+ component_list=['kafka-broker'], audit_db_is_enabled=params.xa_audit_db_is_enabled,
+ credential_file=params.credential_file, xa_audit_db_password=params.xa_audit_db_password,
+ ssl_truststore_password=params.ssl_truststore_password, ssl_keystore_password=params.ssl_keystore_password,
+ api_version = 'v2', skip_if_rangeradmin_down= not params.retryAble,
+ is_security_enabled = params.kerberos_security_enabled,
+ is_stack_supports_ranger_kerberos = params.stack_supports_ranger_kerberos,
+ component_user_principal=params.kafka_jaas_principal if params.kerberos_security_enabled else None,
+ component_user_keytab=params.kafka_keytab_path if params.kerberos_security_enabled else None, plugin_home=params.ranger_plugin_home)
+
+ if params.enable_ranger_kafka and params.stack_supports_kafka_env_include_ranger_script:
+ Execute(('cp', '--remove-destination', params.setup_ranger_env_sh_source, params.setup_ranger_env_sh_target),
+ not_if=format("test -f {setup_ranger_env_sh_target}"),
+ sudo=True
+ )
+ File(params.setup_ranger_env_sh_target,
+ owner = params.kafka_user,
+ group = params.user_group,
+ mode = 0o755
+ )
+ elif not params.stack_supports_kafka_env_include_ranger_script:
+ File(format("{params.setup_ranger_env_sh_target}"),
+ action="delete"
+ )
+ if params.stack_supports_core_site_for_ranger_plugin and params.enable_ranger_kafka and params.kerberos_security_enabled:
+ # sometimes this is a link for missing /etc/hdp directory, just remove link/file and create regular file.
+ Execute(('rm', '-f', os.path.join(params.conf_dir, "core-site.xml")), sudo=True)
+
+ if params.has_namenode and params.stack_supports_kafka_env_include_ranger_script:
+ Logger.info("Stack supports core-site.xml creation for Ranger plugin and Namenode is installed, creating create core-site.xml from namenode configurations")
+ setup_configuration_file_for_required_plugins(component_user = params.kafka_user, component_group = params.user_group,
+ create_core_site_path = params.conf_dir, configurations = params.config['configurations']['core-site'],
+ configuration_attributes = params.config['configurationAttributes']['core-site'], file_name='core-site.xml',
+ xml_include_file=params.mount_table_xml_inclusion_file_full_path, xml_include_file_content=params.mount_table_content)
+ elif params.has_namenode and not params.stack_supports_kafka_env_include_ranger_script:
+ Logger.info("Stack supports core-site.xml creation for Ranger plugin and create core-site and hdfs-site in the ranger-kafka-plugin-impl diretory.")
+
+ Link(format('{ranger_kafka_plugin_impl_path}/core-site.xml'),
+ only_if=os.path.islink(format('{ranger_kafka_plugin_impl_path}/core-site.xml')),
+ action="delete")
+ setup_configuration_file_for_required_plugins(component_user = params.kafka_user,
+ component_group = params.user_group,
+ create_core_site_path = params.ranger_kafka_plugin_impl_path,
+ configurations = params.config['configurations']['core-site'],
+ configuration_attributes = params.config['configurationAttributes']['core-site'],
+ file_name='core-site.xml',
+ xml_include_file=params.mount_table_xml_inclusion_file_full_path,
+ xml_include_file_content=params.mount_table_content)
+
+ Link(format('{ranger_kafka_plugin_impl_path}/hdfs-site.xml'),
+ only_if=os.path.islink(format('{ranger_kafka_plugin_impl_path}/hdfs-site.xml')),
+ action="delete")
+ setup_configuration_file_for_required_plugins(component_user = params.kafka_user,
+ component_group = params.user_group,
+ create_core_site_path = params.ranger_kafka_plugin_impl_path,
+ configurations = params.config['configurations']['hdfs-site'],
+ configuration_attributes = params.config['configurationAttributes']['hdfs-site'],
+ file_name='hdfs-site.xml',
+ xml_include_file=params.mount_table_xml_inclusion_file_full_path,
+ xml_include_file_content=params.mount_table_content)
+ Link(format('{ranger_kafka_plugin_impl_path}/conf'),
+ to=format('{conf_dir}'))
+ else:
+ Logger.info("Stack supports core-site.xml creation for Ranger plugin and Namenode is not installed, creating create core-site.xml from default configurations")
+ setup_configuration_file_for_required_plugins(component_user = params.kafka_user, component_group = params.user_group,
+ create_core_site_path = params.conf_dir, configurations = { 'hadoop.security.authentication' : 'kerberos' if params.kerberos_security_enabled else 'simple' },
+ configuration_attributes = {}, file_name='core-site.xml')
+ Link(format('{ranger_kafka_plugin_impl_path}/conf'),
+ to=format('{conf_dir}'))
+ else:
+ Logger.info("Stack does not support core-site.xml creation for Ranger plugin, skipping core-site.xml configurations")
+ else:
+ Logger.info('Ranger Kafka plugin is not enabled')
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/scripts/status_params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/scripts/status_params.py
new file mode 100644
index 0000000000..d1c01aaf08
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/scripts/status_params.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python3
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""
+from resource_management.libraries.functions import format
+from resource_management.libraries.script.script import Script
+
+config = Script.get_config()
+
+kafka_pid_dir = config['configurations']['kafka-env']['kafka_pid_dir']
+kafka_pid_file = format("{kafka_pid_dir}/kafka.pid")
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/scripts/upgrade.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/scripts/upgrade.py
new file mode 100755
index 0000000000..ed51fdd203
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/scripts/upgrade.py
@@ -0,0 +1,74 @@
+#!/usr/bin/env python3
+"""
+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.core.resources.system import Execute
+from resource_management.libraries.functions import format
+from resource_management.libraries.functions import Direction
+from resource_management.core.exceptions import Fail
+from resource_management.core.logger import Logger
+
+def run_migration(env, upgrade_type):
+ """
+ If the acl migration script is present, then run it for either upgrade or downgrade.
+ That script was introduced in HDP 2.3.4.0 and requires stopping all Kafka brokers first.
+ Requires configs to be present.
+ :param env: Environment.
+ :param upgrade_type: "rolling" or "nonrolling
+ """
+ import params
+
+ if upgrade_type is None:
+ raise Fail('Parameter "upgrade_type" is missing.')
+
+ if params.upgrade_direction is None:
+ raise Fail('Parameter "upgrade_direction" is missing.')
+
+ if not params.kerberos_security_enabled:
+ Logger.info("Skip running the Kafka ACL migration script since cluster security is not enabled.")
+ return
+
+ Logger.info("Upgrade type: {0}, direction: {1}".format(str(upgrade_type), params.upgrade_direction))
+
+ # If the schema upgrade script exists in the version upgrading to, then attempt to upgrade/downgrade it while still using the present bits.
+ kafka_acls_script = None
+ command_suffix = ""
+ if params.upgrade_direction == Direction.UPGRADE:
+ kafka_acls_script = format("{stack_root}/{version}/usr/lib/kafka/bin/kafka-acls.sh")
+ command_suffix = "--upgradeAcls"
+ elif params.upgrade_direction == Direction.DOWNGRADE:
+ kafka_acls_script = format("{stack_root}/{downgrade_from_version}/usr/lib/kafka/bin/kafka-acls.sh")
+ command_suffix = "--downgradeAcls"
+
+ if kafka_acls_script is not None:
+ if os.path.exists(kafka_acls_script):
+ Logger.info("Found Kafka acls script: {0}".format(kafka_acls_script))
+ if params.zookeeper_connect is None:
+ raise Fail("Could not retrieve property kafka-broker/zookeeper.connect")
+
+ acls_command = "{0} --authorizer kafka.security.authorizer.AclAuthorizer --authorizer-properties zookeeper.connect={1} {2}".\
+ format(kafka_acls_script, params.zookeeper_connect, command_suffix)
+
+ Execute(acls_command,
+ user=params.kafka_user,
+ logoutput=True)
+ else:
+ Logger.info("Did not find Kafka acls script: {0}".format(kafka_acls_script))
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/scripts/utils.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/scripts/utils.py
new file mode 100644
index 0000000000..83b4262afe
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/scripts/utils.py
@@ -0,0 +1,38 @@
+#!/usr/bin/env python3
+"""
+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 re
+
+def get_bare_principal(normalized_principal_name):
+ """
+ Given a normalized principal name (nimbus/c6501.ambari.apache.org@EXAMPLE.COM) returns just the
+ primary component (nimbus)
+ :param normalized_principal_name: a string containing the principal name to process
+ :return: a string containing the primary component value or None if not valid
+ """
+
+ bare_principal = None
+
+ if normalized_principal_name:
+ match = re.match(r"([^/@]+)(?:/[^@])?(?:@.*)?", normalized_principal_name)
+
+ if match:
+ bare_principal = match.group(1)
+
+ return bare_principal
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/templates/client_kerberos.properties.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/templates/client_kerberos.properties.j2
new file mode 100755
index 0000000000..a320f490e0
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/templates/client_kerberos.properties.j2
@@ -0,0 +1,18 @@
+# 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.
+
+security.protocol=SASL_PLAINTEXT
+sasl.mechanism=GSSAPI
+sasl.kerberos.service.name=kafka
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/templates/input.config-kafka.json.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/templates/input.config-kafka.json.j2
new file mode 100755
index 0000000000..2b424b1312
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/templates/input.config-kafka.json.j2
@@ -0,0 +1,92 @@
+{#
+ # 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.
+ #}
+{
+ "input":[
+ {
+ "type":"kafka_controller",
+ "rowtype":"service",
+ "path":"{{default('/configurations/kafka-env/kafka_log_dir', '/var/log/kafka')}}/controller.log"
+ },
+ {
+ "type":"kafka_request",
+ "rowtype":"service",
+ "path":"{{default('/configurations/kafka-env/kafka_log_dir', '/var/log/kafka')}}/kafka-request.log"
+ },
+ {
+ "type":"kafka_logcleaner",
+ "rowtype":"service",
+ "path":"{{default('/configurations/kafka-env/kafka_log_dir', '/var/log/kafka')}}/log-cleaner.log"
+ },
+ {
+ "type":"kafka_server",
+ "rowtype":"service",
+ "path":"{{default('/configurations/kafka-env/kafka_log_dir', '/var/log/kafka')}}/server.log"
+ },
+ {
+ "type":"kafka_statechange",
+ "rowtype":"service",
+ "path":"{{default('/configurations/kafka-env/kafka_log_dir', '/var/log/kafka')}}/state-change.log"
+ }
+ ],
+ "filter":[
+ {
+ "filter":"grok",
+ "conditions":{
+ "fields":{
+ "type":[
+ "kafka_controller",
+ "kafka_request",
+ "kafka_logcleaner"
+ ]
+ }
+ },
+ "log4j_format":"[%d] %p %m (%c)%n",
+ "multiline_pattern":"^(\\[%{TIMESTAMP_ISO8601:logtime}\\])",
+ "message_pattern":"(?m)^\\[%{TIMESTAMP_ISO8601:logtime}\\]%{SPACE}%{LOGLEVEL:level}%{SPACE}%{GREEDYDATA:log_message}",
+ "post_map_values":{
+ "logtime":{
+ "map_date":{
+ "target_date_pattern":"yyyy-MM-dd HH:mm:ss,SSS"
+ }
+ }
+ }
+ },
+ {
+ "filter":"grok",
+ "comment":"Suppose to be same log4j pattern as other kafka processes, but some reason thread is not printed",
+ "conditions":{
+ "fields":{
+ "type":[
+ "kafka_server",
+ "kafka_statechange"
+ ]
+ }
+ },
+ "log4j_format":"[%d] %p %m (%c)%n",
+ "multiline_pattern":"^(\\[%{TIMESTAMP_ISO8601:logtime}\\])",
+ "message_pattern":"(?m)^\\[%{TIMESTAMP_ISO8601:logtime}\\]%{SPACE}%{LOGLEVEL:level}%{SPACE}%{GREEDYDATA:log_message}",
+ "post_map_values":{
+ "logtime":{
+ "map_date":{
+ "target_date_pattern":"yyyy-MM-dd HH:mm:ss,SSS"
+ }
+ }
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/templates/kafka.conf.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/templates/kafka.conf.j2
new file mode 100755
index 0000000000..9e18e1d305
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/templates/kafka.conf.j2
@@ -0,0 +1,35 @@
+{#
+# 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.
+#}
+
+# 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_user}} - nofile {{kafka_user_nofile_limit}}
+{{kafka_user}} - nproc {{kafka_user_nproc_limit}}
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/templates/kafka_client_jaas.conf.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/templates/kafka_client_jaas.conf.j2
new file mode 100755
index 0000000000..873d030bef
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/templates/kafka_client_jaas.conf.j2
@@ -0,0 +1,32 @@
+{#
+# 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.
+#}
+
+{% if kerberos_security_enabled %}
+KafkaClient {
+ com.sun.security.auth.module.Krb5LoginModule required
+ useTicketCache=true
+ renewTicket=true
+ serviceName="{{kafka_bare_jaas_principal}}";
+};
+{% endif %}
+Client {
+ com.sun.security.auth.module.Krb5LoginModule required
+ useTicketCache=true
+ renewTicket=true
+ serviceName="zookeeper";
+};
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/templates/kafka_jaas.conf.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/templates/kafka_jaas.conf.j2
new file mode 100755
index 0000000000..68b5e44858
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/templates/kafka_jaas.conf.j2
@@ -0,0 +1,99 @@
+{#
+# 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.
+#}
+
+/**
+* Example of SASL/PLAIN Configuration
+*
+* KafkaServer {
+* org.apache.kafka.common.security.plain.PlainLoginModule required
+* username="admin"
+* password="admin-secret"
+* user_admin="admin-secret"
+* user_alice="alice-secret";
+* };
+*
+* Example of SASL/SCRAM
+*
+* KafkaServer {
+* org.apache.kafka.common.security.scram.ScramLoginModule required
+* username="admin"
+* password="admin-secret"
+* };
+*
+* Example of Enabling multiple SASL mechanisms in a broker:
+*
+* KafkaServer {
+*
+* com.sun.security.auth.module.Krb5LoginModule required
+* useKeyTab=true
+* storeKey=true
+* keyTab="/etc/security/keytabs/kafka_server.keytab"
+* principal="kafka/kafka1.hostname.com@EXAMPLE.COM";
+*
+* org.apache.kafka.common.security.plain.PlainLoginModule required
+* username="admin"
+* password="admin-secret"
+* user_admin="admin-secret"
+* user_alice="alice-secret";
+*
+* org.apache.kafka.common.security.scram.ScramLoginModule required
+* username="scram-admin"
+* password="scram-admin-secret";
+* };
+*
+**/
+
+{% if kerberos_security_enabled %}
+
+KafkaServer {
+ com.sun.security.auth.module.Krb5LoginModule required
+ useKeyTab=true
+ keyTab="{{kafka_keytab_path}}"
+ storeKey=true
+ useTicketCache=false
+ serviceName="{{kafka_bare_jaas_principal}}"
+ principal="{{kafka_jaas_principal}}";
+};
+KafkaClient {
+ com.sun.security.auth.module.Krb5LoginModule required
+ useTicketCache=true
+ renewTicket=true
+ serviceName="{{kafka_bare_jaas_principal}}";
+};
+Client {
+ com.sun.security.auth.module.Krb5LoginModule required
+ useKeyTab=true
+ keyTab="{{kafka_keytab_path}}"
+ storeKey=true
+ useTicketCache=false
+ serviceName="zookeeper"
+ principal="{{kafka_jaas_principal}}";
+};
+com.sun.security.jgss.krb5.initiate {
+ com.sun.security.auth.module.Krb5LoginModule required
+ renewTGT=false
+ doNotPrompt=true
+ useKeyTab=true
+ keyTab="{{kafka_keytab_path}}"
+ storeKey=true
+ useTicketCache=false
+ serviceName="{{kafka_bare_jaas_principal}}"
+ principal="{{kafka_jaas_principal}}";
+};
+
+{% endif %}
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/templates/tools-log4j.properties.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/templates/tools-log4j.properties.j2
new file mode 100755
index 0000000000..c4ad326aeb
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/package/templates/tools-log4j.properties.j2
@@ -0,0 +1,21 @@
+# 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.
+
+log4j.rootLogger=WARN, stderr
+
+log4j.appender.stderr=org.apache.log4j.ConsoleAppender
+log4j.appender.stderr.layout=org.apache.log4j.PatternLayout
+log4j.appender.stderr.layout.ConversionPattern=[%d] %p %m (%c)%n
+log4j.appender.stderr.Target=System.err
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/role_command_order.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/role_command_order.json
new file mode 100644
index 0000000000..04739d7621
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/role_command_order.json
@@ -0,0 +1,7 @@
+{
+ "general_deps" : {
+ "_comment" : "dependencies for KAFKA",
+ "KAFKA_BROKER-START" : ["ZOOKEEPER_SERVER-START","RANGER_USERSYNC-START", "NAMENODE-START"],
+ "KAFKA_SERVICE_CHECK-SERVICE_CHECK": ["KAFKA_BROKER-START"]
+ }
+}
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/service_advisor.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/service_advisor.py
new file mode 100755
index 0000000000..f427b7dc98
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/service_advisor.py
@@ -0,0 +1,451 @@
+#!/usr/bin/env ambari-python-wrap
+"""
+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.
+"""
+
+# Python imports
+import imp
+import os
+import traceback
+import re
+
+from resource_management.core.logger import Logger
+
+SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
+STACKS_DIR = os.path.join(SCRIPT_DIR, '../../../../../stacks/')
+PARENT_FILE = os.path.join(STACKS_DIR, 'service_advisor.py')
+
+try:
+ if "BASE_SERVICE_ADVISOR" in os.environ:
+ PARENT_FILE = os.environ["BASE_SERVICE_ADVISOR"]
+ with open(PARENT_FILE, 'rb') as fp:
+ service_advisor = imp.load_module('service_advisor', fp, PARENT_FILE, ('.py', 'rb', imp.PY_SOURCE))
+except Exception as e:
+ traceback.print_exc()
+ print("Failed to load parent")
+
+class KafkaServiceAdvisor(service_advisor.ServiceAdvisor):
+
+ def __init__(self, *args, **kwargs):
+ self.as_super = super(KafkaServiceAdvisor, self)
+ self.as_super.__init__(*args, **kwargs)
+
+ # Always call these methods
+ self.modifyMastersWithMultipleInstances()
+ self.modifyCardinalitiesDict()
+ self.modifyHeapSizeProperties()
+ self.modifyNotValuableComponents()
+ self.modifyComponentsNotPreferableOnServer()
+ self.modifyComponentLayoutSchemes()
+
+ def modifyMastersWithMultipleInstances(self):
+ """
+ Modify the set of masters with multiple instances.
+ Must be overriden in child class.
+ """
+ # Nothing to do
+ pass
+
+ def modifyCardinalitiesDict(self):
+ """
+ Modify the dictionary of cardinalities.
+ Must be overriden in child class.
+ """
+ # Nothing to do
+ pass
+
+ def modifyHeapSizeProperties(self):
+ """
+ Modify the dictionary of heap size properties.
+ Must be overriden in child class.
+ """
+ pass
+
+ def modifyNotValuableComponents(self):
+ """
+ Modify the set of components whose host assignment is based on other services.
+ Must be overriden in child class.
+ """
+ # Nothing to do
+ pass
+
+ def modifyComponentsNotPreferableOnServer(self):
+ """
+ Modify the set of components that are not preferable on the server.
+ Must be overriden in child class.
+ """
+ # Nothing to do
+ pass
+
+ def modifyComponentLayoutSchemes(self):
+ """
+ Modify layout scheme dictionaries for components.
+ The scheme dictionary basically maps the number of hosts to
+ host index where component should exist.
+ Must be overriden in child class.
+ """
+ # Nothing to do
+ pass
+
+ def getServiceComponentLayoutValidations(self, services, hosts):
+ """
+ Get a list of errors.
+ Must be overriden in child class.
+ """
+
+ return self.getServiceComponentCardinalityValidations(services, hosts, "KAFKA")
+
+ def getServiceConfigurationRecommendations(self, configurations, clusterData, services, hosts):
+ """
+ Entry point.
+ Must be overriden in child class.
+ """
+ #Logger.info("Class: %s, Method: %s. Recommending Service Configurations." %
+ # (self.__class__.__name__, inspect.stack()[0][3]))
+
+ recommender = KafkaRecommender()
+ recommender.recommendKafkaConfigurationsFromHDP22(configurations, clusterData, services, hosts)
+ recommender.recommendKAFKAConfigurationsFromHDP23(configurations, clusterData, services, hosts)
+ recommender.recommendKAFKAConfigurationsFromHDP26(configurations, clusterData, services, hosts)
+ recommender.recommendKAFKAConfigurationsFromHDP30(configurations, clusterData, services, hosts)
+
+ def getServiceConfigurationsValidationItems(self, configurations, recommendedDefaults, services, hosts):
+ """
+ Entry point.
+ Validate configurations for the service. Return a list of errors.
+ The code for this function should be the same for each Service Advisor.
+ """
+ #Logger.info("Class: %s, Method: %s. Validating Configurations." %
+ # (self.__class__.__name__, inspect.stack()[0][3]))
+
+ validator = KafkaValidator()
+ # Calls the methods of the validator using arguments,
+ # method(siteProperties, siteRecommendations, configurations, services, hosts)
+ return validator.validateListOfConfigUsingMethod(configurations, recommendedDefaults, services, hosts, validator.validators)
+
+ @staticmethod
+ def isKerberosEnabled(services, configurations):
+ """
+ Determine if Kerberos is enabled for Kafka.
+
+ If kafka-broker/security.inter.broker.protocol exists and is set to "SASL_PLAINTEXT", return True;
+ otherwise return false.
+
+ The value of this property is first tested in the updated configurations (configurations) then
+ tested in the current configuration set (services)
+
+ :type services: dict
+ :param services: the dictionary containing the existing configuration values
+ :type configurations: dict
+ :param configurations: the dictionary containing the updated configuration values
+ :rtype: bool
+ :return: True or False
+ """
+
+ if configurations and "kafka-broker" in configurations and \
+ "security.inter.broker.protocol" in configurations["kafka-broker"]["properties"]:
+ return configurations["kafka-broker"]["properties"]["security.inter.broker.protocol"] == "SASL_PLAINTEXT"
+ elif services and "kafka-broker" in services["configurations"] and \
+ "security.inter.broker.protocol" in services["configurations"]["kafka-broker"]["properties"]:
+ return services["configurations"]["kafka-broker"]["properties"]["security.inter.broker.protocol"] == "SASL_PLAINTEXT"
+ else:
+ return False
+
+
+
+class KafkaRecommender(service_advisor.ServiceAdvisor):
+ """
+ Kafka Recommender suggests properties when adding the service for the first time or modifying configs via the UI.
+ """
+
+ def __init__(self, *args, **kwargs):
+ self.as_super = super(KafkaRecommender, self)
+ self.as_super.__init__(*args, **kwargs)
+
+
+
+ def recommendKafkaConfigurationsFromHDP22(self, configurations, clusterData, services, hosts):
+ kafka_mounts = [
+ ("log.dirs", "KAFKA_BROKER", "/kafka-logs", "multi")
+ ]
+
+ self.updateMountProperties("kafka-broker", kafka_mounts, configurations, services, hosts)
+
+ def recommendKAFKAConfigurationsFromHDP23(self, configurations, clusterData, services, hosts):
+
+ servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
+ kafka_broker = self.getServicesSiteProperties(services, "kafka-broker")
+ kafka_env = self.getServicesSiteProperties(services, "kafka-env")
+
+ if not kafka_env: #Kafka check not required
+ return
+
+ security_enabled = KafkaServiceAdvisor.isKerberosEnabled(services, configurations)
+
+ putKafkaBrokerProperty = self.putProperty(configurations, "kafka-broker", services)
+ putKafkaLog4jProperty = self.putProperty(configurations, "kafka-log4j", services)
+ putKafkaBrokerAttributes = self.putPropertyAttribute(configurations, "kafka-broker")
+
+ if security_enabled:
+ self.update_listeners_to_sasl(services, putKafkaBrokerProperty)
+
+ kafka_user = kafka_env.get('kafka_user')
+
+ if kafka_user is not None:
+ kafka_super_users = kafka_broker.get('super.users') if kafka_broker is not None else None
+
+ # kafka_super_super_users is expected to be formatted as: User:user1;User:user2
+ if kafka_super_users is not None and kafka_super_users != '':
+ # Parse kafka_super_users to get a set of unique user names and rebuild the property value
+ user_names = set()
+ user_names.add(kafka_user)
+ for match in re.findall('User:([^;]*)', kafka_super_users):
+ user_names.add(match)
+ kafka_super_users = 'User:' + ";User:".join(user_names)
+ else:
+ kafka_super_users = 'User:' + kafka_user
+
+ putKafkaBrokerProperty("super.users", kafka_super_users)
+
+ putKafkaBrokerProperty("principal.to.local.class", "kafka.security.auth.KerberosPrincipalToLocal")
+ putKafkaBrokerProperty("zookeeper.set.acl", "true")
+
+ else: # not security_enabled
+ # remove unneeded properties
+ putKafkaBrokerAttributes('super.users', 'delete', 'true')
+ putKafkaBrokerAttributes('principal.to.local.class', 'delete', 'true')
+
+ # Update ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled to match ranger-env/ranger-kafka-plugin-enabled
+ if "ranger-env" in services["configurations"] \
+ and "ranger-kafka-plugin-properties" in services["configurations"] \
+ and "ranger-kafka-plugin-enabled" in services["configurations"]["ranger-env"]["properties"]:
+ putKafkaRangerPluginProperty = self.putProperty(configurations, "ranger-kafka-plugin-properties", services)
+ ranger_kafka_plugin_enabled = services["configurations"]["ranger-env"]["properties"]["ranger-kafka-plugin-enabled"]
+ putKafkaRangerPluginProperty("ranger-kafka-plugin-enabled", ranger_kafka_plugin_enabled)
+
+
+ ranger_plugin_enabled = False
+ # Only if the RANGER service is installed....
+ if "RANGER" in servicesList:
+ # If ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled,
+ # determine if the Ranger/Kafka plug-in enabled enabled or not
+ if 'ranger-kafka-plugin-properties' in configurations and \
+ 'ranger-kafka-plugin-enabled' in configurations['ranger-kafka-plugin-properties']['properties']:
+ ranger_plugin_enabled = configurations['ranger-kafka-plugin-properties']['properties']['ranger-kafka-plugin-enabled'].lower() == 'yes'
+ # If ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled was not changed,
+ # determine if the Ranger/Kafka plug-in enabled enabled or not
+ elif 'ranger-kafka-plugin-properties' in services['configurations'] and \
+ 'ranger-kafka-plugin-enabled' in services['configurations']['ranger-kafka-plugin-properties']['properties']:
+ ranger_plugin_enabled = services['configurations']['ranger-kafka-plugin-properties']['properties']['ranger-kafka-plugin-enabled'].lower() == 'yes'
+
+ # Determine the value for kafka-broker/authorizer.class.name
+ if ranger_plugin_enabled:
+ # If the Ranger plugin for Kafka is enabled, set authorizer.class.name to
+ # "org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer" whether Kerberos is
+ # enabled or not.
+ putKafkaBrokerProperty("authorizer.class.name", 'org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer')
+ elif security_enabled:
+ putKafkaBrokerProperty("authorizer.class.name", 'kafka.security.authorizer.AclAuthorizer')
+ else:
+ putKafkaBrokerAttributes('authorizer.class.name', 'delete', 'true')
+
+ #If AMS is part of Services, use the KafkaTimelineMetricsReporter for metric reporting. Default is ''.
+ if "AMBARI_METRICS" in servicesList:
+ putKafkaBrokerProperty('kafka.metrics.reporters', 'org.apache.hadoop.metrics2.sink.kafka.KafkaTimelineMetricsReporter')
+
+ if ranger_plugin_enabled:
+ kafkaLog4jRangerLines = [{
+ "name": "log4j.appender.rangerAppender",
+ "value": "org.apache.log4j.DailyRollingFileAppender"
+ },
+ {
+ "name": "log4j.appender.rangerAppender.DatePattern",
+ "value": "'.'yyyy-MM-dd-HH"
+ },
+ {
+ "name": "log4j.appender.rangerAppender.File",
+ "value": "${kafka.logs.dir}/ranger_kafka.log"
+ },
+ {
+ "name": "log4j.appender.rangerAppender.layout",
+ "value": "org.apache.log4j.PatternLayout"
+ },
+ {
+ "name": "log4j.appender.rangerAppender.layout.ConversionPattern",
+ "value": "%d{ISO8601} %p [%t] %C{6} (%F:%L) - %m%n"
+ },
+ {
+ "name": "log4j.logger.org.apache.ranger",
+ "value": "INFO, rangerAppender"
+ }]
+
+ # change kafka-log4j when ranger plugin is installed
+ if 'kafka-log4j' in services['configurations'] and 'content' in services['configurations']['kafka-log4j']['properties']:
+ kafkaLog4jContent = services['configurations']['kafka-log4j']['properties']['content']
+ for item in range(len(kafkaLog4jRangerLines)):
+ if kafkaLog4jRangerLines[item]["name"] not in kafkaLog4jContent:
+ kafkaLog4jContent+= '\n' + kafkaLog4jRangerLines[item]["name"] + '=' + kafkaLog4jRangerLines[item]["value"]
+ putKafkaLog4jProperty("content",kafkaLog4jContent)
+
+ zookeeper_host_port = self.getZKHostPortString(services)
+ if zookeeper_host_port:
+ putRangerKafkaPluginProperty = self.putProperty(configurations, 'ranger-kafka-plugin-properties', services)
+ putRangerKafkaPluginProperty('zookeeper.connect', zookeeper_host_port)
+
+ def update_listeners_to_sasl(self, services, putKafkaBrokerProperty):
+ try:
+ listeners = services['configurations']['kafka-broker']['properties']['listeners']
+ if listeners and "SASL" not in listeners:
+ listeners = re.sub(r"(^|\b)PLAINTEXT://", "SASL_PLAINTEXT://", listeners)
+ listeners = re.sub(r"(^|\b)PLAINTEXTSASL://", "SASL_PLAINTEXT://", listeners)
+ listeners = re.sub(r"(^|\b)SSL://", "SASL_SSL://", listeners)
+ putKafkaBrokerProperty('listeners', listeners)
+ except KeyError as e:
+ self.logger.info('Cannot replace PLAINTEXT to SASL_PLAINTEXT in listeners. KeyError: %s' % e)
+
+ def recommendKAFKAConfigurationsFromHDP26(self, configurations, clusterData, services, hosts):
+ if 'kafka-env' in services['configurations'] and 'kafka_user' in services['configurations']['kafka-env']['properties']:
+ kafka_user = services['configurations']['kafka-env']['properties']['kafka_user']
+ else:
+ kafka_user = "kafka"
+
+ if 'ranger-kafka-plugin-properties' in configurations and 'ranger-kafka-plugin-enabled' in configurations['ranger-kafka-plugin-properties']['properties']:
+ ranger_kafka_plugin_enabled = (configurations['ranger-kafka-plugin-properties']['properties']['ranger-kafka-plugin-enabled'].lower() == 'Yes'.lower())
+ elif 'ranger-kafka-plugin-properties' in services['configurations'] and 'ranger-kafka-plugin-enabled' in services['configurations']['ranger-kafka-plugin-properties']['properties']:
+ ranger_kafka_plugin_enabled = (services['configurations']['ranger-kafka-plugin-properties']['properties']['ranger-kafka-plugin-enabled'].lower() == 'Yes'.lower())
+ else:
+ ranger_kafka_plugin_enabled = False
+
+ if ranger_kafka_plugin_enabled and 'ranger-kafka-plugin-properties' in services['configurations'] and 'REPOSITORY_CONFIG_USERNAME' in services['configurations']['ranger-kafka-plugin-properties']['properties']:
+ self.logger.info("Setting Kafka Repo user for Ranger.")
+ putRangerKafkaPluginProperty = self.putProperty(configurations, "ranger-kafka-plugin-properties", services)
+ putRangerKafkaPluginProperty("REPOSITORY_CONFIG_USERNAME",kafka_user)
+ else:
+ self.logger.info("Not setting Kafka Repo user for Ranger.")
+
+ def recommendKAFKAConfigurationsFromHDP30(self, configurations, clusterData, services, hosts):
+ number_services = len(services['services'])
+ for each_service in range(0, number_services):
+ if services['services'][each_service]['components'][0]['StackServiceComponents']['service_name'] == 'KAFKA':
+ num_kakfa_brokers = len(services['services'][each_service]['components'][0]['StackServiceComponents']['hostnames'])
+ putKafkaBrokerProperty = self.putProperty(configurations, "kafka-broker", services)
+ putKafkaBrokerProperty('offsets.topic.replication.factor', str(min(3, num_kakfa_brokers)))
+ if services['services'][each_service]['components'][0]['StackServiceComponents']['service_name'] == 'STREAMSMSGMGR':
+ putKafkaBrokerProperty('producer.metrics.enable', 'true')
+
+class KafkaValidator(service_advisor.ServiceAdvisor):
+ """
+ Kafka Validator checks the correctness of properties whenever the service is first added or the user attempts to
+ change configs via the UI.
+ """
+
+ def __init__(self, *args, **kwargs):
+ self.as_super = super(KafkaValidator, self)
+ self.as_super.__init__(*args, **kwargs)
+
+ self.validators = [("ranger-kafka-plugin-properties", self.validateKafkaRangerPluginConfigurationsFromHDP22),
+ ("kafka-broker", self.validateKAFKAConfigurationsFromHDP23),
+ ("kafka-broker", self.validateKAFKAConfigurationsFromHDP30)]
+
+ def validateKafkaRangerPluginConfigurationsFromHDP22(self, properties, recommendedDefaults, configurations, services, hosts):
+ validationItems = []
+ ranger_plugin_properties = self.getSiteProperties(configurations, "ranger-kafka-plugin-properties")
+ ranger_plugin_enabled = ranger_plugin_properties['ranger-kafka-plugin-enabled'] if ranger_plugin_properties else 'No'
+ servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
+ security_enabled = KafkaServiceAdvisor.isKerberosEnabled(services, configurations)
+ if 'RANGER' in servicesList and ranger_plugin_enabled.lower() == 'yes':
+ # ranger-hdfs-plugin must be enabled in ranger-env
+ ranger_env = self.getServicesSiteProperties(services, 'ranger-env')
+ if not ranger_env or not 'ranger-kafka-plugin-enabled' in ranger_env or \
+ ranger_env['ranger-kafka-plugin-enabled'].lower() != 'yes':
+ validationItems.append({"config-name": 'ranger-kafka-plugin-enabled',
+ "item": self.getWarnItem(
+ "ranger-kafka-plugin-properties/ranger-kafka-plugin-enabled must correspond ranger-env/ranger-kafka-plugin-enabled")})
+
+ if ("RANGER" in servicesList) and (ranger_plugin_enabled.lower() == 'yes') and not security_enabled:
+ validationItems.append({"config-name": "ranger-kafka-plugin-enabled",
+ "item": self.getWarnItem(
+ "Ranger Kafka plugin should not be enabled in non-kerberos environment.")})
+ return self.toConfigurationValidationProblems(validationItems, "ranger-kafka-plugin-properties")
+
+
+ def validateKAFKAConfigurationsFromHDP23(self, properties, recommendedDefaults, configurations, services, hosts):
+ kafka_broker = properties
+ validationItems = []
+ servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
+
+ #Adding Ranger Plugin logic here
+ ranger_plugin_properties = self.getSiteProperties(configurations, "ranger-kafka-plugin-properties")
+ ranger_plugin_enabled = ranger_plugin_properties['ranger-kafka-plugin-enabled'] if ranger_plugin_properties else 'No'
+ prop_name = 'authorizer.class.name'
+ prop_val = "org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer"
+ if ("RANGER" in servicesList) and (ranger_plugin_enabled.lower() == 'Yes'.lower()):
+ if kafka_broker[prop_name] != prop_val:
+ validationItems.append({"config-name": prop_name,
+ "item": self.getWarnItem(
+ "If Ranger Kafka Plugin is enabled." \
+ "{0} needs to be set to {1}".format(prop_name,prop_val))})
+
+ kafka_broker_properties = self.getSiteProperties(configurations, "kafka-broker")
+ # Find number of services installed, get them all and find kafka service json obj in them.
+ number_services = len(services['services'])
+ for each_service in range(0, number_services):
+ if services['services'][each_service]['components'][0]['StackServiceComponents']['service_name'] == 'KAFKA':
+ num_kakfa_brokers = len(services['services'][each_service]['components'][0]['StackServiceComponents']['hostnames'])
+ if int(kafka_broker_properties['offsets.topic.replication.factor']) > num_kakfa_brokers:
+ validationItems.append({"config-name": 'offsets.topic.replication.factor',
+ "item": self.getErrorItem(
+ "offsets.topic.replication.factor={0} is greater than the number of kafka brokers={1}. " \
+ "It must be less or same as number of kafka brokers." \
+ .format(kafka_broker_properties['offsets.topic.replication.factor'], num_kakfa_brokers))})
+
+ if 'KERBEROS' in servicesList and 'security.inter.broker.protocol' in properties:
+ interBrokerValue = properties['security.inter.broker.protocol']
+ prop_name = 'listeners'
+ prop_value = properties[prop_name]
+ if interBrokerValue and interBrokerValue not in prop_value:
+ validationItems.append({"config-name": "listeners",
+ "item": self.getWarnItem("If kerberos is enabled " \
+ "{0} need to contain {1} as one of " \
+ "the protocol".format(prop_name, interBrokerValue))})
+
+
+ return self.toConfigurationValidationProblems(validationItems, "kafka-broker")
+
+ def validateKAFKAConfigurationsFromHDP30(self, properties, recommendedDefaults, configurations, services, hosts):
+ kafka_broker = properties
+ validationItems = []
+ servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
+ kafka_broker_properties = self.getSiteProperties(configurations, "kafka-broker")
+ if ("STREAMSMSGMGR" in servicesList):
+ prop_name = 'producer.metrics.enable'
+ prop_val = 'true'
+ try:
+ kafka_broker_producer_metrics_enable = kafka_broker_properties[prop_name]
+ if kafka_broker_producer_metrics_enable.lower() == "false":
+ validationItems.append({"config-name": prop_name,
+ "item": self.getWarnItem(
+ "Setting {0} to {1} will prevent collection of metrics related to producer message " \
+ "count by Kafka brokers.".format(prop_name, kafka_broker_producer_metrics_enable))})
+ except KeyError as e:
+ self.logger.info("Unable to find producer.metrics.enable.")
+ validationItems.append({"config-name": prop_name,
+ "item": self.getWarnItem(
+ "After Installing Streams Messaging Manager, {0} with be set to {1}." \
+ "Please restart kafka for changes to take place.".format(prop_name, prop_val))})
+
+ return self.toConfigurationValidationProblems(validationItems, "kafka-broker")
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/themes/directories.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/themes/directories.json
new file mode 100755
index 0000000000..49620b6c49
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/themes/directories.json
@@ -0,0 +1,98 @@
+{
+ "name": "directories",
+ "description": "Directories theme for KAFKA service",
+ "configuration": {
+ "layouts": [
+ {
+ "name": "directories",
+ "tabs": [
+ {
+ "name": "directories",
+ "display-name": "Directories",
+ "layout": {
+ "tab-columns": "1",
+ "tab-rows": "4",
+ "sections": [
+ {
+ "name": "subsection-log-dirs",
+ "display-name": "LOG DIRS",
+ "row-index": "1",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "1",
+ "section-columns": "1",
+ "section-rows": "1",
+ "subsections": [
+ {
+ "name": "subsection-log-dirs",
+ "row-index": "0",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "1"
+ }
+ ]
+ },
+ {
+ "name": "subsection-pid-dirs",
+ "display-name": "PID DIRS",
+ "row-index": "2",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "1",
+ "section-columns": "1",
+ "section-rows": "1",
+ "subsections": [
+ {
+ "name": "subsection-pid-dirs",
+ "row-index": "0",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "1"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ],
+ "placement": {
+ "configuration-layout": "default",
+ "configs": [
+ {
+ "config": "kafka-broker/log.dirs",
+ "subsection-name": "subsection-log-dirs"
+ },
+ {
+ "config": "kafka-env/kafka_log_dir",
+ "subsection-name": "subsection-log-dirs"
+ },
+ {
+ "config": "kafka-env/kafka_pid_dir",
+ "subsection-name": "subsection-pid-dirs"
+ }
+ ]
+ },
+ "widgets": [
+ {
+ "config": "kafka-broker/log.dirs",
+ "widget": {
+ "type": "directories"
+ }
+ },
+ {
+ "config": "kafka-env/kafka_log_dir",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "kafka-env/kafka_pid_dir",
+ "widget": {
+ "type": "text-field"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/widgets.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/widgets.json
new file mode 100644
index 0000000000..03d41f23a9
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/KAFKA/widgets.json
@@ -0,0 +1,181 @@
+{
+ "layouts": [
+ {
+ "layout_name": "default_kafka_dashboard",
+ "display_name": "Standard Kafka Dashboard",
+ "section_name": "KAFKA_SUMMARY",
+ "widgetLayoutInfo": [
+ {
+ "widget_name": "Broker Topics",
+ "description": "Broker Topics",
+ "widget_type": "GRAPH",
+ "is_visible": true,
+ "metrics": [
+ {
+ "name": "kafka.server.BrokerTopicMetrics.BytesInPerSec.1MinuteRate",
+ "metric_path": "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesInPerSec/1MinuteRate",
+ "service_name": "KAFKA",
+ "component_name": "KAFKA_BROKER"
+ },
+ {
+ "name": "kafka.server.BrokerTopicMetrics.BytesOutPerSec.1MinuteRate",
+ "metric_path": "metrics/kafka/server/BrokerTopicMetrics/AllTopicsBytesOutPerSec/1MinuteRate",
+ "service_name": "KAFKA",
+ "component_name": "KAFKA_BROKER"
+ },
+ {
+ "name": "kafka.server.BrokerTopicMetrics.MessagesInPerSec.1MinuteRate",
+ "metric_path": "metrics/kafka/server/BrokerTopicMetrics/AllTopicsMessagesInPerSec/1MinuteRate",
+ "service_name": "KAFKA",
+ "component_name": "KAFKA_BROKER"
+ }
+ ],
+ "values": [
+ {
+ "name": "Bytes In",
+ "value": "${kafka.server.BrokerTopicMetrics.BytesInPerSec.1MinuteRate}"
+ },
+ {
+ "name": "Bytes Out",
+ "value": "${kafka.server.BrokerTopicMetrics.BytesOutPerSec.1MinuteRate}"
+ },
+ {
+ "name": "Messages In",
+ "value": "${kafka.server.BrokerTopicMetrics.MessagesInPerSec.1MinuteRate}"
+ }
+ ],
+ "properties": {
+ "graph_type": "LINE",
+ "time_range": "1"
+ }
+ },
+ {
+ "widget_name": "Active Controller Count",
+ "description": "Active Controller Count",
+ "widget_type": "GRAPH",
+ "is_visible": true,
+ "metrics": [
+ {
+ "name": "kafka.controller.KafkaController.ActiveControllerCount._sum",
+ "metric_path": "metrics/kafka/controller/KafkaController/ActiveControllerCount._sum",
+ "service_name": "KAFKA",
+ "component_name": "KAFKA_BROKER"
+ }
+ ],
+ "values": [
+ {
+ "name": "Active Controller Count",
+ "value": "${kafka.controller.KafkaController.ActiveControllerCount._sum}"
+ }
+ ],
+ "properties": {
+ "graph_type": "LINE",
+ "time_range": "1"
+ }
+ },
+ {
+ "widget_name": "Controller Status",
+ "description": "Controller Status",
+ "widget_type": "GRAPH",
+ "is_visible": true,
+ "metrics": [
+ {
+ "name": "kafka.controller.ControllerStats.LeaderElectionRateAndTimeMs.1MinuteRate",
+ "metric_path": "metrics/kafka/controller/ControllerStats/LeaderElectionRateAndTimeMs/1MinuteRate",
+ "service_name": "KAFKA",
+ "component_name": "KAFKA_BROKER"
+ },
+ {
+ "name": "kafka.controller.ControllerStats.UncleanLeaderElectionsPerSec.1MinuteRate",
+ "metric_path": "metrics/kafka/controller/ControllerStats/UncleanLeaderElectionsPerSec/1MinuteRate",
+ "service_name": "KAFKA",
+ "component_name": "KAFKA_BROKER"
+ }
+ ],
+ "values": [
+ {
+ "name": "Leader Election Rate And Time",
+ "value": "${kafka.controller.ControllerStats.LeaderElectionRateAndTimeMs.1MinuteRate}"
+ },
+ {
+ "name": "Unclean Leader Election",
+ "value": "${kafka.controller.ControllerStats.UncleanLeaderElectionsPerSec.1MinuteRate}"
+ }
+ ],
+ "properties": {
+ "graph_type": "LINE",
+ "time_range": "1"
+ }
+ },
+ {
+ "widget_name": "Replica MaxLag",
+ "description": "Replica MaxLag",
+ "widget_type": "GRAPH",
+ "is_visible": true,
+ "metrics": [
+ {
+ "name": "kafka.server.ReplicaFetcherManager.MaxLag.clientId.Replica",
+ "metric_path": "metrics/kafka/server/ReplicaFetcherManager/Replica-MaxLag",
+ "service_name": "KAFKA",
+ "component_name": "KAFKA_BROKER"
+ }
+ ],
+ "values": [
+ {
+ "name": "Replica MaxLag",
+ "value": "${kafka.server.ReplicaFetcherManager.MaxLag.clientId.Replica}"
+ }
+ ],
+ "properties": {
+ "graph_type": "LINE",
+ "time_range": "1"
+ }
+ },
+ {
+ "widget_name": "Replica Manager",
+ "description": "Replica Manager",
+ "widget_type": "GRAPH",
+ "is_visible": true,
+ "metrics": [
+ {
+ "name": "kafka.server.ReplicaManager.PartitionCount._sum",
+ "metric_path": "metrics/kafka/server/ReplicaManager/PartitionCount._sum",
+ "service_name": "KAFKA",
+ "component_name": "KAFKA_BROKER"
+ },
+ {
+ "name": "kafka.server.ReplicaManager.UnderReplicatedPartitions",
+ "metric_path": "metrics/kafka/server/ReplicaManager/UnderReplicatedPartitions",
+ "service_name": "KAFKA",
+ "component_name": "KAFKA_BROKER"
+ },
+ {
+ "name": "kafka.server.ReplicaManager.LeaderCount._sum",
+ "metric_path": "metrics/kafka/server/ReplicaManager/LeaderCount._sum",
+ "service_name": "KAFKA",
+ "component_name": "KAFKA_BROKER"
+ }
+ ],
+ "values": [
+ {
+ "name": "Partitions count",
+ "value": "${kafka.server.ReplicaManager.PartitionCount._sum}"
+ },
+ {
+ "name": "Under Replicated Partitions",
+ "value": "${kafka.server.ReplicaManager.UnderReplicatedPartitions}"
+ },
+ {
+ "name": "Leader Count",
+ "value": "${kafka.server.ReplicaManager.LeaderCount._sum}"
+ }
+ ],
+ "properties": {
+ "graph_type": "LINE",
+ "time_range": "1"
+ }
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org
(ambari) 14/22: add kyuubi
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch eee
in repository https://gitbox.apache.org/repos/asf/ambari.git
commit 830b4d47f3609f3c11af8085e2936edcf9f77111
Author: jialiang <ji...@gmail.com>
AuthorDate: Sat Sep 7 10:59:35 2024 +0800
add kyuubi
---
.../BIGTOP/3.2.0/services/KYUUBI/alerts.json | 29 +++
.../KYUUBI/configuration/kyuubi-defaults.xml | 136 ++++++++++++++
.../services/KYUUBI/configuration/kyuubi-env.xml | 101 ++++++++++
.../configuration/kyuubi-log4j2-properties.xml | 86 +++++++++
.../BIGTOP/3.2.0/services/KYUUBI/kerberos.json | 76 ++++++++
.../BIGTOP/3.2.0/services/KYUUBI/metainfo.xml | 162 ++++++++++++++++
.../scripts/alerts/alert_kyuubi_server_port.py | 163 ++++++++++++++++
.../KYUUBI/package/scripts/kyuubi_client.py | 70 +++++++
.../KYUUBI/package/scripts/kyuubi_server.py | 115 ++++++++++++
.../services/KYUUBI/package/scripts/params.py | 181 ++++++++++++++++++
.../KYUUBI/package/scripts/service_check.py | 67 +++++++
.../services/KYUUBI/quicklinks/quicklinks.json | 21 +++
.../3.2.0/services/KYUUBI/role_command_order.json | 7 +
.../3.2.0/services/KYUUBI/service_advisor.py | 206 +++++++++++++++++++++
14 files changed, 1420 insertions(+)
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/alerts.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/alerts.json
new file mode 100755
index 0000000000..d09e83a490
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/alerts.json
@@ -0,0 +1,29 @@
+{
+ "KYUUBI": {
+ "service": [],
+ "KYUUBI_SEVER": [
+ {
+ "name": "kyuubi_server_status",
+ "label": "Kyuubi Server",
+ "description": "This host-level alert is triggered if the Kyuubi Server cannot be determined to be up.",
+ "interval": 1,
+ "scope": "ANY",
+ "source": {
+ "type": "SCRIPT",
+ "path": "BIGTOP/3.2.0/services/KYUUBI/package/scripts/alerts/alert_kyuubi_server_port.py",
+ "parameters": [
+ {
+ "name": "check.command.timeout",
+ "display_name": "Command Timeout",
+ "value": 120.0,
+ "type": "NUMERIC",
+ "description": "The maximum time before check command will be killed by timeout",
+ "units": "seconds",
+ "threshold": "CRITICAL"
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/configuration/kyuubi-defaults.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/configuration/kyuubi-defaults.xml
new file mode 100755
index 0000000000..2e9d776dac
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/configuration/kyuubi-defaults.xml
@@ -0,0 +1,136 @@
+<?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.
+ */
+-->
+<configuration supports_final="true">
+<!-- 会起端口冲突,不作为默认配置项-->
+<!-- <property>-->
+<!-- <name>kyuubi.frontend.rest.bind.port</name>-->
+<!-- <value>10099</value>-->
+<!-- <description>-->
+<!-- Port of the machine on which to run the REST frontend service.-->
+<!-- </description>-->
+<!-- <on-ambari-upgrade add="true"/>-->
+<!-- </property>-->
+<!-- <property>-->
+<!-- <name>kyuubi.frontend.thrift.binary.bind.port</name>-->
+<!-- <value>10009</value>-->
+<!-- <description>-->
+<!-- Port of the machine on which to run the thrift frontend service via binary protocol.-->
+<!-- </description>-->
+<!-- <on-ambari-upgrade add="true"/>-->
+<!-- </property>-->
+ <property>
+ <name>kyuubi.ha.zookeeper.session.timeout</name>
+ <value>600000</value>
+ <description>
+ The timeout(ms) of a connected session to be idled
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>kyuubi.session.engine.initialize.timeout</name>
+ <value>300000</value>
+ <description>
+ Timeout for starting the background engine, e.g. SparkSQLEngine.
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>kyuubi.authentication</name>
+ <value>{{kyuubi_authentication}}</value>
+ <description>
+ Client authentication types.
+NOSASL: raw transport.
+NONE: no authentication check.
+KERBEROS: Kerberos/GSSAPI authentication.
+LDAP: Lightweight Directory Access Protocol authentication.
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>spark.master</name>
+ <value>yarn</value>
+ <description>
+ The deploying mode of spark application.
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>spark.submit.deployMode</name>
+ <value>client</value>
+ <description>spark submit deploy mode</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>spark.yarn.queue</name>
+ <value>default</value>
+ <description>
+ The name of the YARN queue to which the application is submitted.
+ </description>
+ <depends-on>
+ <property>
+ <type>capacity-scheduler</type>
+ <name>yarn.scheduler.capacity.root.queues</name>
+ </property>
+ </depends-on>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>spark.yarn.driver.memory</name>
+ <value>1g</value>
+ <description>spark yarn driver momory</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>spark.executor.memory</name>
+ <value>1g</value>
+ <description>spark.executor.memory</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+
+ <property>
+ <name>kyuubi.ha.client.class</name>
+ <value>org.apache.kyuubi.ha.client.zookeeper.ZookeeperDiscoveryClient</value>
+ <description>Class name for service discovery client.
+Zookeeper: org.apache.kyuubi.ha.client.zookeeper.ZookeeperDiscoveryClient
+Etcd: org.apache.kyuubi.ha.client.etcd.EtcdDiscoveryClient</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>kyuubi.ha.addresses</name>
+ <value>{{cluster_zookeeper_quorum}}</value>
+ <description>The connection string for the discovery ensemble</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>kyuubi.ha.zookeeper.quorum</name>
+ <value>{{cluster_zookeeper_quorum}}</value>
+ <description>(deprecated) The connection string for the zookeeper ensemble</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+ <property>
+ <name>kyuubi.ha.namespace</name>
+ <value>kyuubi</value>
+ <description>The root directory for the service to deploy its instance uri</description>
+ <on-ambari-upgrade add="false"/>
+ </property>
+
+</configuration>
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/configuration/kyuubi-env.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/configuration/kyuubi-env.xml
new file mode 100755
index 0000000000..c8ddca945b
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/configuration/kyuubi-env.xml
@@ -0,0 +1,101 @@
+<?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>kyuubi_user</name>
+ <display-name>Kyuubi User</display-name>
+ <value>hive</value>
+ <property-type>USER</property-type>
+ <value-attributes>
+ <type>user</type>
+ <overridable>false</overridable>
+ <user-groups>
+ <property>
+ <type>cluster-env</type>
+ <name>user_group</name>
+ </property>
+ <property>
+ <type>kyuubi-env</type>
+ <name>kyuubi_group</name>
+ </property>
+ </user-groups>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>kyuubi_group</name>
+ <display-name>Kyuubi Group</display-name>
+ <value>hadoop</value>
+ <property-type>GROUP</property-type>
+ <description>kyuubi group</description>
+ <value-attributes>
+ <type>user</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>kyuubi_log_dir</name>
+ <display-name>Kyuubi Log directory</display-name>
+ <value>/var/log/kyuubi</value>
+ <description>Kyuubi Log Dir</description>
+ <value-attributes>
+ <type>directory</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>kyuubi_pid_dir</name>
+ <display-name>Kyuubi PID directory</display-name>
+ <value>/var/run/kyuubi</value>
+ <value-attributes>
+ <type>directory</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>kyuubi_spark_exetension_enabled</name>
+ <display-name>Enable Extensions for Spark</display-name>
+ <value>true</value>
+ <description> Z-Ordering Support,Auxiliary Optimization Rules,Auxiliary SQL Functions.</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <!-- kyuubi-env.sh -->
+ <property>
+ <name>content</name>
+ <description>This is the jinja template for kyuubi-env.sh file</description>
+ <value>
+#!/usr/bin/env bash
+
+export JAVA_HOME={{java_home}}
+export HADOOP_CONF_DIR=/etc/hadoop/conf
+export SPARK_HOME=/usr/bigtop/current/spark-client
+export SPARK_CONF_DIR=/etc/spark/conf
+export KYUUBI_LOG_DIR={{kyuubi_log_dir}}
+export KYUUBI_PID_DIR={{kyuubi_pid_dir}}
+ </value>
+ <value-attributes>
+ <type>content</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/configuration/kyuubi-log4j2-properties.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/configuration/kyuubi-log4j2-properties.xml
new file mode 100755
index 0000000000..f20a607778
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/configuration/kyuubi-log4j2-properties.xml
@@ -0,0 +1,86 @@
+<?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">
+ <!-- kyuubi-env.sh -->
+ <property>
+ <name>content</name>
+ <description>kyuubi-log4j2-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.
+#
+
+# Set everything to be logged to the file
+rootLogger.level = info
+rootLogger.appenderRef.stdout.ref = STDOUT
+
+# Console Appender
+appender.console.type = Console
+appender.console.name = STDOUT
+appender.console.target = SYSTEM_OUT
+appender.console.layout.type = PatternLayout
+appender.console.layout.pattern = %d{HH:mm:ss.SSS} %p %c: %m%n
+
+appender.console.filter.1.type = Filters
+
+appender.console.filter.1.a.type = ThresholdFilter
+appender.console.filter.1.a.level = info
+
+# SPARK-34128: Suppress undesirable TTransportException warnings, due to THRIFT-4805
+appender.console.filter.1.b.type = RegexFilter
+appender.console.filter.1.b.regex = .*Thrift error occurred during processing of message.*
+appender.console.filter.1.b.onMatch = deny
+appender.console.filter.1.b.onMismatch = neutral
+
+# Set the default kyuubi-ctl log level to WARN. When running the kyuubi-ctl, the
+# log level for this class is used to overwrite the root logger's log level.
+logger.ctl.name = org.apache.kyuubi.ctl.ServiceControlCli
+logger.ctl.level = error
+
+# Analysis MySQLFrontend protocol traffic
+# logger.mysql.name = org.apache.kyuubi.server.mysql.codec
+# logger.mysql.level = trace
+
+# Kyuubi BeeLine
+logger.beeline.name = org.apache.hive.beeline.KyuubiBeeLine
+logger.beeline.level = error
+
+ </value>
+ <value-attributes>
+ <type>content</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/kerberos.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/kerberos.json
new file mode 100755
index 0000000000..9235c59cf7
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/kerberos.json
@@ -0,0 +1,76 @@
+{
+ "services": [
+ {
+ "name": "KYUUBI",
+ "identities": [
+ {
+ "name": "kyuubi_smokeuser",
+ "reference": "/smokeuser"
+ },
+ {
+ "name": "kyuubiuser",
+ "principal": {
+ "value": "${kyuubi-env/kyuubi_user}${principal_suffix}@${realm}",
+ "type" : "user",
+ "local_username" : "${kyuubi-env/kyuubi_user}"
+ },
+ "keytab": {
+ "file": "${keytab_dir}/kyuubi.headless.keytab",
+ "owner": {
+ "name": "${kyuubi-env/kyuubi_user}",
+ "access": "r"
+ },
+ "group": {
+ "name": "${cluster-env/user_group}",
+ "access": ""
+ }
+ }
+ },
+ {
+ "name": "kyuubi_service_keytab",
+ "principal": {
+ "value": "kyuubi/_HOST@${realm}",
+ "type" : "service",
+ "configuration": "kyuubi-defaults/kyuubi.kinit.principal",
+ "local_username" : "${kyuubi-env/kyuubi_user}"
+ },
+ "keytab": {
+ "file": "${keytab_dir}/kyuubi.service.keytab",
+ "owner": {
+ "name": "${kyuubi-env/kyuubi_user}",
+ "access": "r"
+ },
+ "group": {
+ "name": "${cluster-env/user_group}",
+ "access": ""
+ },
+ "configuration": "kyuubi-defaults/kyuubi.kinit.keytab"
+ }
+ }
+ ],
+ "configurations": [
+ {
+ "kyuubi-defaults": {
+ "kyuubi.authentication": "KERBEROS",
+ "kyuubi.kinit.keytab": "${keytab_dir}/kyuubi.service.keytab",
+ "kyuubi.kinit.principal": "kyuubi/_HOST@${realm}",
+ "kyuubi.ha.zookeeper.acl.enabled": "true",
+ "kyuubi.ha.zookeeper.auth.keytab": "${keytab_dir}/kyuubi.service.keytab",
+ "kyuubi.ha.zookeeper.auth.principal": "kyuubi/_HOST@${realm}",
+ "kyuubi.ha.zookeeper.auth.type": "KERBEROS",
+ "kyuubi.ha.zookeeper.engine.auth.type": "KERBEROS"
+
+ }
+ }
+ ],
+ "components": [
+ {
+ "name": "KYUUBI_SERVER"
+ },
+ {
+ "name": "KYUUBI_CLIENT"
+ }
+ ]
+ }
+ ]
+}
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/metainfo.xml
new file mode 100755
index 0000000000..a92f390cee
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/metainfo.xml
@@ -0,0 +1,162 @@
+<?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>KYUUBI</name>
+ <displayName>Kyuubi</displayName>
+ <comment>AKyuubi is a distributed multi-tenant Thrift JDBC/ODBC server for large-scale data management, processing, and analytics, built on top of Apache Spark and designed to support more engines (i.e., Flink). </comment>
+ <version>1.8.1</version>
+ <components>
+ <component>
+ <name>KYUUBI_SERVER</name>
+ <displayName>Kyuubi Server</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>
+ <co-locate>HIVE/HIVE_SERVER</co-locate>
+ </auto-deploy>
+ </dependency>
+ <dependency>
+ <name>ZOOKEEPER/ZOOKEEPER_CLIENT</name>
+ <scope>host</scope>
+ <auto-deploy>
+ <enabled>true</enabled>
+ </auto-deploy>
+ </dependency>
+ <dependency>
+ <name>SPARK/SPARK_CLIENT</name>
+ <scope>host</scope>
+ <auto-deploy>
+ <enabled>true</enabled>
+ </auto-deploy>
+ </dependency>
+ </dependencies>
+ <commandScript>
+ <script>scripts/kyuubi_server.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>600</timeout>
+ </commandScript>
+ <configFiles>
+ <configFile>
+ <type>env</type>
+ <fileName>kyuubi-defaults.xml</fileName>
+ <dictionaryName>kyuubi-defaults</dictionaryName>
+ </configFile>
+ <configFile>
+ <type>env</type>
+ <fileName>kyuubi-env.xml</fileName>
+ <dictionaryName>kyuubi-env</dictionaryName>
+ </configFile>
+ <configFile>
+ <type>env</type>
+ <fileName>kyuubi-log4j2-properties.xml</fileName>
+ <dictionaryName>kyuubi-log4j2-properties</dictionaryName>
+ </configFile>
+ </configFiles>
+ <logs>
+ <log>
+ <logId>kyuubi_server</logId>
+ <primary>true</primary>
+ </log>
+ </logs>
+ </component>
+
+<!-- <component>-->
+<!-- <name>KYUUBI_CLIENT</name>-->
+<!-- <displayName>Kyuubi Client</displayName>-->
+<!-- <category>CLIENT</category>-->
+<!-- <cardinality>1+</cardinality>-->
+<!-- <versionAdvertised>true</versionAdvertised>-->
+<!-- <commandScript>-->
+<!-- <script>scripts/kyuubi_client.py</script>-->
+<!-- <scriptType>PYTHON</scriptType>-->
+<!-- </commandScript>-->
+<!-- <configFiles>-->
+<!-- <configFile>-->
+<!-- <type>env</type>-->
+<!-- <fileName>kyuubi-defaults.conf</fileName>-->
+<!-- <dictionaryName>kyuubi-defaults</dictionaryName>-->
+<!-- </configFile>-->
+<!-- <configFile>-->
+<!-- <type>env</type>-->
+<!-- <fileName>kyuubi-env.sh</fileName>-->
+<!-- <dictionaryName>kyuubi-env</dictionaryName>-->
+<!-- </configFile>-->
+<!-- </configFiles>-->
+<!-- </component>-->
+
+ </components>
+
+ <configuration-dependencies>
+ <config-type>kyuubi-defaults</config-type>
+ <config-type>kyuubi-env</config-type>
+ <config-type>kyuubi-log4j2-properties</config-type>
+ </configuration-dependencies>
+
+ <commandScript>
+ <script>scripts/service_check.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>300</timeout>
+ </commandScript>
+
+ <quickLinksConfigurations>
+ <quickLinksConfiguration>
+ <fileName>quicklinks.json</fileName>
+ <default>true</default>
+ </quickLinksConfiguration>
+ </quickLinksConfigurations>
+
+ <requiredServices>
+ <service>ZOOKEEPER</service>
+ <service>HDFS</service>
+ <service>YARN</service>
+ <service>HIVE</service>
+ <service>SPARK</service>
+ </requiredServices>
+
+ <osSpecifics>
+ <osSpecific>
+ <osFamily>redhat9,redhat8,redhat7,amazonlinux2,redhat6,suse11,suse12</osFamily>
+ <packages>
+ <package>
+ <name>kyuubi_${stack_version}</name>
+ </package>
+ </packages>
+ </osSpecific>
+ <osSpecific>
+ <osFamily>debian7,debian9,ubuntu12,ubuntu14,ubuntu16,ubuntu18</osFamily>
+ <packages>
+ <package>
+ <name>kyuubi_${stack_version}</name>
+ </package>
+ </packages>
+ </osSpecific>
+ </osSpecifics>
+
+ </service>
+ </services>
+</metainfo>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/package/scripts/alerts/alert_kyuubi_server_port.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/package/scripts/alerts/alert_kyuubi_server_port.py
new file mode 100755
index 0000000000..5e9aef04dc
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/package/scripts/alerts/alert_kyuubi_server_port.py
@@ -0,0 +1,163 @@
+"""
+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.
+
+//TODO: 有待实现
+alert_kyuubi_server_port.py的实现逻辑可以参考alert_spark_thrift_port.py,在此不列出具体实现逻辑,原理就是定时执行beeline连接操作判断是否可以连接成功。
+
+
+"""
+
+import os
+import socket
+import time
+import logging
+import traceback
+from resource_management.libraries.functions import format
+from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
+from resource_management.libraries.script.script import Script
+from resource_management.libraries.functions import get_kinit_path
+from resource_management.core.resources import Execute
+from resource_management.core import global_lock
+
+
+stack_root = Script.get_stack_root()
+
+OK_MESSAGE = "TCP OK - {0:.3f}s response on port {1}"
+CRITICAL_MESSAGE = "Connection failed on host {0}:{1} ({2})"
+
+KYUUBI_SERVER_THRIFT_PORT_KEY = '{{kyuubi-defaults/kyuubi.frontend.thrift.binary.bind.port}'
+
+SECURITY_ENABLED_KEY = '{{cluster-env/security_enabled}}'
+
+KYUUBI_SERVER_KERBEROS_KEYTAB = '{{kyuubi-defaults/kyuubi.kinit.keytab}}'
+KYUUBI_SERVER_PRINCIPAL_KEY = '{{kyuubi-defaults/kyuubi.kinit.principal}}'
+
+# The configured Kerberos executable search paths, if any
+KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY = '{{kerberos-env/executable_search_paths}}'
+
+THRIFT_PORT_DEFAULT = 10009
+KYUUBI_SERVER_TRANSPORT_MODE_DEFAULT = 'binary'
+
+KYUUBI_USER_KEY = '{{kyuubi-env/kyuubi_user}}'
+
+CHECK_COMMAND_TIMEOUT_KEY = 'check.command.timeout'
+CHECK_COMMAND_TIMEOUT_DEFAULT = 60.0
+
+logger = logging.getLogger('ambari_alerts')
+
+@OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT)
+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 (KYUUBI_SERVER_THRIFT_PORT_KEY, KYUUBI_SERVER_TRANSPORT_MODE_DEFAULT,
+ SECURITY_ENABLED_KEY, KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY, KYUUBI_USER_KEY,
+ KYUUBI_SERVER_KERBEROS_KEYTAB, KYUUBI_SERVER_PRINCIPAL_KEY )
+
+@OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT)
+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
+ """
+
+ kyuubi_home = os.path.join(stack_root, "current", 'kyuubi-client')
+
+ if configurations is None:
+ return ('UNKNOWN', ['There were no configurations supplied to the script.'])
+
+ transport_mode = KYUUBI_SERVER_TRANSPORT_MODE_DEFAULT
+ if KYUUBI_SERVER_TRANSPORT_MODE_DEFAULT in configurations:
+ transport_mode = configurations[KYUUBI_SERVER_TRANSPORT_MODE_DEFAULT]
+
+
+ port = THRIFT_PORT_DEFAULT
+ if transport_mode.lower() == 'binary' and KYUUBI_SERVER_THRIFT_PORT_KEY in configurations:
+ port = int(configurations[KYUUBI_SERVER_THRIFT_PORT_KEY])
+
+
+ security_enabled = False
+ if SECURITY_ENABLED_KEY in configurations:
+ security_enabled = str(configurations[SECURITY_ENABLED_KEY]).upper() == 'TRUE'
+
+ kyuubi_kerberos_keytab = None
+ if KYUUBI_SERVER_KERBEROS_KEYTAB in configurations:
+ kyuubi_kerberos_keytab = configurations[KYUUBI_SERVER_KERBEROS_KEYTAB]
+
+ if host_name is None:
+ host_name = socket.getfqdn()
+
+ kyuubi_principal = None
+ if KYUUBI_SERVER_PRINCIPAL_KEY in configurations:
+ kyuubi_principal = configurations[KYUUBI_SERVER_PRINCIPAL_KEY]
+ kyuubi_principal = kyuubi_principal.replace('_HOST',host_name.lower())
+
+ # Get the configured Kerberos executable search paths, if any
+ if KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY in configurations:
+ kerberos_executable_search_paths = configurations[KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY]
+ else:
+ kerberos_executable_search_paths = None
+
+ kinit_path_local = get_kinit_path(kerberos_executable_search_paths)
+
+ kyuubiuser = configurations[KYUUBI_USER_KEY]
+
+ if security_enabled:
+ kinitcmd = format("{kinit_path_local} -kt {kyuubi_kerberos_keytab} {kyuubi_principal}; ")
+ # prevent concurrent kinit
+ kinit_lock = global_lock.get_lock(global_lock.LOCK_TYPE_KERBEROS)
+ kinit_lock.acquire()
+ try:
+ Execute(kinitcmd, user=kyuubiuser)
+ finally:
+ kinit_lock.release()
+
+ result_code = None
+ try:
+ if host_name is None:
+ host_name = socket.getfqdn()
+
+ beeline_url = ["jdbc:hive2://{host_name}:{port}/default", "transportMode={transport_mode}"]
+ if security_enabled:
+ beeline_url.append("principal={kyuubi_principal}")
+
+ # append url according to used transport
+
+ beeline_cmd = os.path.join(kyuubi_home, "bin", "beeline")
+ cmd = "! %s -u '%s' -e '' 2>&1| awk '{print}'|grep -i -e 'Connection refused' -e 'Invalid URL' -e 'Error: Could not open'" % \
+ (beeline_cmd, format(";".join(beeline_url)))
+
+ start_time = time.time()
+ try:
+ Execute(cmd, user=kyuubiuser, path=[beeline_cmd], timeout=CHECK_COMMAND_TIMEOUT_DEFAULT)
+ total_time = time.time() - start_time
+ result_code = 'OK'
+ label = OK_MESSAGE.format(total_time, port)
+ except:
+ result_code = 'CRITICAL'
+ label = CRITICAL_MESSAGE.format(host_name, port, traceback.format_exc())
+ except:
+ label = traceback.format_exc()
+ result_code = 'UNKNOWN'
+
+ return (result_code, [label])
+
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/package/scripts/kyuubi_client.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/package/scripts/kyuubi_client.py
new file mode 100755
index 0000000000..60d17141aa
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/package/scripts/kyuubi_client.py
@@ -0,0 +1,70 @@
+#!/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.
+
+"""
+
+# Python Imports
+import sys
+import os
+from resource_management import *
+
+
+class KyuubiClient(Script):
+ def install(self, env):
+ import params
+ self.install_packages(env)
+ self.configure(env)
+
+ def status(self, env):
+ raise ClientComponentHasNoStatus()
+
+ def configure(self, env):
+ import params
+ env.set_params(params)
+
+ Directory([params.kyuubi_log_dir, params.kyuubi_pid_dir, params.kyuubi_work_dir, params.kyuubi_metrics_dir, params.kyuubi_operation_log_dir],
+ #Directory([params.kyuubi_log_dir, params.kyuubi_pid_dir, params.kyuubi_operation_log_dir],
+ owner=params.kyuubi_user,
+ group=params.kyuubi_group,
+ mode=0o775,
+ create_parents = True
+ )
+
+ kyuubi_defaults = dict(params.config['configurations']['kyuubi-defaults'])
+
+ PropertiesFile(format("{kyuubi_conf_dir}/kyuubi-defaults.conf"),
+ properties = kyuubi_defaults,
+ key_value_delimiter = " ",
+ owner=params.kyuubi_user,
+ group=params.kyuubi_group,
+ mode=0o644
+ )
+
+ # create kyuubi-env.sh in kyuubi install dir
+ File(os.path.join(params.kyuubi_conf_dir, 'kyuubi-env.sh'),
+ owner=params.kyuubi_user,
+ group=params.kyuubi_group,
+ content=InlineTemplate(params.kyuubi_env_sh),
+ mode=0o644,
+ )
+
+
+
+
+if __name__ == "__main__":
+ KyuubiClient().execute()
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/package/scripts/kyuubi_server.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/package/scripts/kyuubi_server.py
new file mode 100755
index 0000000000..a3b63a0802
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/package/scripts/kyuubi_server.py
@@ -0,0 +1,115 @@
+#!/usr/bin/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 import *
+
+class KyuubiServer(Script):
+ def install(self, env):
+ self.install_packages(env)
+
+ def configure(self, env, upgrade_type=None, config_dir=None):
+ import params
+ env.set_params(params)
+
+
+ Directory([params.kyuubi_log_dir, params.kyuubi_pid_dir, params.kyuubi_work_dir, params.kyuubi_metrics_dir, params.kyuubi_operation_log_dir],
+ owner=params.kyuubi_user,
+ group=params.kyuubi_group,
+ mode=0o775,
+ create_parents = True
+ )
+
+ Directory(params.kyuubi_home,
+ owner=params.kyuubi_user,
+ group=params.kyuubi_group,
+ mode=0o775
+ )
+
+ kyuubi_defaults = dict(params.config['configurations']['kyuubi-defaults'])
+
+ PropertiesFile(format("{kyuubi_conf_dir}/kyuubi-defaults.conf"),
+ properties = kyuubi_defaults,
+ key_value_delimiter = " ",
+ owner=params.kyuubi_user,
+ group=params.kyuubi_group,
+ mode=0o644
+ )
+
+ # create kyuubi-env.sh in kyuubi install dir
+ File(os.path.join(params.kyuubi_conf_dir, 'kyuubi-env.sh'),
+ owner=params.kyuubi_user,
+ group=params.kyuubi_group,
+ content=InlineTemplate(params.kyuubi_env_sh),
+ mode=0o644,
+ )
+
+ #create log4j2.properties kyuubi install dir
+ File(os.path.join(params.kyuubi_conf_dir, 'log4j2.properties'),
+ owner=params.kyuubi_user,
+ group=params.kyuubi_group,
+ content=InlineTemplate(params.kyuubi_log4j2_properties),
+ mode=0o644,
+ )
+ # work dir
+ Directory(os.path.join(params.kyuubi_pid_dir, 'work'),
+ owner=params.kyuubi_user,
+ group=params.kyuubi_group,
+ mode=0o775,
+ create_parents = True
+ )
+
+ # hdfs dir
+ params.HdfsResource(params.kyuubi_hdfs_user_dir,
+ type="directory",
+ action="create_on_execute",
+ owner=params.kyuubi_user,
+ mode=0o775
+ )
+
+ def start(self, env, upgrade_type=None):
+ import params
+ env.set_params(params)
+
+ self.configure(env)
+ Execute(params.kyuubi_start_cmd,user=params.kyuubi_user,environment={'JAVA_HOME': params.java_home})
+
+ def stop(self, env, upgrade_type=None):
+ import params
+ env.set_params(params)
+ self.configure(env)
+
+ Execute(params.kyuubi_stop_cmd,user=params.kyuubi_user,environment={'JAVA_HOME': params.java_home})
+
+ def status(self, env):
+ import params
+ env.set_params(params)
+ check_process_status(params.kyuubi_pid_file)
+
+ def get_user(self):
+ import params
+ return params.kyuubi_user
+
+ def get_pid_files(self):
+ import params
+ return [params.kyuubi_pid_file]
+
+if __name__ == "__main__":
+ KyuubiServer().execute()
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/package/scripts/params.py
new file mode 100755
index 0000000000..45b1758095
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/package/scripts/params.py
@@ -0,0 +1,181 @@
+#!/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 socket
+import os
+from urllib.parse import urlparse
+
+from ambari_commons.constants import AMBARI_SUDO_BINARY
+from resource_management import *
+from resource_management.libraries.functions.stack_features import check_stack_feature
+from resource_management.libraries.functions.constants import StackFeature
+from resource_management.libraries.functions import conf_select, stack_select
+from resource_management.libraries.functions.version import format_stack_version, get_major_version
+from resource_management.libraries.functions.copy_tarball import get_sysprep_skip_copy_tarballs_hdfs
+from resource_management.libraries.functions.format import format
+from resource_management.libraries.functions.default import default
+from resource_management.libraries.functions import get_kinit_path
+from resource_management.libraries.functions.get_not_managed_resources import get_not_managed_resources
+from resource_management.libraries.resources.hdfs_resource import HdfsResource
+from resource_management.libraries.script.script import Script
+from ambari_commons.constants import AMBARI_SUDO_BINARY
+from resource_management.libraries.functions.copy_tarball import get_current_version
+from resource_management.libraries.functions.stack_features import check_stack_feature, get_stack_feature_version
+from resource_management.libraries.functions import StackFeature
+
+config = Script.get_config()
+
+java_home = config['ambariLevelParams']['java_home']
+stack_root = Script.get_stack_root()
+
+config = Script.get_config()
+tmp_dir = Script.get_tmp_dir()
+sudo = AMBARI_SUDO_BINARY
+fqdn = socket.getfqdn().lower()
+
+retryAble = default("/commandParams/command_retry_enabled", False)
+
+cluster_name = config['clusterName']
+stack_name = default("/clusterLevelParams/stack_name", None)
+stack_root = Script.get_stack_root()
+#3.2
+stack_version_unformatted = config['clusterLevelParams']['stack_version']
+#3.2.0.0
+stack_version_formatted = format_stack_version(stack_version_unformatted)
+#3.2
+major_stack_version = get_major_version(stack_version_formatted)
+
+#3.2.1.0-001
+effective_version = get_current_version(service="SPARK")
+
+sysprep_skip_copy_tarballs_hdfs = get_sysprep_skip_copy_tarballs_hdfs()
+
+# New Cluster Stack Version that is defined during the RESTART of a Stack Upgrade
+version = default("/commandParams/version", None)
+
+hadoop_conf_dir = conf_select.get_hadoop_conf_dir()
+hadoop_bin_dir = stack_select.get_hadoop_dir("bin")
+
+if stack_version_formatted and check_stack_feature(StackFeature.ROLLING_UPGRADE, stack_version_formatted):
+ hadoop_home = stack_select.get_hadoop_dir("home")
+
+
+component_directory = "kyuubi-server"
+kyuubi_home = format("{stack_root}/current/{component_directory}")
+kyuubi_conf_dir = format("{stack_root}/current/{component_directory}/conf")
+
+hdfs_user = config['configurations']['hadoop-env']['hdfs_user']
+hdfs_principal_name = config['configurations']['hadoop-env']['hdfs_principal_name']
+hdfs_user_keytab = config['configurations']['hadoop-env']['hdfs_user_keytab']
+user_group = config['configurations']['cluster-env']['user_group']
+
+kyuubi_user = config['configurations']['kyuubi-env']['kyuubi_user']
+kyuubi_group = config['configurations']['kyuubi-env']['kyuubi_group']
+kyuubi_pid_dir = config['configurations']['kyuubi-env']['kyuubi_pid_dir']
+kyuubi_log_dir = config['configurations']['kyuubi-env']['kyuubi_log_dir']
+kyuubi_work_dir = format("{kyuubi_home}/work")
+kyuubi_pid_file = format("{kyuubi_pid_dir}/kyuubi-{kyuubi_user}-org.apache.kyuubi.server.KyuubiServer.pid")
+
+kyuubi_metrics_dir= format("{stack_root}/current/{component_directory}/work/metrics")
+kyuubi_operation_log_dir= format("{stack_root}/current/{component_directory}/work/server_operation_logs")
+
+kyuubi_env_sh = config['configurations']['kyuubi-env']['content']
+kyuubi_log4j2_properties = config['configurations']['kyuubi-log4j2-properties']['content']
+
+kyuubi_hdfs_user_dir = format("/user/{kyuubi_user}")
+
+kyuubi_start_cmd = format("{kyuubi_home}/bin/kyuubi start")
+kyuubi_stop_cmd = format("{kyuubi_home}/bin/kyuubi stop")
+
+# zookeeper
+zookeeper_hosts = config['clusterHostInfo']['zookeeper_server_hosts']
+zookeeper_port = default('/configurations/zoo.cfg/clientPort', None)
+
+# get comma separated lists of zookeeper hosts from clusterHostInfo
+index = 0
+zookeeper_quorum = ""
+for host in zookeeper_hosts:
+ zookeeper_host = host
+ if zookeeper_port is not None:
+ zookeeper_host = host + ":" + str(zookeeper_port)
+
+ zookeeper_quorum += zookeeper_host
+ index += 1
+ if index < len(zookeeper_hosts):
+ zookeeper_quorum += ","
+
+cluster_zookeeper_quorum = zookeeper_quorum
+
+
+
+
+#kyuubi_server_port
+kyuubi_server_port = config['configurations']['kyuubi-defaults']['kyuubi.frontend.thrift.binary.bind.port']
+
+#kyuubi_client_home = format("{stack_root}/current/kyuubi-client")
+#kyuubi_client_conf_dir = format("{stack_root}/current/kyuubi-client/conf")
+
+smoke_user = config['configurations']['cluster-env']['smokeuser']
+
+kyuubi_server_hosts = default("/clusterHostInfo/kyuubi_server_hosts", [])
+has_kyuubi_server = not len(kyuubi_server_hosts) == 0
+
+
+kyuubi_authentication = "NONE"
+
+kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None))
+kyuubi_kerberos_keytab = config['configurations']['kyuubi-defaults']['kyuubi.kinit.keytab']
+kyuubi_kerberos_principal = config['configurations']['kyuubi-defaults']['kyuubi.kinit.principal']
+smoke_user_keytab = config['configurations']['cluster-env']['smokeuser_keytab']
+smokeuser_principal = config['configurations']['cluster-env']['smokeuser_principal_name']
+hive_kerberos_keytab = config['configurations']['hive-site']['hive.server2.authentication.kerberos.keytab']
+
+security_enabled = default("/configurations/cluster-env/security_enabled", None)
+#kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None))
+
+if security_enabled:
+ kyuubi_authentication = "KERBEROS"
+ hive_kerberos_principal = config['configurations']['hive-site']['hive.server2.authentication.kerberos.principal'].replace('_HOST', socket.getfqdn().lower())
+
+#for create_hdfs_directory
+default_fs = config['configurations']['core-site']['fs.defaultFS']
+hdfs_site = config['configurations']['hdfs-site']
+hdfs_resource_ignore_file = "/var/lib/ambari-agent/data/.hdfs_resource_ignore"
+
+dfs_type = default("/clusterLevelParams/dfs_type", "")
+
+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 = hdfs_resource_ignore_file,
+ 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(),
+ dfs_type = dfs_type
+)
+
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/package/scripts/service_check.py
new file mode 100755
index 0000000000..cf7adfac8b
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/package/scripts/service_check.py
@@ -0,0 +1,67 @@
+"""
+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 agree 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 subprocess
+import time
+import os
+
+from resource_management.core.exceptions import Fail
+from resource_management.libraries.script.script import Script
+from resource_management.libraries.functions.format import format
+from resource_management.core.resources.system import Execute
+from resource_management.core.logger import Logger
+
+
+CHECK_COMMAND_TIMEOUT_DEFAULT = 300.0
+
+class KyuubiServiceCheck(Script):
+ def service_check(self, env):
+ import params
+ env.set_params(params)
+
+ if params.security_enabled:
+ #kyuubi_kinit_cmd = format("{kinit_path_local} -kt {smoke_user_keytab} {smokeuser_principal}; ")
+ kyuubi_kinit_cmd = format("{kinit_path_local} -kt {hive_kerberos_keytab} {hive_kerberos_principal}; ")
+ Execute(kyuubi_kinit_cmd, user=params.smoke_user)
+
+
+ if params.has_kyuubi_server:
+ healthy_kyuubi_host = ""
+ for kyuubi_host in params.kyuubi_server_hosts:
+ if params.security_enabled:
+ kerberos_principal = params.kyuubi_kerberos_principal.replace('_HOST', kyuubi_host)
+ beeline_url = ["jdbc:hive2://{kyuubi_host}:{kyuubi_server_port}/default;principal={kerberos_principal}"]
+ else:
+ beeline_url = ["jdbc:hive2://{kyuubi_host}:{kyuubi_server_port}/default"]
+
+ beeline_cmd = os.path.join(params.kyuubi_home, "bin", "beeline")
+ cmd = "! %s -u '%s' -n hive -e '' 2>&1| awk '{print}'|grep -i -e 'Connection refused' -e 'Invalid URL' -e 'Error: Could not open'" % \
+ (beeline_cmd, format(";".join(beeline_url)))
+
+ try:
+ Execute(cmd, user=params.smoke_user, path=[beeline_cmd], timeout=CHECK_COMMAND_TIMEOUT_DEFAULT)
+ healthy_kyuubi_host = kyuubi_host
+ break
+ except:
+ pass
+
+ if len(params.kyuubi_server_hosts) > 0 and healthy_kyuubi_host == "":
+ raise Fail("Connection to all Kyuubi servers failed.")
+
+if __name__ == "__main__":
+ KyuubiServiceCheck().execute()
+
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/quicklinks/quicklinks.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/quicklinks/quicklinks.json
new file mode 100755
index 0000000000..c56b74e064
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/quicklinks/quicklinks.json
@@ -0,0 +1,21 @@
+{
+ "name": "default",
+ "description": "default quick links configuration",
+ "configuration": {
+ "links": [
+ {
+ "name": "Kyuubi_WEB_UI",
+ "label": "Kyuubi Web UI",
+ "requires_user_name": "false",
+ "component_name": "KYUUBI_SERVER",
+ "url":"%@://%@:%@",
+ "port":{
+ "http_property": "kyuubi.frontend.rest.bind.port",
+ "http_default_port": "10099",
+ "regex": "^(\\d+)$",
+ "site": "kyuubi-defaults"
+ }
+ }
+ ]
+ }
+}
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/role_command_order.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/role_command_order.json
new file mode 100755
index 0000000000..f54046c06a
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/role_command_order.json
@@ -0,0 +1,7 @@
+{
+ "general_deps" : {
+ "_comment" : "dependencies for KYUUBI",
+ "KYUUBI_SERVICE_CHECK-SERVICE_CHECK" : ["KYUUBI_SERVER-START"],
+ "KYUUBI_SERVER-START" : ["ZOOKEEPER_SERVER-START", "NAMENODE-START","SECONDARY_NAMENODE-START", "DATANODE-START", "RESOURCEMANAGER-START", "NODEMANAGER-START", "HIVE_METASTORE-START", "SPARK_JOBHISTORYSERVER-START"]
+ }
+}
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/service_advisor.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/service_advisor.py
new file mode 100755
index 0000000000..429981fe0c
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KYUUBI/service_advisor.py
@@ -0,0 +1,206 @@
+#!/usr/bin/env ambari-python-wrap
+"""
+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.
+"""
+
+# Python imports
+from ast import Param
+import imp
+import os
+import traceback
+import re
+import socket
+import fnmatch
+
+
+from resource_management.core.logger import Logger
+
+SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
+STACKS_DIR = os.path.join(SCRIPT_DIR, '../../../../../stacks/')
+PARENT_FILE = os.path.join(STACKS_DIR, 'service_advisor.py')
+
+try:
+ if "BASE_SERVICE_ADVISOR" in os.environ:
+ PARENT_FILE = os.environ["BASE_SERVICE_ADVISOR"]
+ with open(PARENT_FILE, 'rb') as fp:
+ service_advisor = imp.load_module('service_advisor', fp, PARENT_FILE, ('.py', 'rb', imp.PY_SOURCE))
+except Exception as e:
+ traceback.print_exc()
+ print "Failed to load parent"
+
+
+DB_TYPE_DEFAULT_PORT_MAP = {"MYSQL":"3306", "ORACLE":"1521", "POSTGRES":"5432", "MSSQL":"1433", "SQLA":"2638"}
+
+class KyuubiServiceAdvisor(service_advisor.ServiceAdvisor):
+
+ def __init__(self, *args, **kwargs):
+ self.as_super = super(KyuubiServiceAdvisor, self)
+ self.as_super.__init__(*args, **kwargs)
+
+ # Always call these methods
+ self.modifyMastersWithMultipleInstances()
+ self.modifyCardinalitiesDict()
+ self.modifyHeapSizeProperties()
+ self.modifyNotValuableComponents()
+ self.modifyComponentsNotPreferableOnServer()
+ self.modifyComponentLayoutSchemes()
+
+ def modifyMastersWithMultipleInstances(self):
+ """
+ Modify the set of masters with multiple instances.
+ Must be overriden in child class.
+ """
+ # Nothing to do
+ pass
+
+ def modifyCardinalitiesDict(self):
+ """
+ Modify the dictionary of cardinalities.
+ Must be overriden in child class.
+ """
+ # Nothing to do
+ pass
+
+ def modifyHeapSizeProperties(self):
+ """
+ Modify the dictionary of heap size properties.
+ Must be overriden in child class.
+ """
+ pass
+
+ def modifyNotValuableComponents(self):
+ """
+ Modify the set of components whose host assignment is based on other services.
+ Must be overriden in child class.
+ """
+ # Nothing to do
+ pass
+
+ def modifyComponentsNotPreferableOnServer(self):
+ """
+ Modify the set of components that are not preferable on the server.
+ Must be overriden in child class.
+ """
+ # Nothing to do
+ pass
+
+ def modifyComponentLayoutSchemes(self):
+ """
+ Modify layout scheme dictionaries for components.
+ The scheme dictionary basically maps the number of hosts to
+ host index where component should exist.
+ Must be overriden in child class.
+ """
+
+ # Nothing to do
+ pass
+
+
+ def getServiceComponentLayoutValidations(self, services, hosts):
+ """
+ Get a list of errors.
+ Must be overriden in child class.
+ """
+
+ return self.getServiceComponentCardinalityValidations(services, hosts, "KYUUBI")
+
+ def getServiceConfigurationRecommendations(self, configurations, clusterData, services, hosts):
+ """
+ Entry point.
+ Must be overriden in child class.
+ """
+ # Logger.info("Class: %s, Method: %s. Recommending Service Configurations." %
+ # (self.__class__.__name__, inspect.stack()[0][3]))
+
+ recommender = KyuubiRecommender()
+ recommender.recommendKyuubiConfigurationsFromHDP33(configurations, clusterData, services, hosts)
+
+
+ # def getServiceConfigurationRecommendationsForSSO(self, configurations, clusterData, services, hosts):
+ # """
+ # Entry point.
+ # Must be overriden in child class.
+ # """
+ # recommender = KyuubiRecommender()
+ # recommender.recommendConfigurationsForSSO(configurations, clusterData, services, hosts)
+
+ def getServiceConfigurationsValidationItems(self, configurations, recommendedDefaults, services, hosts):
+ """
+ Entry point.
+ Validate configurations for the service. Return a list of errors.
+ The code for this function should be the same for each Service Advisor.
+ """
+ # Logger.info("Class: %s, Method: %s. Validating Configurations." %
+ # (self.__class__.__name__, inspect.stack()[0][3]))
+
+ return []
+
+ @staticmethod
+ def isKerberosEnabled(services, configurations):
+ """
+ Determines if security is enabled by testing the value of core-site/hadoop.security.authentication enabled.
+ If the property exists and is equal to "kerberos", then is it enabled; otherwise is it assumed to be
+ disabled.
+
+ :type services: dict
+ :param services: the dictionary containing the existing configuration values
+ :type configurations: dict
+ :param configurations: the dictionary containing the updated configuration values
+ :rtype: bool
+ :return: True or False
+ """
+ if configurations and "core-site" in configurations and \
+ "hadoop.security.authentication" in configurations["core-site"]["properties"]:
+ return configurations["core-site"]["properties"]["hadoop.security.authentication"].lower() == "kerberos"
+ elif services and "core-site" in services["configurations"] and \
+ "hadoop.security.authentication" in services["configurations"]["core-site"]["properties"]:
+ return services["configurations"]["core-site"]["properties"]["hadoop.security.authentication"].lower() == "kerberos"
+ else:
+ return False
+
+
+class KyuubiRecommender(service_advisor.ServiceAdvisor):
+ """
+ Kyuubi Recommender suggests properties when adding the service for the first time or modifying configs via the UI.
+ """
+
+ def __init__(self, *args, **kwargs):
+ self.as_super = super(KyuubiRecommender, self)
+ self.as_super.__init__(*args, **kwargs)
+
+ def recommendKyuubiConfigurationsFromHDP33(self, configurations, clusterData, services, hosts):
+ """
+ Recommend configurations for this service based on HDP 3.3.
+ """
+
+ putKyuubiDefaultsProperty = self.putProperty(configurations, "kyuubi-defaults", services)
+ putKyuubiDefaultsPropertyAttribute = self.putPropertyAttribute(configurations, "kyuubi-defaults")
+
+ zookeeper_host_port = self.getZKHostPortString(services)
+ putKyuubiDefaultsProperty("kyuubi.ha.zookeeper.quorum", zookeeper_host_port)
+ putKyuubiDefaultsProperty("kyuubi.ha.addresses", zookeeper_host_port)
+ putKyuubiDefaultsProperty("kyuubi.ha.client.class", 'org.apache.kyuubi.ha.client.zookeeper.ZookeeperDiscoveryClient')
+
+
+
+
+
+
+
+
+
+
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org
(ambari) 16/22: add dinky
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch eee
in repository https://gitbox.apache.org/repos/asf/ambari.git
commit e30687f875291c8548926091d0f1645e742060b6
Author: jialiang <ji...@gmail.com>
AuthorDate: Sat Sep 7 11:02:14 2024 +0800
add dinky
---
.../stacks/BIGTOP/3.2.0/services/DINKY/alerts.json | 32 ++++
.../configuration/dinky-application-server.xml | 141 +++++++++++++++
.../services/DINKY/configuration/dinky-env.xml | 74 ++++++++
.../BIGTOP/3.2.0/services/DINKY/metainfo.xml | 99 +++++++++++
.../services/DINKY/package/scripts/dinky_env.py | 70 ++++++++
.../services/DINKY/package/scripts/dinky_server.py | 89 ++++++++++
.../3.2.0/services/DINKY/package/scripts/params.py | 108 ++++++++++++
.../DINKY/package/scripts/service_check.py | 32 ++++
.../package/templates/application-mysql.yml.j2 | 24 +++
.../package/templates/application-pgsql.yml.j2 | 23 +++
.../DINKY/package/templates/application.yml.j2 | 153 ++++++++++++++++
.../services/DINKY/package/templates/auto.sh.j2 | 148 ++++++++++++++++
.../services/DINKY/quicklinks/quicklinks.json | 26 +++
.../BIGTOP/3.2.0/services/DINKY/service_advisor.py | 196 +++++++++++++++++++++
14 files changed, 1215 insertions(+)
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/alerts.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/alerts.json
new file mode 100644
index 0000000000..7ddefb6d23
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/alerts.json
@@ -0,0 +1,32 @@
+{
+ "DINKY": {
+ "service": [],
+ "DINKY_SERVER": [
+ {
+ "name": "dinky_server_port_check",
+ "label": "dinky_server_port_check",
+ "description": "dinky_server_port_check.",
+ "interval": 10,
+ "scope": "ANY",
+ "source": {
+ "type": "PORT",
+ "uri": "{{dinky-application-server/server.port}}",
+ "default_port": 8888,
+ "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
+ }
+ }
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/configuration/dinky-application-server.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/configuration/dinky-application-server.xml
new file mode 100644
index 0000000000..79d78049bd
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/configuration/dinky-application-server.xml
@@ -0,0 +1,141 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+# -*- coding: utf-8 -*-
+#
+# Licensed 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>
+ <!-- server port -->
+ <property require-input="true">
+ <name>server.port</name>
+ <value>8888</value>
+ <property-type>
+ <type>PORT</type>
+ <default-port>8888</default-port>
+ </property-type>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <!-- flink big version -->
+ <property require-input="true">
+ <name>flink.big.version</name>
+ <value>1.17</value>
+ <description>
+ en: The version of flink big version such as: 1.18, 1.17, 1.16, 1.15, 1.14
+ Note: The version of flink big version must be consistent with the version of flink big version installed on
+ the cluster.
+ |
+ zh: Flink大版本号,如:1.18, 1.17, 1.16, 1.15, 1.14
+ 注意:Flink大版本号必须与集群上安装的Flink大版本号保持一致。
+ </description>
+ <value-attributes>
+ <type>value-list</type>
+ <entries>
+ <entry>
+ <value>1.14</value>
+ </entry>
+ <entry>
+ <value>1.15</value>
+ </entry>
+ <entry>
+ <value>1.16</value>
+ </entry>
+ <entry>
+ <value>1.17</value>
+ </entry>
+ </entries>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <!-- 数据库类型 -->
+ <property require-input="true">
+ <name>spring.profiles.active</name>
+ <value>mysql</value>
+ <description>
+ en: The type of database to use. Valid values are mysql, postgresql , you must input the mysql/postgresql
+ information.| zh: 数据库类型,可选值为mysql, postgresql,必须输入mysql/postgresql的信息。
+ </description>
+ <value-attributes>
+ <type>value-list</type>
+ <entries>
+ <entry>
+ <value>mysql</value>
+ <description>
+ en: mysql database | zh: mysql数据库
+ </description>
+ </entry>
+ <entry>
+ <value>pgsql</value>
+ <description>
+ en: postgresql database | zh: postgresql数据库
+ </description>
+ </entry>
+ </entries>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <!-- 数据库主机 -->
+ <property require-input="true">
+ <name>spring.datasource.database.host</name>
+ <value>127.0.0.1</value>
+ <description>
+ en: DataBase host ip/hostname | zh: 数据库主机ip/主机名
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <!-- 数据库端口 -->
+ <property require-input="true">
+ <name>spring.datasource.database.port</name>
+ <value>3306</value>
+ <description>
+ en: DataBase port | zh: 数据库端口
+ </description>
+ <property-type>PORT</property-type>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <!-- 数据库名称 -->
+ <property require-input="true">
+ <name>spring.datasource.database.name</name>
+ <value>dinky</value>
+ <description>
+ en: DataBase Name | zh: 数据库名称
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <!-- 数据库用户名 -->
+ <property require-input="true">
+ <name>spring.datasource.database.username</name>
+ <value>dinky</value>
+ <description>
+ en: DataBase UserName | zh: 数据库用户名
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <!-- 数据库密码 -->
+ <property require-input="true">
+ <name>spring.datasource.database.password</name>
+ <value>dinky1234!2</value>
+ <description>
+ en: DataBase Password | zh: 数据库密码
+ </description>
+ <property-type>PASSWORD</property-type>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/configuration/dinky-env.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/configuration/dinky-env.xml
new file mode 100755
index 0000000000..4279e8d9bc
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/configuration/dinky-env.xml
@@ -0,0 +1,74 @@
+<?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>dinky_user</name>
+ <display-name>Dinky User</display-name>
+ <value>dinky</value>
+ <property-type>USER</property-type>
+ <value-attributes>
+ <type>user</type>
+ <overridable>false</overridable>
+ <user-groups>
+ <property>
+ <type>cluster-env</type>
+ <name>user_group</name>
+ </property>
+ <property>
+ <type>dinky-env</type>
+ <name>dinky_group</name>
+ </property>
+ </user-groups>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>dinky_group</name>
+ <display-name>Dinky Group</display-name>
+ <value>hadoop</value>
+ <property-type>GROUP</property-type>
+ <description>dinky group</description>
+ <value-attributes>
+ <type>user</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>dinky_log_dir</name>
+ <display-name>Dinky Log directory</display-name>
+ <value>/var/log/dinky</value>
+ <description>Dinky Log Dir</description>
+ <value-attributes>
+ <type>directory</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>dinky_pid_dir</name>
+ <display-name>Dinky PID directory</display-name>
+ <value>/var/run/dinky</value>
+ <value-attributes>
+ <type>directory</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/metainfo.xml
new file mode 100644
index 0000000000..3167565f2e
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/metainfo.xml
@@ -0,0 +1,99 @@
+<?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>DINKY</name>
+ <displayName>Dinky</displayName>
+ <comment>Dinky is a distributed multi-tenant Thrift JDBC/ODBC server for large-scale data management, processing, and analytics, built on top of Apache Spark and designed to support more engines (i.e., Flink). </comment>
+ <version>1.0.0</version>
+ <components>
+ <component>
+ <name>DINKY_SERVER</name>
+ <displayName>Dinky Server</displayName>
+ <category>MASTER</category>
+ <cardinality>1</cardinality>
+ <versionAdvertised>true</versionAdvertised>
+ <commandScript>
+ <script>scripts/dinky_server.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>600</timeout>
+ </commandScript>
+ <configFiles>
+ <configFile>
+ <type>env</type>
+ <fileName>dinky-application-server.xml</fileName>
+ <dictionaryName>dinky-defaults</dictionaryName>
+ </configFile>
+ <configFile>
+ <type>env</type>
+ <fileName>dinky-env.xml</fileName>
+ <dictionaryName>dinky-env</dictionaryName>
+ </configFile>
+ </configFiles>
+ <logs>
+ <log>
+ <logId>dinky_server</logId>
+ <primary>true</primary>
+ </log>
+ </logs>
+ </component>
+ </components>
+
+ <configuration-dependencies>
+ <config-type>dinky-application-server</config-type>
+ <config-type>dinky-env</config-type>
+ </configuration-dependencies>
+
+ <quickLinksConfigurations>
+ <quickLinksConfiguration>
+ <fileName>quicklinks.json</fileName>
+ <default>true</default>
+ </quickLinksConfiguration>
+ </quickLinksConfigurations>
+
+ <commandScript>
+ <script>scripts/service_check.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>300</timeout>
+ </commandScript>
+
+ <osSpecifics>
+ <osSpecific>
+ <osFamily>redhat9,redhat8,redhat7,amazonlinux2,redhat6,suse11,suse12</osFamily>
+ <packages>
+ <package>
+ <name>dinky_${stack_version}</name>
+ </package>
+ </packages>
+ </osSpecific>
+ <osSpecific>
+ <osFamily>debian7,debian9,ubuntu12,ubuntu14,ubuntu16,ubuntu18</osFamily>
+ <packages>
+ <package>
+ <name>dinky_${stack_version}</name>
+ </package>
+ </packages>
+ </osSpecific>
+ </osSpecifics>
+
+ </service>
+ </services>
+</metainfo>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/package/scripts/dinky_env.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/package/scripts/dinky_env.py
new file mode 100644
index 0000000000..6e1ece7055
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/package/scripts/dinky_env.py
@@ -0,0 +1,70 @@
+"""
+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 *
+import os
+
+def dinky_env():
+ import params # import 导入params.py文件
+ # User(params.dinky_user, action="create", groups=params.dinky_group
+ # , ignore_already_exists=True # 忽略已经存在
+ # ) # 创建用户
+
+ Directory([params.dinky_log_dir, params.dinky_pid_dir],
+ owner=params.dinky_user,
+ group=params.dinky_group,
+ mode=0o775,
+ create_parents = True
+ )
+
+
+ ## 重写 启动脚本 auto.sh 文件
+ File(os.path.join(params.dinky_bin_dir, params.start_script_name),
+ mode=0o755,
+ content=Template(params.start_script_template_file),
+ owner=params.dinky_user,
+ group=params.dinky_group
+ )
+
+ #content=Template("hbase.conf.j2")
+ # 重写 application.yml 文件
+ File(os.path.join(params.dinky_conf_dir, params.dinky_application_main_config_file),
+ mode=0o755,
+ content=Template(params.dinky_application_main_config_template_file),
+ owner=params.dinky_user,
+ group=params.dinky_group
+ )
+
+ ## 根据 mysql 还是 pgsql 重写 application-xxx.yml 文件
+ if params.dinky_database_config['dinky_database_type'] == "mysql":
+ ## 重写 application-mysql.yml 文件
+ File(os.path.join(params.dinky_conf_dir , params.dinky_application_mysql_config_file),
+ mode=0o755,
+ content=Template(params.dinky_application_mysql_config_template_file),
+ owner=params.dinky_user,
+ group=params.dinky_group
+ )
+ else:
+ ## 重写 application-pgsql.yml 文件
+ File(os.path.join(params.dinky_conf_dir , params.dinky_application_pgsql_config_file),
+ mode=0o755,
+ content=Template(params.dinky_application_pgsql_config_template_file),
+ owner=params.dinky_user,
+ group=params.dinky_group
+ )
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/package/scripts/dinky_server.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/package/scripts/dinky_server.py
new file mode 100644
index 0000000000..63a8c93d2b
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/package/scripts/dinky_server.py
@@ -0,0 +1,89 @@
+"""
+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 time
+import os
+from resource_management import *
+from resource_management.libraries.functions.format import format
+from dinky_env import dinky_env
+
+
+class DinkyService(Script):
+
+ # 安装 dinky
+ def install(self, env):
+ import params
+ env.set_params(params)
+ self.install_packages(env)
+ #Execute(('chmod', '-R', '777', params.dinky_home))
+ #Execute(('chown', '-R', params.dinky_user + ":" + params.dinky_group, params.dinky_home))
+
+
+ def initialize(self, env):
+ import params
+ env.set_params(params)
+ dinky_setup_marker = os.path.join(params.dinky_conf_dir, "dinky_setup")
+ if not os.path.exists(dinky_setup_marker):
+ try :
+ Execute(params.init_sql, user=params.dinky_user)
+ Logger.info(format('dinky init finished, cmd: {params.init_sql}'))
+
+ File(dinky_setup_marker,
+ owner = params.dinky_user,
+ group = params.dinky_group,
+ mode = 0o640)
+ except Exception as e:
+ Logger.exception("There was an exception when ALTER SYSTEM ADD FOLLOWER: " + str(e))
+
+
+ def configure(self, env):
+ import params
+ params.pika_slave = True
+ env.set_params(params)
+ self.initialize(env)
+ dinky_env()
+
+ def start(self, env):
+ import params
+ env.set_params(params)
+ self.configure(env)
+
+ no_op_test = format("ls {params.dinky_pid_file} >/dev/null 2>&1 ")
+
+ start_cmd = format("sh {params.start_script_path} start {params.dinky_flink_big_version}")
+ Execute(start_cmd, user=params.dinky_user, not_if=no_op_test)
+
+ def stop(self, env):
+ import params
+ env.set_params(params)
+ stop_cmd = format("sh {params.start_script_path} stop ")
+ Execute(stop_cmd, user=params.dinky_user)
+ time.sleep(5)
+
+ def status(self, env):
+ import params
+ env.set_params(params)
+ check_process_status(params.dinky_pid_file)
+
+ def restart(self, env):
+ self.stop(env)
+ self.start(env)
+
+
+if __name__ == "__main__":
+ DinkyService().execute()
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/package/scripts/params.py
new file mode 100644
index 0000000000..a4fa11c2cd
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/package/scripts/params.py
@@ -0,0 +1,108 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
+
+import sys
+import os
+from resource_management import *
+from resource_management.core.logger import Logger
+from resource_management.libraries.functions.format import format
+from resource_management.libraries.script.script import Script
+
+
+
+config = Script.get_config()
+
+stack_root = Script.get_stack_root()
+
+component_directory = "dinky-server"
+dinky_home = format("{stack_root}/current/{component_directory}")
+dinky_conf_dir = format("{dinky_home}/config")
+
+
+dinky_user = config['configurations']['dinky-env']['dinky_user']
+dinky_group = config['configurations']['dinky-env']['dinky_group']
+dinky_pid_dir = config['configurations']['dinky-env']['dinky_pid_dir']
+dinky_pid_filename = format("dinky-{dinky_user}.pid")
+dinky_pid_file = os.path.join(dinky_pid_dir, dinky_pid_filename)
+
+dinky_log_dir = config['configurations']['dinky-env']['dinky_log_dir']
+
+
+
+dinky_bin_dir = dinky_home
+dinky_lib_dir = os.path.join(dinky_home, "lib")
+dinky_lib_jars = format("{dinky_lib_dir}/*")
+dinky_extends_flink_dir = os.path.join(dinky_home, "extends")
+dinky_extends_flink_jars = format("{dinky_extends_flink_dir}/*")
+
+dinky_init_mysql_sqlfile = os.path.join(dinky_home, "sql/dinky-mysql.sql")
+dinky_init_pgsqll_sqlfile = os.path.join(dinky_home, "sql/dinky-pg.sql")
+dinky_application_main_config_file = "application.yml"
+dinky_application_main_config_template_file = format("{dinky_application_main_config_file}.j2")
+dinky_application_mysql_config_file = "application-mysql.yml"
+dinky_application_mysql_config_template_file = format("{dinky_application_mysql_config_file}.j2")
+dinky_application_pgsql_config_file = "application-pgsql.yml"
+dinky_application_pgsql_config_template_file = format("{dinky_application_pgsql_config_file}.j2")
+
+start_script_name = "auto.sh"
+start_script_path = os.path.join(dinky_home, start_script_name)
+start_script_template_file = format("{start_script_name}.j2")
+
+
+
+dinky_env_map = {}
+
+dinky_env_map.update(config['configurations']['dinky-application-server'])
+dinky_flink_big_version = dinky_env_map['flink.big.version']
+
+dinky_server_port = dinky_env_map['server.port']
+
+dinky_database_config = {'dinky_database_type': dinky_env_map['spring.profiles.active'],
+ 'dinky_database_username': dinky_env_map['spring.datasource.database.username'],
+ 'dinky_database_password': dinky_env_map['spring.datasource.database.password']}
+
+
+dinky_database_password = dinky_env_map['spring.datasource.database.password']
+dinky_database_name = dinky_env_map['spring.datasource.database.name']
+if 'mysql' == dinky_database_config['dinky_database_type']:
+
+ dinky_database_config['dinky_database_driver'] = 'com.mysql.jdbc.Driver'
+ dinky_database_config['dinky_database_url'] = 'jdbc:mysql://' + dinky_env_map['spring.datasource.database.host'] \
+ + ':' + dinky_env_map['spring.datasource.database.port'] \
+ + '/' + dinky_env_map['spring.datasource.database.name'] \
+ + '?useUnicode=true&characterEncoding=UTF-8'
+ database_host = dinky_env_map['spring.datasource.database.host']
+ database_port = dinky_env_map['spring.datasource.database.port']
+ dinky_init_sql_path = dinky_init_mysql_sqlfile
+ sql_client = "mysql"
+ #mysql -h hostname -P port -u username -p'password' dinky_database_name < /path/to/file.sql
+
+ init_sql = format("{sql_client} -h {database_host} -P {database_port} -u {dinky_user} -p'{dinky_database_password}' {dinky_database_name} < {dinky_init_sql_path}")
+else:
+
+ dinky_database_config['dinky_database_driver'] = 'org.postgresql.Driver'
+ dinky_database_config['dinky_database_url'] = 'jdbc:postgresql://' + dinky_env_map[
+ 'spring.datasource.database.host'] \
+ + ':' + dinky_env_map['spring.datasource.database.port'] \
+ + '/' + dinky_env_map['spring.datasource.database.name'] \
+ + '?stringtype=unspecified'
+ database_host = dinky_env_map['spring.datasource.database.host']
+ database_port = dinky_env_map['spring.datasource.database.port']
+ dinky_init_sql_path = dinky_init_pgsqll_sqlfile
+ sql_client = "psql"
+ init_sql = format("PGPASSWORD={dinky_database_password} {sql_client} -h {database_host} -p {database_port} -U {dinky_user} -d {dinky_database_name} < {dinky_init_sql_path}")
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/package/scripts/service_check.py
new file mode 100644
index 0000000000..9c9d23bff0
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/package/scripts/service_check.py
@@ -0,0 +1,32 @@
+#!/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 *
+
+class ServiceCheck(Script):
+ def service_check(self, env):
+ import params
+ env.set_params(params)
+
+ Execute(format("sh {dinky_bin_dir}/{start_script_name} status"))
+
+if __name__ == "__main__":
+ ServiceCheck().execute()
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/package/templates/application-mysql.yml.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/package/templates/application-mysql.yml.j2
new file mode 100644
index 0000000000..73864dfc80
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/package/templates/application-mysql.yml.j2
@@ -0,0 +1,24 @@
+#
+# 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
+#
+# https://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.
+#
+
+
+spring:
+ datasource:
+ driver-class-name: {{ dinky_database_config['dinky_database_driver'] }}
+ url: {{ dinky_database_config['dinky_database_url'] }}
+ username: {{ dinky_database_config['dinky_database_username'] }}
+ password: {{ dinky_database_config['dinky_database_password'] }}
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/package/templates/application-pgsql.yml.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/package/templates/application-pgsql.yml.j2
new file mode 100644
index 0000000000..3a158c08ec
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/package/templates/application-pgsql.yml.j2
@@ -0,0 +1,23 @@
+#
+# 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
+#
+# https://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.
+#
+
+spring:
+ datasource:
+ driver-class-name: {{ dinky_database_config['dinky_database_driver'] }}
+ url: {{ dinky_database_config['dinky_database_url'] }}
+ username: {{ dinky_database_config['dinky_database_username'] }}
+ password: {{ dinky_database_config['dinky_database_password'] }}
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/package/templates/application.yml.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/package/templates/application.yml.j2
new file mode 100644
index 0000000000..2efa79ea48
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/package/templates/application.yml.j2
@@ -0,0 +1,153 @@
+#################################################################################################################
+################################################# Common Config #################################################
+#################################################################################################################
+# Dinky application port
+server:
+ port: {{ dinky_server_port }}
+
+spring:
+ # Dinky application name
+ application:
+ name: Dinky
+ profiles:
+ # The h2 database is used by default. If you need to use other databases, please set the configuration active to: mysql, currently supports [mysql, pgsql, h2]
+ # If you use mysql database, please configure mysql database connection information in application-mysql.yml
+ # If you use pgsql database, please configure pgsql database connection information in application-pgsql.yml
+ # If you use the h2 database, please configure the h2 database connection information in application-h2.yml,
+ # note: the h2 database is only for experience use, and the related data that has been created cannot be migrated, please use it with caution
+ active: {{ dinky_database_config['dinky_database_type'] }} #[mysql,pgsql]
+ include: jmx
+
+ # mvc config
+ mvc:
+ pathmatch:
+ # Path matching strategy, default ant_path_matcher, support ant_path_matcher and path_pattern_parser
+ matching-strategy: ant_path_matcher
+ format:
+ date: yyyy-MM-dd HH:mm:ss # date format
+ time: HH:mm:ss # time format
+ date-time: yyyy-MM-dd HH:mm:ss # date-time format
+
+ # json format global configuration
+ jackson:
+ time-zone: GMT+8 # Time zone, default is GMT+8
+ date-format: yyyy-MM-dd HH:mm:ss # Date format, the default is yyyy-MM-dd HH:mm:ss
+
+ # circular references allowed
+ main:
+ allow-circular-references: true
+
+ # file upload config of servlet , the default is 500MB
+ servlet:
+ multipart:
+ enabled: true
+ max-file-size: 524288000
+ max-request-size: 524288000
+
+
+ # By default, memory cache metadata information is used,
+ # dinky supports redis cache, if necessary, please change simple to redis, and open the following redis connection configuration
+ # Sub-configuration items can be opened or customized as needed
+ cache:
+ type: simple
+ # If type is configured as redis, this item can be configured as needed, note: Pay attention to the indentation of this configuration item
+ # redis:
+ # # Whether to cache empty values, save the default
+ # cache-null-values: false
+ # # Cache expiration time, default 24 hours
+ # time-to-live: 86400
+
+ ########################################################## Redis配置 ##########################################################
+ # If sa-token needs to rely on redis, please open the redis configuration and depend on pom.xml and dinky-admin/pom.xml, and configure redis connection information in application.yml
+ # note: pay attention to the indentation of this configuration item
+# redis:
+# host: localhost
+# port: 6379
+# password:
+# database: 10
+# jedis:
+# pool:
+# # The maximum number of connections in the connection pool (use a negative value to indicate no limit)
+# max-active: 50
+# # The maximum blocking waiting time of the connection pool (use a negative value to indicate no limit)
+# max-wait: 3000
+# # The maximum number of idle connections in the connection pool
+# max-idle: 20
+# # The minimum number of idle connections in the connection pool
+# min-idle: 5
+# # Connection timeout (milliseconds)
+# timeout: 5000
+
+#################################################################################################################
+################################################# Mybatis Config ################################################
+######### Please note: that the following configurations are not recommended to be modified #####################
+#################################################################################################################
+mybatis-plus:
+ mapper-locations: classpath:/mapper/*Mapper.xml
+ # Entity scanning, multiple packages are separated by commas or semicolons
+ typeAliasesPackage: org.dinky.model
+ global-config:
+ db-config:
+ id-type: auto
+ # Logic delete configuration : 0: false(Not deleted), 1: true(deleted)
+ logic-delete-field: is_delete
+ logic-delete-value: 1
+ logic-not-delete-value: 0
+ banner: false
+ configuration:
+ ##### mybatis-plus prints complete sql (only for development environment)
+ #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+ log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
+ type-handlers-package: org.dinky.data.typehandler
+#################################################################################################################
+################################################# SMS Config ####################################################
+#################################################################################################################
+sms:
+ is-print: false
+
+
+
+#################################################################################################################
+################################################# Sa-Token Config ###############################################
+#################################################################################################################
+# Sa-Token basic configuration
+sa-token:
+ # The validity period of the token, the unit is 10 hours by default, -1 means it will never expire
+ timeout: 36000
+ # The temporary validity period of the token (the token will be considered as expired if there is no operation within the specified time)
+ # unit: second , if you do not need to set a temporary token, you can set it to -1
+ active-timeout: 1800
+ # Whether to allow the same account to log in concurrently (when true, allow login together, when false, new login squeezes out old login)
+ is-concurrent: false
+ # When multiple people log in to the same account, whether to share a token (if true, all logins share a token, and if false, create a new token for each login)
+ is-share: true
+ # token style
+ token-style: uuid
+ # Whether to output the operation log
+ is-log: false
+ # Whether to print banner
+ is-print: false
+ # The secret key
+ jwt-secret-key: 0DA4198858E84F1AADDF846340587A85
+ # is write header
+ is-write-header: true
+ # is read header
+ is-read-header: true
+ token-name: token
+
+#################################################################################################################
+################################################# knife4j Config ################################################
+#################################################################################################################
+knife4j:
+ enable: true
+ setting:
+ language: en
+
+
+
+#################################################################################################################
+################################################# Crypto Config #################################################
+#################################################################################################################
+crypto:
+ enabled: false
+ encryption-password:
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/package/templates/auto.sh.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/package/templates/auto.sh.j2
new file mode 100644
index 0000000000..4dd401c36d
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/package/templates/auto.sh.j2
@@ -0,0 +1,148 @@
+#!/bin/bash
+
+FLINK_VERSION={{ dinky_flink_big_version }}
+
+JAR_NAME="dinky-admin"
+
+PID_FILE={{ dinky_pid_filename }}
+
+# JMX path
+APP_HOME="$(cd `dirname $0`; pwd)"
+
+# Use FLINK_HOME:
+CLASS_PATH="${APP_HOME}:${APP_HOME}/lib/*:${APP_HOME}/config:${APP_HOME}/extends/*:${APP_HOME}/plugins/*:${APP_HOME}/customJar/*:${APP_HOME}/plugins/flink${FLINK_VERSION}/dinky/*:${APP_HOME}/plugins/flink${FLINK_VERSION}/*:${APP_HOME}/extends/flink${FLINK_VERSION}/dinky/*:${APP_HOME}/extends/flink${FLINK_VERSION}/*"
+
+
+JMX="-javaagent:$APP_HOME/lib/jmx_prometheus_javaagent-0.20.0.jar=10087:$APP_HOME/config/jmx/jmx_exporter_config.yaml"
+
+# Check whether the pid path exists
+PID_PATH={{ dinky_pid_dir }}
+
+if [ -d "${PID_PATH}" ];then
+ echo "${PID_PATH} is already exist." >> /dev/null
+else
+ mkdir -p "${PID_PATH}"
+fi
+
+# Check whether the pid file exists
+if [ -f "${PID_PATH}/${PID_FILE}" ];then
+ echo "${PID_PATH}/${PID_FILE} is already exist." >> /dev/null
+else
+ touch "${PID_PATH}"/${PID_FILE}
+fi
+
+tips() {
+ echo ""
+ echo "WARNING!!!......Tips, please use command: sh auto.sh [start|startOnPending|startWithJmx|stop|restart|restartWithJmx|status]. For example: sh auto.sh start "
+ echo ""
+ exit 1
+}
+
+updatePid() {
+ pid=$(ps -ef | grep [D]inky | awk '{print $2}' | head -1)
+ echo $pid >"${PID_PATH}"/${PID_FILE}
+}
+
+start() {
+ updatePid
+ if [ -z "$pid" ]; then
+ nohup java -Ddruid.mysql.usePingMethod=false -Dlog4j2.isThreadContextMapInheritable=true -Xms512M -Xmx2048M -XX:PermSize=512M -XX:MaxPermSize=1024M -XX:+HeapDumpOnOutOfMemoryError -Xverify:none -cp "${CLASS_PATH}" org.dinky.Dinky &
+ echo $! >"${PID_PATH}"/${PID_FILE}
+ echo "FLINK VERSION : $FLINK_VERSION"
+ echo "........................................Start Dinky Successfully........................................"
+ else
+ echo "Dinky pid $pid is in ${PID_PATH}/${PID_FILE}, Please stop first !!!"
+ fi
+}
+
+startOnPending() {
+ updatePid
+ if [ -z "$pid" ]; then
+ java -Ddruid.mysql.usePingMethod=false -Xms512M -Xmx2048M -XX:PermSize=512M -XX:MaxPermSize=1024M -XX:+HeapDumpOnOutOfMemoryError -Xverify:none -cp "${CLASS_PATH}" org.dinky.Dinky
+ echo "FLINK VERSION : $FLINK_VERSION"
+ echo "........................................Start Dinky Successfully........................................"
+ else
+ echo "Dinky pid $pid is in ${PID_PATH}/${PID_FILE}, Please stop first !!!"
+ fi
+}
+
+startWithJmx() {
+ updatePid
+ if [ -z "$pid" ]; then
+ nohup java -Ddruid.mysql.usePingMethod=false -Xms512M -Xmx2048M -XX:PermSize=512M -XX:MaxPermSize=1024M -XX:+HeapDumpOnOutOfMemoryError -Xverify:none "${JMX}" -cp "${CLASS_PATH}" org.dinky.Dinky &
+# echo $! >"${PID_PATH}"/${PID_FILE}
+ updatePid
+ echo "........................................Start Dinky with Jmx Successfully.....................................
+ ..."
+ else
+ echo "Dinky pid $pid is in ${PID_PATH}/${PID_FILE}, Please stop first !!!"
+ fi
+}
+
+stop() {
+ updatePid
+ pid=$(cat "${PID_PATH}"/${PID_FILE})
+ if [ -z $pid ]; then
+ echo "Dinky pid is not exist in ${PID_PATH}/${PID_FILE}"
+ else
+ kill -9 $pid
+ sleep 1
+ echo "........................................Stop Dinky Successfully....................................."
+ rm -f "${PID_PATH}"/${PID_FILE}
+ fi
+}
+
+status() {
+ updatePid
+ if [ -z $pid ]; then
+ echo ""
+ echo "Service ${JAR_NAME} is not running!"
+ echo ""
+ exit 1
+ else
+ echo ""
+ echo "Service ${JAR_NAME} is running. It's pid=${pid}"
+ echo ""
+ fi
+}
+
+restart() {
+ echo ""
+ stop
+ start
+ echo "........................................Restart Successfully........................................"
+}
+
+restartWithJmx() {
+ echo ""
+ stop
+ startWithJmx
+ echo "........................................Restart with Jmx Successfully........................................"
+}
+
+case "$1" in
+"start")
+ start
+ ;;
+"startOnPending")
+ startOnPending
+ ;;
+"startWithJmx")
+ startWithJmx
+ ;;
+"stop")
+ stop
+ ;;
+"status")
+ status
+ ;;
+"restart")
+ restart
+ ;;
+"restartWithJmx")
+ restartWithJmx
+ ;;
+*)
+ tips
+ ;;
+esac
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/quicklinks/quicklinks.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/quicklinks/quicklinks.json
new file mode 100644
index 0000000000..ec5e39e9fb
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/quicklinks/quicklinks.json
@@ -0,0 +1,26 @@
+{
+ "name": "default",
+ "description": "default quick links configuration",
+ "configuration": {
+ "protocol":
+ {
+ "type":"http"
+ },
+
+ "links": [
+ {
+ "name": "dinky-application-ui",
+ "label": "Dinky Web UI",
+ "requires_user_name": "false",
+ "component_name": "DINKY_SERVER",
+ "url": "%@://%@:%@",
+ "port":{
+ "http_property": "server.port",
+ "http_default_port": "8888",
+ "regex": "^(\\d+)$",
+ "site": "dinky-application-ui"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/service_advisor.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/service_advisor.py
new file mode 100755
index 0000000000..c3f5586777
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/DINKY/service_advisor.py
@@ -0,0 +1,196 @@
+#!/usr/bin/env ambari-python-wrap
+"""
+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.
+"""
+
+# Python imports
+from ast import Param
+import imp
+import os
+import traceback
+import re
+import socket
+import fnmatch
+
+
+from resource_management.core.logger import Logger
+
+SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
+STACKS_DIR = os.path.join(SCRIPT_DIR, '../../../../../stacks/')
+PARENT_FILE = os.path.join(STACKS_DIR, 'service_advisor.py')
+
+try:
+ if "BASE_SERVICE_ADVISOR" in os.environ:
+ PARENT_FILE = os.environ["BASE_SERVICE_ADVISOR"]
+ with open(PARENT_FILE, 'rb') as fp:
+ service_advisor = imp.load_module('service_advisor', fp, PARENT_FILE, ('.py', 'rb', imp.PY_SOURCE))
+except Exception as e:
+ traceback.print_exc()
+ print "Failed to load parent"
+
+class DinkyServiceAdvisor(service_advisor.ServiceAdvisor):
+
+ def __init__(self, *args, **kwargs):
+ self.as_super = super(DinkyServiceAdvisor, self)
+ self.as_super.__init__(*args, **kwargs)
+
+ # Always call these methods
+ self.modifyMastersWithMultipleInstances()
+ self.modifyCardinalitiesDict()
+ self.modifyHeapSizeProperties()
+ self.modifyNotValuableComponents()
+ self.modifyComponentsNotPreferableOnServer()
+ self.modifyComponentLayoutSchemes()
+
+ def modifyMastersWithMultipleInstances(self):
+ """
+ Modify the set of masters with multiple instances.
+ Must be overriden in child class.
+ """
+ # Nothing to do
+ pass
+
+ def modifyCardinalitiesDict(self):
+ """
+ Modify the dictionary of cardinalities.
+ Must be overriden in child class.
+ """
+ # Nothing to do
+ pass
+
+ def modifyHeapSizeProperties(self):
+ """
+ Modify the dictionary of heap size properties.
+ Must be overriden in child class.
+ """
+ pass
+
+ def modifyNotValuableComponents(self):
+ """
+ Modify the set of components whose host assignment is based on other services.
+ Must be overriden in child class.
+ """
+ # Nothing to do
+ pass
+
+ def modifyComponentsNotPreferableOnServer(self):
+ """
+ Modify the set of components that are not preferable on the server.
+ Must be overriden in child class.
+ """
+ # Nothing to do
+ pass
+
+ def modifyComponentLayoutSchemes(self):
+ """
+ Modify layout scheme dictionaries for components.
+ The scheme dictionary basically maps the number of hosts to
+ host index where component should exist.
+ Must be overriden in child class.
+ """
+
+ # Nothing to do
+ pass
+
+
+ def getServiceComponentLayoutValidations(self, services, hosts):
+ """
+ Get a list of errors.
+ Must be overriden in child class.
+ """
+
+ return self.getServiceComponentCardinalityValidations(services, hosts, "KYUUBI")
+
+ def getServiceConfigurationRecommendations(self, configurations, clusterData, services, hosts):
+ """
+ Entry point.
+ Must be overriden in child class.
+ """
+ # Logger.info("Class: %s, Method: %s. Recommending Service Configurations." %
+ # (self.__class__.__name__, inspect.stack()[0][3]))
+
+ recommender = DinkyRecommender()
+ recommender.recommendDinkyConfigurationsFromHDP33(configurations, clusterData, services, hosts)
+
+
+ # def getServiceConfigurationRecommendationsForSSO(self, configurations, clusterData, services, hosts):
+ # """
+ # Entry point.
+ # Must be overriden in child class.
+ # """
+ # recommender = DinkyRecommender()
+ # recommender.recommendConfigurationsForSSO(configurations, clusterData, services, hosts)
+
+ def getServiceConfigurationsValidationItems(self, configurations, recommendedDefaults, services, hosts):
+ """
+ Entry point.
+ Validate configurations for the service. Return a list of errors.
+ The code for this function should be the same for each Service Advisor.
+ """
+ # Logger.info("Class: %s, Method: %s. Validating Configurations." %
+ # (self.__class__.__name__, inspect.stack()[0][3]))
+
+ return []
+
+ @staticmethod
+ def isKerberosEnabled(services, configurations):
+ """
+ Determines if security is enabled by testing the value of core-site/hadoop.security.authentication enabled.
+ If the property exists and is equal to "kerberos", then is it enabled; otherwise is it assumed to be
+ disabled.
+
+ :type services: dict
+ :param services: the dictionary containing the existing configuration values
+ :type configurations: dict
+ :param configurations: the dictionary containing the updated configuration values
+ :rtype: bool
+ :return: True or False
+ """
+ if configurations and "core-site" in configurations and \
+ "hadoop.security.authentication" in configurations["core-site"]["properties"]:
+ return configurations["core-site"]["properties"]["hadoop.security.authentication"].lower() == "kerberos"
+ elif services and "core-site" in services["configurations"] and \
+ "hadoop.security.authentication" in services["configurations"]["core-site"]["properties"]:
+ return services["configurations"]["core-site"]["properties"]["hadoop.security.authentication"].lower() == "kerberos"
+ else:
+ return False
+
+
+class DinkyRecommender(service_advisor.ServiceAdvisor):
+ """
+ Dinky Recommender suggests properties when adding the service for the first time or modifying configs via the UI.
+ """
+
+ def __init__(self, *args, **kwargs):
+ self.as_super = super(DinkyRecommender, self)
+ self.as_super.__init__(*args, **kwargs)
+
+ def recommendDinkyConfigurationsFromHDP33(self, configurations, clusterData, services, hosts):
+ """
+ Recommend configurations for this service based on HDP 3.3.
+ """
+
+
+
+
+
+
+
+
+
+
+
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org
(ambari) 07/22: move ranger to 3.3
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch eee
in repository https://gitbox.apache.org/repos/asf/ambari.git
commit bca67d67a6e1d92b63e1aeface7f97b9589a48b8
Author: jialiang <ji...@gmail.com>
AuthorDate: Fri Sep 6 17:12:07 2024 +0800
move ranger to 3.3
---
.../resources/stacks/BIGTOP/{3.2.0 => 3.3.0}/services/RANGER/alerts.json | 0
.../{3.2.0 => 3.3.0}/services/RANGER/configuration/admin-logback.xml | 0
.../{3.2.0 => 3.3.0}/services/RANGER/configuration/admin-properties.xml | 0
.../{3.2.0 => 3.3.0}/services/RANGER/configuration/atlas-tagsync-ssl.xml | 0
.../{3.2.0 => 3.3.0}/services/RANGER/configuration/ranger-admin-site.xml | 0
.../BIGTOP/{3.2.0 => 3.3.0}/services/RANGER/configuration/ranger-env.xml | 0
.../services/RANGER/configuration/ranger-solr-configuration.xml | 0
.../services/RANGER/configuration/ranger-tagsync-policymgr-ssl.xml | 0
.../services/RANGER/configuration/ranger-tagsync-site.xml | 0
.../{3.2.0 => 3.3.0}/services/RANGER/configuration/ranger-ugsync-site.xml | 0
.../services/RANGER/configuration/tagsync-application-properties.xml | 0
.../{3.2.0 => 3.3.0}/services/RANGER/configuration/tagsync-logback.xml | 0
.../{3.2.0 => 3.3.0}/services/RANGER/configuration/usersync-logback.xml | 0
.../stacks/BIGTOP/{3.2.0 => 3.3.0}/services/RANGER/kerberos.json | 0
.../resources/stacks/BIGTOP/{3.2.0 => 3.3.0}/services/RANGER/metainfo.xml | 0
.../services/RANGER/package/alerts/alert_ranger_admin_passwd_check.py | 0
.../BIGTOP/{3.2.0 => 3.3.0}/services/RANGER/package/scripts/params.py | 0
.../{3.2.0 => 3.3.0}/services/RANGER/package/scripts/ranger_admin.py | 0
.../{3.2.0 => 3.3.0}/services/RANGER/package/scripts/ranger_service.py | 0
.../{3.2.0 => 3.3.0}/services/RANGER/package/scripts/ranger_tagsync.py | 0
.../{3.2.0 => 3.3.0}/services/RANGER/package/scripts/ranger_usersync.py | 0
.../{3.2.0 => 3.3.0}/services/RANGER/package/scripts/service_check.py | 0
.../{3.2.0 => 3.3.0}/services/RANGER/package/scripts/setup_ranger_xml.py | 0
.../{3.2.0 => 3.3.0}/services/RANGER/package/scripts/status_params.py | 0
.../BIGTOP/{3.2.0 => 3.3.0}/services/RANGER/package/scripts/upgrade.py | 0
.../services/RANGER/package/templates/input.config-ranger.json.j2 | 0
.../services/RANGER/package/templates/ranger_admin_pam.j2 | 0
.../services/RANGER/package/templates/ranger_remote_pam.j2 | 0
.../services/RANGER/package/templates/ranger_solr_jaas_conf.j2 | 0
.../{3.2.0 => 3.3.0}/services/RANGER/properties/admin-logback.xml.j2 | 0
.../BIGTOP/{3.2.0 => 3.3.0}/services/RANGER/properties/ranger-env.sh.j2 | 0
.../{3.2.0 => 3.3.0}/services/RANGER/properties/ranger-solrconfig.xml.j2 | 0
.../{3.2.0 => 3.3.0}/services/RANGER/properties/tagsync-logback.xml.j2 | 0
.../{3.2.0 => 3.3.0}/services/RANGER/properties/usersync-logback.xml.j2 | 0
.../BIGTOP/{3.2.0 => 3.3.0}/services/RANGER/quicklinks/quicklinks.json | 0
.../BIGTOP/{3.2.0 => 3.3.0}/services/RANGER/role_command_order.json | 0
.../stacks/BIGTOP/{3.2.0 => 3.3.0}/services/RANGER/service_advisor.py | 0
.../BIGTOP/{3.2.0 => 3.3.0}/services/RANGER/themes/credentials.json | 0
.../stacks/BIGTOP/{3.2.0 => 3.3.0}/services/RANGER/themes/database.json | 0
.../BIGTOP/{3.2.0 => 3.3.0}/services/RANGER/themes/directories.json | 0
.../BIGTOP/{3.2.0 => 3.3.0}/services/RANGER/themes/theme_version_1.json | 0
.../stacks/BIGTOP/{3.2.0 => 3.3.0}/services/RANGER_KMS/alerts.json | 0
.../{3.2.0 => 3.3.0}/services/RANGER_KMS/configuration/dbks-site.xml | 0
.../BIGTOP/{3.2.0 => 3.3.0}/services/RANGER_KMS/configuration/kms-env.xml | 0
.../{3.2.0 => 3.3.0}/services/RANGER_KMS/configuration/kms-log4j.xml | 0
.../{3.2.0 => 3.3.0}/services/RANGER_KMS/configuration/kms-logback.xml | 0
.../{3.2.0 => 3.3.0}/services/RANGER_KMS/configuration/kms-properties.xml | 0
.../{3.2.0 => 3.3.0}/services/RANGER_KMS/configuration/kms-site.xml | 0
.../services/RANGER_KMS/configuration/ranger-kms-audit.xml | 0
.../services/RANGER_KMS/configuration/ranger-kms-policymgr-ssl.xml | 0
.../services/RANGER_KMS/configuration/ranger-kms-security.xml | 0
.../services/RANGER_KMS/configuration/ranger-kms-site.xml | 0
.../stacks/BIGTOP/{3.2.0 => 3.3.0}/services/RANGER_KMS/kerberos.json | 0
.../stacks/BIGTOP/{3.2.0 => 3.3.0}/services/RANGER_KMS/metainfo.xml | 0
.../BIGTOP/{3.2.0 => 3.3.0}/services/RANGER_KMS/package/scripts/kms.py | 0
.../{3.2.0 => 3.3.0}/services/RANGER_KMS/package/scripts/kms_server.py | 0
.../{3.2.0 => 3.3.0}/services/RANGER_KMS/package/scripts/kms_service.py | 0
.../BIGTOP/{3.2.0 => 3.3.0}/services/RANGER_KMS/package/scripts/params.py | 0
.../{3.2.0 => 3.3.0}/services/RANGER_KMS/package/scripts/service_check.py | 0
.../{3.2.0 => 3.3.0}/services/RANGER_KMS/package/scripts/status_params.py | 0
.../{3.2.0 => 3.3.0}/services/RANGER_KMS/package/scripts/upgrade.py | 0
.../services/RANGER_KMS/package/templates/input.config-ranger-kms.json.j2 | 0
.../BIGTOP/{3.2.0 => 3.3.0}/services/RANGER_KMS/properties/kms-env.sh.j2 | 0
.../{3.2.0 => 3.3.0}/services/RANGER_KMS/properties/kms-logback.xml.j2 | 0
.../BIGTOP/{3.2.0 => 3.3.0}/services/RANGER_KMS/role_command_order.json | 0
.../stacks/BIGTOP/{3.2.0 => 3.3.0}/services/RANGER_KMS/service_advisor.py | 0
.../BIGTOP/{3.2.0 => 3.3.0}/services/RANGER_KMS/themes/credentials.json | 0
.../BIGTOP/{3.2.0 => 3.3.0}/services/RANGER_KMS/themes/database.json | 0
.../BIGTOP/{3.2.0 => 3.3.0}/services/RANGER_KMS/themes/directories.json | 0
.../{3.2.0 => 3.3.0}/services/RANGER_KMS/themes/theme_version_1.json | 0
.../{3.2.0 => 3.3.0}/services/RANGER_KMS/themes/theme_version_2.json | 0
71 files changed, 0 insertions(+), 0 deletions(-)
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/alerts.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/alerts.json
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/alerts.json
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/alerts.json
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/configuration/admin-logback.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/configuration/admin-logback.xml
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/configuration/admin-logback.xml
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/configuration/admin-logback.xml
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/configuration/admin-properties.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/configuration/admin-properties.xml
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/configuration/admin-properties.xml
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/configuration/admin-properties.xml
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/configuration/atlas-tagsync-ssl.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/configuration/atlas-tagsync-ssl.xml
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/configuration/atlas-tagsync-ssl.xml
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/configuration/atlas-tagsync-ssl.xml
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/configuration/ranger-admin-site.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/configuration/ranger-admin-site.xml
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/configuration/ranger-admin-site.xml
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/configuration/ranger-admin-site.xml
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/configuration/ranger-env.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/configuration/ranger-env.xml
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/configuration/ranger-env.xml
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/configuration/ranger-env.xml
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/configuration/ranger-solr-configuration.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/configuration/ranger-solr-configuration.xml
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/configuration/ranger-solr-configuration.xml
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/configuration/ranger-solr-configuration.xml
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/configuration/ranger-tagsync-policymgr-ssl.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/configuration/ranger-tagsync-policymgr-ssl.xml
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/configuration/ranger-tagsync-policymgr-ssl.xml
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/configuration/ranger-tagsync-policymgr-ssl.xml
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/configuration/ranger-tagsync-site.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/configuration/ranger-tagsync-site.xml
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/configuration/ranger-tagsync-site.xml
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/configuration/ranger-tagsync-site.xml
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/configuration/ranger-ugsync-site.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/configuration/ranger-ugsync-site.xml
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/configuration/ranger-ugsync-site.xml
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/configuration/ranger-ugsync-site.xml
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/configuration/tagsync-application-properties.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/configuration/tagsync-application-properties.xml
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/configuration/tagsync-application-properties.xml
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/configuration/tagsync-application-properties.xml
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/configuration/tagsync-logback.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/configuration/tagsync-logback.xml
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/configuration/tagsync-logback.xml
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/configuration/tagsync-logback.xml
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/configuration/usersync-logback.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/configuration/usersync-logback.xml
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/configuration/usersync-logback.xml
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/configuration/usersync-logback.xml
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/kerberos.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/kerberos.json
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/kerberos.json
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/kerberos.json
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/metainfo.xml
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/metainfo.xml
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/metainfo.xml
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/alerts/alert_ranger_admin_passwd_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/alerts/alert_ranger_admin_passwd_check.py
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/alerts/alert_ranger_admin_passwd_check.py
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/alerts/alert_ranger_admin_passwd_check.py
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/params.py
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/scripts/params.py
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/params.py
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/scripts/ranger_admin.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_admin.py
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/scripts/ranger_admin.py
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_admin.py
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/scripts/ranger_service.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_service.py
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/scripts/ranger_service.py
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_service.py
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/scripts/ranger_tagsync.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_tagsync.py
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/scripts/ranger_tagsync.py
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_tagsync.py
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/scripts/ranger_usersync.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_usersync.py
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/scripts/ranger_usersync.py
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/ranger_usersync.py
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/service_check.py
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/scripts/service_check.py
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/service_check.py
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/scripts/setup_ranger_xml.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/setup_ranger_xml.py
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/scripts/setup_ranger_xml.py
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/setup_ranger_xml.py
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/scripts/status_params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/status_params.py
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/scripts/status_params.py
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/status_params.py
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/scripts/upgrade.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/upgrade.py
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/scripts/upgrade.py
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/scripts/upgrade.py
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/templates/input.config-ranger.json.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/templates/input.config-ranger.json.j2
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/templates/input.config-ranger.json.j2
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/templates/input.config-ranger.json.j2
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/templates/ranger_admin_pam.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/templates/ranger_admin_pam.j2
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/templates/ranger_admin_pam.j2
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/templates/ranger_admin_pam.j2
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/templates/ranger_remote_pam.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/templates/ranger_remote_pam.j2
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/templates/ranger_remote_pam.j2
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/templates/ranger_remote_pam.j2
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/templates/ranger_solr_jaas_conf.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/templates/ranger_solr_jaas_conf.j2
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/package/templates/ranger_solr_jaas_conf.j2
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/package/templates/ranger_solr_jaas_conf.j2
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/properties/admin-logback.xml.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/properties/admin-logback.xml.j2
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/properties/admin-logback.xml.j2
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/properties/admin-logback.xml.j2
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/properties/ranger-env.sh.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/properties/ranger-env.sh.j2
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/properties/ranger-env.sh.j2
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/properties/ranger-env.sh.j2
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/properties/ranger-solrconfig.xml.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/properties/ranger-solrconfig.xml.j2
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/properties/ranger-solrconfig.xml.j2
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/properties/ranger-solrconfig.xml.j2
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/properties/tagsync-logback.xml.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/properties/tagsync-logback.xml.j2
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/properties/tagsync-logback.xml.j2
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/properties/tagsync-logback.xml.j2
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/properties/usersync-logback.xml.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/properties/usersync-logback.xml.j2
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/properties/usersync-logback.xml.j2
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/properties/usersync-logback.xml.j2
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/quicklinks/quicklinks.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/quicklinks/quicklinks.json
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/quicklinks/quicklinks.json
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/quicklinks/quicklinks.json
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/role_command_order.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/role_command_order.json
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/role_command_order.json
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/role_command_order.json
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/service_advisor.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/service_advisor.py
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/service_advisor.py
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/service_advisor.py
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/themes/credentials.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/themes/credentials.json
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/themes/credentials.json
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/themes/credentials.json
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/themes/database.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/themes/database.json
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/themes/database.json
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/themes/database.json
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/themes/directories.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/themes/directories.json
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/themes/directories.json
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/themes/directories.json
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/themes/theme_version_1.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/themes/theme_version_1.json
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER/themes/theme_version_1.json
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER/themes/theme_version_1.json
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/alerts.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/alerts.json
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/alerts.json
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/alerts.json
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/configuration/dbks-site.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/configuration/dbks-site.xml
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/configuration/dbks-site.xml
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/configuration/dbks-site.xml
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/configuration/kms-env.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/configuration/kms-env.xml
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/configuration/kms-env.xml
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/configuration/kms-env.xml
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/configuration/kms-log4j.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/configuration/kms-log4j.xml
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/configuration/kms-log4j.xml
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/configuration/kms-log4j.xml
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/configuration/kms-logback.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/configuration/kms-logback.xml
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/configuration/kms-logback.xml
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/configuration/kms-logback.xml
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/configuration/kms-properties.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/configuration/kms-properties.xml
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/configuration/kms-properties.xml
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/configuration/kms-properties.xml
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/configuration/kms-site.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/configuration/kms-site.xml
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/configuration/kms-site.xml
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/configuration/kms-site.xml
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/configuration/ranger-kms-audit.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/configuration/ranger-kms-audit.xml
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/configuration/ranger-kms-audit.xml
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/configuration/ranger-kms-audit.xml
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/configuration/ranger-kms-policymgr-ssl.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/configuration/ranger-kms-policymgr-ssl.xml
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/configuration/ranger-kms-policymgr-ssl.xml
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/configuration/ranger-kms-policymgr-ssl.xml
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/configuration/ranger-kms-security.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/configuration/ranger-kms-security.xml
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/configuration/ranger-kms-security.xml
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/configuration/ranger-kms-security.xml
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/configuration/ranger-kms-site.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/configuration/ranger-kms-site.xml
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/configuration/ranger-kms-site.xml
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/configuration/ranger-kms-site.xml
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/kerberos.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/kerberos.json
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/kerberos.json
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/kerberos.json
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/metainfo.xml
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/metainfo.xml
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/metainfo.xml
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/package/scripts/kms.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/kms.py
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/package/scripts/kms.py
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/kms.py
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/package/scripts/kms_server.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/kms_server.py
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/package/scripts/kms_server.py
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/kms_server.py
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/package/scripts/kms_service.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/kms_service.py
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/package/scripts/kms_service.py
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/kms_service.py
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/params.py
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/package/scripts/params.py
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/params.py
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/service_check.py
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/package/scripts/service_check.py
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/service_check.py
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/package/scripts/status_params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/status_params.py
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/package/scripts/status_params.py
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/status_params.py
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/package/scripts/upgrade.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/upgrade.py
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/package/scripts/upgrade.py
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/scripts/upgrade.py
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/package/templates/input.config-ranger-kms.json.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/templates/input.config-ranger-kms.json.j2
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/package/templates/input.config-ranger-kms.json.j2
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/package/templates/input.config-ranger-kms.json.j2
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/properties/kms-env.sh.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/properties/kms-env.sh.j2
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/properties/kms-env.sh.j2
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/properties/kms-env.sh.j2
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/properties/kms-logback.xml.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/properties/kms-logback.xml.j2
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/properties/kms-logback.xml.j2
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/properties/kms-logback.xml.j2
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/role_command_order.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/role_command_order.json
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/role_command_order.json
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/role_command_order.json
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/service_advisor.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/service_advisor.py
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/service_advisor.py
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/service_advisor.py
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/themes/credentials.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/themes/credentials.json
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/themes/credentials.json
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/themes/credentials.json
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/themes/database.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/themes/database.json
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/themes/database.json
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/themes/database.json
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/themes/directories.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/themes/directories.json
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/themes/directories.json
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/themes/directories.json
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/themes/theme_version_1.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/themes/theme_version_1.json
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/themes/theme_version_1.json
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/themes/theme_version_1.json
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/themes/theme_version_2.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/themes/theme_version_2.json
similarity index 100%
rename from ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/RANGER_KMS/themes/theme_version_2.json
rename to ambari-server/src/main/resources/stacks/BIGTOP/3.3.0/services/RANGER_KMS/themes/theme_version_2.json
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org
(ambari) 02/22: AMBARI-26119: Add dependency python3-distro for ambari-server #3816
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch eee
in repository https://gitbox.apache.org/repos/asf/ambari.git
commit 6fde041701132e38d6548c2ff8089b8b8991b82d
Author: jialiang <ji...@gmail.com>
AuthorDate: Fri Sep 6 16:57:33 2024 +0800
AMBARI-26119: Add dependency python3-distro for ambari-server #3816
---
ambari-server/src/main/package/dependencies.properties | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ambari-server/src/main/package/dependencies.properties b/ambari-server/src/main/package/dependencies.properties
index 1ea214864c..027a3328d3 100644
--- a/ambari-server/src/main/package/dependencies.properties
+++ b/ambari-server/src/main/package/dependencies.properties
@@ -28,6 +28,6 @@
# Such a format is respected by install_ambari_tarball.py by default,
# however should be encouraged manually in pom.xml.
-rpm.dependency.list=postgresql-server >= 8.1,\nRequires: openssl,\nRequires: python3
+rpm.dependency.list=postgresql-server >= 8.1,\nRequires: openssl,\nRequires: python3,\nRequires: python3-distro
rpm.dependency.list.suse=postgresql-server >= 8.1,\nRequires: openssl,\nRequires: python-xml,\nRequires: python3
-deb.dependency.list=openssl, postgresql (>= 8.1), python3, curl
\ No newline at end of file
+deb.dependency.list=openssl, postgresql (>= 8.1), python3, curl
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org
(ambari) 15/22: add trino
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch eee
in repository https://gitbox.apache.org/repos/asf/ambari.git
commit 5e7a34b4cd42bcc2337862cd2fd91f179b4b4faa
Author: jialiang <ji...@gmail.com>
AuthorDate: Sat Sep 7 11:00:36 2024 +0800
add trino
---
.../TRINO/configuration/config.properties.xml | 99 ++++++++
.../TRINO/configuration/connectors.properties.xml | 29 +++
.../services/TRINO/configuration/jvm.config.xml | 39 +++
.../TRINO/configuration/node.properties.xml | 54 +++++
.../services/TRINO/configuration/trino-env.xml | 75 ++++++
.../BIGTOP/3.2.0/services/TRINO/metainfo.xml | 123 ++++++++++
.../3.2.0/services/TRINO/package/__init__.py | 0
.../services/TRINO/package/scripts/__init__.py | 0
.../3.2.0/services/TRINO/package/scripts/common.py | 68 ++++++
.../3.2.0/services/TRINO/package/scripts/params.py | 86 +++++++
.../services/TRINO/package/scripts/trino_cli.py | 39 +++
.../services/TRINO/package/scripts/trino_client.py | 266 +++++++++++++++++++++
.../TRINO/package/scripts/trino_coordinator.py | 110 +++++++++
.../services/TRINO/package/scripts/trino_worker.py | 107 +++++++++
.../services/TRINO/package/templates/launcher.j2 | 7 +
.../services/TRINO/quicklinks/quicklinks.json | 21 ++
.../stacks/BIGTOP/3.2.0/services/TRINO/setup.py | 59 +++++
.../BIGTOP/3.2.0/services/TRINO/themes/theme.json | 218 +++++++++++++++++
18 files changed, 1400 insertions(+)
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/configuration/config.properties.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/configuration/config.properties.xml
new file mode 100755
index 0000000000..6c7da69069
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/configuration/config.properties.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0"?>
+<!--
+# -*- coding: utf-8 -*-
+#
+# Licensed 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.
+-->
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<configuration>
+ <property>
+ <name>node-scheduler.include-coordinator</name>
+ <value>false</value>
+ <description>
+ Allow scheduling work on the coordinator. For larger clusters, processing
+ work on the coordinator can impact query performance because the machine’s
+ resources are not available for the critical task of scheduling, managing
+ and monitoring query execution.
+ </description>
+ <value-attributes>
+ <type>value-list</type>
+ <entries>
+ <entry>
+ <value>true</value>
+ <label>Enabled</label>
+ </entry>
+ <entry>
+ <value>false</value>
+ <label>Disabled</label>
+ </entry>
+ </entries>
+ <selection-cardinality>1</selection-cardinality>
+ </value-attributes>
+ </property>
+
+ <property>
+ <name>http-server.http.port</name>
+ <value>8285</value>
+ <description>
+ Specifies the port for the HTTP server. Presto uses HTTP for all
+ communication, internal and external
+ </description>
+ </property>
+
+ <property>
+ <name>query.max-memory</name>
+ <value>50GB</value>
+ <description>
+ The maximum amount of distributed memory that a query may use.
+ If you'd like to enter a value higher than the maximum on the slider,
+ click on the pencil that appears when you hover over the setting and
+ ignore that higher values are not recommended.
+ </description>
+ </property>
+
+ <property>
+ <name>memory.heap-headroom-per-node</name>
+ <value>300MB</value>
+ <description>
+ This is the amount of memory set aside as headroom/buffer in the JVM heap for allocations that are not tracked by Trino.Default value: (JVM max memory * 0.3)
+ </description>
+ </property>
+
+
+
+ <property>
+ <name>query.max-memory-per-node</name>
+ <value>1GB</value>
+ <description>
+ The maximum amount of memory that a query may use on any one machine.
+
+ If you'd like to enter a value higher than the maximum on the slider,
+ click on the pencil that appears when you hover over the setting and
+ ignore that higher values are not recommended.
+ </description>
+ </property>
+
+ <property>
+ <name>discovery.uri</name>
+ <value>{{ discovery_uri }}</value>
+ <description>
+ The URI to the Discovery server. Because we have enabled the embedded
+ version of Discovery in the Presto coordinator, this should be the URI of
+ the Presto coordinator. For example: http://master.net:8285 but make sure
+ to replace master.net with the actual hostname of your coordinator node.
+ Ensure the port in the URI matches the port set in the http-server.http.port
+ property. This URI must not end in a slash.
+ </description>
+ </property>
+
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/configuration/connectors.properties.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/configuration/connectors.properties.xml
new file mode 100644
index 0000000000..1783f0703a
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/configuration/connectors.properties.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!--
+# -*- coding: utf-8 -*-
+#
+# Licensed 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.
+-->
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<configuration>
+ <property>
+ <name>how_to_add_connector</name>
+ <value>see description</value>
+ <description>
+ To integrate a new Trino connector within the Ambari configuration, you must add a specific property.
+ This property should begin with connector_ followed by the name of the connector you wish to add. For instance, to add a Hive connector, the property name should be connector_hive=a_value\n.
+ Assign the appropriate configuration details as the value of this property. After adding this property, a system restart is required for the changes to be effective.
+ If you need to remove a Trino connector, simply delete the relevant configuration property that was previously added. Don't forget to restart the system thereafter to ensure that the removal is properly processed.
+ </description>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/configuration/jvm.config.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/configuration/jvm.config.xml
new file mode 100644
index 0000000000..ac90a1757d
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/configuration/jvm.config.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+# -*- coding: utf-8 -*-
+#
+# Licensed 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.
+-->
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<configuration>
+ <property>
+ <name>jvm.config</name>
+ <value>-server
+-Xmx2G
+-XX:+UseG1GC
+-XX:G1HeapRegionSize=32M
+-XX:+UseGCOverheadLimit
+-XX:+ExplicitGCInvokesConcurrent
+-XX:+ExitOnOutOfMemoryError
+-Djdk.attach.allowAttachSelf=true
+-Djdk.nio.maxCachedBufferSize=2000000
+ </value>
+ <description>
+ A list of command line options used for launching the Java Virtual
+ Machine. The format of the file must be one option per line. These
+ options are not interpreted by the shell, so options containing spaces or
+ other special characters should not be quoted (as demonstrated by the
+ OnOutOfMemoryError option).
+ </description>
+ </property>
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/configuration/node.properties.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/configuration/node.properties.xml
new file mode 100644
index 0000000000..9498f3d85b
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/configuration/node.properties.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<!--
+# -*- coding: utf-8 -*-
+#
+# Licensed 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.
+-->
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<configuration>
+ <property>
+ <name>node.environment</name>
+ <value>production</value>
+ <description>
+ The name of the environment. All Presto nodes in a cluster must have the
+ same environment name.
+ </description>
+ </property>
+
+ <property>
+ <name>node.data-dir</name>
+ <value>{{ trino_node_data_dir }}</value>
+ <description>
+ The location (filesystem path) of the data directory. Presto will store
+ logs and other data here.
+ </description>
+ </property>
+
+ <property>
+ <name>catalog.config-dir</name>
+ <value>{{ catalog_conf_dir }}</value>
+ <description>
+ Configuration directory for plugins. This is where you should place
+ connector property files.
+ </description>
+ </property>
+
+ <property>
+ <name>plugin.dir</name>
+ <value>{{ plugin_dir }}</value>
+ <description>
+ Library directory for plugins.
+ </description>
+ </property>
+
+</configuration>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/configuration/trino-env.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/configuration/trino-env.xml
new file mode 100755
index 0000000000..8ee9ceb318
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/configuration/trino-env.xml
@@ -0,0 +1,75 @@
+<?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="true">
+ <property>
+ <name>trino_user</name>
+ <display-name>Trino User</display-name>
+ <value>trino</value>
+ <property-type>USER</property-type>
+ <value-attributes>
+ <type>user</type>
+ <overridable>false</overridable>
+ <user-groups>
+ <property>
+ <type>cluster-env</type>
+ <name>user_group</name>
+ </property>
+ <property>
+ <type>trino-env</type>
+ <name>trino_group</name>
+ </property>
+ </user-groups>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <property>
+ <name>trino_group</name>
+ <display-name>Trino Group</display-name>
+ <value>hadoop</value>
+ <property-type>GROUP</property-type>
+ <description>trino group</description>
+ <value-attributes>
+ <type>user</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <property>
+ <name>java_home</name>
+ <display-name>Trino Java Home</display-name>
+ <value>/opt/jdk17</value>
+ <description>Trino Java Home jdk 17 needed.</description>
+ </property>
+
+ <property>
+ <name>content</name>
+ <description>trino launcher</description>
+ <value>#!/bin/sh -eu
+export JAVA_HOME="{{trino_java_home}}"
+export PATH=$JAVA_HOME/bin:$PATH
+exec "$(dirname "$0")/launcher.py" "$@"
+ </value>
+ </property>
+
+
+</configuration>
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/metainfo.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/metainfo.xml
new file mode 100755
index 0000000000..8f5b352852
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/metainfo.xml
@@ -0,0 +1,123 @@
+<?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>TRINO</name>
+ <displayName>TRINO</displayName>
+ <comment>Trino is an open source distributed SQL query engine for running
+ interactive analytic queries against data sources of all sizes ranging
+ from gigabytes to petabytes. </comment>
+ <version>428</version>
+ <components>
+ <component>
+ <name>TRINO_COORDINATOR</name>
+ <displayName>Trino coordinator</displayName>
+ <category>MASTER</category>
+ <cardinality>1</cardinality>
+ <versionAdvertised>true</versionAdvertised>
+ <commandScript>
+ <script>scripts/trino_coordinator.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>600</timeout>
+ </commandScript>
+ </component>
+
+ <component>
+ <name>TRINO_WORKER</name>
+ <displayName>Trino worker</displayName>
+ <category>SLAVE</category>
+ <cardinality>1+</cardinality>
+ <versionAdvertised>true</versionAdvertised>
+ <commandScript>
+ <script>scripts/trino_worker.py</script>
+ <scriptType>PYTHON</scriptType>
+ </commandScript>
+ </component>
+
+
+ <component>
+ <name>TRINO_CLI</name>
+ <displayName>Trino command line interface</displayName>
+ <category>CLIENT</category>
+ <cardinality>1+</cardinality>
+ <versionAdvertised>true</versionAdvertised>
+ <commandScript>
+ <script>scripts/trino_cli.py</script>
+ <scriptType>PYTHON</scriptType>
+ </commandScript>
+ </component>
+ </components>
+
+ <configuration-dependencies>
+ <config-type>node.properties</config-type>
+ <config-type>config.properties</config-type>
+ <config-type>jvm.config</config-type>
+ <config-type>trino-env</config-type>
+ </configuration-dependencies>
+
+ <commandScript>
+ <script>scripts/service_check.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>300</timeout>
+ </commandScript>
+
+ <quickLinksConfigurations>
+ <quickLinksConfiguration>
+ <fileName>quicklinks.json</fileName>
+ <default>true</default>
+ </quickLinksConfiguration>
+ </quickLinksConfigurations>
+
+
+ <osSpecifics>
+ <osSpecific>
+ <osFamily>redhat9,redhat8,redhat7,amazonlinux2,redhat6,suse11,suse12</osFamily>
+ <packages>
+ <package>
+ <name>trino_${stack_version}</name>
+ </package>
+ <package>
+ <name>trino_${stack_version}-cli</name>
+ </package>
+ <package>
+ <name>trino_${stack_version}-server</name>
+ </package>
+ </packages>
+ </osSpecific>
+ <osSpecific>
+ <osFamily>debian7,debian9,ubuntu12,ubuntu14,ubuntu16,ubuntu18</osFamily>
+ <packages>
+ <package>
+ <name>trino_${stack_version}</name>
+ </package>
+ <package>
+ <name>trino_${stack_version}-cli</name>
+ </package>
+ <package>
+ <name>trino_${stack_version}-server</name>
+ </package>
+ </packages>
+ </osSpecific>
+ </osSpecifics>
+
+ </service>
+ </services>
+</metainfo>
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/package/__init__.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/package/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/package/scripts/__init__.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/package/scripts/__init__.py
new file mode 100755
index 0000000000..e69de29bb2
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/package/scripts/common.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/package/scripts/common.py
new file mode 100755
index 0000000000..de60149240
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/package/scripts/common.py
@@ -0,0 +1,68 @@
+# -*- coding: utf-8 -*-
+#
+# Licensed 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.core.resources.system import Execute
+import re
+from resource_management import *
+def recursive_glob(rootdir='.', suffix='', filter_func=None):
+ import glob
+ import os
+
+ """Recursively glob files with a specific suffix from rootdir, and apply an optional filter."""
+ files = [
+ os.path.join(looproot, filename)
+ for looproot, _, filenames in os.walk(rootdir)
+ for filename in filenames if filename.endswith(suffix)
+ ]
+ # 如果提供了过滤函数,进一步过滤文件列表
+ if filter_func is not None:
+ files = [file for file in files if filter_func(file)]
+ return files
+
+
+def process_connector_conf(catalog_conf_dir,trino_user,trino_group):
+ white_list=["jmx", "tpcds", "tpch"]
+
+ config = Script.get_config()
+ connector_lists = {k: v for k, v in config['configurations']['connectors.properties'].items() if k.startswith("connector_")}
+ for k, v in connector_lists.items():
+ connector_tpl_content = config['configurations']['connectors.properties'][k]
+ connector_tpl_content_dict = dict(item.split('=') for item in connector_tpl_content.split('\\n'))
+
+
+ connector_name = k.split("_")[1]
+ connector_file = os.path.join(catalog_conf_dir, connector_name + '.properties')
+ print(f"writing connector file to {connector_file} {connector_tpl_content_dict}")
+
+ PropertiesFile(connector_file,
+ properties = connector_tpl_content_dict,
+ owner=trino_user,
+ group=trino_group
+ )
+
+ # 遍历删除catalog 目录下所有 .properties
+ connector_filepaths = recursive_glob(catalog_conf_dir, ".properties")
+ connector_name_lists = {k.split("connector_")[1] for k, v in config['configurations']['connectors.properties'].items() if k.startswith("connector_")}
+ for filepath in connector_filepaths:
+ connector_file_name = os.path.basename(filepath)
+ connector_name = connector_file_name.split(".properties")[0]
+ if connector_name not in connector_name_lists and connector_name not in white_list:
+ print(f" connector file will be removed {filepath}")
+ File(filepath,action = "delete")
+
+
+def check_jdk_version():
+ pass
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/package/scripts/params.py
new file mode 100755
index 0000000000..fd2918aaf5
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/package/scripts/params.py
@@ -0,0 +1,86 @@
+#!/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 socket
+import os
+from urllib.parse import urlparse
+
+from ambari_commons.constants import AMBARI_SUDO_BINARY
+from resource_management import *
+from resource_management.libraries.functions.stack_features import check_stack_feature
+from resource_management.libraries.functions.constants import StackFeature
+from resource_management.libraries.functions import conf_select, stack_select
+from resource_management.libraries.functions.version import format_stack_version, get_major_version
+from resource_management.libraries.functions.copy_tarball import get_sysprep_skip_copy_tarballs_hdfs
+from resource_management.libraries.functions.format import format
+from resource_management.libraries.functions.default import default
+from resource_management.libraries.functions import get_kinit_path
+from resource_management.libraries.functions.get_not_managed_resources import get_not_managed_resources
+from resource_management.libraries.resources.hdfs_resource import HdfsResource
+from resource_management.libraries.script.script import Script
+from ambari_commons.constants import AMBARI_SUDO_BINARY
+from resource_management.libraries.functions.copy_tarball import get_current_version
+from resource_management.libraries.functions.stack_features import check_stack_feature, get_stack_feature_version
+from resource_management.libraries.functions import StackFeature
+
+
+
+# config object that holds the configurations declared in the config xml file
+config = Script.get_config()
+config_properties = config['configurations']['config.properties']
+
+node_properties = config['configurations']['node.properties']
+jvm_config = config['configurations']['jvm.config']['jvm.config']
+connectors_to_add = config['configurations']['connectors.properties']['connectors.to.add']
+connectors_to_delete = config['configurations']['connectors.properties']['connectors.to.delete']
+memory_configs = ['query.max-memory-per-node', 'query.max-memory']
+
+stack_root = Script.get_stack_root()
+hadoop_conf_dir = conf_select.get_hadoop_conf_dir()
+
+component_directory = "trino"
+trino_home = format("{stack_root}/current/{component_directory}")
+trino_conf_dir = format("{stack_root}/current/{component_directory}/etc")
+trino_user = config['configurations']['trino-env']['trino_user']
+trino_group = config['configurations']['trino-env']['trino_group']
+
+trino_java_home = config['configurations']['trino-env']['java_home']
+trino_launcher_content = config['configurations']['trino-env']['content']
+
+trino_launcher_bin_path = f"{trino_home}/bin/launcher"
+trino_pid_dir = "/var/run/trino"
+trino_log_dir = "/var/log/trino"
+
+plugin_dir = f"{trino_home}/plugin"
+catalog_conf_dir = f"{trino_home}/etc/catalog"
+trino_pid_file = f"{trino_pid_dir}/launcher.pid"
+trino_node_data_dir = f"{trino_home}"
+
+trino_start_cmd = format("{trino_home}/bin/launcher start")
+trino_stop_cmd = format("{trino_home}/bin/launcher stop")
+
+trino_coordinator_hosts = default("/clusterHostInfo/trino_coordinator_hosts", None)
+has_trino_coordinator = bool(trino_coordinator_hosts)
+
+trino_http_port = config_properties["http-server.http.port"]
+if has_trino_coordinator:
+ discovery_uri = f"http://{trino_coordinator_hosts[0]}:{trino_http_port}"
+else:
+ has_trino_coordinator=""
+smoke_user = config['configurations']['cluster-env']['smokeuser']
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/package/scripts/trino_cli.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/package/scripts/trino_cli.py
new file mode 100755
index 0000000000..fe58defa2f
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/package/scripts/trino_cli.py
@@ -0,0 +1,39 @@
+# -*- coding: utf-8 -*-
+#
+# Licensed 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.core.resources.system import Execute
+from resource_management.core.exceptions import ClientComponentHasNoStatus
+
+
+class Cli(Script):
+ def install(self, env):
+ self.install_packages(env)
+ def status(self, env):
+ raise ClientComponentHasNoStatus()
+
+ def configure(self, env):
+ import params
+ env.set_params(params)
+
+ def start(self, env):
+ import params
+ env.set_params(params)
+
+ def stop(self, env):
+ import params
+ env.set_params(params)
+
+if __name__ == '__main__':
+ Cli().execute()
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/package/scripts/trino_client.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/package/scripts/trino_client.py
new file mode 100755
index 0000000000..0da0841b09
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/package/scripts/trino_client.py
@@ -0,0 +1,266 @@
+# -*- coding: utf-8 -*-
+#
+# Licensed 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.
+
+"""
+Simple client to communicate with a Trino server.
+"""
+from httplib import HTTPConnection, HTTPException
+import logging
+import json
+import socket
+import sys
+import time
+
+from urllib2 import HTTPError, urlopen, URLError
+
+
+URL_TIMEOUT_MS = 5000
+NUM_ROWS = 1000
+DATA_RESP = 'data'
+NEXT_URI_RESP = 'nextUri'
+RETRY_TIMEOUT = 120
+SYSTEM_RUNTIME_NODES = 'select * from system.runtime.nodes'
+SHOW_CATALOGS = 'show catalogs'
+SLEEP_INTERVAL = 10
+
+logging.basicConfig(stream=sys.stdout)
+_LOGGER = logging.getLogger(__name__)
+
+def smoketest_trino(client, all_hosts):
+ ensure_nodes_are_up(client, all_hosts)
+ ensure_catalogs_are_available(client)
+ client.execute_query('select * from nation', schema='sf1', catalog='tpch')
+ rows = client.get_rows()
+ if len(rows) != 25:
+ raise RuntimeError('Trino server failed to return the correct \
+number of rows from nation table in TPCH connector. Expected 25 but got {0}'.format(len(rows)))
+
+def ensure_catalogs_are_available(client):
+ rows = []
+ elapsed_time = 0
+ while elapsed_time < RETRY_TIMEOUT:
+ client.execute_query(SHOW_CATALOGS)
+ rows = client.get_rows()
+ if not rows:
+ time.sleep(SLEEP_INTERVAL)
+ _LOGGER.debug('Failed to load catalogs after '
+ 'waiting for %d seconds. Retrying...' % elapsed_time)
+ elapsed_time += SLEEP_INTERVAL
+ else:
+ break
+ if not rows:
+ raise RuntimeError('Trino server failed to load all catalogs within \
+{0} seconds.'.format(RETRY_TIMEOUT))
+
+
+def ensure_nodes_are_up(client, all_hosts):
+ result = True
+ elapsed_time = 0
+ while elapsed_time < RETRY_TIMEOUT:
+ result = client.execute_query(SYSTEM_RUNTIME_NODES)
+ if not result:
+ time.sleep(SLEEP_INTERVAL)
+ _LOGGER.debug('Status retrieval for the server failed after '
+ 'waiting for %d seconds. Retrying...' % elapsed_time)
+ elapsed_time += SLEEP_INTERVAL
+ else:
+ break
+ if not result:
+ raise RuntimeError('Trino server failed to start within \
+{0} seconds.'.format(RETRY_TIMEOUT))
+
+ # Verify that the nodes we expect to have registered with the Discovery
+ # service have actually registered correctly
+ elapsed_time = 0
+ are_expected_nodes_up = False
+ while elapsed_time < RETRY_TIMEOUT:
+ client.execute_query(SYSTEM_RUNTIME_NODES)
+ nodes_returned_from_trino = []
+ for row in client.get_rows():
+ nodes_returned_from_trino.append(row[0])
+ if len(nodes_returned_from_trino) == len(all_hosts):
+ are_expected_nodes_up = True
+ break
+ else:
+ time.sleep(SLEEP_INTERVAL)
+ _LOGGER.debug('Elapsed time {0}'.format(elapsed_time))
+ _LOGGER.debug(
+ 'Number of hosts returned from Presto {0} do not match number of hosts specified by user {1}'.format(
+ nodes_returned_from_trino, all_hosts))
+ elapsed_time += SLEEP_INTERVAL
+ if not are_expected_nodes_up:
+ raise RuntimeError(
+ 'Number of hosts returned from Presto {0} do not equal the number of hosts specified by user {1}'.format(
+ nodes_returned_from_trino, all_hosts))
+
+# This class was copied more or less verbatim from
+# https://github.com/trinosql/trino-admin/blob/master/trinoadmin/trinoclient.py
+class TrinoClient:
+ response_from_server = {}
+ # rows returned by the query
+ rows = []
+ next_uri = ''
+
+ def __init__(self, server, user, port=None):
+ self.server = server
+ self.user = user
+ self.port = port if port else None
+
+ def clear_old_results(self):
+ if self.rows:
+ self.rows = []
+
+ if self.next_uri:
+ self.next_uri = ''
+
+ if self.response_from_server:
+ self.response_from_server = {}
+
+ def execute_query(self, sql, schema='sf1', catalog='tpch'):
+ """
+ Execute a query connecting to Trino server using passed parameters.
+
+ Client sends http POST request to the Trino server, page:
+ '/v1/statement'. Header information should
+ include: X-Presto-Catalog, X-Presto-Schema, X-Presto-User
+
+ Args:
+ sql: SQL query to be executed
+ schema: Presto schema to be used while executing query
+ (default=default)
+ catalog: Catalog to be used by the server
+
+ Returns:
+ True or False exit status
+ """
+ if not sql:
+ raise InvalidArgumentError('SQL query missing')
+
+ if not self.server:
+ raise InvalidArgumentError('Server IP missing')
+
+ if not self.user:
+ raise InvalidArgumentError('Username missing')
+
+ if not self.port:
+ raise InvalidArgumentError('Port missing')
+
+ self.clear_old_results()
+
+ headers = {'X-Presto-Catalog': catalog,
+ 'X-Presto-Schema': schema,
+ 'X-Presto-User': self.user}
+ answer = ''
+ try:
+ _LOGGER.info('Connecting to server at: ' + self.server +
+ ':' + str(self.port) + ' as user ' + self.user)
+ conn = HTTPConnection(self.server, int(self.port), False,
+ URL_TIMEOUT_MS)
+ conn.request('POST', '/v1/statement', sql, headers)
+ response = conn.getresponse()
+
+ if response.status != 200:
+ conn.close()
+ _LOGGER.error('Connection error: '
+ + str(response.status) + ' ' + response.reason)
+ return False
+
+ answer = response.read()
+ conn.close()
+
+ self.response_from_server = json.loads(answer)
+ _LOGGER.info('Query executed successfully')
+ return True
+ except (HTTPException, socket.error):
+ _LOGGER.error('Error connecting to trino server at: ' +
+ self.server + ':' + str(self.port))
+ return False
+ except ValueError as e:
+ _LOGGER.error('Error connecting to Trino server: ' + str(e) +
+ ' error from server: ' + answer)
+ raise e
+
+ def get_response_from(self, uri):
+ """
+ Sends a GET request to the Trino server at the specified next_uri
+ and updates the response
+ """
+ try:
+ conn = urlopen(uri, None, URL_TIMEOUT_MS)
+ answer = conn.read()
+ conn.close()
+
+ self.response_from_server = json.loads(answer)
+ _LOGGER.info('GET request successful for uri: ' + uri)
+ return True
+ except (HTTPError, URLError) as e:
+ _LOGGER.error('Error opening the trino response uri: ' +
+ str(e.reason))
+ return False
+
+ def build_results_from_response(self):
+ """
+ Build result from the response
+
+ The reponse_from_server may contain up to 3 uri's.
+ 1. link to fetch the next packet of data ('nextUri')
+ 2. TODO: information about the query execution ('infoUri')
+ 3. TODO: cancel the query ('partialCancelUri').
+ """
+ if NEXT_URI_RESP in self.response_from_server:
+ self.next_uri = self.response_from_server[NEXT_URI_RESP]
+ else:
+ self.next_uri = ''
+
+ if DATA_RESP in self.response_from_server:
+ if self.rows:
+ self.rows.extend(self.response_from_server[DATA_RESP])
+ else:
+ self.rows = self.response_from_server[DATA_RESP]
+
+ def get_rows(self, num_of_rows=NUM_ROWS):
+ """
+ Get the rows returned from the query.
+
+ The client sends GET requests to the server using the 'nextUri'
+ from the previous response until the servers response does not
+ contain anymore 'nextUri's. When there is no 'nextUri' the query is
+ finished
+
+ Note that this can only be called once and does not page through
+ the results.
+
+ Parameters:
+ num_of_rows: to be retrieved. 1000 by default
+ """
+ if num_of_rows == 0:
+ return []
+
+ self.build_results_from_response()
+
+ if not self.get_next_uri():
+ return []
+
+ while self.get_next_uri():
+ if not self.get_response_from(self.get_next_uri()):
+ return []
+ if len(self.rows) <= num_of_rows:
+ self.build_results_from_response()
+ return self.rows
+
+ def get_next_uri(self):
+ return self.next_uri
+
+class InvalidArgumentError(ValueError):
+ pass
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/package/scripts/trino_coordinator.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/package/scripts/trino_coordinator.py
new file mode 100755
index 0000000000..54419f8f45
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/package/scripts/trino_coordinator.py
@@ -0,0 +1,110 @@
+# -*- coding: utf-8 -*-
+#
+# Licensed 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 uuid
+import os.path as path
+import os
+from resource_management import *
+from common import process_connector_conf
+
+class Coordinator(Script):
+ def install(self, env):
+ self.install_packages(env)
+
+ def stop(self, env):
+ import params
+ Execute(params.trino_stop_cmd, user=params.trino_user)
+
+ def start(self, env):
+ import params
+ self.configure(env)
+ Execute(params.trino_start_cmd, user=params.trino_user)
+
+
+ def status(self, env):
+ import params
+ env.set_params(params)
+ check_process_status(params.trino_pid_file)
+
+ def configure(self, env, upgrade_type=None, config_dir=None):
+ import params
+ env.set_params(params)
+
+ mode_identified_for_file = 0o644
+ mode_identified_for_dir = 0o755
+
+
+ Directory([params.trino_node_data_dir, params.catalog_conf_dir, params.plugin_dir, params.trino_pid_dir, params.trino_log_dir],
+ owner=params.trino_user,
+ group=params.trino_group,
+ mode=mode_identified_for_dir,
+ create_parents = True
+ )
+
+
+ Directory(params.trino_home,
+ owner=params.trino_user,
+ group=params.trino_group,
+ mode=mode_identified_for_dir
+ )
+
+ File(params.trino_launcher_bin_path,
+ owner=params.trino_user,
+ group=params.trino_group,
+ content=InlineTemplate(params.trino_launcher_content),
+ mode=0o755,
+ )
+
+
+ node_properties = os.path.join(params.trino_conf_dir,'node.properties')
+ PropertiesFile(node_properties,
+ properties = params.node_properties,
+ mode=mode_identified_for_file,
+ owner=params.trino_user,
+ group=params.trino_group
+ )
+ ModifyPropertiesFile(node_properties,
+ properties = {'node.id': str(uuid.uuid4())},
+ owner = params.trino_user,
+ )
+
+ jvm_config_file = os.path.join(params.trino_conf_dir,'jvm.config')
+ File(jvm_config_file,
+ owner=params.trino_user,
+ group=params.trino_group,
+ content=InlineTemplate(params.jvm_config),
+ mode=mode_identified_for_file,
+ )
+
+ config_properties_file = os.path.join(params.trino_conf_dir,'config.properties')
+ PropertiesFile(config_properties_file,
+ properties = params.config_properties,
+ mode=mode_identified_for_file,
+ owner=params.trino_user,
+ group=params.trino_group
+ )
+
+ ModifyPropertiesFile(config_properties_file,
+ properties = {'coordinator': 'true'},
+ mode=mode_identified_for_file,
+ owner = params.trino_user
+ )
+
+ process_connector_conf(params.catalog_conf_dir,params.trino_user,params.trino_group)
+
+
+
+
+if __name__ == '__main__':
+ Coordinator().execute()
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/package/scripts/trino_worker.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/package/scripts/trino_worker.py
new file mode 100755
index 0000000000..95aecce9c3
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/package/scripts/trino_worker.py
@@ -0,0 +1,107 @@
+# -*- coding: utf-8 -*-
+#
+# Licensed 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 uuid
+import os.path as path
+from resource_management import *
+import os
+from common import process_connector_conf
+
+class Worker(Script):
+ def install(self, env):
+ self.install_packages(env)
+
+ def stop(self, env):
+ import params
+ Execute(params.trino_stop_cmd, user=params.trino_user)
+
+ def start(self, env):
+ import params
+ self.configure(env)
+ Execute(params.trino_start_cmd, user=params.trino_user)
+
+ def status(self, env):
+ import params
+ env.set_params(params)
+ check_process_status(params.trino_pid_file)
+
+ def configure(self, env, upgrade_type=None, config_dir=None):
+ import params
+ env.set_params(params)
+
+ mode_identified_for_file = 0o644
+ mode_identified_for_dir = 0o755
+
+
+ Directory([params.trino_node_data_dir, params.catalog_conf_dir, params.plugin_dir, params.trino_pid_dir, params.trino_log_dir],
+ owner=params.trino_user,
+ group=params.trino_group,
+ mode=mode_identified_for_dir,
+ create_parents = True
+ )
+
+
+ Directory(params.trino_home,
+ owner=params.trino_user,
+ group=params.trino_group,
+ mode=mode_identified_for_dir
+ )
+
+ File(params.trino_launcher_bin_path,
+ owner=params.trino_user,
+ group=params.trino_group,
+ content=InlineTemplate(params.trino_launcher_content),
+ mode=0o755,
+ )
+
+
+ node_properties = os.path.join(params.trino_conf_dir,'node.properties')
+ PropertiesFile(node_properties,
+ properties = params.node_properties,
+ mode=mode_identified_for_file,
+ owner=params.trino_user,
+ group=params.trino_group
+ )
+ ModifyPropertiesFile(node_properties,
+ properties = {'node.id': str(uuid.uuid4())},
+ owner = params.trino_user,
+ )
+
+ jvm_config_file = os.path.join(params.trino_conf_dir,'jvm.config')
+ File(jvm_config_file,
+ owner=params.trino_user,
+ group=params.trino_group,
+ content=InlineTemplate(params.jvm_config),
+ mode=mode_identified_for_file,
+ )
+
+ config_properties_file = os.path.join(params.trino_conf_dir,'config.properties')
+ PropertiesFile(config_properties_file,
+ properties = params.config_properties,
+ mode=mode_identified_for_file,
+ owner=params.trino_user,
+ group=params.trino_group
+ )
+
+ ModifyPropertiesFile(config_properties_file,
+ properties = {'coordinator': 'false'},
+ mode=mode_identified_for_file,
+ owner = params.trino_user
+ )
+
+ process_connector_conf(params.catalog_conf_dir,params.trino_user,params.trino_group)
+
+
+if __name__ == '__main__':
+ Worker().execute()
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/package/templates/launcher.j2 b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/package/templates/launcher.j2
new file mode 100644
index 0000000000..db40356484
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/package/templates/launcher.j2
@@ -0,0 +1,7 @@
+#!/bin/sh -eu
+
+
+export JAVA_HOME="{{trino_java_home}}"
+export PATH=$JAVA_HOME/bin:$PATH
+
+exec "$(dirname "$0")/launcher.py" "$@"
\ No newline at end of file
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/quicklinks/quicklinks.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/quicklinks/quicklinks.json
new file mode 100755
index 0000000000..c9498e6299
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/quicklinks/quicklinks.json
@@ -0,0 +1,21 @@
+{
+ "name": "default",
+ "description": "default quick links configuration",
+ "configuration": {
+ "links": [
+ {
+ "name": "Trino_WEB_UI",
+ "label": "Trino Web UI",
+ "requires_user_name": "false",
+ "component_name": "TRINO_COORDINATOR",
+ "url":"%@://%@:%@",
+ "port":{
+ "http_property": "http-server.http.port",
+ "http_default_port": "8285",
+ "regex": "^(\\d+)$",
+ "site": "connectors.properties"
+ }
+ }
+ ]
+ }
+}
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/setup.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/setup.py
new file mode 100755
index 0000000000..246704ee3c
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/setup.py
@@ -0,0 +1,59 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Licensed 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.
+
+try:
+ from setuptools import setup
+except ImportError:
+ from distutils.core import setup
+
+with open('README.md') as readme_file:
+ readme = readme_file.read()
+
+with open('HISTORY.rst') as history_file:
+ history = history_file.read().replace('.. :changelog:', '')
+
+test_requirements = [
+ 'tox==1.9.2',
+ 'nose==1.3.7',
+ 'mock==1.0.1',
+]
+
+
+setup(
+ name='ambari-presto',
+ version='1.3',
+ description='This project contains the integration code for integrating \
+Presto as a service in Ambari.',
+ long_description=readme + '\n\n' + history,
+ author='Teradata Corporation',
+ author_email='anton.petrov@teradata.com',
+ url='https://github.com/TeradataCenterForHadoop/ambari-presto-service',
+ packages=['package.scripts'],
+ include_package_data=True,
+ license='APLv2',
+ zip_safe=False,
+ keywords=['presto', 'ambari', 'hadoop'],
+ classifiers=[
+ 'Development Status :: 3 - Alpha',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: APLv2 License',
+ 'Natural Language :: English',
+ "Programming Language :: Python :: 2",
+ 'Programming Language :: Python :: 2.6',
+ 'Programming Language :: Python :: 2.7'
+ ],
+ test_suite='tests',
+ tests_require=test_requirements,
+)
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/themes/theme.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/themes/theme.json
new file mode 100644
index 0000000000..2297ddb66c
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/TRINO/themes/theme.json
@@ -0,0 +1,218 @@
+{
+ "name": "default",
+ "description": "Default theme for Presto service",
+ "configuration": {
+ "layouts": [
+ {
+ "name": "default",
+ "tabs": [
+ {
+ "name": "settings",
+ "display-name": "Settings",
+ "layout": {
+ "tab-columns": "2",
+ "tab-rows": "3",
+ "sections": [
+ {
+ "name": "section-node-config",
+ "display-name": "Node Config",
+ "row-index": "0",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "1",
+ "subsections": [
+ {
+ "name": "subsection-node-config",
+ "row-index": "0",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "1"
+ }
+ ]
+ },
+ {
+ "name": "section-general-config",
+ "display-name": "General Config",
+ "row-index": "0",
+ "column-index": "1",
+ "row-span": "3",
+ "column-span": "1",
+ "subsections": [
+ {
+ "name": "subsection-general-config",
+ "row-index": "0",
+ "column-index": "0",
+ "row-span": "3",
+ "column-span": "1"
+ }
+ ]
+ },
+ {
+ "name": "section-connector-config",
+ "display-name": "Connectors",
+ "row-index": "1",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "1",
+ "subsections": [
+ {
+ "name": "subsection-connector-config",
+ "row-index": "0",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "1"
+ }
+ ]
+ },
+ {
+ "name": "section-jvm-config",
+ "display-name": "JVM Config",
+ "row-index": "2",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "1",
+ "subsections": [
+ {
+ "name": "subsection-jvm-config",
+ "row-index": "0",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "1"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ],
+ "placement": {
+ "configuration-layout": "default",
+ "configs": [
+ {
+ "config": "node.properties/node.environment",
+ "subsection-name": "subsection-node-config"
+ },
+ {
+ "config": "node.properties/plugin.config-dir",
+ "subsection-name": "subsection-node-config"
+ },
+ {
+ "config": "node.properties/plugin.dir",
+ "subsection-name": "subsection-node-config"
+ },
+ {
+ "config": "connectors.properties/connectors.to.add",
+ "subsection-name": "subsection-connector-config"
+ },
+ {
+ "config": "connectors.properties/connectors.to.delete",
+ "subsection-name": "subsection-connector-config"
+ },
+ {
+ "config": "config.properties/node-scheduler.include-coordinator",
+ "subsection-name": "subsection-general-config"
+ },
+ {
+ "config": "config.properties/http-server.http.port",
+ "subsection-name": "subsection-general-config"
+ },
+ {
+ "config": "config.properties/query.max-memory",
+ "subsection-name": "subsection-general-config"
+ },
+ {
+ "config": "config.properties/query.max-memory-per-node",
+ "subsection-name": "subsection-general-config"
+ },
+ {
+ "config": "config.properties/discovery.uri",
+ "subsection-name": "subsection-general-config"
+ },
+ {
+ "config": "jvm.config/jvm.config",
+ "subsection-name": "subsection-jvm-config"
+ }
+ ]
+ },
+ "widgets": [
+ {
+ "config": "node.properties/node.environment",
+ "widget": {
+ "type": "text-area"
+ }
+ },
+ {
+ "config": "node.properties/plugin.config-dir",
+ "widget": {
+ "type": "directory"
+ }
+ },
+ {
+ "config": "node.properties/plugin.dir",
+ "widget": {
+ "type": "directory"
+ }
+ },
+ {
+ "config": "connectors.properties/connectors.to.add",
+ "widget": {
+ "type": "text-area"
+ }
+ },
+ {
+ "config": "connectors.properties/connectors.to.delete",
+ "widget": {
+ "type": "text-area"
+ }
+ },
+ {
+ "config": "config.properties/node-scheduler.include-coordinator",
+ "widget": {
+ "type": "toggle"
+ }
+ },
+ {
+ "config": "config.properties/http-server.http.port",
+ "widget": {
+ "type": "text-area"
+ }
+ },
+ {
+ "config": "config.properties/query.max-memory",
+ "widget": {
+ "type": "slider",
+ "units": [
+ {
+ "unit-name": "GB"
+ }
+ ]
+ }
+ },
+ {
+ "config": "config.properties/query.max-memory-per-node",
+ "widget": {
+ "type": "slider",
+ "units": [
+ {
+ "unit-name": "GB"
+ }
+ ]
+ }
+ },
+ {
+ "config": "config.properties/discovery.uri",
+ "widget": {
+ "type": "text-area"
+ }
+ },
+ {
+ "config": "jvm.config/jvm.config",
+ "widget": {
+ "type": "text-area"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org
(ambari) 18/22: add mpack add stack packages
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch eee
in repository https://gitbox.apache.org/repos/asf/ambari.git
commit c5e3ab675bb0a4fbc542af5fd05553f8c2afe513
Author: jialiang <ji...@gmail.com>
AuthorDate: Sat Sep 7 14:28:34 2024 +0800
add mpack
add stack packages
---
.../main/resources/scripts/ambari_mpack_tools.py | 298 +++++++++++++++++++
.../BIGTOP/3.2.0/properties/stack_packages.json | 208 ++++++++++++-
contrib/utils/mpack/README.md | 85 ++++++
contrib/utils/mpack/ambari_mpack_tools.py | 324 +++++++++++++++++++++
pom.xml | 59 ++--
5 files changed, 948 insertions(+), 26 deletions(-)
diff --git a/ambari-server/src/main/resources/scripts/ambari_mpack_tools.py b/ambari-server/src/main/resources/scripts/ambari_mpack_tools.py
new file mode 100644
index 0000000000..8333f2975e
--- /dev/null
+++ b/ambari-server/src/main/resources/scripts/ambari_mpack_tools.py
@@ -0,0 +1,298 @@
+import os
+import json
+import shutil
+import logging
+from xml.etree.ElementTree import Element, SubElement, tostring, parse
+from xml.dom import minidom
+import argparse
+
+# Configure logging
+logging.basicConfig(level=logging.INFO)
+
+
+class XMLUtils:
+ @staticmethod
+ def parse_xml(xml_path):
+ tree = parse(xml_path)
+ return tree.getroot()
+
+ @staticmethod
+ def create_xml_element(tag, text=None, attrib={}):
+ element = Element(tag, attrib)
+ if text:
+ element.text = text
+ return element
+
+ @staticmethod
+ def prettify_xml(element):
+ return minidom.parseString(tostring(element)).toprettyxml(indent=" ")
+
+ @staticmethod
+ def write_xml_file(path, element):
+ xmlstr = XMLUtils.prettify_xml(element)
+ with open(path, "w") as f:
+ f.write(xmlstr)
+
+
+class FileUtils:
+ @staticmethod
+ def ensure_directory(path):
+ os.makedirs(path, exist_ok=True)
+
+ @staticmethod
+ def remove_directory(path):
+ if os.path.exists(path):
+ shutil.rmtree(path)
+
+ @staticmethod
+ def copy_directory(src, dst):
+ shutil.copytree(src, dst)
+
+
+class Service:
+ def __init__(self, name, version):
+ self.name = name
+ self.version = version
+
+ @staticmethod
+ def get_service_version(xml_path):
+ root = XMLUtils.parse_xml(xml_path)
+ version = root.find("./services/service/version").text
+ version = version.replace("-", ".")
+ logging.info(f"Service version: {version}")
+ return version
+
+
+class Artifact:
+ def __init__(self, name, type, source_dir, service_version=None, service_name=None, stack_name=None,
+ stack_version=None):
+ self.name = name
+ self.type = type
+ self.source_dir = source_dir
+ self.service_version = service_version
+ self.service_name = service_name
+ self.stack_name = stack_name
+ self.stack_version = stack_version
+
+ def to_dict(self):
+ artifact_dict = {
+ "name": self.name,
+ "type": self.type,
+ "source_dir": self.source_dir
+ }
+ if self.service_version:
+ artifact_dict["service_version"] = self.service_version
+ if self.service_name:
+ artifact_dict["service_versions_map"] = [
+ {
+ "service_name": self.service_name,
+ "service_version": self.service_version,
+ "applicable_stacks": [
+ {
+ "stack_name": self.stack_name,
+ "stack_version": self.stack_version
+ }
+ ]
+ }
+ ]
+ return artifact_dict
+
+
+class Mpack:
+ def __init__(self, name, version, description, min_ambari_version, max_ambari_version, artifacts=None,
+ mpack_type="service", build_number=None, branch=None):
+ self.name = name
+ self.version = version
+ self.description = description
+ self.min_ambari_version = min_ambari_version
+ self.max_ambari_version = max_ambari_version
+ self.artifacts = artifacts or []
+ self.mpack_type = mpack_type
+ self.build_number = build_number
+ self.branch = branch
+
+ def to_dict(self):
+ if self.mpack_type == "service":
+ return {
+ "type": "full-release",
+ "name": self.name,
+ "version": self.version,
+ "description": self.description,
+ "prerequisites": {
+ "min_ambari_version": self.min_ambari_version,
+ "max-ambari-version": self.max_ambari_version
+ },
+ "artifacts": [artifact.to_dict() for artifact in self.artifacts]
+ }
+ else:
+ return {
+ "type": "full-release",
+ "name": self.name,
+ "version": self.version,
+ "hash": self.build_number,
+ "branch": self.branch,
+ "description": self.description,
+ "prerequisites": {
+ "min-ambari-version": f"{self.min_ambari_version}",
+ "max-ambari-version": f"{self.max_ambari_version}"
+ },
+ "artifacts": [
+ {
+ "name": "stack-definitions",
+ "type": "stack-definitions",
+ "source_dir": "stacks"
+ }
+ ]
+ }
+
+ def write_mpack_json(self, target_dir):
+ path = os.path.join(target_dir, "mpack.json")
+ with open(path, "w") as f:
+ json.dump(self.to_dict(), f, indent=2)
+
+
+class MpackBuilder:
+ def __init__(self, ambari_dir, output_directory, service_name, stack_name, stack_version, mpack_version):
+ self.ambari_dir = ambari_dir
+ self.output_directory = output_directory
+ self.service_name = service_name
+ self.stack_name = stack_name
+ self.stack_version = stack_version
+ self.mpack_version = mpack_version
+
+ def build_mpack(self, mpack_type):
+ if mpack_type == "service":
+ mpack_name = f"{self.service_name.lower()}-ambari-mpack"
+ source_dir = self.get_service_source_dir()
+ service_version = Service.get_service_version(f"{source_dir}/metainfo.xml")
+ else: # mpack_type == "stack"
+ mpack_name = "ambari-mpack"
+ source_dir = self.get_stack_source_dir()
+ service_version = None
+
+ target_dir = self.prepare_target_directory(mpack_name)
+ self.copy_source_to_target(source_dir, target_dir, mpack_type, service_version)
+ if mpack_type == "service":
+ self.create_metainfo_common(service_version, target_dir)
+ self.create_mpack(target_dir, mpack_type, service_version)
+ self.create_mpack_tarball(self.output_directory, mpack_name)
+
+ def get_service_source_dir(self):
+ return f"{self.ambari_dir}/ambari-server/src/main/resources/stacks/{self.stack_name}/{self.stack_version}/services/{self.service_name}"
+
+ def get_stack_source_dir(self):
+ return f"{self.ambari_dir}/ambari-server/src/main/resources"
+
+ def prepare_target_directory(self, mpack_name):
+ target_dir = os.path.join(self.output_directory, mpack_name)
+ FileUtils.remove_directory(target_dir)
+ FileUtils.ensure_directory(target_dir)
+ os.chdir(target_dir)
+ return target_dir
+
+ def copy_source_to_target(self, source_dir, target_dir, mpack_type, service_version):
+ if mpack_type == "service":
+ common_dir = f"{target_dir}/common-services/{self.service_name}/{service_version}"
+ FileUtils.remove_directory(common_dir)
+ FileUtils.copy_directory(source_dir, common_dir)
+ FileUtils.ensure_directory(f"addon-services/{self.service_name}/{service_version}")
+ else: # mpack_type == "stack"
+ common_dir = f"{target_dir}/common-services/"
+ stack_dir = f"{target_dir}/stacks/BIGTOP/"
+ FileUtils.copy_directory(f"{source_dir}/common-services", common_dir)
+ FileUtils.copy_directory(f"{source_dir}/stacks/BIGTOP", stack_dir)
+
+ def build_service_mpack(self):
+ self.build_mpack("service")
+
+ def build_stack_mpack(self):
+ self.build_mpack("stack")
+
+ def create_metainfo_common(self, service_version, target_dir):
+ root = XMLUtils.create_xml_element("metainfo", attrib={"schemaVersion": "2.0"})
+ services = SubElement(root, "services")
+ service = SubElement(services, "service")
+ SubElement(service, "name").text = self.service_name
+ SubElement(service, "version").text = service_version
+ SubElement(service, "extends").text = f"common-services/{self.service_name}/{service_version}"
+ path = os.path.join(target_dir, f"addon-services/{self.service_name}/{service_version}/metainfo.xml")
+ XMLUtils.write_xml_file(path, root)
+
+ def create_mpack(self, target_dir, mpack_type, service_version=None):
+ artifacts = []
+ build_number = None
+ branch = None
+ if mpack_type == "service":
+ artifact1 = Artifact(f"{self.service_name}-service-definitions", "service-definitions", "common-services",
+ service_version)
+ artifact2 = Artifact(f"{self.service_name.lower()}-addon-service-definitions",
+ "stack-addon-service-definitions", "addon-services", service_version,
+ self.service_name,
+ self.stack_name, self.stack_version)
+ artifacts = [artifact1, artifact2]
+ else:
+ build_number = "xxasdfasfdasf"
+ branch = "udh3"
+ mpack = Mpack(f"{self.service_name.lower()}-ambari-mpack", self.mpack_version,
+ f"{self.service_name} Management Pack", "2.7.5.0.0", "3.7.5.0.0", artifacts=artifacts,
+ build_number=build_number, branch=branch, mpack_type=mpack_type)
+ mpack.write_mpack_json(target_dir)
+
+ def create_mpack_tarball(self, output_directory, mpack_name):
+ os.chdir(output_directory)
+ tarball_name = f"{mpack_name}-{self.mpack_version}.tar.gz"
+ os.system(f"tar -czvf {tarball_name} {mpack_name}")
+ logging.info(f"Created mpack tarball: {tarball_name}")
+
+
+
+def setup_options():
+ parser = argparse.ArgumentParser(description='ambari Mpack Tools.')
+
+ # Add the arguments
+ parser.add_argument('-ambari-dir',
+ type=str,
+ help='The ambari prj dir')
+ parser.add_argument('-stack-name',
+ type=str,
+ help='the ambari stack u want package')
+
+ parser.add_argument('-service-name',
+ type=str,
+ help='the ambari service u want package')
+
+ parser.add_argument('-stack-version',
+ type=str,
+ help='upload components to nexus build')
+
+ parser.add_argument('-mpack-version',
+ type=str,
+ help='upload os pkgs to nexus')
+ parser.add_argument('-output-dir',
+ type=str,
+ help='upload os pkgs to nexus')
+
+ args = parser.parse_args()
+ print(f"main program params is : {args}")
+ return args
+
+
+# Usage
+if __name__ == "__main__":
+
+ args = setup_options()
+ ambari_dir = args.ambari_dir
+ stack_name = args.stack_name
+ service_name = args.service_name
+ stack_version = args.stack_version
+ mpack_version = args.mpack_version
+ output_dir = args.output_dir
+ ambari_dir=os.path.abspath(ambari_dir)
+ output_dir=os.path.abspath(output_dir)
+
+ if service_name:
+ mpack_builder = MpackBuilder(ambari_dir, output_dir, service_name, stack_name, stack_version, mpack_version)
+ mpack_builder.build_service_mpack()
+ else:
+ mpack_builder = MpackBuilder(ambari_dir, output_dir, stack_name, stack_name, stack_version, mpack_version)
+ mpack_builder.build_stack_mpack()
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/properties/stack_packages.json b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/properties/stack_packages.json
index 3025e61075..e61d57a072 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/properties/stack_packages.json
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/properties/stack_packages.json
@@ -1,6 +1,110 @@
{
"BIGTOP": {
"stack-select": {
+ "CELEBORN": {
+ "CELEBORN_MASTER": {
+ "STACK-SELECT-PACKAGE": "celeborn",
+ "INSTALL": [
+ "celeborn"
+ ],
+ "PATCH": [
+ "celeborn"
+ ],
+ "STANDARD": [
+ "celeborn"
+ ]
+ },
+ "CELEBORN_WORKER": {
+ "STACK-SELECT-PACKAGE": "celeborn",
+ "INSTALL": [
+ "celeborn"
+ ],
+ "PATCH": [
+ "celeborn"
+ ],
+ "STANDARD": [
+ "celeborn"
+ ]
+ }
+ },
+ "HADOOP_ROUTER": {
+ "ROUTER": {
+ "STACK-SELECT-PACKAGE": "hadoop-hdfs-router",
+ "INSTALL": [
+ "hadoop-hdfs-router"
+ ],
+ "PATCH": [
+ "hadoop-hdfs-router"
+ ],
+ "STANDARD": [
+ "hadoop-hdfs-router"
+ ]
+ }
+ },
+ "ALLUXIO": {
+ "ALLUXIO_MASTER": {
+ "STACK-SELECT-PACKAGE": "alluxio",
+ "INSTALL": [
+ "alluxio"
+ ],
+ "PATCH": [
+ "alluxio"
+ ],
+ "STANDARD": [
+ "alluxio"
+ ]
+ },
+ "ALLUXIO_WORKER": {
+ "STACK-SELECT-PACKAGE": "alluxio",
+ "INSTALL": [
+ "alluxio"
+ ],
+ "PATCH": [
+ "alluxio"
+ ],
+ "STANDARD": [
+ "alluxio"
+ ]
+ }
+ },
+ "TRINO": {
+ "TRINO_COORDINATOR": {
+ "STACK-SELECT-PACKAGE": "trino",
+ "INSTALL": [
+ "trino"
+ ],
+ "PATCH": [
+ "trino"
+ ],
+ "STANDARD": [
+ "trino"
+ ]
+ },
+ "TRINO_WORKER": {
+ "STACK-SELECT-PACKAGE": "trino",
+ "INSTALL": [
+ "trino"
+ ],
+ "PATCH": [
+ "trino"
+ ],
+ "STANDARD": [
+ "trino"
+ ]
+ },
+ "TRINO_CLI": {
+ "STACK-SELECT-PACKAGE": "trino-cli",
+ "INSTALL": [
+ "trino-cli"
+ ],
+ "PATCH": [
+ "trino-cli"
+ ],
+ "STANDARD": [
+ "trino-cli"
+ ]
+ }
+ },
"HBASE": {
"HBASE_CLIENT": {
"STACK-SELECT-PACKAGE": "hbase-client",
@@ -215,6 +319,20 @@
]
}
},
+ "KNOX": {
+ "KNOX_GATEWAY": {
+ "STACK-SELECT-PACKAGE": "knox-server",
+ "INSTALL": [
+ "knox-server"
+ ],
+ "PATCH": [
+ "knox-server"
+ ],
+ "STANDARD": [
+ "knox-server"
+ ]
+ }
+ },
"MAPREDUCE2": {
"HISTORYSERVER": {
"STACK-SELECT-PACKAGE": "hadoop-mapreduce-historyserver",
@@ -283,6 +401,20 @@
]
}
},
+ "KYUUBI": {
+ "KYUUBI_SERVER": {
+ "STACK-SELECT-PACKAGE": "kyuubi-server",
+ "INSTALL": [
+ "kyuubi-server"
+ ],
+ "PATCH": [
+ "kyuubi-server"
+ ],
+ "STANDARD": [
+ "kyuubi-server"
+ ]
+ }
+ },
"LIVY": {
"LIVY_CLIENT": {
"STACK-SELECT-PACKAGE": "livy-client",
@@ -336,6 +468,20 @@
]
}
},
+ "KYUUBI": {
+ "KYUUBI_SERVER": {
+ "STACK-SELECT-PACKAGE": "kyuubi-server",
+ "INSTALL": [
+ "kyuubi-server"
+ ],
+ "PATCH": [
+ "kyuubi-server"
+ ],
+ "STANDARD": [
+ "kyuubi-server"
+ ]
+ }
+ },
"RANGER": {
"RANGER_ADMIN": {
"STACK-SELECT-PACKAGE": "ranger-admin",
@@ -417,11 +563,34 @@
}
},
"YARN": {
+ "APP_TIMELINE_SERVER": {
+ "STACK-SELECT-PACKAGE": "hadoop-yarn-timelineserver",
+ "INSTALL": [
+ "hadoop-yarn-timelineserver"
+ ],
+ "PATCH": [
+ "hadoop-yarn-timelineserver"
+ ],
+ "STANDARD": [
+ "hadoop-yarn-timelineserver"
+ ]
+ },
+ "TIMELINE_READER": {
+ "STACK-SELECT-PACKAGE": "hadoop-yarn-timelinereader",
+ "INSTALL": [
+ "hadoop-yarn-timelinereader"
+ ],
+ "PATCH": [
+ "hadoop-yarn-timelinereader"
+ ],
+ "STANDARD": [
+ "hadoop-yarn-timelinereader"
+ ]
+ },
"NODEMANAGER": {
"STACK-SELECT-PACKAGE": "hadoop-yarn-nodemanager",
"INSTALL": [
- "hadoop-yarn-nodemanager",
- "hadoop-client"
+ "hadoop-yarn-nodemanager"
],
"PATCH": [
"hadoop-yarn-nodemanager"
@@ -433,8 +602,7 @@
"RESOURCEMANAGER": {
"STACK-SELECT-PACKAGE": "hadoop-yarn-resourcemanager",
"INSTALL": [
- "hadoop-yarn-resourcemanager",
- "hadoop-client"
+ "hadoop-yarn-resourcemanager"
],
"PATCH": [
"hadoop-yarn-resourcemanager"
@@ -446,8 +614,7 @@
"YARN_CLIENT": {
"STACK-SELECT-PACKAGE": "hadoop-yarn-client",
"INSTALL": [
- "hadoop-yarn-client",
- "hadoop-client"
+ "hadoop-yarn-client"
],
"PATCH": [
"hadoop-yarn-client"
@@ -455,6 +622,18 @@
"STANDARD": [
"hadoop-client"
]
+ },
+ "YARN_REGISTRY_DNS": {
+ "STACK-SELECT-PACKAGE": "hadoop-yarn-registrydns",
+ "INSTALL": [
+ "hadoop-yarn-registrydns"
+ ],
+ "PATCH": [
+ "hadoop-yarn-registrydns"
+ ],
+ "STANDARD": [
+ "hadoop-yarn-registrydns"
+ ]
}
},
"ZEPPELIN": {
@@ -541,6 +720,13 @@
"component": "kafka-broker"
}
],
+ "knox": [
+ {
+ "conf_dir": "/etc/knox/conf",
+ "current_dir": "{0}/current/knox-server/conf",
+ "component": "knox-server"
+ }
+ ],
"phoenix": [
{
"conf_dir": "/etc/phoenix/conf",
@@ -579,6 +765,13 @@
"component": "spark-client"
}
],
+ "kyuubi": [
+ {
+ "conf_dir": "/etc/kyuubi/conf",
+ "current_dir": "{0}/current/kyuubi-server/conf",
+ "component": "kyuubi-server"
+ }
+ ],
"flink": [
{
"conf_dir": "/etc/flink/conf",
@@ -635,6 +828,9 @@
"kafka"
]
},
+ "KNOX": {
+ "packages": ["knox"]
+ },
"MAPREDUCE2": {
"packages": []
},
diff --git a/contrib/utils/mpack/README.md b/contrib/utils/mpack/README.md
new file mode 100644
index 0000000000..9dd1a044e6
--- /dev/null
+++ b/contrib/utils/mpack/README.md
@@ -0,0 +1,85 @@
+<!---
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--->
+# Ambari Management Pack Tool Usage Guide
+
+The Ambari Management Pack Tool is an instrumental tool designed for comprehensively packaging service code or stack code from your project into a single MPack package. This capability greatly facilitates the process of updating your Ambari services, ensuring a smooth and efficient deployment of new features or modifications.
+
+## Use Cases
+n day-to-day operations, 99% of modifications usually occur under the Ambari Stack rather than the Ambari Server itself. In such circumstances, using MPack to update only the contents of the Stack becomes highly necessary. For instance, when you are updating the management code of an Ambari service in an already existing environment, such as the HDFS service, there's no need for manual distribution or synchronization, just simply package and update with an MPack.
+For example, when you are developing a new service or modifying a service's configuration, it can be challenging to apply changes to an existing live environment. This is because Ambari writes configurations into the database at startup, making your modifications hard to implement without reinstallation. However, using MPack can resolve this issue, as the installation of an MPack will re-enter the contents of the MPack into the database, making it a powerful tool for applying updates or [...]
+
+## Preparation
+
+Before starting, make sure you have Python 3 and Ambari Server installed, and that you have the address of the Ambari project at hand.
+
+## Overview of Steps
+
+1. **Generate MPack**: Generate the needed MPack package by providing specific commands.
+2. **Stop Ambari Server**: Stop the Ambari Server before installing a new MPack.
+3. **Install MPack**: Install the generated MPack package using specified commands.
+4. **Start Ambari Server**: Restart the Ambari Server after completing the MPack installation.
+
+### Detailed Steps
+
+#### Generate MPack
+
+Use the following command to generate an MPack package. Be sure to replace the variables with your actual path and version information.
+
+```shell
+python3 ambari-server/src/main/resources/scripts/ambari_mpack_tools.py -ambari-dir=$AMBARI_DIR -stack-name=BIGTOP -stack-version=3.3.0 -mpack-version=3.3.0 -output-dir=$OUT_DIR
+```
+
+Parameter description:
+
+- `-ambari-dir`: The path to the Ambari project.
+- `-stack-name`: The stack name of the MPack being packaged, which must be consistent with the stack name in the project.
+- `-stack-version`: Under which stack version the packaged service is.
+- `-mpack-version`: The version of the MPack package being output.
+- `-output-dir`: The location where the MPack package is output.
+
+#### Stop Ambari Server
+
+Stop the Ambari Server before installing the new MPack:
+
+```shell
+ambari-server stop
+```
+
+#### Install MPack
+
+Use the following command to install the MPack, replacing the path with the location of your MPack package:
+
+```shell
+ambari-server install-mpack -s --purge --verbose --mpack=/tmp/bgtp-ambari-mpack-1.0.0.0-SNAPSHOT-bgtp-ambari-mpack.tar.gz
+```
+
+The `--purge` option will automatically delete the previous old stack definitions and then symlink the installed MPack to the corresponding location.
+
+#### Start Ambari Server
+
+After completing the steps above, restart the Ambari Server:
+
+```shell
+ambari-server start
+```
+
+## Reference Material
+
+For more detailed information, please refer to the [Ambari official documentation](https://cwiki.apache.org/confluence/display/AMBARI/Management+Packs#ManagementPacks-ManagementPackStructure).
+
+---
+Thank you for choosing the Ambari Management Pack. We hope this documentation helps you more effectively manage and update the contents of your Ambari Stack.
\ No newline at end of file
diff --git a/contrib/utils/mpack/ambari_mpack_tools.py b/contrib/utils/mpack/ambari_mpack_tools.py
new file mode 100644
index 0000000000..bef0ff6c8c
--- /dev/null
+++ b/contrib/utils/mpack/ambari_mpack_tools.py
@@ -0,0 +1,324 @@
+import os
+import json
+import shutil
+import logging
+from xml.etree.ElementTree import Element, SubElement, tostring, parse
+from xml.dom import minidom
+import argparse
+
+# Configure logging
+logging.basicConfig(level=logging.INFO)
+
+
+class XMLUtils:
+ @staticmethod
+ def parse_xml(xml_path):
+ tree = parse(xml_path)
+ return tree.getroot()
+
+ @staticmethod
+ def create_xml_element(tag, text=None, attrib={}):
+ element = Element(tag, attrib)
+ if text:
+ element.text = text
+ return element
+
+ @staticmethod
+ def prettify_xml(element):
+ return minidom.parseString(tostring(element)).toprettyxml(indent=" ")
+
+ @staticmethod
+ def write_xml_file(path, element):
+ with open(path, "w") as f:
+ f.write(XMLUtils.prettify_xml(element))
+
+
+class FileUtils:
+ @staticmethod
+ def ensure_directory(path):
+ os.makedirs(path, exist_ok=True)
+
+ @staticmethod
+ def remove_directory(path):
+ if os.path.exists(path):
+ shutil.rmtree(path)
+
+ @staticmethod
+ def copy_directory(src, dst):
+ shutil.copytree(src, dst)
+
+
+class Service:
+ def __init__(self, name, version):
+ self.name = name
+ self.version = version
+
+ @staticmethod
+ def get_service_version(xml_path):
+ root = XMLUtils.parse_xml(xml_path)
+ version = root.find("./services/service/version").text
+ version = version.replace("-", ".")
+ logging.info(f"Service version: {version}")
+ return version
+
+
+class Artifact:
+ def __init__(self, name, type, source_dir, service_version=None, service_name=None, stack_name=None,
+ stack_version=None):
+ self.name = name
+ self.type = type
+ self.source_dir = source_dir
+ self.service_version = service_version
+ self.service_name = service_name
+ self.stack_name = stack_name
+ self.stack_version = stack_version
+
+ def to_dict(self):
+ artifact_dict = {
+ "name": self.name,
+ "type": self.type,
+ "source_dir": self.source_dir
+ }
+ if self.service_version:
+ artifact_dict["service_version"] = self.service_version
+ if self.service_name:
+ artifact_dict["service_versions_map"] = [
+ {
+ "service_name": self.service_name,
+ "service_version": self.service_version,
+ "applicable_stacks": [
+ {
+ "stack_name": self.stack_name,
+ "stack_version": self.stack_version
+ }
+ ]
+ }
+ ]
+ return artifact_dict
+
+
+class Mpack:
+ def __init__(self, name, version, description, min_ambari_version, max_ambari_version, artifacts=None,
+ mpack_type="service", build_number=None, branch=None):
+ self.name = name
+ self.version = version
+ self.description = description
+ self.min_ambari_version = min_ambari_version
+ self.max_ambari_version = max_ambari_version
+ self.artifacts = artifacts or []
+ self.mpack_type = mpack_type
+ self.build_number = build_number
+ self.branch = branch
+
+ def to_dict(self):
+ if self.mpack_type == "service":
+ return {
+ "type": "full-release",
+ "name": self.name,
+ "version": self.version,
+ "description": self.description,
+ "prerequisites": {
+ "min_ambari_version": self.min_ambari_version,
+ "max-ambari-version": self.max_ambari_version
+ },
+ "artifacts": [artifact.to_dict() for artifact in self.artifacts]
+ }
+ else:
+ return {
+ "type": "full-release",
+ "name": self.name,
+ "version": self.version,
+ "hash": self.build_number,
+ "branch": self.branch,
+ "description": self.description,
+ "prerequisites": {
+ "min-ambari-version": f"{self.min_ambari_version}",
+ "max-ambari-version": f"{self.max_ambari_version}"
+ },
+ "artifacts": [
+ {
+ "name": "stack-definitions",
+ "type": "stack-definitions",
+ "source_dir": "stacks"
+ }
+ ]
+ }
+
+ def write_mpack_json(self, target_dir):
+ path = os.path.join(target_dir, "mpack.json")
+ with open(path, "w") as f:
+ json.dump(self.to_dict(), f, indent=2)
+
+
+class MpackBuilder:
+ def __init__(self, ambari_dir, output_directory, service_name, stack_name, stack_version, mpack_version):
+ self.ambari_dir = ambari_dir
+ self.output_directory = output_directory
+ self.service_name = service_name
+ self.stack_name = stack_name
+ self.stack_version = stack_version
+ self.mpack_version = mpack_version
+
+ def validate_paths(self):
+ stack_dir = self.get_stack_source_dir()
+ if not os.path.exists(stack_dir):
+ raise FileNotFoundError(f"The stack directory does not exist: {stack_dir}")
+ print(f"Stack directory validation passed: {stack_dir}")
+
+ if not os.path.exists(self.output_directory):
+ raise FileNotFoundError(f"The output directory does not exist: {self.output_directory}")
+ print(f"output directory validation passed: {self.output_directory}")
+
+ if self.service_name:
+ service_dir = self.get_service_source_dir()
+ if not os.path.exists(service_dir):
+ raise FileNotFoundError(f"The service directory does not exist: {service_dir}")
+ print(f"Service directory validation passed: {service_dir}")
+
+
+
+ def build_mpack(self, mpack_type):
+ if mpack_type == "service":
+ mpack_name = f"{self.service_name.lower()}-ambari-mpack"
+ source_dir = self.get_service_source_dir()
+ service_version = Service.get_service_version(f"{source_dir}/metainfo.xml")
+ else: # mpack_type == "stack"
+ mpack_name = "ambari-mpack"
+ source_dir = self.get_stack_source_dir()
+ service_version = None
+
+ target_dir = self.prepare_target_directory(mpack_name)
+ self.copy_source_to_target(source_dir, target_dir, mpack_type, service_version)
+ if mpack_type == "service":
+ self.create_metainfo_common(service_version, target_dir)
+ self.create_mpack(target_dir, mpack_type, service_version)
+ self.create_mpack_tarball(self.output_directory, mpack_name)
+
+ def get_service_source_dir(self):
+ return f"{self.ambari_dir}/ambari-server/src/main/resources/stacks/{self.stack_name}/{self.stack_version}/services/{self.service_name}"
+
+ def get_stack_source_dir(self):
+ return f"{self.ambari_dir}/ambari-server/src/main/resources"
+
+ def prepare_target_directory(self, mpack_name):
+ target_dir = os.path.join(self.output_directory, mpack_name)
+ FileUtils.remove_directory(target_dir)
+ FileUtils.ensure_directory(target_dir)
+ os.chdir(target_dir)
+ return target_dir
+
+ def copy_source_to_target(self, source_dir, target_dir, mpack_type, service_version):
+ if mpack_type == "service":
+ common_dir = f"{target_dir}/common-services/{self.service_name}/{service_version}"
+ FileUtils.remove_directory(common_dir)
+ FileUtils.copy_directory(source_dir, common_dir)
+ FileUtils.ensure_directory(f"addon-services/{self.service_name}/{service_version}")
+ else: # for stack mpack
+ common_dir = f"{target_dir}/common-services/"
+ stack_dir = f"{target_dir}/stacks/{self.stack_name}/"
+ FileUtils.copy_directory(f"{source_dir}/common-services", common_dir)
+ FileUtils.copy_directory(f"{source_dir}/stacks/{self.stack_name}", stack_dir)
+
+
+ def build(self):
+ if self.service_name:
+ mpack_builder.build_service_mpack()
+ else:
+ mpack_builder.build_stack_mpack()
+
+
+ def build_service_mpack(self):
+ self.build_mpack("service")
+
+ def build_stack_mpack(self):
+ self.build_mpack("stack")
+
+ def create_metainfo_common(self, service_version, target_dir):
+ root = XMLUtils.create_xml_element("metainfo", attrib={"schemaVersion": "2.0"})
+ services = SubElement(root, "services")
+ service = SubElement(services, "service")
+ SubElement(service, "name").text = self.service_name
+ SubElement(service, "version").text = service_version
+ SubElement(service, "extends").text = f"common-services/{self.service_name}/{service_version}"
+ path = os.path.join(target_dir, f"addon-services/{self.service_name}/{service_version}/metainfo.xml")
+ XMLUtils.write_xml_file(path, root)
+
+ def create_mpack(self, target_dir, mpack_type, service_version=None):
+ artifacts = []
+ build_number = None
+ branch = None
+ if mpack_type == "service":
+ artifact1 = Artifact(f"{self.service_name}-service-definitions", "service-definitions", "common-services",
+ service_version)
+ artifact2 = Artifact(f"{self.service_name.lower()}-addon-service-definitions",
+ "stack-addon-service-definitions", "addon-services", service_version,
+ self.service_name,
+ self.stack_name, self.stack_version)
+ artifacts = [artifact1, artifact2]
+ else:
+ build_number = "build_number_placeholder"
+ branch = "trunk"
+ mpack = Mpack(f"{self.stack_name.lower()}-ambari-mpack", self.mpack_version,
+ f"{self.stack_name} Management Pack", "2.7.5.0.0", "3.7.5.0.0", artifacts=artifacts,
+ build_number=build_number, branch=branch, mpack_type=mpack_type)
+ mpack.write_mpack_json(target_dir)
+
+ def create_mpack_tarball(self, output_directory, mpack_name):
+ os.chdir(output_directory)
+ tarball_name = f"{mpack_name}-{self.mpack_version}.tar.gz"
+ os.system(f"tar -czvf {tarball_name} {mpack_name}")
+ logging.info(f"Created mpack tarball: {tarball_name}")
+
+
+def setup_options():
+ parser = argparse.ArgumentParser(description='ambari Mpack Tools.')
+
+ # Add the arguments
+ parser.add_argument('-ambari-dir',
+ required=True,
+ type=str,
+ help='The Ambari project directory')
+ parser.add_argument('-stack-name',
+ required=True,
+ type=str,
+ help='The Ambari stack you want to package')
+
+ parser.add_argument('-service-name',
+ type=str,
+ help='The Ambari service you want to package')
+
+ parser.add_argument('-stack-version',
+ type=str,
+ help='The stack version to package the service for. It is used when packaging a service mpack '
+ 'to specify which version of the stack the service belongs to.')
+
+ parser.add_argument('-mpack-version',
+ required=True,
+ type=str,
+ help='mpack verion')
+
+ parser.add_argument('-output-dir',
+ required=True,
+ type=str,
+ help='Location to save the packaged mpack tar')
+
+ args = parser.parse_args()
+ logging.info(f"main program params is : {args}")
+ return args
+
+
+# Usage
+if __name__ == "__main__":
+
+ args = setup_options()
+ ambari_dir = args.ambari_dir
+ stack_name = args.stack_name
+ stack_version = args.stack_version
+ service_name = args.service_name
+ mpack_version = args.mpack_version
+ output_dir = args.output_dir
+ ambari_dir = os.path.abspath(ambari_dir)
+ output_dir = os.path.abspath(output_dir)
+ mpack_builder = MpackBuilder(ambari_dir, output_dir, service_name, stack_name, stack_version, mpack_version)
+ mpack_builder.validate_paths()
+ mpack_builder.build()
diff --git a/pom.xml b/pom.xml
index cad72176fd..f94c71e33a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -98,6 +98,17 @@
<eclipselink.version>2.6.2</eclipselink.version>
</properties>
<pluginRepositories>
+ <pluginRepository>
+ <id>aliyun-public</id>
+ <name>aliyun nexus</name>
+ <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
<pluginRepository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net Repository for Maven</name>
@@ -125,34 +136,42 @@
<repositories>
<repository>
- <id>oss.sonatype.org</id>
- <name>OSS Sonatype Staging</name>
- <url>https://oss.sonatype.org/content/groups/staging</url>
+ <id>aliyun-central</id>
+ <url>https://maven.aliyun.com/repository/central</url>
</repository>
<repository>
- <id>spring-milestones</id>
- <name>Spring Milestones</name>
- <url>https://repo.spring.io/milestone</url>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
+ <id>aliyun-public</id>
+ <url>https://maven.aliyun.com/repository/public</url>
</repository>
<repository>
- <id>ASF Staging</id>
- <url>https://repository.apache.org/content/groups/staging/</url>
+ <id>aliyun-snapshots</id>
+ <url>https://maven.aliyun.com/repository/apache-snapshots</url>
</repository>
<repository>
- <id>ASF Snapshots</id>
- <url>https://repository.apache.org/content/repositories/snapshots/</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>false</enabled>
- </releases>
+ <id>apache-spring-plugin</id>
+ <url>https://maven.aliyun.com/repository/spring-plugin</url>
+ </repository>
+ <repository>
+ <id>aliyun-spring</id>
+ <url>https://maven.aliyun.com/repository/spring</url>
+ </repository>
+ <repository>
+ <id>aliyun-google</id>
+ <url>https://maven.aliyun.com/repository/google</url>
+ </repository>
+ <repository>
+ <id>aliyun-gradle-plugin</id>
+ <url>https://maven.aliyun.com/repository/gradle-plugin</url>
+ </repository>
+ <repository>
+ <id>aliyun-jcenter</id>
+ <url>https://maven.aliyun.com/repository/jcenter</url>
+ </repository>
+ <repository>
+ <id>aliyun-releases</id>
+ <url>https://maven.aliyun.com/repository/releases</url>
</repository>
</repositories>
-
<build>
<pluginManagement>
<plugins>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org
(ambari) 05/22: AMBARI-26107: Migrate away from DOMNodeInserted to MutationObserver (ambari-admin) (#3819)
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch eee
in repository https://gitbox.apache.org/repos/asf/ambari.git
commit 3d717078ecaa13ee91ae343c8cbbf595b5891ed2
Author: jialiang <ji...@gmail.com>
AuthorDate: Fri Sep 6 17:00:05 2024 +0800
AMBARI-26107: Migrate away from DOMNodeInserted to MutationObserver (ambari-admin) (#3819)
---
.../app/scripts/controllers/SideNavCtrl.js | 29 ++++++++++++++++------
1 file changed, 21 insertions(+), 8 deletions(-)
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/SideNavCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/SideNavCtrl.js
index 6bf356d796..2e3e820513 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/SideNavCtrl.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/SideNavCtrl.js
@@ -35,14 +35,27 @@ angular.module('ambariAdminConsole')
}
function initNavigationBar () {
- $('body').on('DOMNodeInserted', '.navigation-bar', function() {
- $('.navigation-bar').navigationBar({
- fitHeight: true,
- collapseNavBarClass: 'fa-angle-double-left',
- expandNavBarClass: 'fa-angle-double-right'
- });
- //initTooltips();
- $('body').off('DOMNodeInserted', '.navigation-bar');
+ const observer = new MutationObserver(mutations => {
+ var targetNode
+ if (mutations.some((mutation) => mutation.type === 'childList' && (targetNode = $('.navigation-bar')).length)) {
+ observer.disconnect();
+ //initTooltips();
+ targetNode.navigationBar({
+ fitHeight: true,
+ collapseNavBarClass: 'fa-angle-double-left',
+ expandNavBarClass: 'fa-angle-double-right'
+ });
+ }
+ });
+
+ setTimeout(() => {
+ // remove observer if selected element is not found in 10secs.
+ observer.disconnect();
+ }, 10000)
+
+ observer.observe(document.body, {
+ childList: true,
+ subtree: true
});
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org
(ambari) 01/22: AMBARI-26118: Fix the default SSL Ciphers of port 8440/8441 are too weak issue #3815
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch eee
in repository https://gitbox.apache.org/repos/asf/ambari.git
commit fb7a9701999819935cd03560510e717b4e371c4c
Author: jialiang <ji...@gmail.com>
AuthorDate: Fri Sep 6 16:56:51 2024 +0800
AMBARI-26118: Fix the default SSL Ciphers of port 8440/8441 are too weak issue #3815
---
ambari-server/conf/unix/ambari-env.sh | 2 +-
ambari-server/conf/windows/ambari-env.cmd | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ambari-server/conf/unix/ambari-env.sh b/ambari-server/conf/unix/ambari-env.sh
index d2f655c1b9..cb226eef56 100644
--- a/ambari-server/conf/unix/ambari-env.sh
+++ b/ambari-server/conf/unix/ambari-env.sh
@@ -15,7 +15,7 @@
AMBARI_PASSHPHRASE="DEV"
-export AMBARI_JVM_ARGS="$AMBARI_JVM_ARGS -Xms512m -Xmx2048m -XX:MaxPermSize=128m -Djava.security.auth.login.config=$ROOT/etc/ambari-server/conf/krb5JAASLogin.conf -Djava.security.krb5.conf=/etc/krb5.conf -Djavax.security.auth.useSubjectCredsOnly=false -Dcom.sun.jndi.ldap.connect.pool.protocol=\"plain ssl\" -Dcom.sun.jndi.ldap.connect.pool.maxsize=20 -Dcom.sun.jndi.ldap.connect.pool.timeout=300000"
+export AMBARI_JVM_ARGS="$AMBARI_JVM_ARGS -Xms512m -Xmx2048m -XX:MaxPermSize=128m -Djdk.tls.ephemeralDHKeySize=2048 -Djava.security.auth.login.config=$ROOT/etc/ambari-server/conf/krb5JAASLogin.conf -Djava.security.krb5.conf=/etc/krb5.conf -Djavax.security.auth.useSubjectCredsOnly=false -Dcom.sun.jndi.ldap.connect.pool.protocol=\"plain ssl\" -Dcom.sun.jndi.ldap.connect.pool.maxsize=20 -Dcom.sun.jndi.ldap.connect.pool.timeout=300000"
export PATH=$PATH:$ROOT/var/lib/ambari-server
export PYTHONPATH=$ROOT/usr/lib/ambari-server/lib:$PYTHONPATH
diff --git a/ambari-server/conf/windows/ambari-env.cmd b/ambari-server/conf/windows/ambari-env.cmd
index 23600d4330..07dc6b1ad2 100644
--- a/ambari-server/conf/windows/ambari-env.cmd
+++ b/ambari-server/conf/windows/ambari-env.cmd
@@ -16,4 +16,4 @@ rem limitations under the License.
set AMBARI_PASSHPHRASE=DEV
-set AMBARI_JVM_ARGS=%AMBARI_JVM_ARGS% -Xms512m -Xmx2048m -Djava.security.auth.login.config=conf\krb5JAASLogin.conf -Djava.security.krb5.conf=conf\krb5.conf -Djavax.security.auth.useSubjectCredsOnly=false
+set AMBARI_JVM_ARGS=%AMBARI_JVM_ARGS% -Xms512m -Xmx2048m -Djdk.tls.ephemeralDHKeySize=2048 -Djava.security.auth.login.config=conf\krb5JAASLogin.conf -Djava.security.krb5.conf=conf\krb5.conf -Djavax.security.auth.useSubjectCredsOnly=false
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org
(ambari) 03/22: AMBARI-26120:When selecting all hosts in install wizard step 6 page, the disabled host should be excluded (#3817)
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch eee
in repository https://gitbox.apache.org/repos/asf/ambari.git
commit ad410e6f4d53a3c7a49b45d624432a64de0f555d
Author: jialiang <ji...@gmail.com>
AuthorDate: Fri Sep 6 16:58:04 2024 +0800
AMBARI-26120:When selecting all hosts in install wizard step 6 page, the disabled host should be excluded (#3817)
---
ambari-web/app/controllers/wizard/step6_controller.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ambari-web/app/controllers/wizard/step6_controller.js b/ambari-web/app/controllers/wizard/step6_controller.js
index 5952ed7219..c17514768c 100644
--- a/ambari-web/app/controllers/wizard/step6_controller.js
+++ b/ambari-web/app/controllers/wizard/step6_controller.js
@@ -250,7 +250,9 @@ App.WizardStep6Controller = Em.Controller.extend(App.HostComponentValidationMixi
this.get('hosts').forEach(function (host) {
host.checkboxes.filterProperty('isInstalled', false).forEach(function (checkbox) {
if (checkbox.component === component) {
- Em.set(checkbox, 'checked', checked);
+ if (!checkbox.isDisabled) {
+ Em.set(checkbox, 'checked', checked);
+ }
}
});
});
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org
(ambari) 11/22: add alluxio
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch eee
in repository https://gitbox.apache.org/repos/asf/ambari.git
commit 00cd43bb4a866c603b20d24d67350a9f84830981
Merge: 5aa5048fbb 9ca07921d3
Author: jialiang <ji...@gmail.com>
AuthorDate: Sat Sep 7 10:55:11 2024 +0800
add alluxio
.../BIGTOP/3.2.0/services/ALLUXIO/alerts.json | 59 +++++
.../services/ALLUXIO/configuration/alluxio-env.xml | 232 ++++++++++++++++++++
.../configuration/alluxio-log4j-properties.xml | 244 +++++++++++++++++++++
.../configuration/alluxio-metrics-properties.xml | 132 +++++++++++
.../configuration/alluxio-site-properties.xml | 153 +++++++++++++
.../BIGTOP/3.2.0/services/ALLUXIO/kerberos.json | 70 ++++++
.../BIGTOP/3.2.0/services/ALLUXIO/metainfo.xml | 132 +++++++++++
.../services/ALLUXIO/package/scripts/master.py | 149 +++++++++++++
.../services/ALLUXIO/package/scripts/params.py | 241 ++++++++++++++++++++
.../ALLUXIO/package/scripts/service_check.py | 40 ++++
.../services/ALLUXIO/package/scripts/worker.py | 121 ++++++++++
.../services/ALLUXIO/package/templates/masters.j2 | 1 +
.../services/ALLUXIO/package/templates/workers.j2 | 1 +
.../services/ALLUXIO/quicklinks/quicklinks.json | 21 ++
.../3.2.0/services/ALLUXIO/role_command_order.json | 8 +
.../3.2.0/services/ALLUXIO/service_advisor.py | 196 +++++++++++++++++
16 files changed, 1800 insertions(+)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org