AMBARI-7958 - Move MetricsSink properties and Hadoop username/password properties from hadoop-env.xml to cluster-env.xml
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/28e15774 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/28e15774 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/28e15774 Branch: refs/heads/branch-windows-dev Commit: 28e1577470867da5cd2de15d11e546729aa93640 Parents: 95a13e0 Author: Artem Baranchuk <[email protected]> Authored: Fri Oct 24 21:35:19 2014 +0300 Committer: Artem Baranchuk <[email protected]> Committed: Fri Oct 24 21:40:11 2014 +0300 ---------------------------------------------------------------------- .../libraries/script/script.py | 2 +- .../libraries/script/script.py.orig | 2 +- .../HDPWIN/2.1/configuration/cluster-env.xml | 111 +++++++++++++++++++ .../services/HDFS/configuration/hadoop-env.xml | 52 --------- .../2.1/services/HDFS/package/scripts/params.py | 8 +- ambari-web/app/data/HDP2/site_properties.js | 4 +- 6 files changed, 119 insertions(+), 60 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/28e15774/ambari-common/src/main/python/resource_management/libraries/script/script.py ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/resource_management/libraries/script/script.py b/ambari-common/src/main/python/resource_management/libraries/script/script.py index d3aa7df..c7e6121 100644 --- a/ambari-common/src/main/python/resource_management/libraries/script/script.py +++ b/ambari-common/src/main/python/resource_management/libraries/script/script.py @@ -49,7 +49,7 @@ USAGE = """Usage: {0} <COMMAND> <JSON_CONFIG> <BASEDIR> <STROUTPUT> <LOGGING_LEV <TMP_DIR> temporary directory for executable scripts. Ex: /var/lib/ambari-agent/data/tmp """ -_PASSWORD_MAP = {"/configurations/hadoop-env/hadoop.user.name":"/configurations/hadoop-env/hadoop.user.password"} +_PASSWORD_MAP = {"/configurations/cluster-env/hadoop.user.name":"/configurations/cluster-env/hadoop.user.password"} def get_path_form_configuration(name, configuration): subdicts = filter(None, name.split('/')) http://git-wip-us.apache.org/repos/asf/ambari/blob/28e15774/ambari-common/src/main/python/resource_management/libraries/script/script.py.orig ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/resource_management/libraries/script/script.py.orig b/ambari-common/src/main/python/resource_management/libraries/script/script.py.orig index ba6775e..82860c5 100644 --- a/ambari-common/src/main/python/resource_management/libraries/script/script.py.orig +++ b/ambari-common/src/main/python/resource_management/libraries/script/script.py.orig @@ -42,7 +42,7 @@ USAGE = """Usage: {0} <COMMAND> <JSON_CONFIG> <BASEDIR> <STROUTPUT> <LOGGING_LEV <LOGGING_LEVEL> log level for stdout. Ex:DEBUG,INFO """ -_PASSWORD_MAP = {"/configurations/hadoop-env/hadoop.user.name":"/configurations/hadoop-env/hadoop.user.password"} +_PASSWORD_MAP = {"/configurations/cluster-env/hadoop.user.name":"/configurations/cluster-env/hadoop.user.password"} def get_path_form_configuration(name, configuration): subdicts = filter(None, name.split('/')) http://git-wip-us.apache.org/repos/asf/ambari/blob/28e15774/ambari-server/src/main/resources/stacks/HDPWIN/2.1/configuration/cluster-env.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/configuration/cluster-env.xml b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/configuration/cluster-env.xml new file mode 100644 index 0000000..de38931 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/configuration/cluster-env.xml @@ -0,0 +1,111 @@ +<?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> + <!-- metrics sink properties --> + <property> + <name>sink_database</name> + <value>Existing MSSQL Server database with sql auth</value> + </property> + + <property> + <name>sink.dbservername</name> + <value/> + </property> + + <property> + <name>sink.dblogin</name> + <value>hadoop</value> + <description> + DB user name. + </description> + </property> + + <property> + <name>sink.dbpassword</name> + <value/> + <description> + DB password. + </description> + </property> + + <property> + <name>sink.db.schema.name</name> + <value>HadoopMetrics</value> + </property> + + <property> + <name>sink.jdbc.driver</name> + <value>com.microsoft.sqlserver.jdbc.SQLServerDriver</value> + <description> + JDBC driver class. + </description> + </property> + + <property> + <name>sink.jdbc.url</name> + <value/> + <description> + JDBC URL. + </description> + </property> + + <property> + <name>hadoop.user.name</name> + <value>hadoop</value> + </property> + + + + <property> + <name>security_enabled</name> + <value>false</value> + <description>Hadoop Security</description> + </property> + <property> + <name>kerberos_domain</name> + <value>EXAMPLE.COM</value> + <description>Kerberos realm.</description> + </property> + <property> + <name>ignore_groupsusers_create</name> + <value>false</value> + <description>Whether to ignore failures on users and group creation</description> + </property> + <property> + <name>smokeuser</name> + <value>ambari-qa</value> + <property-type>USER</property-type> + <description>User executing service checks</description> + </property> + <property> + <name>smokeuser_keytab</name> + <value>/etc/security/keytabs/smokeuser.headless.keytab</value> + <description>Path to smoke test user keytab file</description> + </property> + <property> + <name>user_group</name> + <value>hadoop</value> + <property-type>GROUP</property-type> + <description>Hadoop user group.</description> + </property> +</configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/28e15774/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HDFS/configuration/hadoop-env.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HDFS/configuration/hadoop-env.xml b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HDFS/configuration/hadoop-env.xml index 2380408..484235d 100644 --- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HDFS/configuration/hadoop-env.xml +++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HDFS/configuration/hadoop-env.xml @@ -25,58 +25,6 @@ <!-- Put site-specific property overrides in this file. --> <configuration> - <!-- metrics sink properties --> - <property> - <name>sink_database</name> - <value>Existing MSSQL Server database with sql auth</value> - </property> - - <property> - <name>sink.dbservername</name> - <value></value> - </property> - - <property> - <name>sink.dblogin</name> - <value>hadoop</value> - <description> - DB user name. - </description> - </property> - - <property> - <name>sink.dbpassword</name> - <value></value> - <description> - DB password. - </description> - </property> - - <property> - <name>sink.db.schema.name</name> - <value>HadoopMetrics</value> - </property> - - <property> - <name>sink.jdbc.driver</name> - <value>com.microsoft.sqlserver.jdbc.SQLServerDriver</value> - <description> - JDBC driver class. - </description> - </property> - - <property> - <name>sink.jdbc.url</name> - <value></value> - <description> - JDBC URL. - </description> - </property> - - <property> - <name>hadoop.user.name</name> - <value>hadoop</value> - </property> <property> <name>dfs.datanode.data.dir.mount.file</name> http://git-wip-us.apache.org/repos/asf/ambari/blob/28e15774/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HDFS/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HDFS/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HDFS/package/scripts/params.py index d3c6c4b..cd57f5f 100644 --- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HDFS/package/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HDFS/package/scripts/params.py @@ -50,10 +50,10 @@ if dfs_ha_enabled: if hostname in nn_host: namenode_id = nn_id namenode_rpc = nn_host -dbserver = config['configurations']['hadoop-env']['sink.dbservername'].replace('\\', '\\\\') -dblogin = config['configurations']['hadoop-env']['sink.dblogin'] -dbpassword = config['configurations']['hadoop-env']['sink.dbpassword'] -dburl = config['configurations']['hadoop-env']['sink.jdbc.url'].replace('\\', '\\\\') +dbserver = config['configurations']['cluster-env']['sink.dbservername'].replace('\\', '\\\\') +dblogin = config['configurations']['cluster-env']['sink.dblogin'] +dbpassword = config['configurations']['cluster-env']['sink.dbpassword'] +dburl = config['configurations']['cluster-env']['sink.jdbc.url'].replace('\\', '\\\\') if 'integratedSecurity=true' not in dburl: dburl = dburl + ';user=' + dblogin + ';password=' + dbpassword; http://git-wip-us.apache.org/repos/asf/ambari/blob/28e15774/ambari-web/app/data/HDP2/site_properties.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/data/HDP2/site_properties.js b/ambari-web/app/data/HDP2/site_properties.js index 7800725..7485c5a 100644 --- a/ambari-web/app/data/HDP2/site_properties.js +++ b/ambari-web/app/data/HDP2/site_properties.js @@ -55,7 +55,7 @@ module.exports = "isOverridable": false, "isVisible": App.get('isHadoopWindowsStack'), "serviceName": "MISC", - "filename": "hadoop-env.xml", + "filename": "cluster-env.xml", "category": "Users and Groups", "belongsToService": ["HDFS"], "index": 0 @@ -70,7 +70,7 @@ module.exports = "isOverridable": false, "isVisible": App.get('isHadoopWindowsStack'), "serviceName": "MISC", - "filename": "hadoop-env.xml", + "filename": "cluster-env.xml", "category": "Users and Groups", "belongsToService": ["HDFS"], "index": 1
