You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2014/12/19 22:52:49 UTC

[1/2] ambari git commit: AMBARI-8836 - Upgrade pack for Hive (jonathanhurley)

Repository: ambari
Updated Branches:
  refs/heads/trunk fad56746f -> 181f3ab4d


http://git-wip-us.apache.org/repos/asf/ambari/blob/181f3ab4/ambari-server/src/test/python/stacks/2.2/configs/hive-upgrade.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/configs/hive-upgrade.json b/ambari-server/src/test/python/stacks/2.2/configs/hive-upgrade.json
new file mode 100644
index 0000000..876e200
--- /dev/null
+++ b/ambari-server/src/test/python/stacks/2.2/configs/hive-upgrade.json
@@ -0,0 +1,845 @@
+{
+    "configuration_attributes": {
+        "mapred-site": {},
+        "pig-env": {},
+        "webhcat-env": {},
+        "hcat-env": {},
+        "tez-site": {},
+        "hdfs-site": {
+            "final": {
+                "dfs.support.append": "true",
+                "dfs.namenode.http-address": "true"
+            }
+        },
+        "yarn-log4j": {},
+        "pig-properties": {},
+        "hive-log4j": {},
+        "hadoop-policy": {},
+        "hdfs-log4j": {},
+        "hive-site": {},
+        "hive-exec-log4j": {},
+        "mapred-env": {},
+        "tez-env": {},
+        "core-site": {
+            "final": {
+                "fs.defaultFS": "true"
+            }
+        },
+        "yarn-env": {},
+        "hadoop-env": {},
+        "zookeeper-log4j": {},
+        "yarn-site": {},
+        "hive-env": {},
+        "capacity-scheduler": {},
+        "webhcat-site": {},
+        "ganglia-env": {},
+        "zoo.cfg": {},
+        "hiveserver2-site": {},
+        "zookeeper-env": {},
+        "pig-log4j": {},
+        "cluster-env": {}
+    },
+    "commandParams": {
+        "service_package_folder": "common-services/HIVE/0.12.0.2.0/package",
+        "script": "scripts/hive_server.py",
+        "hooks_folder": "HDP/2.0.6/hooks",
+        "restart_type": "rolling_upgrade",
+        "version": "2.2.1.0-2065",
+        "command_timeout": "900",
+        "script_type": "PYTHON"
+    },
+    "roleCommand": "CUSTOM_COMMAND",
+    "kerberosCommandParams": [],
+    "clusterName": "c1",
+    "hostname": "c6402.ambari.apache.org",
+    "hostLevelParams": {
+        "jdk_location": "http://hw10897.ix:8080/resources/",
+        "ambari_db_rca_password": "mapred",
+        "java_home": "/usr/jdk64/jdk1.7.0_45",
+        "ambari_db_rca_url": "jdbc:postgresql://hw10897.ix/ambarirca",
+        "stack_name": "HDP",
+        "custom_command": "RESTART",
+        "oracle_jdbc_url": "http://hw10897.ix:8080/resources//ojdbc6.jar",
+        "repo_info": "[{\"baseUrl\":\"http://repo.ambari.apache.org/hdp/centos6/HDP-2.2.0.0/\",\"osType\":\"redhat6\",\"repoId\":\"HDP-2.2\",\"repoName\":\"HDP\",\"defaultBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP/centos6/2.x/GA/2.2.0.0\",\"latestBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP/centos6/2.x/GA/2.2.0.0\"},{\"baseUrl\":\"http://repo.ambari.apache.org/hdp/centos6/HDP-UTILS-1.1.0.20/\",\"osType\":\"redhat6\",\"repoId\":\"HDP-UTILS-1.1.0.20\",\"repoName\":\"HDP-UTILS\",\"defaultBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos6\",\"latestBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos6\"}]",
+        "group_list": "[\"hadoop\",\"nobody\",\"users\"]",
+        "agentCacheDir": "/var/lib/ambari-agent/cache",
+        "stack_version": "2.2",
+        "db_name": "ambari",
+        "ambari_db_rca_driver": "org.postgresql.Driver",
+        "jdk_name": "jdk-7u45-linux-x64.tar.gz",
+        "ambari_db_rca_username": "mapred",
+        "db_driver_filename": "mysql-connector-java.jar",
+        "user_list": "[\"nobody\",\"hive\",\"mapred\",\"ambari-qa\",\"zookeeper\",\"tez\",\"hdfs\",\"yarn\",\"hcat\"]",
+        "mysql_jdbc_url": "http://hw10897.ix:8080/resources//mysql-connector-java.jar"
+    },
+    "commandType": "EXECUTION_COMMAND",
+    "roleParams": {
+        "component_category": "MASTER"
+    },
+    "serviceName": "HIVE",
+    "role": "HIVE_SERVER",
+    "forceRefreshConfigTags": [],
+    "taskId": 77,
+    "public_hostname": "c6402.ambari.apache.org",
+    "configurations": {
+        "mapred-site": {
+            "mapreduce.jobhistory.address": "c6402.ambari.apache.org:10020",
+            "mapreduce.cluster.administrators": " hadoop",
+            "mapreduce.reduce.input.buffer.percent": "0.0",
+            "mapreduce.output.fileoutputformat.compress": "false",
+            "mapreduce.framework.name": "yarn",
+            "mapreduce.map.speculative": "false",
+            "mapreduce.reduce.shuffle.merge.percent": "0.66",
+            "yarn.app.mapreduce.am.resource.mb": "682",
+            "mapreduce.map.java.opts": "-Xmx546m",
+            "mapreduce.application.classpath": "$PWD/mr-framework/hadoop/share/hadoop/mapreduce/*:$PWD/mr-framework/hadoop/share/hadoop/mapreduce/lib/*:$PWD/mr-framework/hadoop/share/hadoop/common/*:$PWD/mr-framework/hadoop/share/hadoop/common/lib/*:$PWD/mr-framework/hadoop/share/hadoop/yarn/*:$PWD/mr-framework/hadoop/share/hadoop/yarn/lib/*:$PWD/mr-framework/hadoop/share/hadoop/hdfs/*:$PWD/mr-framework/hadoop/share/hadoop/hdfs/lib/*:/usr/hdp/${hdp.version}/hadoop/lib/hadoop-lzo-0.6.0.${hdp.version}.jar:/etc/hadoop/conf/secure",
+            "mapreduce.job.reduce.slowstart.completedmaps": "0.05",
+            "mapreduce.output.fileoutputformat.compress.type": "BLOCK",
+            "mapreduce.reduce.speculative": "false",
+            "mapreduce.reduce.java.opts": "-Xmx546m",
+            "mapreduce.am.max-attempts": "2",
+            "yarn.app.mapreduce.am.admin-command-opts": "-Dhdp.version=${hdp.version}",
+            "mapreduce.reduce.log.level": "INFO",
+            "mapreduce.map.sort.spill.percent": "0.7",
+            "mapreduce.job.emit-timeline-data": "false",
+            "mapreduce.application.framework.path": "/hdp/apps/${hdp.version}/mapreduce/mapreduce.tar.gz#mr-framework",
+            "mapreduce.task.timeout": "300000",
+            "mapreduce.map.memory.mb": "682",
+            "mapreduce.task.io.sort.factor": "100",
+            "mapreduce.jobhistory.intermediate-done-dir": "/mr-history/tmp",
+            "mapreduce.reduce.memory.mb": "682",
+            "yarn.app.mapreduce.am.log.level": "INFO",
+            "mapreduce.map.log.level": "INFO",
+            "mapreduce.shuffle.port": "13562",
+            "mapreduce.reduce.shuffle.fetch.retry.timeout-ms": "30000",
+            "mapreduce.admin.user.env": "LD_LIBRARY_PATH=/usr/hdp/${hdp.version}/hadoop/lib/native:/usr/hdp/${hdp.version}/hadoop/lib/native/Linux-amd64-64",
+            "mapreduce.map.output.compress": "false",
+            "yarn.app.mapreduce.am.staging-dir": "/user",
+            "mapreduce.reduce.shuffle.parallelcopies": "30",
+            "mapreduce.reduce.shuffle.input.buffer.percent": "0.7",
+            "mapreduce.jobhistory.webapp.address": "c6402.ambari.apache.org:19888",
+            "mapreduce.jobhistory.done-dir": "/mr-history/done",
+            "mapreduce.admin.reduce.child.java.opts": "-server -XX:NewRatio=8 -Djava.net.preferIPv4Stack=true -Dhdp.version=${hdp.version}",
+            "mapreduce.reduce.shuffle.fetch.retry.enabled": "1",
+            "mapreduce.task.io.sort.mb": "273",
+            "yarn.app.mapreduce.am.command-opts": "-Xmx546m -Dhdp.version=${hdp.version}",
+            "mapreduce.reduce.shuffle.fetch.retry.interval-ms": "1000",
+            "mapreduce.jobhistory.bind-host": "0.0.0.0",
+            "mapreduce.admin.map.child.java.opts": "-server -XX:NewRatio=8 -Djava.net.preferIPv4Stack=true -Dhdp.version=${hdp.version}"
+        },
+        "pig-env": {
+            "content": "\nJAVA_HOME={{java64_home}}\nHADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\n\nif [ -d \"/usr/lib/tez\" ]; then\n  PIG_OPTS=\"$PIG_OPTS -Dmapreduce.framework.name=yarn\"\nfi"
+        },
+        "webhcat-env": {
+            "content": "\n# The file containing the running pid\nPID_FILE={{webhcat_pid_file}}\n\nTEMPLETON_LOG_DIR={{templeton_log_dir}}/\n\n\nWEBHCAT_LOG_DIR={{templeton_log_dir}}/\n\n# The console error log\nERROR_LOG={{templeton_log_dir}}/webhcat-console-error.log\n\n# The console log\nCONSOLE_LOG={{templeton_log_dir}}/webhcat-console.log\n\n#TEMPLETON_JAR=templeton_jar_name\n\n#HADOOP_PREFIX=hadoop_prefix\n\n#HCAT_PREFIX=hive_prefix\n\n# Set HADOOP_HOME to point to a specific hadoop install directory\nexport HADOOP_HOME={{hadoop_home}}"
+        },
+        "hcat-env": {
+            "content": "\n      # Licensed to the Apache Software Foundation (ASF) under one\n      # or more contributor license agreements. See the NOTICE file\n      # distributed with this work for additional information\n      # regarding copyright ownership. The ASF licenses this file\n      # to you under the Apache License, Version 2.0 (the\n      # \"License\"); you may not use this file except in compliance\n      # with the License. You may obtain a copy of the License at\n      #\n      # http://www.apache.org/licenses/LICENSE-2.0\n      #\n      # Unless required by applicable law or agreed to in writing, software\n      # distributed under the License is distributed on an \"AS IS\" BASIS,\n      # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n      # See the License for the specific language governing permissions and\n      # limitations under the License.\n\n      JAVA_HOME={{java64_home}}\n      HCAT_PID_DIR={{hcat_pid_dir}}/\n      HCAT_L
 OG_DIR={{hcat_log_dir}}/\n      HCAT_CONF_DIR={{hcat_conf_dir}}\n      HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\n      #DBROOT is the path where the connector jars are downloaded\n      DBROOT={{hcat_dbroot}}\n      USER={{hcat_user}}\n      METASTORE_PORT={{hive_metastore_port}}"
+        },
+        "tez-site": {
+            "tez.task.get-task.sleep.interval-ms.max": "200",
+            "tez.task.max-events-per-heartbeat": "500",
+            "tez.task.launch.cmd-opts": "-XX:+PrintGCDetails -verbose:gc -XX:+PrintGCTimeStamps -XX:+UseNUMA -XX:+UseParallelGC",
+            "tez.runtime.compress": "true",
+            "tez.runtime.io.sort.mb": "272",
+            "tez.generate.debug.artifacts": "false",
+            "tez.am.log.level": "INFO",
+            "tez.counters.max.groups": "1000",
+            "tez.runtime.unordered.output.buffer.size-mb": "51",
+            "tez.shuffle-vertex-manager.max-src-fraction": "0.4",
+            "tez.counters.max": "2000",
+            "tez.task.resource.memory.mb": "682",
+            "tez.history.logging.service.class": "org.apache.tez.dag.history.logging.ats.ATSHistoryLoggingService",
+            "tez.lib.uris": "/hdp/apps/${hdp.version}/tez/tez.tar.gz",
+            "tez.task.am.heartbeat.counter.interval-ms.max": "4000",
+            "tez.am.max.app.attempts": "2",
+            "tez.am.launch.env": "LD_LIBRARY_PATH=/usr/hdp/${hdp.version}/hadoop/lib/native:/usr/hdp/${hdp.version}/hadoop/lib/native/Linux-amd64-64",
+            "tez.am.container.idle.release-timeout-max.millis": "20000",
+            "tez.am.launch.cluster-default.cmd-opts": "-server -Djava.net.preferIPv4Stack=true -Dhdp.version=${hdp.version}",
+            "tez.am.container.idle.release-timeout-min.millis": "10000",
+            "tez.runtime.compress.codec": "org.apache.hadoop.io.compress.SnappyCodec",
+            "tez.task.launch.cluster-default.cmd-opts": "-server -Djava.net.preferIPv4Stack=true -Dhdp.version=${hdp.version}",
+            "tez.task.launch.env": "LD_LIBRARY_PATH=/usr/hdp/${hdp.version}/hadoop/lib/native:/usr/hdp/${hdp.version}/hadoop/lib/native/Linux-amd64-64",
+            "tez.am.container.reuse.enabled": "true",
+            "tez.session.am.dag.submit.timeout.secs": "300",
+            "tez.grouping.min-size": "16777216",
+            "tez.grouping.max-size": "1073741824",
+            "tez.session.client.timeout.secs": "-1",
+            "tez.cluster.additional.classpath.prefix": "/usr/hdp/${hdp.version}/hadoop/lib/hadoop-lzo-0.6.0.${hdp.version}.jar:/etc/hadoop/conf/secure",
+            "tez.am.launch.cmd-opts": "-XX:+PrintGCDetails -verbose:gc -XX:+PrintGCTimeStamps -XX:+UseNUMA -XX:+UseParallelGC",
+            "tez.staging-dir": "/tmp/${user.name}/staging",
+            "tez.am.am-rm.heartbeat.interval-ms.max": "250",
+            "tez.am.maxtaskfailures.per.node": "10",
+            "tez.am.container.reuse.non-local-fallback.enabled": "false",
+            "tez.am.container.reuse.locality.delay-allocation-millis": "250",
+            "tez.am.container.reuse.rack-fallback.enabled": "true",
+            "tez.grouping.split-waves": "1.7",
+            "tez.shuffle-vertex-manager.min-src-fraction": "0.2",
+            "tez.am.resource.memory.mb": "1364"
+        },
+        "hdfs-site": {
+            "dfs.namenode.checkpoint.period": "21600",
+            "dfs.namenode.avoid.write.stale.datanode": "true",
+            "dfs.namenode.startup.delay.block.deletion.sec": "3600",
+            "dfs.namenode.checkpoint.txns": "1000000",
+            "dfs.block.access.token.enable": "true",
+            "dfs.support.append": "true",
+            "dfs.datanode.address": "0.0.0.0:50010",
+            "dfs.cluster.administrators": " hdfs",
+            "dfs.replication": "3",
+            "dfs.datanode.balance.bandwidthPerSec": "6250000",
+            "dfs.namenode.safemode.threshold-pct": "1.0f",
+            "dfs.namenode.checkpoint.edits.dir": "${dfs.namenode.checkpoint.dir}",
+            "dfs.permissions.enabled": "true",
+            "dfs.client.read.shortcircuit": "true",
+            "dfs.namenode.https-address": "c6401.ambari.apache.org:50470",
+            "dfs.journalnode.edits.dir": "/hadoop/hdfs/journalnode",
+            "dfs.blocksize": "134217728",
+            "dfs.datanode.max.transfer.threads": "4096",
+            "dfs.heartbeat.interval": "3",
+            "dfs.webhdfs.enabled": "true",
+            "dfs.namenode.handler.count": "40",
+            "dfs.namenode.checkpoint.dir": "/hadoop/hdfs/namesecondary",
+            "fs.permissions.umask-mode": "022",
+            "dfs.datanode.http.address": "0.0.0.0:50075",
+            "dfs.datanode.ipc.address": "0.0.0.0:8010",
+            "dfs.datanode.data.dir": "/hadoop/hdfs/data",
+            "dfs.namenode.http-address": "c6401.ambari.apache.org:50070",
+            "dfs.blockreport.initialDelay": "120",
+            "dfs.datanode.failed.volumes.tolerated": "0",
+            "dfs.namenode.accesstime.precision": "0",
+            "dfs.datanode.https.address": "0.0.0.0:50475",
+            "dfs.namenode.avoid.read.stale.datanode": "true",
+            "dfs.namenode.secondary.http-address": "c6402.ambari.apache.org:50090",
+            "dfs.namenode.stale.datanode.interval": "30000",
+            "dfs.datanode.du.reserved": "1073741824",
+            "dfs.client.read.shortcircuit.streams.cache.size": "4096",
+            "dfs.http.policy": "HTTP_ONLY",
+            "dfs.permissions.superusergroup": "hdfs",
+            "dfs.https.port": "50470",
+            "dfs.journalnode.http-address": "0.0.0.0:8480",
+            "dfs.domain.socket.path": "/var/lib/hadoop-hdfs/dn_socket",
+            "dfs.namenode.write.stale.datanode.ratio": "1.0f",
+            "dfs.hosts.exclude": "/etc/hadoop/conf/dfs.exclude",
+            "dfs.datanode.data.dir.perm": "750",
+            "dfs.namenode.name.dir.restore": "true",
+            "dfs.replication.max": "50",
+            "dfs.namenode.name.dir": "/hadoop/hdfs/namenode"
+        },
+        "yarn-log4j": {
+            "content": "\n#Relative to Yarn Log Dir Prefix\nyarn.log.dir=.\n#\n# Job Summary Appender\n#\n# Use following logger to send summary to separate file defined by\n# hadoop.mapreduce.jobsummary.log.file rolled daily:\n# hadoop.mapreduce.jobsummary.logger=INFO,JSA\n#\nhadoop.mapreduce.jobsummary.logger=${hadoop.root.logger}\nhadoop.mapreduce.jobsummary.log.file=hadoop-mapreduce.jobsummary.log\nlog4j.appender.JSA=org.apache.log4j.DailyRollingFileAppender\n# Set the ResourceManager summary log filename\nyarn.server.resourcemanager.appsummary.log.file=hadoop-mapreduce.jobsummary.log\n# Set the ResourceManager summary log level and appender\nyarn.server.resourcemanager.appsummary.logger=${hadoop.root.logger}\n#yarn.server.resourcemanager.appsummary.logger=INFO,RMSUMMARY\n\n# To enable AppSummaryLogging for the RM,\n# set yarn.server.resourcemanager.appsummary.logger to\n# LEVEL,RMSUMMARY in hadoop-env.sh\n\n# Appender for ResourceManager Application Summary Log\n# Requires the 
 following properties to be set\n#    - hadoop.log.dir (Hadoop Log directory)\n#    - yarn.server.resourcemanager.appsummary.log.file (resource manager app summary log filename)\n#    - yarn.server.resourcemanager.appsummary.logger (resource manager app summary log level and appender)\nlog4j.appender.RMSUMMARY=org.apache.log4j.RollingFileAppender\nlog4j.appender.RMSUMMARY.File=${yarn.log.dir}/${yarn.server.resourcemanager.appsummary.log.file}\nlog4j.appender.RMSUMMARY.MaxFileSize=256MB\nlog4j.appender.RMSUMMARY.MaxBackupIndex=20\nlog4j.appender.RMSUMMARY.layout=org.apache.log4j.PatternLayout\nlog4j.appender.RMSUMMARY.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n\nlog4j.appender.JSA.layout=org.apache.log4j.PatternLayout\nlog4j.appender.JSA.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n\nlog4j.appender.JSA.DatePattern=.yyyy-MM-dd\nlog4j.appender.JSA.layout=org.apache.log4j.PatternLayout\nlog4j.logger.org.apache.hadoop.yarn.server.resourcemanager.RMAppManager$Applic
 ationSummary=${yarn.server.resourcemanager.appsummary.logger}\nlog4j.additivity.org.apache.hadoop.yarn.server.resourcemanager.RMAppManager$ApplicationSummary=false"
+        },
+        "pig-properties": {
+            "content": "\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\n# Pig default configuration file. All values can be overwritten by pig.properties and command line arguments.\n# see bin/pig -help\n\n# brief logging (no timestamps
 )\nbrief=false\n\n# debug level, INFO is default\ndebug=INFO\n\n# verbose print all log messages to screen (default to print only INFO and above to screen)\nverbose=false\n\n# exectype local|mapreduce, mapreduce is default\nexectype=mapreduce\n\n# Enable insertion of information about script into hadoop job conf \npig.script.info.enabled=true\n\n# Do not spill temp files smaller than this size (bytes)\npig.spill.size.threshold=5000000\n\n# EXPERIMENT: Activate garbage collection when spilling a file bigger than this size (bytes)\n# This should help reduce the number of files being spilled.\npig.spill.gc.activation.size=40000000\n\n# the following two parameters are to help estimate the reducer number\npig.exec.reducers.bytes.per.reducer=1000000000\npig.exec.reducers.max=999\n\n# Temporary location to store the intermediate data.\npig.temp.dir=/tmp/\n\n# Threshold for merging FRJoin fragment files\npig.files.concatenation.threshold=100\npig.optimistic.files.concatenation=false;\n\npi
 g.disable.counter=false\n\n# Avoid pig failures when multiple jobs write to the same location\npig.location.check.strict=false\n\nhcat.bin=/usr/bin/hcat"
+        },
+        "hive-log4j": {
+            "content": "\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Define some default values that can be overridden by system properties\nhive.log.threshold=ALL\nhive.root.logger=INFO,DRFA\nhive.log.dir=${java.io.tmpdir}/${user.na
 me}\nhive.log.file=hive.log\n\n# Define the root logger to the system property \"hadoop.root.logger\".\nlog4j.rootLogger=${hive.root.logger}, EventCounter\n\n# Logging Threshold\nlog4j.threshold=${hive.log.threshold}\n\n#\n# Daily Rolling File Appender\n#\n# Use the PidDailyerRollingFileAppend class instead if you want to use separate log files\n# for different CLI session.\n#\n# log4j.appender.DRFA=org.apache.hadoop.hive.ql.log.PidDailyRollingFileAppender\n\nlog4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender\n\nlog4j.appender.DRFA.File=${hive.log.dir}/${hive.log.file}\n\n# Rollver at midnight\nlog4j.appender.DRFA.DatePattern=.yyyy-MM-dd\n\n# 30-day backup\n#log4j.appender.DRFA.MaxBackupIndex=30\nlog4j.appender.DRFA.layout=org.apache.log4j.PatternLayout\n\n# Pattern format: Date LogLevel LoggerName LogMessage\n#log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\n# Debugging Pattern format\nlog4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p [%t
 ]: %c{2} (%F:%M(%L)) - %m%n\n\n\n#\n# console\n# Add \"console\" to rootlogger above if you want to use this\n#\n\nlog4j.appender.console=org.apache.log4j.ConsoleAppender\nlog4j.appender.console.target=System.err\nlog4j.appender.console.layout=org.apache.log4j.PatternLayout\nlog4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} [%t]: %p %c{2}: %m%n\nlog4j.appender.console.encoding=UTF-8\n\n#custom logging levels\n#log4j.logger.xxx=DEBUG\n\n#\n# Event Counter Appender\n# Sends counts of logging messages at different severity levels to Hadoop Metrics.\n#\nlog4j.appender.EventCounter=org.apache.hadoop.hive.shims.HiveEventCounter\n\n\nlog4j.category.DataNucleus=ERROR,DRFA\nlog4j.category.Datastore=ERROR,DRFA\nlog4j.category.Datastore.Schema=ERROR,DRFA\nlog4j.category.JPOX.Datastore=ERROR,DRFA\nlog4j.category.JPOX.Plugin=ERROR,DRFA\nlog4j.category.JPOX.MetaData=ERROR,DRFA\nlog4j.category.JPOX.Query=ERROR,DRFA\nlog4j.category.JPOX.General=ERROR,DRFA\nlog4j.category.JPOX.En
 hancer=ERROR,DRFA\n\n\n# Silence useless ZK logs\nlog4j.logger.org.apache.zookeeper.server.NIOServerCnxn=WARN,DRFA\nlog4j.logger.org.apache.zookeeper.ClientCnxnSocketNIO=WARN,DRFA"
+        },
+        "hadoop-policy": {
+            "security.job.client.protocol.acl": "*",
+            "security.job.task.protocol.acl": "*",
+            "security.datanode.protocol.acl": "*",
+            "security.namenode.protocol.acl": "*",
+            "security.client.datanode.protocol.acl": "*",
+            "security.inter.tracker.protocol.acl": "*",
+            "security.refresh.usertogroups.mappings.protocol.acl": "hadoop",
+            "security.client.protocol.acl": "*",
+            "security.refresh.policy.protocol.acl": "hadoop",
+            "security.admin.operations.protocol.acl": "hadoop",
+            "security.inter.datanode.protocol.acl": "*"
+        },
+        "hdfs-log4j": {
+            "content": "\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#  http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n#\n\n\n# Define some default values that can be overridden by system properties\n# To change daemon root logger use hadoop_root_logger in hadoop-env\nhadoop.root.lo
 gger=INFO,console\nhadoop.log.dir=.\nhadoop.log.file=hadoop.log\n\n\n# Define the root logger to the system property \"hadoop.root.logger\".\nlog4j.rootLogger=${hadoop.root.logger}, EventCounter\n\n# Logging Threshold\nlog4j.threshhold=ALL\n\n#\n# Daily Rolling File Appender\n#\n\nlog4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.DRFA.File=${hadoop.log.dir}/${hadoop.log.file}\n\n# Rollver at midnight\nlog4j.appender.DRFA.DatePattern=.yyyy-MM-dd\n\n# 30-day backup\n#log4j.appender.DRFA.MaxBackupIndex=30\nlog4j.appender.DRFA.layout=org.apache.log4j.PatternLayout\n\n# Pattern format: Date LogLevel LoggerName LogMessage\nlog4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\n# Debugging Pattern format\n#log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n\n\n\n#\n# console\n# Add \"console\" to rootlogger above if you want to use this\n#\n\nlog4j.appender.console=org.apache.log4j.ConsoleAppender\nlog4j.appender
 .console.target=System.err\nlog4j.appender.console.layout=org.apache.log4j.PatternLayout\nlog4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n\n\n#\n# TaskLog Appender\n#\n\n#Default values\nhadoop.tasklog.taskid=null\nhadoop.tasklog.iscleanup=false\nhadoop.tasklog.noKeepSplits=4\nhadoop.tasklog.totalLogFileSize=100\nhadoop.tasklog.purgeLogSplits=true\nhadoop.tasklog.logsRetainHours=12\n\nlog4j.appender.TLA=org.apache.hadoop.mapred.TaskLogAppender\nlog4j.appender.TLA.taskId=${hadoop.tasklog.taskid}\nlog4j.appender.TLA.isCleanup=${hadoop.tasklog.iscleanup}\nlog4j.appender.TLA.totalLogFileSize=${hadoop.tasklog.totalLogFileSize}\n\nlog4j.appender.TLA.layout=org.apache.log4j.PatternLayout\nlog4j.appender.TLA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\n\n#\n#Security audit appender\n#\nhadoop.security.logger=INFO,console\nhadoop.security.log.maxfilesize=256MB\nhadoop.security.log.maxbackupindex=20\nlog4j.category.SecurityLogger=${hadoop.security.logg
 er}\nhadoop.security.log.file=SecurityAuth.audit\nlog4j.appender.DRFAS=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.DRFAS.File=${hadoop.log.dir}/${hadoop.security.log.file}\nlog4j.appender.DRFAS.layout=org.apache.log4j.PatternLayout\nlog4j.appender.DRFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\nlog4j.appender.DRFAS.DatePattern=.yyyy-MM-dd\n\nlog4j.appender.RFAS=org.apache.log4j.RollingFileAppender\nlog4j.appender.RFAS.File=${hadoop.log.dir}/${hadoop.security.log.file}\nlog4j.appender.RFAS.layout=org.apache.log4j.PatternLayout\nlog4j.appender.RFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\nlog4j.appender.RFAS.MaxFileSize=${hadoop.security.log.maxfilesize}\nlog4j.appender.RFAS.MaxBackupIndex=${hadoop.security.log.maxbackupindex}\n\n#\n# hdfs audit logging\n#\nhdfs.audit.logger=INFO,console\nlog4j.logger.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=${hdfs.audit.logger}\nlog4j.additivity.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=
 false\nlog4j.appender.DRFAAUDIT=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.DRFAAUDIT.File=${hadoop.log.dir}/hdfs-audit.log\nlog4j.appender.DRFAAUDIT.layout=org.apache.log4j.PatternLayout\nlog4j.appender.DRFAAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n\nlog4j.appender.DRFAAUDIT.DatePattern=.yyyy-MM-dd\n\n#\n# mapred audit logging\n#\nmapred.audit.logger=INFO,console\nlog4j.logger.org.apache.hadoop.mapred.AuditLogger=${mapred.audit.logger}\nlog4j.additivity.org.apache.hadoop.mapred.AuditLogger=false\nlog4j.appender.MRAUDIT=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.MRAUDIT.File=${hadoop.log.dir}/mapred-audit.log\nlog4j.appender.MRAUDIT.layout=org.apache.log4j.PatternLayout\nlog4j.appender.MRAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n\nlog4j.appender.MRAUDIT.DatePattern=.yyyy-MM-dd\n\n#\n# Rolling File Appender\n#\n\nlog4j.appender.RFA=org.apache.log4j.RollingFileAppender\nlog4j.appender.RFA.File=${hadoop.log.dir}/${hadoop.log.fi
 le}\n\n# Logfile size and and 30-day backups\nlog4j.appender.RFA.MaxFileSize=256MB\nlog4j.appender.RFA.MaxBackupIndex=10\n\nlog4j.appender.RFA.layout=org.apache.log4j.PatternLayout\nlog4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} - %m%n\nlog4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n\n\n\n# Custom Logging levels\n\nhadoop.metrics.log.level=INFO\n#log4j.logger.org.apache.hadoop.mapred.JobTracker=DEBUG\n#log4j.logger.org.apache.hadoop.mapred.TaskTracker=DEBUG\n#log4j.logger.org.apache.hadoop.fs.FSNamesystem=DEBUG\nlog4j.logger.org.apache.hadoop.metrics2=${hadoop.metrics.log.level}\n\n# Jets3t library\nlog4j.logger.org.jets3t.service.impl.rest.httpclient.RestS3Service=ERROR\n\n#\n# Null Appender\n# Trap security logger on the hadoop client side\n#\nlog4j.appender.NullAppender=org.apache.log4j.varia.NullAppender\n\n#\n# Event Counter Appender\n# Sends counts of logging messages at different severity levels to Hadoop Metrics.\n#\n
 log4j.appender.EventCounter=org.apache.hadoop.log.metrics.EventCounter\n\n# Removes \"deprecated\" messages\nlog4j.logger.org.apache.hadoop.conf.Configuration.deprecation=WARN\n\n#\n# HDFS block state change log from block manager\n#\n# Uncomment the following to suppress normal block state change\n# messages from BlockManager in NameNode.\n#log4j.logger.BlockStateChange=WARN"
+        },
+        "hive-site": {
+            "javax.jdo.option.ConnectionDriverName": "com.mysql.jdbc.Driver",
+            "hive.fetch.task.aggr": "false",
+            "hive.execution.engine": "mr",
+            "hive.tez.java.opts": "-server -Xmx546m -Djava.net.preferIPv4Stack=true -XX:NewRatio=8 -XX:+UseNUMA -XX:+UseParallelGC -XX:+PrintGCDetails -verbose:gc -XX:+PrintGCTimeStamps",
+            "hive.server2.table.type.mapping": "CLASSIC",
+            "hive.tez.min.partition.factor": "0.25",
+            "hive.tez.cpu.vcores": "-1",
+            "hive.conf.restricted.list": "hive.security.authenticator.manager,hive.security.authorization.manager,hive.users.in.admin.role",
+            "hive.stats.dbclass": "fs",
+            "hive.tez.auto.reducer.parallelism": "false",
+            "hive.auto.convert.sortmerge.join.to.mapjoin": "false",
+            "hive.server2.thrift.http.path": "cliservice",
+            "hive.exec.scratchdir": "/tmp/hive",
+            "hive.exec.post.hooks": "org.apache.hadoop.hive.ql.hooks.ATSHook",
+            "hive.zookeeper.namespace": "hive_zookeeper_namespace",
+            "hive.cbo.enable": "true",
+            "hive.optimize.index.filter": "true",
+            "hive.optimize.bucketmapjoin": "true",
+            "hive.mapjoin.bucket.cache.size": "10000",
+            "hive.limit.optimize.enable": "true",
+            "hive.fetch.task.conversion.threshold": "1073741824",
+            "hive.exec.max.dynamic.partitions": "5000",
+            "hive.metastore.sasl.enabled": "false",
+            "hive.txn.manager": "org.apache.hadoop.hive.ql.lockmgr.DummyTxnManager",
+            "hive.optimize.constant.propagation": "true",
+            "hive.exec.submitviachild": "false",
+            "hive.metastore.kerberos.principal": "hive/_HOST@EXAMPLE.COM",
+            "hive.txn.max.open.batch": "1000",
+            "hive.exec.compress.output": "false",
+            "hive.merge.size.per.task": "256000000",
+            "hive.security.authenticator.manager": "org.apache.hadoop.hive.ql.security.ProxyUserAuthenticator",
+            "hive.merge.mapfiles": "true",
+            "hive.compactor.initiator.on": "false",
+            "hive.mapjoin.optimized.hashtable": "true",
+            "hive.optimize.metadataonly": "true",
+            "hive.tez.dynamic.partition.pruning.max.event.size": "1048576",
+            "hive.server2.thrift.max.worker.threads": "500",
+            "hive.optimize.sort.dynamic.partition": "false",
+            "hive.server2.thrift.http.port": "10001",
+            "hive.metastore.pre.event.listeners": "org.apache.hadoop.hive.ql.security.authorization.AuthorizationPreEventListener",
+            "hive.metastore.failure.retries": "24",
+            "hive.merge.smallfiles.avgsize": "16000000",
+            "hive.tez.max.partition.factor": "2.0",
+            "hive.server2.transport.mode": "binary",
+            "hive.tez.container.size": "682",
+            "hive.optimize.bucketmapjoin.sortedmerge": "false",
+            "hive.compactor.worker.threads": "0",
+            "hive.security.metastore.authorization.manager": "org.apache.hadoop.hive.ql.security.authorization.StorageBasedAuthorizationProvider,org.apache.hadoop.hive.ql.security.authorization.MetaStoreAuthzAPIAuthorizerEmbedOnly",
+            "hive.server2.thrift.port": "10010",
+            "hive.map.aggr.hash.percentmemory": "0.5",
+            "hive.user.install.directory": "/user/",
+            "hive.compute.query.using.stats": "true",
+            "hive.merge.rcfile.block.level": "true",
+            "hive.map.aggr": "true",
+            "hive.metastore.client.connect.retry.delay": "5s",
+            "hive.security.authorization.enabled": "false",
+            "hive.map.aggr.hash.force.flush.memory.threshold": "0.9",
+            "hive.server2.tez.default.queues": "default",
+            "hive.prewarm.enabled": "false",
+            "hive.exec.reducers.max": "1009",
+            "hive.metastore.kerberos.keytab.file": "/etc/security/keytabs/hive.service.keytab",
+            "hive.stats.fetch.partition.stats": "true",
+            "hive.cli.print.header": "false",
+            "hive.server2.thrift.sasl.qop": "auth",
+            "hive.server2.support.dynamic.service.discovery": "true",
+            "hive.fetch.task.conversion": "more",
+            "hive.exec.reducers.bytes.per.reducer": "67108864",
+            "hive.compactor.abortedtxn.threshold": "1000",
+            "hive.tez.dynamic.partition.pruning.max.data.size": "104857600",
+            "hive.metastore.warehouse.dir": "/apps/hive/warehouse",
+            "hive.metastore.client.socket.timeout": "1800s",
+            "hive.server2.zookeeper.namespace": "hiveserver2",
+            "hive.prewarm.numcontainers": "10",
+            "hive.vectorized.groupby.flush.percent": "0.1",
+            "hive.server2.enable.doAs": "true",
+            "hive.security.metastore.authenticator.manager": "org.apache.hadoop.hive.ql.security.HadoopDefaultMetastoreAuthenticator",
+            "hive.server2.use.SSL": "false",
+            "hive.enforce.bucketing": "true",
+            "hive.server2.authentication.spnego.keytab": "HTTP/_HOST@EXAMPLE.COM",
+            "hive.mapred.reduce.tasks.speculative.execution": "false",
+            "javax.jdo.option.ConnectionURL": "jdbc:mysql://c6402.ambari.apache.org/hive?createDatabaseIfNotExist=true",
+            "hive.exec.dynamic.partition.mode": "nonstrict",
+            "hive.auto.convert.sortmerge.join": "true",
+            "hive.zookeeper.quorum": "c6402.ambari.apache.org:2181,c6403.ambari.apache.org:2181,c6401.ambari.apache.org:2181",
+            "hive.security.authorization.manager": "org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdConfOnlyAuthorizerFactory",
+            "hive.exec.parallel": "false",
+            "hive.stats.fetch.column.stats": "false",
+            "hive.enforce.sorting": "true",
+            "hive.txn.timeout": "300",
+            "hive.metastore.authorization.storage.checks": "false",
+            "hive.exec.orc.default.stripe.size": "67108864",
+            "hive.metastore.cache.pinobjtypes": "Table,Database,Type,FieldSchema,Order",
+            "hive.server2.logging.operation.enabled": "true",
+            "hive.merge.tezfiles": "false",
+            "hive.exec.parallel.thread.number": "8",
+            "hive.auto.convert.join.noconditionaltask": "true",
+            "hive.server2.authentication.spnego.principal": "/etc/security/keytabs/spnego.service.keytab",
+            "hive.compactor.worker.timeout": "86400L",
+            "hive.optimize.null.scan": "true",
+            "hive.server2.tez.initialize.default.sessions": "false",
+            "datanucleus.cache.level2.type": "none",
+            "hive.stats.autogather": "true",
+            "hive.auto.convert.join": "true",
+            "hive.exec.submit.local.task.via.child": "true",
+            "hive.merge.mapredfiles": "false",
+            "hive.vectorized.execution.enabled": "true",
+            "hive.cluster.delegation.token.store.zookeeper.connectString": "c6402.ambari.apache.org:2181,c6403.ambari.apache.org:2181,c6401.ambari.apache.org:2181",
+            "hive.vectorized.execution.reduce.enabled": "false",
+            "hive.optimize.reducededuplication": "true",
+            "hive.server2.tez.sessions.per.default.queue": "1",
+            "hive.exec.max.dynamic.partitions.pernode": "2000",
+            "hive.tez.dynamic.partition.pruning": "true",
+            "hive.limit.pushdown.memory.usage": "0.04",
+            "hive.security.metastore.authorization.auth.reads": "true",
+            "ambari.hive.db.schema.name": "hive",
+            "hive.vectorized.groupby.checkinterval": "4096",
+            "hive.smbjoin.cache.rows": "10000",
+            "hive.metastore.execute.setugi": "true",
+            "hive.zookeeper.client.port": "2181",
+            "hive.vectorized.groupby.maxentries": "100000",
+            "hive.cluster.delegation.token.store.class": "org.apache.hadoop.hive.thrift.ZooKeeperTokenStore",
+            "hive.cluster.delegation.token.store.zookeeper.znode": "/hive/cluster/delegation",
+            "javax.jdo.option.ConnectionPassword": "password",
+            "hive.exec.max.created.files": "100000",
+            "hive.map.aggr.hash.min.reduction": "0.5",
+            "hive.orc.splits.include.file.footer": "false",
+            "hive.exec.pre.hooks": "org.apache.hadoop.hive.ql.hooks.ATSHook",
+            "hive.merge.orcfile.stripe.level": "true",
+            "hive.exec.orc.default.compress": "ZLIB",
+            "hive.server2.allow.user.substitution": "true",
+            "hive.metastore.connect.retries": "24",
+            "hive.metastore.server.max.threads": "100000",
+            "hive.exec.orc.compression.strategy": "SPEED",
+            "hive.optimize.reducededuplication.min.reducer": "4",
+            "hive.metastore.uris": "thrift://c6402.ambari.apache.org:9083",
+            "hive.enforce.sortmergebucketmapjoin": "true",
+            "hive.auto.convert.join.noconditionaltask.size": "238026752",
+            "javax.jdo.option.ConnectionUserName": "hive",
+            "hive.tez.log.level": "INFO",
+            "hive.compactor.delta.num.threshold": "10",
+            "hive.exec.dynamic.partition": "true",
+            "hive.server2.authentication": "NONE",
+            "hive.exec.compress.intermediate": "false",
+            "hive.orc.compute.splits.num.threads": "10",
+            "hive.tez.smb.number.waves": "0.5",
+            "hive.convert.join.bucket.mapjoin.tez": "false",
+            "hive.server2.logging.operation.log.location": "${system:java.io.tmpdir}/${system:user.name}/operation_logs",
+            "hive.tez.input.format": "org.apache.hadoop.hive.ql.io.HiveInputFormat",
+            "hive.exec.failure.hooks": "org.apache.hadoop.hive.ql.hooks.ATSHook",
+            "hive.support.concurrency": "false",
+            "hive.compactor.check.interval": "300L",
+            "hive.compactor.delta.pct.threshold": "0.1f"
+        },
+        "hive-exec-log4j": {
+            "content": "\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Define some default values that can be overridden by system properties\n\nhive.log.threshold=ALL\nhive.root.logger=INFO,FA\nhive.log.dir=${java.io.tmpdir}/${user.na
 me}\nhive.query.id=hadoop\nhive.log.file=${hive.query.id}.log\n\n# Define the root logger to the system property \"hadoop.root.logger\".\nlog4j.rootLogger=${hive.root.logger}, EventCounter\n\n# Logging Threshold\nlog4j.threshhold=${hive.log.threshold}\n\n#\n# File Appender\n#\n\nlog4j.appender.FA=org.apache.log4j.FileAppender\nlog4j.appender.FA.File=${hive.log.dir}/${hive.log.file}\nlog4j.appender.FA.layout=org.apache.log4j.PatternLayout\n\n# Pattern format: Date LogLevel LoggerName LogMessage\n#log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n\n# Debugging Pattern format\nlog4j.appender.FA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n\n\n\n#\n# console\n# Add \"console\" to rootlogger above if you want to use this\n#\n\nlog4j.appender.console=org.apache.log4j.ConsoleAppender\nlog4j.appender.console.target=System.err\nlog4j.appender.console.layout=org.apache.log4j.PatternLayout\nlog4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm
 :ss} %p %c{2}: %m%n\n\n#custom logging levels\n#log4j.logger.xxx=DEBUG\n\n#\n# Event Counter Appender\n# Sends counts of logging messages at different severity levels to Hadoop Metrics.\n#\nlog4j.appender.EventCounter=org.apache.hadoop.hive.shims.HiveEventCounter\n\n\nlog4j.category.DataNucleus=ERROR,FA\nlog4j.category.Datastore=ERROR,FA\nlog4j.category.Datastore.Schema=ERROR,FA\nlog4j.category.JPOX.Datastore=ERROR,FA\nlog4j.category.JPOX.Plugin=ERROR,FA\nlog4j.category.JPOX.MetaData=ERROR,FA\nlog4j.category.JPOX.Query=ERROR,FA\nlog4j.category.JPOX.General=ERROR,FA\nlog4j.category.JPOX.Enhancer=ERROR,FA\n\n\n# Silence useless ZK logs\nlog4j.logger.org.apache.zookeeper.server.NIOServerCnxn=WARN,FA\nlog4j.logger.org.apache.zookeeper.ClientCnxnSocketNIO=WARN,FA"
+        },
+        "mapred-env": {
+            "content": "\n# export JAVA_HOME=/home/y/libexec/jdk1.6.0/\n\nexport HADOOP_JOB_HISTORYSERVER_HEAPSIZE={{jobhistory_heapsize}}\n\nexport HADOOP_MAPRED_ROOT_LOGGER=INFO,RFA\n\n#export HADOOP_JOB_HISTORYSERVER_OPTS=\n#export HADOOP_MAPRED_LOG_DIR=\"\" # Where log files are stored.  $HADOOP_MAPRED_HOME/logs by default.\n#export HADOOP_JHS_LOGGER=INFO,RFA # Hadoop JobSummary logger.\n#export HADOOP_MAPRED_PID_DIR= # The pid files are stored. /tmp by default.\n#export HADOOP_MAPRED_IDENT_STRING= #A string representing this instance of hadoop. $USER by default\n#export HADOOP_MAPRED_NICENESS= #The scheduling priority for daemons. Defaults to 0.\nexport HADOOP_OPTS=\"-Dhdp.version=$HDP_VERSION $HADOOP_OPTS\"",
+            "mapred_pid_dir_prefix": "/var/run/hadoop-mapreduce",
+            "mapred_user": "mapred",
+            "jobhistory_heapsize": "900",
+            "mapred_log_dir_prefix": "/var/log/hadoop-mapreduce"
+        },
+        "tez-env": {
+            "content": "\n# Tez specific configuration\nexport TEZ_CONF_DIR={{config_dir}}\n\n# Set HADOOP_HOME to point to a specific hadoop install directory\nexport HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\n\n# The java implementation to use.\nexport JAVA_HOME={{java64_home}}",
+            "tez_user": "tez"
+        },
+        "core-site": {
+            "io.serializations": "org.apache.hadoop.io.serializer.WritableSerialization",
+            "hadoop.proxyuser.hcat.groups": "users",
+            "proxyuser_group": "users",
+            "fs.trash.interval": "360",
+            "hadoop.proxyuser.hcat.hosts": "c6402.ambari.apache.org",
+            "hadoop.proxyuser.hive.groups": "users",
+            "hadoop.security.authentication": "simple",
+            "io.compression.codecs": "org.apache.hadoop.io.compress.GzipCodec,org.apache.hadoop.io.compress.DefaultCodec,org.apache.hadoop.io.compress.SnappyCodec",
+            "mapreduce.jobtracker.webinterface.trusted": "false",
+            "hadoop.security.authorization": "false",
+            "fs.defaultFS": "hdfs://c6401.ambari.apache.org:8020",
+            "hadoop.http.authentication.simple.anonymous.allowed": "true",
+            "ipc.client.connect.max.retries": "50",
+            "ipc.client.idlethreshold": "8000",
+            "io.file.buffer.size": "131072",
+            "ipc.server.tcpnodelay": "true",
+            "hadoop.proxyuser.hive.hosts": "c6402.ambari.apache.org",
+            "hadoop.security.auth_to_local": "\n        RULE:[2:$1@$0]([rn]m@.*)s/.*/yarn/\n        RULE:[2:$1@$0](jhs@.*)s/.*/mapred/\n        RULE:[2:$1@$0]([nd]n@.*)s/.*/hdfs/\n        RULE:[2:$1@$0](hm@.*)s/.*/hbase/\n        RULE:[2:$1@$0](rs@.*)s/.*/hbase/\n        DEFAULT",
+            "ipc.client.connection.maxidletime": "30000"
+        },
+        "yarn-env": {
+            "yarn_pid_dir_prefix": "/var/run/hadoop-yarn",
+            "apptimelineserver_heapsize": "1024",
+            "nodemanager_heapsize": "1024",
+            "content": "\nexport HADOOP_YARN_HOME={{hadoop_yarn_home}}\nexport YARN_LOG_DIR={{yarn_log_dir_prefix}}/$USER\nexport YARN_PID_DIR={{yarn_pid_dir_prefix}}/$USER\nexport HADOOP_LIBEXEC_DIR={{hadoop_libexec_dir}}\nexport JAVA_HOME={{java64_home}}\n\n# User for YARN daemons\nexport HADOOP_YARN_USER=${HADOOP_YARN_USER:-yarn}\n\n# resolve links - $0 may be a softlink\nexport YARN_CONF_DIR=\"${YARN_CONF_DIR:-$HADOOP_YARN_HOME/conf}\"\n\n# some Java parameters\n# export JAVA_HOME=/home/y/libexec/jdk1.6.0/\nif [ \"$JAVA_HOME\" != \"\" ]; then\n  #echo \"run java in $JAVA_HOME\"\n  JAVA_HOME=$JAVA_HOME\nfi\n\nif [ \"$JAVA_HOME\" = \"\" ]; then\n  echo \"Error: JAVA_HOME is not set.\"\n  exit 1\nfi\n\nJAVA=$JAVA_HOME/bin/java\nJAVA_HEAP_MAX=-Xmx1000m\n\n# For setting YARN specific HEAP sizes please use this\n# Parameter and set appropriately\nYARN_HEAPSIZE={{yarn_heapsize}}\n\n# check envvars which might override default args\nif [ \"$YARN_HEAPSIZE\" != \"\" ]; then\n  JAVA_HEAP_M
 AX=\"-Xmx\"\"$YARN_HEAPSIZE\"\"m\"\nfi\n\n# Resource Manager specific parameters\n\n# Specify the max Heapsize for the ResourceManager using a numerical value\n# in the scale of MB. For example, to specify an jvm option of -Xmx1000m, set\n# the value to 1000.\n# This value will be overridden by an Xmx setting specified in either YARN_OPTS\n# and/or YARN_RESOURCEMANAGER_OPTS.\n# If not specified, the default value will be picked from either YARN_HEAPMAX\n# or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two.\nexport YARN_RESOURCEMANAGER_HEAPSIZE={{resourcemanager_heapsize}}\n\n# Specify the JVM options to be used when starting the ResourceManager.\n# These options will be appended to the options specified as YARN_OPTS\n# and therefore may override any similar flags set in YARN_OPTS\n#export YARN_RESOURCEMANAGER_OPTS=\n\n# Node Manager specific parameters\n\n# Specify the max Heapsize for the NodeManager using a numerical value\n# in the scale of MB. For example, to 
 specify an jvm option of -Xmx1000m, set\n# the value to 1000.\n# This value will be overridden by an Xmx setting specified in either YARN_OPTS\n# and/or YARN_NODEMANAGER_OPTS.\n# If not specified, the default value will be picked from either YARN_HEAPMAX\n# or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two.\nexport YARN_NODEMANAGER_HEAPSIZE={{nodemanager_heapsize}}\n\n# Specify the max Heapsize for the HistoryManager using a numerical value\n# in the scale of MB. For example, to specify an jvm option of -Xmx1000m, set\n# the value to 1024.\n# This value will be overridden by an Xmx setting specified in either YARN_OPTS\n# and/or YARN_HISTORYSERVER_OPTS.\n# If not specified, the default value will be picked from either YARN_HEAPMAX\n# or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two.\nexport YARN_HISTORYSERVER_HEAPSIZE={{apptimelineserver_heapsize}}\n\n# Specify the JVM options to be used when starting the NodeManager.\n# These options will be
  appended to the options specified as YARN_OPTS\n# and therefore may override any similar flags set in YARN_OPTS\n#export YARN_NODEMANAGER_OPTS=\n\n# so that filenames w/ spaces are handled correctly in loops below\nIFS=\n\n\n# default log directory and file\nif [ \"$YARN_LOG_DIR\" = \"\" ]; then\n  YARN_LOG_DIR=\"$HADOOP_YARN_HOME/logs\"\nfi\nif [ \"$YARN_LOGFILE\" = \"\" ]; then\n  YARN_LOGFILE='yarn.log'\nfi\n\n# default policy file for service-level authorization\nif [ \"$YARN_POLICYFILE\" = \"\" ]; then\n  YARN_POLICYFILE=\"hadoop-policy.xml\"\nfi\n\n# restore ordinary behaviour\nunset IFS\n\n\nYARN_OPTS=\"$YARN_OPTS -Dhadoop.log.dir=$YARN_LOG_DIR\"\nYARN_OPTS=\"$YARN_OPTS -Dyarn.log.dir=$YARN_LOG_DIR\"\nYARN_OPTS=\"$YARN_OPTS -Dhadoop.log.file=$YARN_LOGFILE\"\nYARN_OPTS=\"$YARN_OPTS -Dyarn.log.file=$YARN_LOGFILE\"\nYARN_OPTS=\"$YARN_OPTS -Dyarn.home.dir=$YARN_COMMON_HOME\"\nYARN_OPTS=\"$YARN_OPTS -Dyarn.id.str=$YARN_IDENT_STRING\"\nYARN_OPTS=\"$YARN_OPTS -Dhadoop.root.logger=$
 {YARN_ROOT_LOGGER:-INFO,console}\"\nYARN_OPTS=\"$YARN_OPTS -Dyarn.root.logger=${YARN_ROOT_LOGGER:-INFO,console}\"\nif [ \"x$JAVA_LIBRARY_PATH\" != \"x\" ]; then\n  YARN_OPTS=\"$YARN_OPTS -Djava.library.path=$JAVA_LIBRARY_PATH\"\nfi\nYARN_OPTS=\"$YARN_OPTS -Dyarn.policy.file=$YARN_POLICYFILE\"",
+            "yarn_heapsize": "1024",
+            "min_user_id": "1000",
+            "yarn_user": "yarn",
+            "resourcemanager_heapsize": "1024",
+            "yarn_log_dir_prefix": "/var/log/hadoop-yarn"
+        },
+        "hadoop-env": {
+            "dtnode_heapsize": "1024m",
+            "namenode_opt_maxnewsize": "200m",
+            "hdfs_log_dir_prefix": "/var/log/hadoop",
+            "namenode_heapsize": "1024m",
+            "proxyuser_group": "users",
+            "hadoop_pid_dir_prefix": "/var/run/hadoop",
+            "content": "\n# Set Hadoop-specific environment variables here.\n\n# The only required environment variable is JAVA_HOME.  All others are\n# optional.  When running a distributed configuration it is best to\n# set JAVA_HOME in this file, so that it is correctly defined on\n# remote nodes.\n\n# The java implementation to use.  Required.\nexport JAVA_HOME={{java_home}}\nexport HADOOP_HOME_WARN_SUPPRESS=1\n\n# Hadoop home directory\nexport HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\n\n# Hadoop Configuration Directory\n\n{# this is different for HDP1 #}\n# Path to jsvc required by secure HDP 2.0 datanode\nexport JSVC_HOME={{jsvc_path}}\n\n\n# The maximum amount of heap to use, in MB. Default is 1000.\nexport HADOOP_HEAPSIZE=\"{{hadoop_heapsize}}\"\n\nexport HADOOP_NAMENODE_INIT_HEAPSIZE=\"-Xms{{namenode_heapsize}}\"\n\n# Extra Java runtime options.  Empty by default.\nexport HADOOP_OPTS=\"-Djava.net.preferIPv4Stack=true ${HADOOP_OPTS}\"\n\n# Command specific options appende
 d to HADOOP_OPTS when specified\nexport HADOOP_NAMENODE_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -XX:PermSize={{namenode_opt_permsize}} -XX:MaxPermSize={{namenode_opt_maxpermsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms{{namenode_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_NAMENODE_OPTS}\"\nHADOOP_JOBTRACKER_OPTS=\"-server -XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{jtnode_opt_newsize}} -XX:MaxNewSize={{jtnode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStam
 ps -Xmx{{jtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dmapred.audit.logger=INFO,MRAUDIT -Dhadoop.mapreduce.jobsummary.logger=INFO,JSA ${HADOOP_JOBTRACKER_OPTS}\"\n\nHADOOP_TASKTRACKER_OPTS=\"-server -Xmx{{ttnode_heapsize}} -Dhadoop.security.logger=ERROR,console -Dmapred.audit.logger=ERROR,console ${HADOOP_TASKTRACKER_OPTS}\"\nexport HADOOP_DATANODE_OPTS=\"-server -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:ErrorFile=/var/log/hadoop/$USER/hs_err_pid%p.log -XX:NewSize=200m -XX:MaxNewSize=200m -XX:PermSize=128m -XX:MaxPermSize=256m -Xloggc:/var/log/hadoop/$USER/gc.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms{{dtnode_heapsize}} -Xmx{{dtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT ${HADOOP_DATANODE_OPTS}\"\nHADOOP_BALANCER_OPTS=\"-server -Xmx{{hadoop_heapsize}}m ${HADOOP_BALANCER_OPTS}\"\n\nexport HADOOP_SECONDARYNAMENODE_OPTS=$HADOOP_NAMENODE_OPTS\n\n# The following
  applies to multiple commands (fs, dfs, fsck, distcp etc)\nexport HADOOP_CLIENT_OPTS=\"-Xmx${HADOOP_HEAPSIZE}m -XX:MaxPermSize=512m $HADOOP_CLIENT_OPTS\"\n\n# On secure datanodes, user to run the datanode as after dropping privileges\nexport HADOOP_SECURE_DN_USER=${HADOOP_SECURE_DN_USER:-{{hadoop_secure_dn_user}}}\n\n# Extra ssh options.  Empty by default.\nexport HADOOP_SSH_OPTS=\"-o ConnectTimeout=5 -o SendEnv=HADOOP_CONF_DIR\"\n\n# Where log files are stored.  $HADOOP_HOME/logs by default.\nexport HADOOP_LOG_DIR={{hdfs_log_dir_prefix}}/$USER\n\n# History server logs\nexport HADOOP_MAPRED_LOG_DIR={{mapred_log_dir_prefix}}/$USER\n\n# Where log files are stored in the secure data environment.\nexport HADOOP_SECURE_DN_LOG_DIR={{hdfs_log_dir_prefix}}/$HADOOP_SECURE_DN_USER\n\n# File naming remote slave hosts.  $HADOOP_HOME/conf/slaves by default.\n# export HADOOP_SLAVES=${HADOOP_HOME}/conf/slaves\n\n# host:path where hadoop code should be rsync'd from.  Unset by default.\n# export HAD
 OOP_MASTER=master:/home/$USER/src/hadoop\n\n# Seconds to sleep between slave commands.  Unset by default.  This\n# can be useful in large clusters, where, e.g., slave rsyncs can\n# otherwise arrive faster than the master can service them.\n# export HADOOP_SLAVE_SLEEP=0.1\n\n# The directory where pid files are stored. /tmp by default.\nexport HADOOP_PID_DIR={{hadoop_pid_dir_prefix}}/$USER\nexport HADOOP_SECURE_DN_PID_DIR={{hadoop_pid_dir_prefix}}/$HADOOP_SECURE_DN_USER\n\n# History server pid\nexport HADOOP_MAPRED_PID_DIR={{mapred_pid_dir_prefix}}/$USER\n\nYARN_RESOURCEMANAGER_OPTS=\"-Dyarn.server.resourcemanager.appsummary.logger=INFO,RMSUMMARY\"\n\n# A string representing this instance of hadoop. $USER by default.\nexport HADOOP_IDENT_STRING=$USER\n\n# The scheduling priority for daemon processes.  See 'man nice'.\n\n# export HADOOP_NICENESS=10\n\n# Use libraries from standard classpath\nJAVA_JDBC_LIBS=\"\"\n#Add libraries required by mysql connector\nfor jarFile in `ls /usr/share/
 java/*mysql* 2>/dev/null`\ndo\n  JAVA_JDBC_LIBS=${JAVA_JDBC_LIBS}:$jarFile\ndone\n# Add libraries required by oracle connector\nfor jarFile in `ls /usr/share/java/*ojdbc* 2>/dev/null`\ndo\n  JAVA_JDBC_LIBS=${JAVA_JDBC_LIBS}:$jarFile\ndone\n# Add libraries required by nodemanager\nMAPREDUCE_LIBS={{mapreduce_libs_path}}\nexport HADOOP_CLASSPATH=${HADOOP_CLASSPATH}${JAVA_JDBC_LIBS}:${MAPREDUCE_LIBS}\n\n# added to the HADOOP_CLASSPATH\nif [ -d \"/usr/hdp/current/tez-client\" ]; then\n  if [ -d \"/etc/tez/conf/\" ]; then\n    # When using versioned RPMs, the tez-client will be a symlink to the current folder of tez in HDP.\n    export HADOOP_CLASSPATH=${HADOOP_CLASSPATH}:/usr/hdp/current/tez-client/*:/usr/hdp/current/tez-client/lib/*:/etc/tez/conf/\n  fi\nfi\n\n\n# Setting path to hdfs command line\nexport HADOOP_LIBEXEC_DIR={{hadoop_libexec_dir}}\n\n# Mostly required for hadoop 2.0\nexport JAVA_LIBRARY_PATH=${JAVA_LIBRARY_PATH}\n\nexport HADOOP_OPTS=\"-Dhdp.version=$HDP_VERSION $HADOOP_
 OPTS\"",
+            "hdfs_user": "hdfs",
+            "namenode_opt_newsize": "200m",
+            "dfs.datanode.data.dir.mount.file": "/etc/hadoop/conf/dfs_data_dir_mount.hist",
+            "hadoop_root_logger": "INFO,RFA",
+            "hadoop_heapsize": "1024",
+            "namenode_opt_maxpermsize": "256m",
+            "namenode_opt_permsize": "128m"
+        },
+        "zookeeper-log4j": {
+            "content": "\n#\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n#\n#\n#\n\n#\n# ZooKeeper Logging Configuration\n#\n\n# DEFAULT: console appender only\nlog4j.rootLogger=INFO, CONSOLE\n\n# Example with rolling log file\n#log4
 j.rootLogger=DEBUG, CONSOLE, ROLLINGFILE\n\n# Example with rolling log file and tracing\n#log4j.rootLogger=TRACE, CONSOLE, ROLLINGFILE, TRACEFILE\n\n#\n# Log INFO level and above messages to the console\n#\nlog4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender\nlog4j.appender.CONSOLE.Threshold=INFO\nlog4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout\nlog4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n\n\n#\n# Add ROLLINGFILE to rootLogger to get log file output\n#    Log DEBUG level and above messages to a log file\nlog4j.appender.ROLLINGFILE=org.apache.log4j.RollingFileAppender\nlog4j.appender.ROLLINGFILE.Threshold=DEBUG\nlog4j.appender.ROLLINGFILE.File=zookeeper.log\n\n# Max log file size of 10MB\nlog4j.appender.ROLLINGFILE.MaxFileSize=10MB\n# uncomment the next line to limit number of backup files\n#log4j.appender.ROLLINGFILE.MaxBackupIndex=10\n\nlog4j.appender.ROLLINGFILE.layout=org.apache.log4j.PatternLayout\nlog4j.appender.ROLLIN
 GFILE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n\n\n\n#\n# Add TRACEFILE to rootLogger to get log file output\n#    Log DEBUG level and above messages to a log file\nlog4j.appender.TRACEFILE=org.apache.log4j.FileAppender\nlog4j.appender.TRACEFILE.Threshold=TRACE\nlog4j.appender.TRACEFILE.File=zookeeper_trace.log\n\nlog4j.appender.TRACEFILE.layout=org.apache.log4j.PatternLayout\n### Notice we are including log4j's NDC here (%x)\nlog4j.appender.TRACEFILE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L][%x] - %m%n"
+        },
+        "yarn-site": {
+            "yarn.client.nodemanager-connect.max-wait-ms": "900000",
+            "yarn.resourcemanager.zk-num-retries": "1000",
+            "yarn.timeline-service.bind-host": "0.0.0.0",
+            "yarn.resourcemanager.ha.enabled": "false",
+            "yarn.nodemanager.linux-container-executor.cgroups.hierarchy": "hadoop-yarn",
+            "yarn.timeline-service.webapp.address": "c6402.ambari.apache.org:8188",
+            "yarn.resourcemanager.state-store.max-completed-applications": "${yarn.resourcemanager.max-completed-applications}",
+            "yarn.timeline-service.enabled": "true",
+            "yarn.nodemanager.recovery.enabled": "true",
+            "yarn.timeline-service.http-authentication.type": "simple",
+            "yarn.resourcemanager.hostname": "c6402.ambari.apache.org",
+            "yarn.resourcemanager.am.max-attempts": "2",
+            "yarn.nodemanager.log-aggregation.debug-enabled": "false",
+            "yarn.resourcemanager.system-metrics-publisher.enabled": "true",
+            "yarn.nodemanager.vmem-pmem-ratio": "2.1",
+            "yarn.resourcemanager.nodes.exclude-path": "/etc/hadoop/conf/yarn.exclude",
+            "yarn.nodemanager.linux-container-executor.cgroups.mount": "false",
+            "yarn.resourcemanager.system-metrics-publisher.dispatcher.pool-size": "10",
+            "yarn.log.server.url": "http://c6402.ambari.apache.org:19888/jobhistory/logs",
+            "yarn.application.classpath": "$HADOOP_CONF_DIR,/usr/hdp/current/hadoop-client/*,/usr/hdp/current/hadoop-client/lib/*,/usr/hdp/current/hadoop-hdfs-client/*,/usr/hdp/current/hadoop-hdfs-client/lib/*,/usr/hdp/current/hadoop-yarn-client/*,/usr/hdp/current/hadoop-yarn-client/lib/*",
+            "yarn.resourcemanager.webapp.delegation-token-auth-filter.enabled": "false",
+            "yarn.nodemanager.local-dirs": "/hadoop/yarn/local",
+            "yarn.nodemanager.linux-container-executor.cgroups.strict-resource-usage": "false",
+            "yarn.nodemanager.remote-app-log-dir-suffix": "logs",
+            "yarn.resourcemanager.connect.max-wait.ms": "900000",
+            "yarn.resourcemanager.address": "c6402.ambari.apache.org:8050",
+            "yarn.scheduler.maximum-allocation-mb": "2048",
+            "yarn.nodemanager.container-monitor.interval-ms": "3000",
+            "yarn.node-labels.fs-store.retry-policy-spec": "2000, 500",
+            "yarn.resourcemanager.zk-acl": "world:anyone:rwcda",
+            "yarn.timeline-service.address": "c6402.ambari.apache.org:10200",
+            "yarn.log-aggregation-enable": "true",
+            "yarn.nodemanager.delete.debug-delay-sec": "0",
+            "yarn.timeline-service.store-class": "org.apache.hadoop.yarn.server.timeline.LeveldbTimelineStore",
+            "yarn.timeline-service.client.retry-interval-ms": "1000",
+            "hadoop.registry.zk.quorum": "c6402.ambari.apache.org:2181,c6403.ambari.apache.org:2181,c6401.ambari.apache.org:2181",
+            "yarn.nodemanager.aux-services": "mapreduce_shuffle",
+            "yarn.nodemanager.aux-services.mapreduce_shuffle.class": "org.apache.hadoop.mapred.ShuffleHandler",
+            "yarn.nodemanager.disk-health-checker.max-disk-utilization-per-disk-percentage": "90",
+            "yarn.resourcemanager.zk-timeout-ms": "10000",
+            "yarn.resourcemanager.fs.state-store.uri": " ",
+            "yarn.nodemanager.linux-container-executor.group": "hadoop",
+            "yarn.nodemanager.remote-app-log-dir": "/app-logs",
+            "yarn.resourcemanager.work-preserving-recovery.scheduling-wait-ms": "10000",
+            "yarn.timeline-service.generic-application-history.store-class": "org.apache.hadoop.yarn.server.applicationhistoryservice.NullApplicationHistoryStore",
+            "yarn.nodemanager.disk-health-checker.min-healthy-disks": "0.25",
+            "yarn.resourcemanager.work-preserving-recovery.enabled": "true",
+            "yarn.resourcemanager.resource-tracker.address": "c6402.ambari.apache.org:8025",
+            "yarn.nodemanager.health-checker.script.timeout-ms": "60000",
+            "yarn.resourcemanager.scheduler.class": "org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler",
+            "yarn.nodemanager.resource.memory-mb": "2048",
+            "yarn.nodemanager.resource.cpu-vcores": "1",
+            "yarn.timeline-service.ttl-ms": "2678400000",
+            "yarn.nodemanager.resource.percentage-physical-cpu-limit": "100",
+            "yarn.nodemanager.disk-health-checker.min-free-space-per-disk-mb": "1000",
+            "yarn.nodemanager.log-aggregation.roll-monitoring-interval-seconds": "-1",
+            "yarn.nodemanager.log.retain-second": "604800",
+            "yarn.nodemanager.log-dirs": "/hadoop/yarn/log",
+            "yarn.timeline-service.client.max-retries": "30",
+            "yarn.nodemanager.health-checker.interval-ms": "135000",
+            "yarn.nodemanager.admin-env": "MALLOC_ARENA_MAX=$MALLOC_ARENA_MAX",
+            "yarn.nodemanager.vmem-check-enabled": "false",
+            "yarn.acl.enable": "false",
+            "yarn.node-labels.manager-class": "org.apache.hadoop.yarn.server.resourcemanager.nodelabels.MemoryRMNodeLabelsManager",
+            "yarn.timeline-service.leveldb-timeline-store.read-cache-size": "104857600",
+            "yarn.nodemanager.linux-container-executor.resources-handler.class": "org.apache.hadoop.yarn.server.nodemanager.util.DefaultLCEResourcesHandler",
+            "yarn.resourcemanager.webapp.address": "c6402.ambari.apache.org:8088",
+            "yarn.timeline-service.http-authentication.simple.anonymous.allowed": "true",
+            "yarn.timeline-service.leveldb-timeline-store.start-time-read-cache-size": "10000",
+            "yarn.resourcemanager.bind-host": "0.0.0.0",
+            "yarn.resourcemanager.zk-address": "localhost:2181",
+            "yarn.nodemanager.recovery.dir": "{{yarn_log_dir_prefix}}/nodemanager/recovery-state",
+            "yarn.nodemanager.container-executor.class": "org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor",
+            "yarn.resourcemanager.store.class": "org.apache.hadoop.yarn.server.resourcemanager.recovery.ZKRMStateStore",
+            "yarn.timeline-service.leveldb-timeline-store.path": "/hadoop/yarn/timeline",
+            "yarn.scheduler.minimum-allocation-mb": "682",
+            "yarn.timeline-service.ttl-enable": "true",
+            "yarn.resourcemanager.scheduler.address": "c6402.ambari.apache.org:8030",
+            "yarn.log-aggregation.retain-seconds": "2592000",
+            "yarn.nodemanager.address": "0.0.0.0:45454",
+            "hadoop.registry.rm.enabled": "false",
+            "yarn.timeline-service.leveldb-timeline-store.ttl-interval-ms": "300000",
+            "yarn.resourcemanager.fs.state-store.retry-policy-spec": "2000, 500",
+            "yarn.resourcemanager.zk-state-store.parent-path": "/rmstore",
+            "yarn.nodemanager.log-aggregation.compression-type": "gz",
+            "yarn.nodemanager.log-aggregation.num-log-files-per-app": "30",
+            "yarn.resourcemanager.recovery.enabled": "true",
+            "yarn.nodemanager.bind-host": "0.0.0.0",
+            "yarn.resourcemanager.zk-retry-interval-ms": "1000",
+            "yarn.admin.acl": "",
+            "yarn.node-labels.fs-store.root-dir": "/system/yarn/node-labels",
+            "yarn.client.nodemanager-connect.retry-interval-ms": "10000",
+            "yarn.resourcemanager.admin.address": "c6402.ambari.apache.org:8141",
+            "yarn.timeline-service.webapp.https.address": "c6402.ambari.apache.org:8190",
+            "yarn.resourcemanager.connect.retry-interval.ms": "30000",
+            "yarn.timeline-service.leveldb-timeline-store.start-time-write-cache-size": "10000"
+        },
+        "hive-env": {
+            "hcat_pid_dir": "/var/run/webhcat",
+            "hcat_user": "hcat",
+            "hive_ambari_database": "MySQL",
+            "hive_hostname": "c6402.ambari.apache.org",
+            "hive_metastore_port": "9083",
+            "webhcat_user": "hcat",
+            "content": "\n if [ \"$SERVICE\" = \"cli\" ]; then\n   if [ -z \"$DEBUG\" ]; then\n     export HADOOP_OPTS=\"$HADOOP_OPTS -XX:NewRatio=12 -Xms10m -XX:MaxHeapFreeRatio=40 -XX:MinHeapFreeRatio=15 -XX:+UseParNewGC -XX:-UseGCOverheadLimit\"\n   else\n     export HADOOP_OPTS=\"$HADOOP_OPTS -XX:NewRatio=12 -Xms10m -XX:MaxHeapFreeRatio=40 -XX:MinHeapFreeRatio=15 -XX:-UseGCOverheadLimit\"\n   fi\n fi\n\n# The heap size of the jvm stared by hive shell script can be controlled via:\n\n# Larger heap size may be required when running queries over large number of files or partitions.\n# By default hive shell scripts use a heap size of 256 (MB).  Larger heap size would also be\n# appropriate for hive server (hwi etc).\n\n\n# Set HADOOP_HOME to point to a specific hadoop install directory\nHADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\n\n# Hive Configuration Directory can be controlled by:\nexport HIVE_CONF_DIR={{hive_config_dir}}\n\n# Folder containing extra libraries required for hive 
 compilation/execution can be controlled by:\nif [ \"${HIVE_AUX_JARS_PATH}\" != \"\" ]; then\n  export HIVE_AUX_JARS_PATH=${HIVE_AUX_JARS_PATH}\nelif [ -d \"/usr/hdp/current/hive-webhcat/share/hcatalog\" ]; then\n  export HIVE_AUX_JARS_PATH=/usr/hdp/current/hive-webhcat/share/hcatalog\nfi\n\nexport METASTORE_PORT={{hive_metastore_port}}",
+            "hive_database_name": "hive",
+            "hive_database_type": "mysql",
+            "hive_pid_dir": "/var/run/hive",
+            "hive_log_dir": "/var/log/hive",
+            "hive_user": "hive",
+            "hcat_log_dir": "/var/log/webhcat",
+            "hive_database": "New MySQL Database"
+        },
+        "capacity-scheduler": {
+            "yarn.scheduler.capacity.default.minimum-user-limit-percent": "100",
+            "yarn.scheduler.capacity.node-locality-delay": "40",
+            "yarn.scheduler.capacity.root.default.user-limit-factor": "1",
+            "yarn.scheduler.capacity.root.accessible-node-labels": "*",
+            "yarn.scheduler.capacity.root.default.state": "RUNNING",
+            "yarn.scheduler.capacity.root.capacity": "100",
+            "yarn.scheduler.capacity.root.default.capacity": "100",
+            "yarn.scheduler.capacity.root.queues": "default",
+            "yarn.scheduler.capacity.root.default.acl_administer_jobs": "*",
+            "yarn.scheduler.capacity.root.default-node-label-expression": " ",
+            "yarn.scheduler.capacity.root.default.maximum-capacity": "100",
+            "yarn.scheduler.capacity.root.accessible-node-labels.default.capacity": "-1",
+            "yarn.scheduler.capacity.root.default.acl_submit_applications": "*",
+            "yarn.scheduler.capacity.maximum-am-resource-percent": "0.2",
+            "yarn.scheduler.capacity.root.acl_administer_queue": "*",
+            "yarn.scheduler.capacity.maximum-applications": "10000",
+            "yarn.scheduler.capacity.root.accessible-node-labels.default.maximum-capacity": "-1",
+            "yarn.scheduler.capacity.resource-calculator": "org.apache.hadoop.yarn.util.resource.DefaultResourceCalculator"
+        },
+        "webhcat-site": {
+            "templeton.pig.path": "pig.tar.gz/pig/bin/pig",
+            "templeton.hive.properties": "hive.metastore.local=false, hive.metastore.uris=thrift://c6402.ambari.apache.org:9933, hive.metastore.sasl.enabled=false, hive.metastore.execute.setugi=true",
+            "templeton.override.enabled": "false",
+            "templeton.hcat.home": "hive.tar.gz/hive/hcatalog",
+            "templeton.jar": "/usr/hdp/current/hive-webhcat/share/webhcat/svr/lib/hive-webhcat-*.jar",
+            "templeton.sqoop.path": "sqoop.tar.gz/sqoop/bin/sqoop",
+            "templeton.hadoop": "/usr/hdp/current/hadoop-client/bin/hadoop",
+            "templeton.zookeeper.hosts": "c6402.ambari.apache.org:2181,c6403.ambari.apache.org:2181,c6401.ambari.apache.org:2181",
+            "templeton.exec.timeout": "60000",
+            "templeton.storage.class": "org.apache.hive.hcatalog.templeton.tool.ZooKeeperStorage",
+            "templeton.sqoop.archive": "hdfs:///hdp/apps/${hdp.version}/sqoop/sqoop.tar.gz",
+            "templeton.hive.archive": "hdfs:///hdp/apps/${hdp.version}/hive/hive.tar.gz",
+            "templeton.streaming.jar": "hdfs:///hdp/apps/${hdp.version}/mapreduce/hadoop-streaming.jar",
+            "templeton.port": "50111",
+            "templeton.libjars": "/usr/hdp/current/zookeeper-client/zookeeper.jar",
+            "templeton.sqoop.home": "sqoop.tar.gz/sqoop",
+            "templeton.hive.home": "hive.tar.gz/hive",
+            "templeton.hadoop.conf.dir": "/etc/hadoop/conf",
+            "templeton.hive.path": "hive.tar.gz/hive/bin/hive",
+            "templeton.hcat": "/usr/hdp/current/hive-client/bin/hcat",
+            "templeton.pig.archive": "hdfs:///hdp/apps/${hdp.version}/pig/pig.tar.gz"
+        },
+        "ganglia-env": {
+            "gmond_user": "nobody",
+            "ganglia_runtime_dir": "/var/run/ganglia/hdp",
+            "rrdcached_base_dir": "/var/lib/ganglia/rrds",
+            "rrdcached_flush_timeout": "7200",
+            "additional_clusters": " ",
+            "gmetad_user": "nobody",
+            "rrdcached_write_threads": "4",
+            "rrdcached_delay": "1800",
+            "rrdcached_timeout": "3600"
+        },
+        "zoo.cfg": {
+            "clientPort": "2181",
+            "autopurge.purgeInterval": "24",
+            "syncLimit": "5",
+            "dataDir": "/hadoop/zookeeper",
+            "initLimit": "10",
+            "tickTime": "2000",
+            "autopurge.snapRetainCount": "30"
+        },
+        "hiveserver2-site": {
+            "hive.security.authenticator.manager": "org.apache.hadoop.hive.ql.security.SessionStateUserAuthenticator",
+            "hive.security.authorization.manager": "org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory"
+        },
+        "zookeeper-env": {
+            "content": "\nexport JAVA_HOME={{java64_home}}\nexport ZOOKEEPER_HOME={{zk_home}}\nexport ZOO_LOG_DIR={{zk_log_dir}}\nexport ZOOPIDFILE={{zk_pid_file}}\nexport SERVER_JVMFLAGS={{zk_server_heapsize}}\nexport JAVA=$JAVA_HOME/bin/java\nexport CLASSPATH=$CLASSPATH:/usr/share/zookeeper/*\n\n{% if security_enabled %}\nexport SERVER_JVMFLAGS=\"$SERVER_JVMFLAGS -Djava.security.auth.login.config={{zk_server_jaas_file}}\"\nexport CLIENT_JVMFLAGS=\"$CLIENT_JVMFLAGS -Djava.security.auth.login.config={{zk_client_jaas_file}}\"\n{% endif %}",
+            "zk_log_dir": "/var/log/zookeeper",
+            "zk_pid_dir": "/var/run/zookeeper",
+            "zk_user": "zookeeper"
+        },
+        "pig-log4j": {
+            "content": "\n#\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n#\n#\n#\n\n# ***** Set root logger level to DEBUG and its only appender to A.\nlog4j.logger.org.apache.pig=info, A\n\n# ***** A is set to be a ConsoleAppender.\
 nlog4j.appender.A=org.apache.log4j.ConsoleAppender\n# ***** A uses PatternLayout.\nlog4j.appender.A.layout=org.apache.log4j.PatternLayout\nlog4j.appender.A.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n"
+        },
+        "cluster-env": {
+            "security_enabled": "false",
+            "sink_existing_mssql_server_2_database": "MSSQL",
+            "pig_tar_source": "/usr/hdp/current/pig-client/pig.tar.gz",
+            "hadoop-streaming_tar_source": "/usr/hdp/current/hadoop-mapreduce-client/hadoop-streaming.jar",
+            "sink_existing_mssql_server_database": "MSSQL",
+            "sqoop_tar_destination_folder": "hdfs:///hdp/apps/{{ hdp_stack_version }}/sqoop/",
+            "hadoop-streaming_tar_destination_folder": "hdfs:///hdp/apps/{{ hdp_stack_version }}/mapreduce/",
+            "sink.dbservername": "",
+            "ignore_groupsusers_create": "false",
+            "kerberos_domain": "EXAMPLE.COM",
+            "sink.dblogin": "",
+            "hive_tar_destination_folder": "hdfs:///hdp/apps/{{ hdp_stack_version }}/hive/",
+            "tez_tar_source": "/usr/hdp/current/tez-client/lib/tez.tar.gz",
+            "mapreduce_tar_source": "/usr/hdp/current/hadoop-client/mapreduce.tar.gz",
+            "hadoop.user.name": "hadoop",
+            "hive_tar_source": "/usr/hdp/current/hive-client/hive.tar.gz",
+            "sink.db.schema.name": "",
+            "sink.jdbc.url": "",
+            "tez_tar_destination_folder": "hdfs:///hdp/apps/{{ hdp_stack_version }}/tez/",
+            "user_group": "hadoop",
+            "sqoop_tar_source": "/usr/hdp/current/sqoop-client/sqoop.tar.gz",
+            "hadoop.user.password": "",
+            "sink.jdbc.driver": "",
+            "smokeuser": "ambari-qa",
+            "mapreduce_tar_destination_folder": "hdfs:///hdp/apps/{{ hdp_stack_version }}/mapreduce/",
+            "pig_tar_destination_folder": "hdfs:///hdp/apps/{{ hdp_stack_version }}/pig/",
+            "sink.dbpassword": "",
+            "sink_database": "Existing MSSQL Server database with sql auth"
+        }
+    },
+    "configurationTags": {
+        "mapred-site": {
+            "tag": "version1"
+        },
+        "pig-env": {
+            "tag": "version1"
+        },
+        "webhcat-env": {
+            "tag": "version1"
+        },
+        "hcat-env": {
+            "tag": "version1"
+        },
+        "tez-site": {
+            "tag": "version1"
+        },
+        "hdfs-site": {
+            "tag": "version1"
+        },
+        "tez-env": {
+            "tag": "version1"
+        },
+        "yarn-log4j": {
+            "tag": "version1"
+        },
+        "hadoop-policy": {
+            "tag": "version1"
+        },
+        "hdfs-log4j": {
+            "tag": "version1"
+        },
+        "yarn-site": {
+            "tag": "version1"
+        },
+        "hive-exec-log4j": {
+            "tag": "version1"
+        },
+        "mapred-env": {
+            "tag": "version1"
+        },
+        "zoo.cfg": {
+            "tag": "version1"
+        },
+        "pig-properties": {
+            "tag": "version1"
+        },
+        "core-site": {
+            "tag": "version1"
+        },
+        "hive-env": {
+            "tag": "version1"
+        },
+        "hadoop-env": {
+            "tag": "version1"
+        },
+        "zookeeper-log4j": {
+            "tag": "version1"
+        },
+        "hive-site": {
+            "tag": "version1"
+        },
+        "yarn-env": {
+            "tag": "version1"
+        },
+        "capacity-scheduler": {
+            "tag": "version1"
+        },
+        "webhcat-site": {
+            "tag": "version1"
+        },
+        "ganglia-env": {
+            "tag": "version1"
+        },
+        "hive-log4j": {
+            "tag": "version1"
+        },
+        "hiveserver2-site": {
+            "tag": "version1"
+        },
+        "zookeeper-env": {
+            "tag": "version1"
+        },
+        "pig-log4j": {
+            "tag": "version1"
+        },
+        "cluster-env": {
+            "tag": "version1"
+        }
+    },
+    "commandId": "6-5",
+    "clusterHostInfo": {
+        "snamenode_host": [
+            "c6402.ambari.apache.org"
+        ],
+        "nm_hosts": [
+            "c6403.ambari.apache.org"
+        ],
+        "app_timeline_server_hosts": [
+            "c6402.ambari.apache.org"
+        ],
+        "hive_metastore_host": [
+            "c6402.ambari.apache.org"
+        ],
+        "ganglia_monitor_hosts": [
+            "c6403.ambari.apache.org",
+            "c6401.ambari.apache.org",
+            "c6402.ambari.apache.org"
+        ],
+        "all_ping_ports": [
+            "8670",
+            "8670",
+            "8670"
+        ],
+        "rm_host": [
+            "c6402.ambari.apache.org"
+        ],
+        "all_hosts": [
+            "c6403.ambari.apache.org",
+            "c6401.ambari.apache.org",
+            "c6402.ambari.apache.org"
+        ],
+        "slave_hosts": [
+            "c6403.ambari.apache.org"
+        ],
+        "namenode_host": [
+            "c6401.ambari.apache.org"
+        ],
+        "ganglia_server_host": [
+            "c6401.ambari.apache.org"
+        ],
+        "hive_mysql_host": [
+            "c6402.ambari.apache.org"
+        ],
+        "webhcat_server_host": [
+            "c6402.ambari.apache.org"
+        ],
+        "ambari_server_host": [
+            "hw10897.ix"
+        ],
+        "zookeeper_hosts": [
+            "c6403.ambari.apache.org",
+            "c6401.ambari.apache.org",
+            "c6402.ambari.apache.org"
+        ],
+        "hs_host": [
+            "c6402.ambari.apache.org"
+        ],
+        "hive_server_host": [
+            "c6402.ambari.apache.org"
+        ]
+    }
+}
\ No newline at end of file


[2/2] ambari git commit: AMBARI-8836 - Upgrade pack for Hive (jonathanhurley)

Posted by jo...@apache.org.
AMBARI-8836 - Upgrade pack for Hive (jonathanhurley)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/181f3ab4
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/181f3ab4
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/181f3ab4

Branch: refs/heads/trunk
Commit: 181f3ab4dea07151aaded509ad55b55d0919f60b
Parents: fad5674
Author: Jonathan Hurley <jh...@hortonworks.com>
Authored: Fri Dec 19 14:58:23 2014 -0500
Committer: Jonathan Hurley <jh...@hortonworks.com>
Committed: Fri Dec 19 16:52:41 2014 -0500

----------------------------------------------------------------------
 .../serveraction/upgrades/ConfigureAction.java  |  75 +-
 .../ambari/server/state/ConfigHelper.java       | 241 +++---
 .../server/upgrade/UpgradeCatalog170.java       |  63 +-
 .../package/scripts/hive_metastore.py           |  39 +-
 .../0.12.0.2.0/package/scripts/hive_server.py   |  28 +-
 .../package/scripts/hive_server_upgrade.py      |  85 ++
 .../0.12.0.2.0/package/scripts/hive_service.py  |  34 +-
 .../HIVE/0.12.0.2.0/package/scripts/params.py   |  15 +-
 .../package/scripts/webhcat_server.py           |  15 +-
 .../stacks/HDP/2.2/upgrades/upgrade-2.2.xml     |  51 +-
 .../stacks/2.0.6/HIVE/test_hive_server.py       |  63 +-
 .../python/stacks/2.2/configs/hive-upgrade.json | 845 +++++++++++++++++++
 12 files changed, 1370 insertions(+), 184 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/181f3ab4/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
index 4474d05..549f9fa 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/ConfigureAction.java
@@ -17,23 +17,94 @@
  */
 package org.apache.ambari.server.serveraction.upgrades;
 
+import java.text.MessageFormat;
+import java.util.HashMap;
+import java.util.Map;
 import java.util.concurrent.ConcurrentMap;
 
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.actionmanager.HostRoleStatus;
 import org.apache.ambari.server.agent.CommandReport;
+import org.apache.ambari.server.controller.AmbariManagementController;
+import org.apache.ambari.server.controller.ConfigurationRequest;
 import org.apache.ambari.server.serveraction.AbstractServerAction;
+import org.apache.ambari.server.state.Cluster;
+import org.apache.ambari.server.state.Clusters;
+import org.apache.ambari.server.state.Config;
+import org.apache.ambari.server.state.ConfigHelper;
+import org.apache.ambari.server.state.DesiredConfig;
+
+import com.google.inject.Inject;
 
 /**
  * Action that represents a manual stage.
  */
 public class ConfigureAction extends AbstractServerAction {
 
+  /**
+   * Used to lookup the cluster.
+   */
+  @Inject
+  private Clusters m_clusters;
+
+  /**
+   * Used to update the configuration properties.
+   */
+  @Inject
+  private AmbariManagementController m_controller;
+
+  /**
+   * Used to assist in the creation of a {@link ConfigurationRequest} to update
+   * configuration values.
+   */
+  @Inject
+  private ConfigHelper m_configHelper;
+
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public CommandReport execute(
       ConcurrentMap<String, Object> requestSharedDataContext)
       throws AmbariException, InterruptedException {
-    // TODO Auto-generated method stub
-    return createCommandReport(0, HostRoleStatus.COMPLETED, "{}", "", "");
+
+    Map<String,String> commandParameters = getCommandParameters();
+    if( null == commandParameters || commandParameters.isEmpty() ){
+      return createCommandReport(0, HostRoleStatus.FAILED, "{}", "",
+          "Unable to change configuration values without command parameters");
+    }
+
+    String clusterName = commandParameters.get("clusterName");
+    String key = commandParameters.get("key");
+    String value = commandParameters.get("value");
+
+    // such as hdfs-site or hbase-env
+    String configType = commandParameters.get("type");
+
+    if (null == clusterName || null == configType || null == key) {
+      String message = "cluster={0}, type={1}, key={2}";
+      message = MessageFormat.format(message, clusterName, configType, key);
+
+      return createCommandReport(0, HostRoleStatus.FAILED, "{}", "", message);
+    }
+
+    Cluster cluster = m_clusters.getCluster(clusterName);
+    Map<String, DesiredConfig> desiredConfigs = cluster.getDesiredConfigs();
+    DesiredConfig desiredConfig = desiredConfigs.get(configType);
+    Config config = cluster.getConfig(configType, desiredConfig.getTag());
+
+    Map<String, String> propertiesToChange = new HashMap<String, String>();
+    propertiesToChange.put(key, value);
+    config.updateProperties(propertiesToChange);
+
+    String serviceVersionNote = "Stack Upgrade";
+
+    m_configHelper.createConfigType(cluster, m_controller, configType,
+        config.getProperties(), m_controller.getAuthName(), serviceVersionNote);
+
+    String message = "Updated ''{0}'' with ''{1}={2}''";
+    message = MessageFormat.format(message, configType, key, value);
+
+    return createCommandReport(0, HostRoleStatus.COMPLETED, "{}", message, "");
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/181f3ab4/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
index 42f9601..b64e9ce 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
@@ -31,16 +31,8 @@ import java.util.Set;
 import java.util.TreeMap;
 import java.util.concurrent.TimeUnit;
 
-import com.google.common.cache.Cache;
-import com.google.common.cache.CacheBuilder;
-import com.google.inject.Singleton;
-
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.api.services.AmbariMetaInfo;
-
-import com.google.inject.Inject;
-import com.google.inject.persist.Transactional;
-
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.controller.AmbariManagementController;
 import org.apache.ambari.server.controller.ConfigurationRequest;
@@ -52,6 +44,12 @@ import org.apache.ambari.server.upgrade.UpgradeCatalog170;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.common.cache.Cache;
+import com.google.common.cache.CacheBuilder;
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+import com.google.inject.persist.Transactional;
+
 /**
  * Helper class that works with config traversals.
  */
@@ -89,9 +87,9 @@ public class ConfigHelper {
    */
   public Map<String, Map<String, String>> getEffectiveDesiredTags(
       Cluster cluster, String hostName) throws AmbariException {
-    
+
     Host host = clusters.getHost(hostName);
-    
+
     return getEffectiveDesiredTags(cluster, host.getDesiredHostConfigs(cluster));
   }
 
@@ -103,15 +101,15 @@ public class ConfigHelper {
    */
   private Map<String, Map<String, String>> getEffectiveDesiredTags(
       Cluster cluster, Map<String, HostConfig> hostConfigOverrides) {
-    
+
     Map<String, DesiredConfig> clusterDesired = cluster.getDesiredConfigs();
-    
+
     Map<String, Map<String,String>> resolved = new TreeMap<String, Map<String, String>>();
-    
+
     // Do not use host component config mappings.  Instead, the rules are:
     // 1) Use the cluster desired config
     // 2) override (1) with config-group overrides
-    
+
     for (Entry<String, DesiredConfig> clusterEntry : clusterDesired.entrySet()) {
       String type = clusterEntry.getKey();
       String tag = clusterEntry.getValue().getTag();
@@ -394,7 +392,7 @@ public class ConfigHelper {
   public void invalidateStaleConfigsCache(ServiceComponentHost sch) {
     staleConfigsCache.invalidate(sch);
   }
-  
+
   /**
    * Remove configs by type
    * @param type config Type
@@ -402,15 +400,15 @@ public class ConfigHelper {
   @Transactional
   public void removeConfigsByType(Cluster cluster, String type) {
     Set<String> globalVersions = cluster.getConfigsByType(type).keySet();
-    
+
     for(String version:globalVersions) {
       ClusterConfigEntity clusterConfigEntity = clusterDAO.findConfig
         (cluster.getClusterId(), type, version);
-      
+
       clusterDAO.removeConfig(clusterConfigEntity);
     }
   }
-  
+
   /**
    * Gets all the config dictionary where property with the given name is present in stack definitions
    * @param stackId
@@ -419,30 +417,30 @@ public class ConfigHelper {
   public Set<String> findConfigTypesByPropertyName(StackId stackId, String propertyName, String clusterName) throws AmbariException {
     StackInfo stack = ambariMetaInfo.getStack(stackId.getStackName(),
         stackId.getStackVersion());
-    
+
     Set<String> result = new HashSet<String>();
 
     for(Service service : clusters.getCluster(clusterName).getServices().values()) {
       Set<PropertyInfo> stackProperties = ambariMetaInfo.getServiceProperties(stack.getName(), stack.getVersion(), service.getName());
       Set<PropertyInfo> stackLevelProperties = ambariMetaInfo.getStackProperties(stack.getName(), stack.getVersion());
       stackProperties.addAll(stackLevelProperties);
-      
+
       for (PropertyInfo stackProperty : stackProperties) {
         if(stackProperty.getName().equals(propertyName)) {
           String configType = fileNameToConfigType(stackProperty.getFilename());
-          
+
           result.add(configType);
         }
       }
     }
-    
+
     return result;
   }
-  
+
   public Set<String> getPropertyValuesWithPropertyType(StackId stackId, PropertyType propertyType, Cluster cluster) throws AmbariException {
     StackInfo stack = ambariMetaInfo.getStack(stackId.getStackName(),
         stackId.getStackVersion());
-    
+
     Set<String> result = new HashSet<String>();
 
     for(Service service : cluster.getServices().values()) {
@@ -456,99 +454,123 @@ public class ConfigHelper {
         }
       }
     }
-    
+
     Set<PropertyInfo> stackProperties = ambariMetaInfo.getStackProperties(stack.getName(), stack.getVersion());
-    
+
     for (PropertyInfo stackProperty : stackProperties) {
       if(stackProperty.getPropertyTypes().contains(propertyType)) {
         String stackPropertyConfigType = fileNameToConfigType(stackProperty.getFilename());
         result.add(cluster.getDesiredConfigByType(stackPropertyConfigType).getProperties().get(stackProperty.getName()));
       }
     }
-    
+
     return result;
   }
-  
+
   public String getPropertyValueFromStackDefinitions(Cluster cluster, String configType, String propertyName) throws AmbariException {
     StackId stackId = cluster.getCurrentStackVersion();
     StackInfo stack = ambariMetaInfo.getStack(stackId.getStackName(),
         stackId.getStackVersion());
-    
+
     for(ServiceInfo serviceInfo:stack.getServices()) {
       Set<PropertyInfo> serviceProperties = ambariMetaInfo.getServiceProperties(stack.getName(), stack.getVersion(), serviceInfo.getName());
       Set<PropertyInfo> stackProperties = ambariMetaInfo.getStackProperties(stack.getName(), stack.getVersion());
       serviceProperties.addAll(stackProperties);
-      
+
       for (PropertyInfo stackProperty : serviceProperties) {
         String stackPropertyConfigType = fileNameToConfigType(stackProperty.getFilename());
-        
+
         if(stackProperty.getName().equals(propertyName) && stackPropertyConfigType.equals(configType)) {
           return stackProperty.getValue();
         }
       }
-      
+
     }
-    
+
     return null;
   }
-  
+
   public ServiceInfo getPropertyOwnerService(Cluster cluster, String configType, String propertyName) throws AmbariException {
     StackId stackId = cluster.getCurrentStackVersion();
     StackInfo stack = ambariMetaInfo.getStack(stackId.getStackName(), stackId.getStackVersion());
-    
-    for(ServiceInfo serviceInfo:stack.getServices()) {     
+
+    for(ServiceInfo serviceInfo:stack.getServices()) {
       Set<PropertyInfo> serviceProperties = ambariMetaInfo.getServiceProperties(stack.getName(), stack.getVersion(), serviceInfo.getName());
-      
+
       for (PropertyInfo stackProperty : serviceProperties) {
         String stackPropertyConfigType = fileNameToConfigType(stackProperty.getFilename());
-        
+
         if(stackProperty.getName().equals(propertyName) && stackPropertyConfigType.equals(configType)) {
           return serviceInfo;
         }
       }
-      
+
     }
-    
+
     return null;
   }
-  
+
   public Set<PropertyInfo> getServiceProperties(Cluster cluster, String serviceName) throws AmbariException {
     StackId stackId = cluster.getCurrentStackVersion();
     StackInfo stack = ambariMetaInfo.getStack(stackId.getStackName(), stackId.getStackVersion());
-    
+
     return ambariMetaInfo.getServiceProperties(stack.getName(), stack.getVersion(), serviceName);
   }
-  
+
   public Set<PropertyInfo> getStackProperties(Cluster cluster) throws AmbariException {
     StackId stackId = cluster.getCurrentStackVersion();
     StackInfo stack = ambariMetaInfo.getStack(stackId.getStackName(), stackId.getStackVersion());
-    
+
     return ambariMetaInfo.getStackProperties(stack.getName(), stack.getVersion());
   }
-  
-  public void createConfigType(Cluster cluster, AmbariManagementController ambariManagementController, 
-      String configType, Map<String, String> properties, String authName) throws AmbariException {
-    String tag;
-    if(cluster.getConfigsByType(configType) == null) {
-      tag = "version1";
-    } else {
+
+  /**
+   * A helper method to create a new {@link Config} for a given configuration
+   * type. This method will perform the following tasks:
+   * <ul>
+   * <li>Create a {@link Config} in the cluster for the specified type. This
+   * will have the proper versions and tags set automatically.</li>
+   * <li>Set the cluster's {@link DesiredConfig} to the new configuration</li>
+   * <li>Create an entry in the configuration history with a note and username.</li>
+   * <ul>
+   *
+   * @param cluster
+   * @param controller
+   * @param configType
+   * @param properties
+   * @param authenticatedUserName
+   * @param serviceVersionNote
+   * @throws AmbariException
+   */
+  public void createConfigType(Cluster cluster,
+      AmbariManagementController controller, String configType,
+      Map<String, String> properties, String authenticatedUserName,
+      String serviceVersionNote) throws AmbariException {
+
+    String tag = "version1";
+    if (cluster.getConfigsByType(configType) != null) {
       tag = "version" + System.currentTimeMillis();
     }
-    
-    ConfigurationRequest cr = new ConfigurationRequest();
-    cr.setClusterName(cluster.getClusterName());
-    cr.setVersionTag(tag);
-    cr.setType(configType);
-    cr.setProperties(properties);
-    ambariManagementController.createConfiguration(cr);
-    
-    Config baseConfig = cluster.getConfig(cr.getType(), cr.getVersionTag());
-    
+
+    // update the configuration
+    ConfigurationRequest configurationRequest = new ConfigurationRequest();
+    configurationRequest.setClusterName(cluster.getClusterName());
+    configurationRequest.setVersionTag(tag);
+    configurationRequest.setType(configType);
+    configurationRequest.setProperties(properties);
+    configurationRequest.setServiceConfigVersionNote(serviceVersionNote);
+    controller.createConfiguration(configurationRequest);
+
+    // create the configuration history entry
+    Config baseConfig = cluster.getConfig(configurationRequest.getType(),
+        configurationRequest.getVersionTag());
+
     if (baseConfig != null) {
-      cluster.addDesiredConfig(authName, Collections.singleton(baseConfig));
+      cluster.addDesiredConfig(authenticatedUserName,
+          Collections.singleton(baseConfig), serviceVersionNote);
     }
   }
-  
+
   /**
    * Since global configs are deprecated since 1.7.0, but still supported.
    * We should automatically map any globals used, to *-env dictionaries.
@@ -557,57 +579,58 @@ public class ConfigHelper {
    */
   public void moveDeprecatedGlobals(StackId stackId, Map<String, Map<String, String>> configurations, String clusterName) {
     Map<String, String> globalConfigurations = new HashMap<String, String>();
-    
+
     if(configurations.get(Configuration.GLOBAL_CONFIG_TAG) == null ||
-        configurations.get(Configuration.GLOBAL_CONFIG_TAG).size() == 0)
+        configurations.get(Configuration.GLOBAL_CONFIG_TAG).size() == 0) {
       return;
-  
+    }
+
     globalConfigurations.putAll(configurations.get(Configuration.GLOBAL_CONFIG_TAG));
-    
+
     if(globalConfigurations!=null && globalConfigurations.size() != 0) {
       LOG.warn("Global configurations are deprecated, "
           + "please use *-env");
     }
-    
+
     for(Map.Entry<String, String> property:globalConfigurations.entrySet()) {
       String propertyName = property.getKey();
       String propertyValue = property.getValue();
-      
+
       Set<String> newConfigTypes = null;
       try{
-        newConfigTypes = this.findConfigTypesByPropertyName(stackId, propertyName, clusterName);
+        newConfigTypes = findConfigTypesByPropertyName(stackId, propertyName, clusterName);
       } catch(AmbariException e) {
         LOG.error("Exception while getting configurations from the stacks", e);
         return;
       }
-      
+
       newConfigTypes.remove(Configuration.GLOBAL_CONFIG_TAG);
-      
+
       String newConfigType = null;
       if(newConfigTypes.size() > 0) {
         newConfigType = newConfigTypes.iterator().next();
       } else {
         newConfigType = UpgradeCatalog170.getAdditionalMappingGlobalToEnv().get(propertyName);
       }
-      
+
       if(newConfigType==null) {
         LOG.warn("Cannot find where to map " + propertyName + " from " + Configuration.GLOBAL_CONFIG_TAG +
             " (value="+propertyValue+")");
         continue;
       }
-      
-      LOG.info("Mapping config " + propertyName + " from " + Configuration.GLOBAL_CONFIG_TAG + 
+
+      LOG.info("Mapping config " + propertyName + " from " + Configuration.GLOBAL_CONFIG_TAG +
           " to " + newConfigType +
           " (value="+propertyValue+")");
-      
+
       configurations.get(Configuration.GLOBAL_CONFIG_TAG).remove(propertyName);
-      
+
       if(!configurations.containsKey(newConfigType)) {
         configurations.put(newConfigType, new HashMap<String, String>());
       }
       configurations.get(newConfigType).put(propertyName, propertyValue);
     }
-    
+
     if(configurations.get(Configuration.GLOBAL_CONFIG_TAG).size() == 0) {
       configurations.remove(Configuration.GLOBAL_CONFIG_TAG);
     }
@@ -620,15 +643,16 @@ public class ConfigHelper {
     }
 
     Map <String, HostConfig> actual = sch.getActualConfigs();
-    if (null == actual || actual.isEmpty())
+    if (null == actual || actual.isEmpty()) {
       return false;
+    }
 
     Cluster cluster = clusters.getClusterById(sch.getClusterId());
     StackId stackId = cluster.getDesiredStackVersion();
-    
+
     Map<String, Map<String, String>> desired = getEffectiveDesiredTags(cluster,
         sch.getHostName());
-    
+
     ServiceInfo serviceInfo = ambariMetaInfo.getService(stackId.getStackName(),
         stackId.getStackVersion(), sch.getServiceName());
     ComponentInfo componentInfo = serviceInfo.getComponentByName(sch.getServiceComponentName());
@@ -643,13 +667,13 @@ public class ConfigHelper {
     boolean stale = false;
 
     Iterator<Entry<String, Map<String, String>>> it = desired.entrySet().iterator();
-    
+
     while (it.hasNext() && !stale) {
       Entry<String, Map<String, String>> desiredEntry = it.next();
-      
+
       String type = desiredEntry.getKey();
       Map<String, String> tags = desiredEntry.getValue();
-      
+
       if (!actual.containsKey(type)) {
         // desired is set, but actual is not
         if (!serviceInfo.hasConfigDependency(type)) {
@@ -658,7 +682,7 @@ public class ConfigHelper {
           // find out if the keys are stale by first checking the target service,
           // then all services
           Collection<String> keys = mergeKeyNames(cluster, type, tags.values());
-          
+
           if (serviceInfo.hasDependencyAndPropertyFor(type, keys) || !hasPropertyFor(stackId, type, keys)) {
             stale = true;
           }
@@ -723,51 +747,55 @@ public class ConfigHelper {
 
     for (ServiceInfo svc : ambariMetaInfo.getServices(stack.getStackName(),
         stack.getStackVersion()).values()) {
-      
-      if (svc.hasDependencyAndPropertyFor(type, keys))
+
+      if (svc.hasDependencyAndPropertyFor(type, keys)) {
         return true;
-      
+      }
+
     }
-    
+
     return false;
   }
-  
+
   /**
    * @return the keys that have changed values
    */
   private Collection<String> findChangedKeys(Cluster cluster, String type,
       Collection<String> desiredTags, Collection<String> actualTags) {
-    
+
     Map<String, String> desiredValues = new HashMap<String, String>();
     Map<String, String> actualValues = new HashMap<String, String>();
-    
+
     for (String tag : desiredTags) {
       Config config = cluster.getConfig(type, tag);
-      if (null != config)
+      if (null != config) {
         desiredValues.putAll(config.getProperties());
+      }
     }
-    
+
     for (String tag : actualTags) {
       Config config = cluster.getConfig(type, tag);
-      if (null != config)
+      if (null != config) {
         actualValues.putAll(config.getProperties());
+      }
     }
-    
+
     List<String> keys = new ArrayList<String>();
-    
+
     for (Entry<String, String> entry : desiredValues.entrySet()) {
       String key = entry.getKey();
       String value = entry.getValue();
-      
-      if (!actualValues.containsKey(key))
+
+      if (!actualValues.containsKey(key)) {
         keys.add(key);
-      else if (!actualValues.get(key).equals(value))
+      } else if (!actualValues.get(key).equals(value)) {
         keys.add(key);
+      }
     }
-    
+
     return keys;
   }
-  
+
   /**
    * @return the map of tags for a desired config
    */
@@ -781,13 +809,14 @@ public class ConfigHelper {
     }
     return map;
   }
-  
+
   /**
    * @return true if the tags are different in any way, even if not-specified
    */
   private boolean isTagChanged(Map<String, String> desiredTags, Map<String, String> actualTags, boolean groupSpecificConfigs) {
-    if (!actualTags.get(CLUSTER_DEFAULT_TAG).equals(desiredTags.get(CLUSTER_DEFAULT_TAG)) && !groupSpecificConfigs)
+    if (!actualTags.get(CLUSTER_DEFAULT_TAG).equals(desiredTags.get(CLUSTER_DEFAULT_TAG)) && !groupSpecificConfigs) {
       return true;
+    }
 
     // if the host has group specific configs for type we should ignore the cluster level configs and compare specifics
     if (groupSpecificConfigs) {
@@ -807,14 +836,14 @@ public class ConfigHelper {
    */
   private Collection<String> mergeKeyNames(Cluster cluster, String type, Collection<String> tags) {
     Set<String> names = new HashSet<String>();
-    
+
     for (String tag : tags) {
       Config config = cluster.getConfig(type, tag);
       if (null != config) {
         names.addAll(config.getProperties().keySet());
       }
     }
-    
+
     return names;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/181f3ab4/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
index bb151b9..a7736dd 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
@@ -18,9 +18,30 @@
 
 package org.apache.ambari.server.upgrade;
 
-import com.google.common.reflect.TypeToken;
-import com.google.inject.Inject;
-import com.google.inject.Injector;
+import java.lang.reflect.Type;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
+import javax.persistence.EntityManager;
+import javax.persistence.TypedQuery;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Expression;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.controller.AmbariManagementController;
@@ -70,35 +91,16 @@ import org.apache.ambari.server.state.Cluster;
 import org.apache.ambari.server.state.Clusters;
 import org.apache.ambari.server.state.Config;
 import org.apache.ambari.server.state.ConfigHelper;
-import org.apache.ambari.server.state.alert.Scope;
 import org.apache.ambari.server.state.State;
+import org.apache.ambari.server.state.alert.Scope;
 import org.apache.ambari.server.utils.StageUtils;
 import org.apache.ambari.server.view.ViewRegistry;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.persistence.EntityManager;
-import javax.persistence.TypedQuery;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Expression;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-import java.lang.reflect.Type;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
+import com.google.common.reflect.TypeToken;
+import com.google.inject.Inject;
+import com.google.inject.Injector;
 
 /**
  * Upgrade catalog for version 1.7.0.
@@ -1110,11 +1112,12 @@ public class UpgradeCatalog170 extends AbstractUpgradeCatalog {
         Config oldConfig = cluster.getDesiredConfigByType(PIG_PROPERTIES_CONFIG_TYPE);
         if (oldConfig != null) {
           Map<String, String> properties = oldConfig.getProperties();
-          
+
           if(!properties.containsKey(CONTENT_FIELD_NAME)) {
             String value = properties.remove(PIG_CONTENT_FIELD_NAME);
             properties.put(CONTENT_FIELD_NAME, value);
-            configHelper.createConfigType(cluster, ambariManagementController, PIG_PROPERTIES_CONFIG_TYPE, properties, "ambari-upgrade");
+            configHelper.createConfigType(cluster, ambariManagementController,
+                PIG_PROPERTIES_CONFIG_TYPE, properties, "ambari-upgrade", null);
           }
         }
       }
@@ -1212,7 +1215,9 @@ public class UpgradeCatalog170 extends AbstractUpgradeCatalog {
         // if have some custom properties, for own services etc., leave that as it was
         if(unmappedGlobalProperties.size() != 0) {
           LOG.info("Not deleting globals because have custom properties");
-          configHelper.createConfigType(cluster, ambariManagementController, Configuration.GLOBAL_CONFIG_TAG, unmappedGlobalProperties, "ambari-upgrade");
+          configHelper.createConfigType(cluster, ambariManagementController,
+              Configuration.GLOBAL_CONFIG_TAG, unmappedGlobalProperties,
+              "ambari-upgrade", null);
         } else {
           configHelper.removeConfigsByType(cluster, Configuration.GLOBAL_CONFIG_TAG);
         }

http://git-wip-us.apache.org/repos/asf/ambari/blob/181f3ab4/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
index dc02a7d..84a76ea 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
@@ -23,42 +23,55 @@ from resource_management import *
 
 from hive import hive
 from hive_service import hive_service
-from mysql_service import mysql_service
 
-class HiveMetastore(Script):
 
+class HiveMetastore(Script):
   def install(self, env):
     import params
-    self.install_packages(env, exclude_packages=params.hive_exclude_packages)
+
+    self.install_packages(env, exclude_packages = params.hive_exclude_packages)
+
 
   def configure(self, env):
     import params
+
     env.set_params(params)
 
-    hive(name='metastore')
+    hive(name = 'metastore')
+
 
-  def start(self, env, rolling_restart=False):
+  def start(self, env, rolling_restart = False):
     import params
+
     env.set_params(params)
-    self.configure(env) # FOR SECURITY
-    hive_service( 'metastore',
-                   action = 'start'
-    )
+    self.configure(env)  # FOR SECURITY
+    hive_service('metastore', action = 'start')
+
 
-  def stop(self, env, rolling_restart=False):
+  def stop(self, env, rolling_restart = False):
     import params
+
     env.set_params(params)
+    hive_service('metastore', action = 'stop' )
 
-    hive_service( 'metastore',
-                   action = 'stop'
-    )
 
   def status(self, env):
     import status_params
+
     env.set_params(status_params)
     pid_file = format("{hive_pid_dir}/{hive_metastore_pid}")
     # Recursively check all existing gmetad pid files
     check_process_status(pid_file)
 
+
+  def pre_rolling_restart(self, env):
+    Logger.info("Executing Metastore Rolling Upgrade pre-restart")
+    import params
+    env.set_params(params)
+
+    if params.version and compare_versions(format_hdp_stack_version(params.version), '2.2.0.0') >= 0:
+      Execute(format("hdp-select set hive-metastore {version}"))
+
+
 if __name__ == "__main__":
   HiveMetastore().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/181f3ab4/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server.py
index fa8ece4..12efae8 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server.py
@@ -17,6 +17,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 """
+import hive_server_upgrade
 
 from resource_management import *
 from hive import hive
@@ -30,13 +31,16 @@ class HiveServer(Script):
     import params
     self.install_packages(env, exclude_packages=params.hive_exclude_packages)
 
+
   def configure(self, env):
     import params
     env.set_params(params)
     if not (params.hdp_stack_version != "" and compare_versions(params.hdp_stack_version, '2.2') >=0):
       install_tez_jars()
+
     hive(name='hiveserver2')
 
+
   def start(self, env, rolling_restart=False):
     import params
     env.set_params(params)
@@ -46,25 +50,37 @@ class HiveServer(Script):
     copy_tarballs_to_hdfs('mapreduce', params.tez_user, params.hdfs_user, params.user_group)
     copy_tarballs_to_hdfs('tez', params.tez_user, params.hdfs_user, params.user_group)
 
-    hive_service( 'hiveserver2',
-                  action = 'start'
-    )
+    hive_service( 'hiveserver2', action = 'start',
+      rolling_restart=rolling_restart )
+
 
   def stop(self, env, rolling_restart=False):
     import params
     env.set_params(params)
 
-    hive_service( 'hiveserver2',
-                  action = 'stop'
-    )
+    if rolling_restart:
+      hive_server_upgrade.pre_upgrade_deregister()
+    else:
+      hive_service( 'hiveserver2', action = 'stop' )
+
 
   def status(self, env):
     import status_params
     env.set_params(status_params)
     pid_file = format("{hive_pid_dir}/{hive_pid}")
+
     # Recursively check all existing gmetad pid files
     check_process_status(pid_file)
 
 
+  def pre_rolling_restart(self, env):
+    Logger.info("Executing HiveServer2 Rolling Upgrade pre-restart")
+    import params
+    env.set_params(params)
+
+    if params.version and compare_versions(format_hdp_stack_version(params.version), '2.2.0.0') >= 0:
+      Execute(format("hdp-select set hive-server2 {version}"))
+
+
 if __name__ == "__main__":
   HiveServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/181f3ab4/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_upgrade.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_upgrade.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_upgrade.py
new file mode 100644
index 0000000..653d4bd
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_upgrade.py
@@ -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.
+
+"""
+
+import re
+from resource_management.core.logger import Logger
+from resource_management.core.exceptions import Fail
+from resource_management.core.resources.system import Execute
+from resource_management.core.shell import call
+from resource_management.libraries.functions import format
+
+
+def pre_upgrade_deregister():
+  """
+  Runs the "hive --service hiveserver2 --deregister <version>" command to
+  de-provision the server in preparation for an upgrade. This will contact
+  ZooKeeper to remove the server so that clients that attempt to connect
+  will be directed to other servers automatically. Once all
+  clients have drained, the server will shutdown automatically; this process
+  could take a very long time.
+  This function will obtain the Kerberos ticket if security is enabled.
+  :return:
+  """
+  import params
+
+  Logger.info('HiveServer2 executing "deregister" command in preparation for upgrade...')
+
+  if params.security_enabled:
+    kinit_command=format("{kinit_path_local} -kt {smoke_user_keytab} {smokeuser}; ")
+    Execute(kinit_command,user=params.smokeuser)
+
+  # calculate the current hive server version
+  current_hiveserver_version = _get_current_hiveserver_version()
+  if current_hiveserver_version is None:
+    raise Fail('Unable to determine the current HiveServer2 version to deregister.')
+
+  # deregister
+  command = 'hive --service hiveserver2 --deregister ' + current_hiveserver_version
+  Execute(command, user=params.hive_user, path=params.execute_path, tries=1 )
+
+
+def _get_current_hiveserver_version():
+  """
+  Runs an "hdp-select status hive-server2" check and parses the result in order
+  to obtain the current version of hive.
+
+  :return:  the hiveserver2 version, such as "hdp-select status hive-server2"
+  """
+  import params
+
+  try:
+    command = 'hdp-select status hive-server2'
+    return_code, hdp_output = call(command, user=params.hive_user)
+  except Exception, e:
+    Logger.error(str(e))
+    raise Fail('Unable to execute hdp-select command to retrieve the hiveserver2 version.')
+
+  if return_code != 0:
+    raise Fail('Unable to determine the current HiveServer2 version because of a non-zero return code of {0}'.format(str(return_code)))
+
+  # strip "hive-server2 - " off of result and test the version
+  current_hive_server_version = re.sub('hive-server2 - ', '', hdp_output)
+  match = re.match('[0-9]+.[0-9]+.[0-9]+.[0-9]+-[0-9]+', current_hive_server_version)
+
+  if match:
+    return current_hive_server_version
+  else:
+    raise Fail('The extracted hiveserver2 version "{0}" does not matching any known pattern'.format(current_hive_server_version))
+
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/181f3ab4/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
index 8e5d878..3918a74 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_service.py
@@ -23,9 +23,7 @@ import sys
 import time
 from resource_management.core import shell
 
-def hive_service(
-    name,
-    action='start'):
+def hive_service(name, action='start', rolling_restart=False):
 
   import params
 
@@ -38,20 +36,23 @@ def hive_service(
     cmd = format(
       "env JAVA_HOME={java64_home} {start_hiveserver2_path} {hive_log_dir}/hive-server2.out {hive_log_dir}/hive-server2.log {pid_file} {hive_server_conf_dir} {hive_log_dir}")
 
-  process_id_exists = format("ls {pid_file} >/dev/null 2>&1 && ps -p `cat {pid_file}` >/dev/null 2>&1")
-  
+  process_id_exists_command = format("ls {pid_file} >/dev/null 2>&1 && ps -p `cat {pid_file}` >/dev/null 2>&1")
+
   if action == 'start':
     if name == 'hiveserver2':
       check_fs_root()
 
     demon_cmd = format("{cmd}")
-    
-    Execute(demon_cmd,
-            user=params.hive_user,
-            environment={'HADOOP_HOME': params.hadoop_home},
-            path=params.execute_path,
-            not_if=process_id_exists
-    )
+
+    # upgrading hiveserver2 (rolling_restart) means that there is an existing,
+    # de-registering hiveserver2; the pid will still exist, but the new
+    # hiveserver is spinning up on a new port, so the pid will be re-written
+    if rolling_restart:
+      process_id_exists_command = None
+
+    Execute(demon_cmd, user=params.hive_user,
+      environment={'HADOOP_HOME': params.hadoop_home}, path=params.execute_path,
+      not_if=process_id_exists_command )
 
     if params.hive_jdbc_driver == "com.mysql.jdbc.Driver" or \
        params.hive_jdbc_driver == "org.postgresql.Driver" or \
@@ -96,12 +97,9 @@ def hive_service(
             
   elif action == 'stop':
     demon_cmd = format("sudo kill `cat {pid_file}`")
-    Execute(demon_cmd,
-         not_if = format("! ({process_id_exists})")
-    )
-    File(pid_file,
-         action = "delete",
-    )
+    Execute(demon_cmd, not_if = format("! ({process_id_exists_command})"))
+
+    File(pid_file, action = "delete",)
 
 def check_fs_root():
   import params  

http://git-wip-us.apache.org/repos/asf/ambari/blob/181f3ab4/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params.py
index 4e58de0..774e811 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params.py
@@ -38,14 +38,27 @@ version = default("/commandParams/version", None)
 # Hadoop params
 # TODO, this logic should initialize these parameters in a file inside the HDP 2.2 stack.
 if hdp_stack_version != "" and compare_versions(hdp_stack_version, '2.2') >=0:
+  # start out with client libraries
   hadoop_bin_dir = "/usr/hdp/current/hadoop-client/bin"
   hadoop_home = '/usr/hdp/current/hadoop-client'
   hive_bin = '/usr/hdp/current/hive-client/bin'
   hive_lib = '/usr/hdp/current/hive-client/lib'
 
+  # if this is a server action, then use the server binaries; smoke tests
+  # use the client binaries
+  command_role = default("/role", "")
+  server_role_dir_mapping = { 'HIVE_SERVER' : 'hive-server2',
+    'HIVE_METASTORE' : 'hive-metastore' }
+
+  if command_role in server_role_dir_mapping:
+    hive_server_root = server_role_dir_mapping[command_role]
+    hive_bin = format('/usr/hdp/current/{hive_server_root}/bin')
+    hive_lib = format('/usr/hdp/current/{hive_server_root}/lib')
+
+  # there are no client versions of these, use server versions directly
   hcat_lib = '/usr/hdp/current/hive-webhcat/share/hcatalog'
   webhcat_bin_dir = '/usr/hdp/current/hive-webhcat/sbin'
-  
+
   hive_specific_configs_supported = True
 else:
   hadoop_bin_dir = "/usr/bin"

http://git-wip-us.apache.org/repos/asf/ambari/blob/181f3ab4/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py
index a8b3a8f..f1f9f37 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_server.py
@@ -18,7 +18,6 @@ limitations under the License.
 Ambari Agent
 
 """
-import sys
 from resource_management import *
 
 from webhcat import webhcat
@@ -27,27 +26,41 @@ from webhcat_service import webhcat_service
 class WebHCatServer(Script):
   def install(self, env):
     self.install_packages(env)
+
+
   def configure(self, env):
     import params
     env.set_params(params)
     webhcat()
 
+
   def start(self, env, rolling_restart=False):
     import params
     env.set_params(params)
     self.configure(env) # FOR SECURITY
     webhcat_service(action = 'start')
 
+
   def stop(self, env, rolling_restart=False):
     import params
     env.set_params(params)
 
     webhcat_service(action = 'stop')
 
+
   def status(self, env):
     import status_params
     env.set_params(status_params)
     check_process_status(status_params.webhcat_pid_file)
 
+
+  def pre_rolling_restart(self, env):
+    Logger.info("Executing WebHCat Rolling Upgrade pre-restart")
+    import params
+    env.set_params(params)
+
+    if params.version and compare_versions(format_hdp_stack_version(params.version), '2.2.0.0') >= 0:
+      Execute(format("hdp-select set hive-webhcat {version}"))
+
 if __name__ == "__main__":
   WebHCatServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/181f3ab4/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.2.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.2.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.2.xml
index dbb41e0..8d8fe00 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.2.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.2.xml
@@ -21,7 +21,6 @@
   <target>2.2.*.*</target>
 
   <order>
-
     <group name="ZOOKEEPER" title="Zookeeper">
       <service name="ZOOKEEPER">
         <component>ZOOKEEPER_SERVER</component>
@@ -68,6 +67,14 @@
       </batch>
     </group>
 
+    <group name="HIVE" title="Hive">
+      <service name="HIVE">
+        <component>HIVE_METASTORE</component>
+        <component>HIVE_SERVER</component>
+        <component>WEBHCAT_SERVER</component>
+      </service>
+    </group>
+
     <group name="CLIENTS" title="Client Components">
       <service name="HDFS">
         <component>HDFS_CLIENT</component>
@@ -118,7 +125,7 @@
         </task>
       </execute-stage>
     </group>
-   
+
   </order>
   
   
@@ -312,8 +319,46 @@
         </upgrade>
       </component>
     </service>
-    
+
     <service name="HIVE">
+      <component name="HIVE_METASTORE">
+        <pre-upgrade>
+          <task xsi:type="manual">
+            <message>Backup the Hive Metastore database.</message>
+          </task>
+          <task xsi:type="manual">
+            <message>Run the SQL file at /usr/hdp/$version/hive/scripts/metastore/upgrade to update the Hive Metastore schema.</message>
+          </task>
+        </pre-upgrade>
+        <upgrade>
+          <task xsi:type="restart" />
+        </upgrade>
+      </component>
+
+      <component name="HIVE_SERVER">
+        <pre-upgrade>
+          <task xsi:type="manual">
+            <message>The HiveServer port will now change to 10010. Ensure that this port is available on each HiveServer instance.</message>
+          </task>
+
+          <task xsi:type="configure">
+            <type>hive-site</type>
+            <key>hive.server2.thrift.port</key>
+            <value>10010</value>
+          </task>
+        </pre-upgrade>
+
+        <upgrade>
+          <task xsi:type="restart" />
+        </upgrade>
+      </component>
+
+      <component name="WEBHCAT_SERVER">
+        <upgrade>
+          <task xsi:type="restart" />
+        </upgrade>
+      </component>
+
       <component name="HIVE_CLIENT">
         <upgrade>
           <task xsi:type="restart" />

http://git-wip-us.apache.org/repos/asf/ambari/blob/181f3ab4/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
index ee7d8af..d00c3b5 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
@@ -17,18 +17,17 @@ 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 socket
 import subprocess
-from mock.mock import MagicMock, call, patch
+
+from mock.mock import MagicMock, patch
 from resource_management.core import shell
-from resource_management.libraries.functions import hive_check
 from stacks.utils.RMFTestCase import *
 
-import socket
-
 class TestHiveServer(RMFTestCase):
   COMMON_SERVICES_PACKAGE_DIR = "HIVE/0.12.0.2.0/package"
   STACK_VERSION = "2.0.6"
+  UPGRADE_STACK_VERSION = "2.2"
 
   def test_configure_default(self):
     self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/hive_server.py",
@@ -545,3 +544,57 @@ class TestHiveServer(RMFTestCase):
       self.assert_configure_default()
       self.assertFalse(socket_mock.called)
       self.assertFalse(s.close.called)
+
+
+  @patch("hive_server.HiveServer.pre_rolling_restart")
+  @patch("hive_server.HiveServer.start")
+  @patch("subprocess.Popen")
+  def test_stop_during_upgrade(self, process_mock, hive_server_start_mock,
+    hive_server_pre_rolling_mock):
+
+    process_output = 'hive-server2 - 2.2.0.0-2041'
+
+    process = MagicMock()
+    process.communicate.return_value = [process_output]
+    process.returncode = 0
+    process_mock.return_value = process
+
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/hive_server.py",
+     classname = "HiveServer", command = "restart", config_file = "hive-upgrade.json",
+     hdp_stack_version = self.UPGRADE_STACK_VERSION,
+     target = RMFTestCase.TARGET_COMMON_SERVICES )
+
+    self.assertTrue(process_mock.called)
+    self.assertEqual(process_mock.call_count,2)
+
+    self.assertResourceCalled('Execute', 'hive --service hiveserver2 --deregister 2.2.0.0-2041',
+      path=['/bin:/usr/hdp/current/hive-server2/bin:/usr/hdp/current/hadoop-client/bin'],
+      tries=1, user='hive')
+
+    self.assertResourceCalled('Execute', 'hdp-select set hive-server2 2.2.1.0-2065',)
+
+
+  @patch("hive_server.HiveServer.pre_rolling_restart")
+  @patch("hive_server.HiveServer.start")
+  @patch("subprocess.Popen")
+  def test_stop_during_upgrade_bad_hive_version(self, process_mock, hive_server_start_mock,
+    hive_server_pre_rolling_mock):
+
+    process_output = 'BAD VERSION'
+
+    process = MagicMock()
+    process.communicate.return_value = [process_output]
+    process.returncode = 0
+    process_mock.return_value = process
+
+    try:
+      self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/hive_server.py",
+       classname = "HiveServer", command = "restart", config_file = "hive-upgrade.json",
+       hdp_stack_version = self.UPGRADE_STACK_VERSION,
+       target = RMFTestCase.TARGET_COMMON_SERVICES )
+
+      self.fail("Invalid hive version should have caused an exception")
+    except:
+      pass
+
+    self.assertNoMoreResources()