Repository: ambari
Updated Branches:
  refs/heads/branch-windows-dev 588a2cfc4 -> 28e157747


AMBARI-7851 - HCatalog and WebHCat components in HDPWIN should be part of Hive 
service


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

Branch: refs/heads/branch-windows-dev
Commit: 892ebe4ff587bbec926fd01f9dd374495a52c1eb
Parents: 588a2cf
Author: Artem Baranchuk <[email protected]>
Authored: Tue Oct 21 23:53:05 2014 +0300
Committer: Artem Baranchuk <[email protected]>
Committed: Fri Oct 24 17:00:06 2014 +0300

----------------------------------------------------------------------
 .../stacks/HDPWIN/2.1/role_command_order.json   |   4 +-
 .../services/HIVE/configuration/hive-site.xml   |   2 +-
 .../HIVE/configuration/webhcat-site.xml         | 109 +++++++++++++++++++
 .../HDPWIN/2.1/services/HIVE/metainfo.xml       |  86 ++++++++++++---
 .../HIVE/package/files/templetonSmoke.sh        |  96 ++++++++++++++++
 .../2.1/services/HIVE/package/scripts/params.py |   2 +
 .../HIVE/package/scripts/service_check.py       |   3 +
 .../HIVE/package/scripts/service_mapping.py     |   3 +-
 .../services/HIVE/package/scripts/webhcat.py    |  30 +++++
 .../HIVE/package/scripts/webhcat_server.py      |  48 ++++++++
 .../package/scripts/webhcat_service_check.py    |  27 +++++
 .../HIVE/package/templates/webhcat-env.sh.j2    |  62 +++++++++++
 .../WEBHCAT/configuration/webhcat-site.xml      | 109 -------------------
 .../HDPWIN/2.1/services/WEBHCAT/metainfo.xml    |  85 ---------------
 .../WEBHCAT/package/files/templetonSmoke.sh     |  96 ----------------
 .../services/WEBHCAT/package/scripts/params.py  |  29 -----
 .../WEBHCAT/package/scripts/service_check.py    |  32 ------
 .../WEBHCAT/package/scripts/service_mapping.py  |  20 ----
 .../services/WEBHCAT/package/scripts/webhcat.py |  30 -----
 .../WEBHCAT/package/scripts/webhcat_server.py   |  48 --------
 .../WEBHCAT/package/templates/webhcat-env.sh.j2 |  62 -----------
 .../app/controllers/wizard/step5_controller.js  |   4 +-
 22 files changed, 452 insertions(+), 535 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/892ebe4f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/role_command_order.json
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/role_command_order.json 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/role_command_order.json
index 549b6c7..47cd50d 100644
--- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/role_command_order.json
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/role_command_order.json
@@ -21,10 +21,8 @@
         "WEBHCAT_SERVER-START", "FLUME_HANDLER-START"],
     "MAPREDUCE_SERVICE_CHECK-SERVICE_CHECK": ["JOBTRACKER-START", 
"TASKTRACKER-START"],
     "OOZIE_SERVICE_CHECK-SERVICE_CHECK": ["OOZIE_SERVER-START", 
"MAPREDUCE2_SERVICE_CHECK-SERVICE_CHECK"],
-    "WEBHCAT_SERVICE_CHECK-SERVICE_CHECK": ["WEBHCAT_SERVER-START"],
     "HBASE_SERVICE_CHECK-SERVICE_CHECK": ["HBASE_MASTER-START", 
"HBASE_REGIONSERVER-START"],
-    "HIVE_SERVICE_CHECK-SERVICE_CHECK": ["HIVE_SERVER-START", 
"HIVE_METASTORE-START"],
-    "HCAT_SERVICE_CHECK-SERVICE_CHECK": ["HIVE_SERVER-START"],
+    "HIVE_SERVICE_CHECK-SERVICE_CHECK": ["HIVE_SERVER-START", 
"HIVE_METASTORE-START", "WEBHCAT_SERVER-START"],
     "PIG_SERVICE_CHECK-SERVICE_CHECK": ["JOBTRACKER-START", 
"TASKTRACKER-START"],
     "SQOOP_SERVICE_CHECK-SERVICE_CHECK": ["JOBTRACKER-START", 
"TASKTRACKER-START"],
     "ZOOKEEPER_SERVICE_CHECK-SERVICE_CHECK": ["ZOOKEEPER_SERVER-START"],

http://git-wip-us.apache.org/repos/asf/ambari/blob/892ebe4f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/configuration/hive-site.xml
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/configuration/hive-site.xml
 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/configuration/hive-site.xml
index 01be0a3..3f90c76 100644
--- 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/configuration/hive-site.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/configuration/hive-site.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
 
-<configuration>
+<configuration supports_final="true">
 
   <!-- Hive Configuration can either be stored in this file or in the hadoop 
configuration files  -->
   <!-- that are implied by Hadoop setup variables.                             
                   -->

http://git-wip-us.apache.org/repos/asf/ambari/blob/892ebe4f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/configuration/webhcat-site.xml
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/configuration/webhcat-site.xml
 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/configuration/webhcat-site.xml
new file mode 100644
index 0000000..bae9712
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/configuration/webhcat-site.xml
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<!-- The default settings for Templeton. -->
+<!-- Edit templeton-site.xml to change settings for your local -->
+<!-- install. -->
+
+<configuration>
+
+  <property>
+    <name>templeton.port</name>
+    <value>50111</value>
+    <description>The HTTP port for the main server.</description>
+  </property>
+
+  <property>
+    <name>templeton.jar</name>
+    <value>c:\hdp\hive\hcatalog\share\webhcat\svr\lib\hive-webhca.jar</value>
+    <description>The path to the Templeton jar file.</description>
+  </property>
+
+  <property>
+    <name>templeton.override.enabled</name>
+    <value>false</value>
+    <description>
+      Enable the override path in templeton.override.jars
+    </description>
+  </property>
+
+  <property>
+    <name>templeton.hcat</name>
+    <value>${env.HCAT_HOME}/bin/hcat.py</value>
+    <description>The path to the hcatalog executable.</description>
+  </property>
+
+  <property>
+    <name>templeton.hadoop</name>
+    <value>${env.HADOOP_HOME}/bin/hadoop.cmd</value>
+    <description>The path to the Hadoop executable.</description>
+  </property>
+
+  <property>
+    <name>templeton.exec.envs</name>
+    
<value>HADOOP_HOME,JAVA_HOME,HIVE_HOME,TEMP,HADOOP_BIN_PATH,PATH,SystemRoot,TEZ_CLASSPATH</value>
+    <description>The environment variables passed through to 
exec.</description>
+  </property>
+
+  <property>
+    <name>templeton.streaming.jar</name>
+    
<value>file:///c:/hdp/hadoop/share/hadoop/tools/lib/hadoop-streaming.jar</value>
+    <description>The hdfs path to the Hadoop streaming jar file.</description>
+  </property>
+
+  <property>
+    <name>templeton.hive.properties</name>
+    
<value>hive.metastore.local=false,hive.metastore.uris=thrift://WIN-QS1HDPKHRAM:9083</value>
+    <description>Properties to set when running hive.</description>
+  </property>
+
+  <property>
+    <name>templeton.libjars</name>
+    <value>file:///c:/hdp/hive/lib/zookeeper.jar</value>
+    <description>Jars to add to the classpath.</description>
+  </property>
+
+  <property>
+    <name>templeton.pig.path</name>
+    <value>${env.PIG_HOME}/bin/pig.cmd</value>
+    <description>The path to the Pig executable.</description>
+  </property>
+
+  <property>
+    <name>templeton.hive.path</name>
+    <value>${env.HIVE_HOME}/bin/hive.cmd</value>
+    <description>The path to the Hive executable.</description>
+  </property>
+
+
+  <property>
+    <name>templeton.hadoop.queue.name</name>
+    <value>joblauncher</value>
+  </property>
+
+  <property>
+    <name>templeton.zookeeper.hosts</name>
+    <value>localhost:2181</value>
+  </property>
+
+  <property>
+    <name>templeton.storage.class</name>
+    <value>org.apache.hive.hcatalog.templeton.tool.ZooKeeperStorage</value>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/892ebe4f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/metainfo.xml
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/metainfo.xml 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/metainfo.xml
index bd9c8e4..ed6be9e 100644
--- 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/metainfo.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/metainfo.xml
@@ -20,12 +20,14 @@
   <services>
     <service>
       <name>HIVE</name>
+      <displayName>Hive</displayName>
       <comment>Data warehouse system for ad-hoc queries &amp; analysis of 
large datasets and table &amp; storage management service</comment>
       <version>0.12.0.2.0</version>
       <components>
 
         <component>
           <name>HIVE_METASTORE</name>
+          <displayName>Hive Metastore</displayName>
           <category>MASTER</category>
           <cardinality>1</cardinality>
           <auto-deploy>
@@ -41,6 +43,7 @@
 
         <component>
           <name>HIVE_SERVER</name>
+          <displayName>HiveServer2</displayName>
           <category>MASTER</category>
           <cardinality>1</cardinality>
           <dependencies>
@@ -82,6 +85,7 @@
 
         <component>
           <name>MYSQL_SERVER</name>
+          <displayName>MySQL Server</displayName>
           <category>MASTER</category>
           <cardinality>1</cardinality>
           <commandScript>
@@ -92,6 +96,7 @@
 
         <component>
           <name>HIVE_CLIENT</name>
+          <displayName>Hive Client</displayName>
           <category>CLIENT</category>
           <cardinality>0+</cardinality>
           <commandScript>
@@ -99,41 +104,88 @@
             <scriptType>PYTHON</scriptType>
           </commandScript>
         </component>
-      </components>
-
-      <commandScript>
-        <script>scripts/service_check.py</script>
-        <scriptType>PYTHON</scriptType>
-        <timeout>1200</timeout>
-      </commandScript>
-      <configuration-dependencies>
-        <config-type>hive-site</config-type>
-        <config-type>hive-env</config-type>
-      </configuration-dependencies>
-    </service>
 
-    <service>
-      <name>HCATALOG</name>
-      <comment>This is comment for HCATALOG service</comment>
-      <version>0.12.0.2.0.6.0</version>
-      <components>
         <component>
           <name>HCAT</name>
+          <displayName>HCat Client</displayName>
           <category>CLIENT</category>
+          <cardinality>0+</cardinality>
           <commandScript>
             <script>scripts/hcat_client.py</script>
             <scriptType>PYTHON</scriptType>
           </commandScript>
         </component>
+
+        <component>
+          <name>WEBHCAT_SERVER</name>
+          <displayName>WebHCat Server</displayName>
+          <category>MASTER</category>
+          <cardinality>1</cardinality>
+          <clientsToUpdateConfigs>
+            <client>HCAT</client>
+          </clientsToUpdateConfigs>
+          <dependencies>
+            <dependency>
+              <name>HDFS/HDFS_CLIENT</name>
+              <scope>host</scope>
+              <auto-deploy>
+                <enabled>true</enabled>
+              </auto-deploy>
+            </dependency>
+            <dependency>
+              <name>MAPREDUCE2/MAPREDUCE2_CLIENT</name>
+              <scope>host</scope>
+              <auto-deploy>
+                <enabled>true</enabled>
+              </auto-deploy>
+            </dependency>
+            <dependency>
+              <name>ZOOKEEPER/ZOOKEEPER_SERVER</name>
+              <scope>cluster</scope>
+              <auto-deploy>
+                <enabled>true</enabled>
+                <co-locate>HIVE/WEBHCAT_SERVER</co-locate>
+              </auto-deploy>
+            </dependency>
+            <dependency>
+              <name>ZOOKEEPER/ZOOKEEPER_CLIENT</name>
+              <scope>host</scope>
+              <auto-deploy>
+                <enabled>true</enabled>
+              </auto-deploy>
+            </dependency>
+            <dependency>
+              <name>YARN/YARN_CLIENT</name>
+              <scope>host</scope>
+              <auto-deploy>
+                <enabled>true</enabled>
+              </auto-deploy>
+            </dependency>
+          </dependencies>
+          <commandScript>
+            <script>scripts/webhcat_server.py</script>
+            <scriptType>PYTHON</scriptType>
+            <timeout>1200</timeout>
+          </commandScript>
+        </component>
       </components>
+
       <commandScript>
         <script>scripts/service_check.py</script>
         <scriptType>PYTHON</scriptType>
         <timeout>1200</timeout>
       </commandScript>
+
+      <requiredServices>
+        <service>ZOOKEEPER</service>
+        <service>YARN</service>
+        <service>TEZ</service>
+      </requiredServices>
+
       <configuration-dependencies>
         <config-type>hive-site</config-type>
         <config-type>hive-env</config-type>
+        <config-type>webhcat-site</config-type>
       </configuration-dependencies>
     </service>
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/892ebe4f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/files/templetonSmoke.sh
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/files/templetonSmoke.sh
 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/files/templetonSmoke.sh
new file mode 100644
index 0000000..2d07b8b
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/files/templetonSmoke.sh
@@ -0,0 +1,96 @@
+#!/usr/bin/env bash
+#
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#
+
+export ttonhost=$1
+export smoke_test_user=$2
+export smoke_user_keytab=$3
+export security_enabled=$4
+export kinit_path_local=$5
+export ttonurl="http://${ttonhost}:50111/templeton/v1";
+
+if [[ $security_enabled == "true" ]]; then
+  kinitcmd="${kinit_path_local}  -kt ${smoke_user_keytab} ${smoke_test_user}; "
+else
+  kinitcmd=""
+fi
+
+export no_proxy=$ttonhost
+cmd="${kinitcmd}curl --negotiate -u : -s -w 'http_code <%{http_code}>'    
$ttonurl/status 2>&1"
+retVal=`su - ${smoke_test_user} -c "$cmd"`
+httpExitCode=`echo $retVal |sed 's/.*http_code <\([0-9]*\)>.*/\1/'`
+
+if [[ "$httpExitCode" -ne "200" ]] ; then
+  echo "Templeton Smoke Test (status cmd): Failed. : $retVal"
+  export TEMPLETON_EXIT_CODE=1
+  exit 1
+fi
+
+exit 0
+
+#try hcat ddl command
+echo "user.name=${smoke_test_user}&exec=show databases;" /tmp/show_db.post.txt
+cmd="${kinitcmd}curl --negotiate -u : -s -w 'http_code <%{http_code}>' -d  
\@${destdir}/show_db.post.txt  $ttonurl/ddl 2>&1"
+retVal=`su - ${smoke_test_user} -c "$cmd"`
+httpExitCode=`echo $retVal |sed 's/.*http_code <\([0-9]*\)>.*/\1/'`
+
+if [[ "$httpExitCode" -ne "200" ]] ; then
+  echo "Templeton Smoke Test (ddl cmd): Failed. : $retVal"
+  export TEMPLETON_EXIT_CODE=1
+  exit  1
+fi
+
+# NOT SURE?? SUHAS
+if [[ $security_enabled == "true" ]]; then
+  echo "Templeton Pig Smoke Tests not run in secure mode"
+  exit 0
+fi
+
+#try pig query
+outname=${smoke_test_user}.`date +"%M%d%y"`.$$;
+ttonTestOutput="/tmp/idtest.${outname}.out";
+ttonTestInput="/tmp/idtest.${outname}.in";
+ttonTestScript="idtest.${outname}.pig"
+
+echo "A = load '$ttonTestInput' using PigStorage(':');"  > /tmp/$ttonTestScript
+echo "B = foreach A generate \$0 as id; " >> /tmp/$ttonTestScript
+echo "store B into '$ttonTestOutput';" >> /tmp/$ttonTestScript
+
+#copy pig script to hdfs
+su - ${smoke_test_user} -c "hadoop dfs -copyFromLocal /tmp/$ttonTestScript 
/tmp/$ttonTestScript"
+
+#copy input file to hdfs
+su - ${smoke_test_user} -c "hadoop dfs -copyFromLocal /etc/passwd 
$ttonTestInput"
+
+#create, copy post args file
+echo -n "user.name=${smoke_test_user}&file=/tmp/$ttonTestScript" > 
/tmp/pig_post.txt
+
+#submit pig query
+cmd="curl -s -w 'http_code <%{http_code}>' -d  \@${destdir}/pig_post.txt  
$ttonurl/pig 2>&1"
+retVal=`su - ${smoke_test_user} -c "$cmd"`
+httpExitCode=`echo $retVal |sed 's/.*http_code <\([0-9]*\)>.*/\1/'`
+if [[ "$httpExitCode" -ne "200" ]] ; then
+  echo "Templeton Smoke Test (pig cmd): Failed. : $retVal"
+  export TEMPLETON_EXIT_CODE=1
+  exit 1
+fi
+
+exit 0

http://git-wip-us.apache.org/repos/asf/ambari/blob/892ebe4f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/params.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/params.py
 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/params.py
index a91b82c..041669f 100644
--- 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/params.py
@@ -30,8 +30,10 @@ hive_lib_dir = os.environ["HIVE_LIB_DIR"]
 hive_log_dir = os.environ["HIVE_LOG_DIR"]
 hive_opts = os.environ["HIVE_OPTS"]
 hcat_home = os.environ["HCAT_HOME"]
+hcat_config_dir = os.environ["WEBHCAT_CONF_DIR"]
 
 hive_env_sh_template = config['configurations']['hive-env']['content']
 hive_warehouse_dir = 
config['configurations']['hive-site']['hive.metastore.warehouse.dir']
 hive_user = "hadoop"
 hadoop_user = "hadoop"
+hcat_user = "hadoop"

http://git-wip-us.apache.org/repos/asf/ambari/blob/892ebe4f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/service_check.py
 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/service_check.py
index 8d8a9f2..619be7a 100644
--- 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/service_check.py
+++ 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/service_check.py
@@ -23,6 +23,7 @@ import socket
 import sys
 
 from hcat_service_check import hcat_service_check
+from webhcat_service_check import webhcat_service_check
 
 class HiveServiceCheck(Script):
   def service_check(self, env):
@@ -32,5 +33,7 @@ class HiveServiceCheck(Script):
     service = "HIVE"
     Execute(format("cmd /C {smoke_cmd} {service}"), user=params.hive_user, 
logoutput=True)
 
+    webhcat_service_check()
+
 if __name__ == "__main__":
   HiveServiceCheck().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/892ebe4f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/service_mapping.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/service_mapping.py
 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/service_mapping.py
index 5ab9742..84dd897 100644
--- 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/service_mapping.py
+++ 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/service_mapping.py
@@ -19,4 +19,5 @@ limitations under the License.
 
 hive_metastore_win_service_name = "metastore"
 hive_client_win_service_name = "hwi"
-hive_server_win_service_name = "hiveserver2"
\ No newline at end of file
+hive_server_win_service_name = "hiveserver2"
+webhcat_server_win_service_name = "templeton"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/892ebe4f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/webhcat.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/webhcat.py
 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/webhcat.py
new file mode 100644
index 0000000..032ca79
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/webhcat.py
@@ -0,0 +1,30 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Ambari Agent
+
+"""
+from resource_management import *
+import sys
+
+
+def webhcat():
+  import params
+  XmlConfig("webhcat-site.xml",
+            conf_dir=params.config_dir,
+            configurations=params.config['configurations']['webhcat-site']
+  )

http://git-wip-us.apache.org/repos/asf/ambari/blob/892ebe4f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/webhcat_server.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/webhcat_server.py
 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/webhcat_server.py
new file mode 100644
index 0000000..527efb8
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/webhcat_server.py
@@ -0,0 +1,48 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Ambari Agent
+
+"""
+import sys
+from resource_management import *
+from webhcat import webhcat
+import service_mapping
+
+class WebHCatServer(Script):
+  def install(self, env):
+    if not 
check_windows_service_exists(service_mapping.webhcat_server_win_service_name):
+      self.install_packages(env)
+
+  def configure(self, env):
+    import params
+    env.set_params(params)
+    webhcat()
+
+  def start(self, env):
+    import params
+    self.configure(env) # FOR SECURITY
+    Service(service_mapping.webhcat_server_win_service_name, action="start")
+
+  def stop(self, env):
+    Service(service_mapping.webhcat_server_win_service_name, action="stop")
+
+  def status(self, env):
+    
check_windows_service_status(service_mapping.webhcat_server_win_service_name)
+
+if __name__ == "__main__":
+  WebHCatServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/892ebe4f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/webhcat_service_check.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/webhcat_service_check.py
 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/webhcat_service_check.py
new file mode 100644
index 0000000..1fa08a3
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/scripts/webhcat_service_check.py
@@ -0,0 +1,27 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Ambari Agent
+
+"""
+from resource_management import *
+
+def webhcat_service_check():
+  import params
+  smoke_cmd = os.path.join(params.hdp_root,"Run-SmokeTests.cmd")
+  service = "WEBHCAT"
+  Execute(format("cmd /C {smoke_cmd} {service}"), user=params.hcat_user, 
logoutput=True)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/892ebe4f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/templates/webhcat-env.sh.j2
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/templates/webhcat-env.sh.j2
 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/templates/webhcat-env.sh.j2
new file mode 100644
index 0000000..220f420
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HIVE/package/templates/webhcat-env.sh.j2
@@ -0,0 +1,62 @@
+{#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#}
+
+#
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#
+#
+
+# The file containing the running pid
+PID_FILE={{pid_file}}
+
+TEMPLETON_LOG_DIR={{templeton_log_dir}}/
+
+
+WEBHCAT_LOG_DIR={{templeton_log_dir}}/
+
+# The console error log
+ERROR_LOG={{templeton_log_dir}}/webhcat-console-error.log
+
+# The console log
+CONSOLE_LOG={{templeton_log_dir}}/webhcat-console.log
+
+#TEMPLETON_JAR=templeton_jar_name
+
+#HADOOP_PREFIX=hadoop_prefix
+
+#HCAT_PREFIX=hive_prefix
+
+# Set HADOOP_HOME to point to a specific hadoop install directory
+export HADOOP_HOME=/usr/lib/hadoop

http://git-wip-us.apache.org/repos/asf/ambari/blob/892ebe4f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/configuration/webhcat-site.xml
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/configuration/webhcat-site.xml
 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/configuration/webhcat-site.xml
deleted file mode 100644
index bae9712..0000000
--- 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/configuration/webhcat-site.xml
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-
-<!-- The default settings for Templeton. -->
-<!-- Edit templeton-site.xml to change settings for your local -->
-<!-- install. -->
-
-<configuration>
-
-  <property>
-    <name>templeton.port</name>
-    <value>50111</value>
-    <description>The HTTP port for the main server.</description>
-  </property>
-
-  <property>
-    <name>templeton.jar</name>
-    <value>c:\hdp\hive\hcatalog\share\webhcat\svr\lib\hive-webhca.jar</value>
-    <description>The path to the Templeton jar file.</description>
-  </property>
-
-  <property>
-    <name>templeton.override.enabled</name>
-    <value>false</value>
-    <description>
-      Enable the override path in templeton.override.jars
-    </description>
-  </property>
-
-  <property>
-    <name>templeton.hcat</name>
-    <value>${env.HCAT_HOME}/bin/hcat.py</value>
-    <description>The path to the hcatalog executable.</description>
-  </property>
-
-  <property>
-    <name>templeton.hadoop</name>
-    <value>${env.HADOOP_HOME}/bin/hadoop.cmd</value>
-    <description>The path to the Hadoop executable.</description>
-  </property>
-
-  <property>
-    <name>templeton.exec.envs</name>
-    
<value>HADOOP_HOME,JAVA_HOME,HIVE_HOME,TEMP,HADOOP_BIN_PATH,PATH,SystemRoot,TEZ_CLASSPATH</value>
-    <description>The environment variables passed through to 
exec.</description>
-  </property>
-
-  <property>
-    <name>templeton.streaming.jar</name>
-    
<value>file:///c:/hdp/hadoop/share/hadoop/tools/lib/hadoop-streaming.jar</value>
-    <description>The hdfs path to the Hadoop streaming jar file.</description>
-  </property>
-
-  <property>
-    <name>templeton.hive.properties</name>
-    
<value>hive.metastore.local=false,hive.metastore.uris=thrift://WIN-QS1HDPKHRAM:9083</value>
-    <description>Properties to set when running hive.</description>
-  </property>
-
-  <property>
-    <name>templeton.libjars</name>
-    <value>file:///c:/hdp/hive/lib/zookeeper.jar</value>
-    <description>Jars to add to the classpath.</description>
-  </property>
-
-  <property>
-    <name>templeton.pig.path</name>
-    <value>${env.PIG_HOME}/bin/pig.cmd</value>
-    <description>The path to the Pig executable.</description>
-  </property>
-
-  <property>
-    <name>templeton.hive.path</name>
-    <value>${env.HIVE_HOME}/bin/hive.cmd</value>
-    <description>The path to the Hive executable.</description>
-  </property>
-
-
-  <property>
-    <name>templeton.hadoop.queue.name</name>
-    <value>joblauncher</value>
-  </property>
-
-  <property>
-    <name>templeton.zookeeper.hosts</name>
-    <value>localhost:2181</value>
-  </property>
-
-  <property>
-    <name>templeton.storage.class</name>
-    <value>org.apache.hive.hcatalog.templeton.tool.ZooKeeperStorage</value>
-  </property>
-</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/892ebe4f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/metainfo.xml
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/metainfo.xml
 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/metainfo.xml
deleted file mode 100644
index 390dc9a..0000000
--- 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/metainfo.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0"?>
-<!--
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
--->
-<metainfo>
-  <schemaVersion>2.0</schemaVersion>
-  <services>
-    <service>
-      <name>WEBHCAT</name>
-      <comment>This is comment for WEBHCAT service</comment>
-      <version>0.12.0.2.0</version>
-      <components>
-        <component>
-          <name>WEBHCAT_SERVER</name>
-          <category>MASTER</category>
-          <cardinality>1</cardinality>
-          <dependencies>
-            <dependency>
-              <name>HDFS/HDFS_CLIENT</name>
-              <scope>host</scope>
-              <auto-deploy>
-                <enabled>true</enabled>
-              </auto-deploy>
-            </dependency>
-            <dependency>
-              <name>MAPREDUCE2/MAPREDUCE2_CLIENT</name>
-              <scope>host</scope>
-              <auto-deploy>
-                <enabled>true</enabled>
-              </auto-deploy>
-            </dependency>
-            <dependency>
-              <name>ZOOKEEPER/ZOOKEEPER_SERVER</name>
-              <scope>cluster</scope>
-              <auto-deploy>
-                <enabled>true</enabled>
-                <co-locate>WEBHCAT/WEBHCAT_SERVER</co-locate>
-              </auto-deploy>
-            </dependency>
-            <dependency>
-              <name>ZOOKEEPER/ZOOKEEPER_CLIENT</name>
-              <scope>host</scope>
-              <auto-deploy>
-                <enabled>true</enabled>
-              </auto-deploy>
-            </dependency>
-            <dependency>
-              <name>YARN/YARN_CLIENT</name>
-              <scope>host</scope>
-              <auto-deploy>
-                <enabled>true</enabled>
-              </auto-deploy>
-            </dependency>
-          </dependencies>
-          <commandScript>
-            <script>scripts/webhcat_server.py</script>
-            <scriptType>PYTHON</scriptType>
-            <timeout>1200</timeout>
-          </commandScript>
-        </component>
-      </components>
-      <commandScript>
-        <script>scripts/service_check.py</script>
-        <scriptType>PYTHON</scriptType>
-        <timeout>1200</timeout>
-      </commandScript>
-      <configuration-dependencies>
-        <config-type>webhcat-site</config-type>
-      </configuration-dependencies>
-    </service>
-  </services>
-</metainfo>

http://git-wip-us.apache.org/repos/asf/ambari/blob/892ebe4f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/files/templetonSmoke.sh
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/files/templetonSmoke.sh
 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/files/templetonSmoke.sh
deleted file mode 100644
index 2d07b8b..0000000
--- 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/files/templetonSmoke.sh
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/usr/bin/env bash
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-
-export ttonhost=$1
-export smoke_test_user=$2
-export smoke_user_keytab=$3
-export security_enabled=$4
-export kinit_path_local=$5
-export ttonurl="http://${ttonhost}:50111/templeton/v1";
-
-if [[ $security_enabled == "true" ]]; then
-  kinitcmd="${kinit_path_local}  -kt ${smoke_user_keytab} ${smoke_test_user}; "
-else
-  kinitcmd=""
-fi
-
-export no_proxy=$ttonhost
-cmd="${kinitcmd}curl --negotiate -u : -s -w 'http_code <%{http_code}>'    
$ttonurl/status 2>&1"
-retVal=`su - ${smoke_test_user} -c "$cmd"`
-httpExitCode=`echo $retVal |sed 's/.*http_code <\([0-9]*\)>.*/\1/'`
-
-if [[ "$httpExitCode" -ne "200" ]] ; then
-  echo "Templeton Smoke Test (status cmd): Failed. : $retVal"
-  export TEMPLETON_EXIT_CODE=1
-  exit 1
-fi
-
-exit 0
-
-#try hcat ddl command
-echo "user.name=${smoke_test_user}&exec=show databases;" /tmp/show_db.post.txt
-cmd="${kinitcmd}curl --negotiate -u : -s -w 'http_code <%{http_code}>' -d  
\@${destdir}/show_db.post.txt  $ttonurl/ddl 2>&1"
-retVal=`su - ${smoke_test_user} -c "$cmd"`
-httpExitCode=`echo $retVal |sed 's/.*http_code <\([0-9]*\)>.*/\1/'`
-
-if [[ "$httpExitCode" -ne "200" ]] ; then
-  echo "Templeton Smoke Test (ddl cmd): Failed. : $retVal"
-  export TEMPLETON_EXIT_CODE=1
-  exit  1
-fi
-
-# NOT SURE?? SUHAS
-if [[ $security_enabled == "true" ]]; then
-  echo "Templeton Pig Smoke Tests not run in secure mode"
-  exit 0
-fi
-
-#try pig query
-outname=${smoke_test_user}.`date +"%M%d%y"`.$$;
-ttonTestOutput="/tmp/idtest.${outname}.out";
-ttonTestInput="/tmp/idtest.${outname}.in";
-ttonTestScript="idtest.${outname}.pig"
-
-echo "A = load '$ttonTestInput' using PigStorage(':');"  > /tmp/$ttonTestScript
-echo "B = foreach A generate \$0 as id; " >> /tmp/$ttonTestScript
-echo "store B into '$ttonTestOutput';" >> /tmp/$ttonTestScript
-
-#copy pig script to hdfs
-su - ${smoke_test_user} -c "hadoop dfs -copyFromLocal /tmp/$ttonTestScript 
/tmp/$ttonTestScript"
-
-#copy input file to hdfs
-su - ${smoke_test_user} -c "hadoop dfs -copyFromLocal /etc/passwd 
$ttonTestInput"
-
-#create, copy post args file
-echo -n "user.name=${smoke_test_user}&file=/tmp/$ttonTestScript" > 
/tmp/pig_post.txt
-
-#submit pig query
-cmd="curl -s -w 'http_code <%{http_code}>' -d  \@${destdir}/pig_post.txt  
$ttonurl/pig 2>&1"
-retVal=`su - ${smoke_test_user} -c "$cmd"`
-httpExitCode=`echo $retVal |sed 's/.*http_code <\([0-9]*\)>.*/\1/'`
-if [[ "$httpExitCode" -ne "200" ]] ; then
-  echo "Templeton Smoke Test (pig cmd): Failed. : $retVal"
-  export TEMPLETON_EXIT_CODE=1
-  exit 1
-fi
-
-exit 0

http://git-wip-us.apache.org/repos/asf/ambari/blob/892ebe4f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/scripts/params.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/scripts/params.py
 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/scripts/params.py
deleted file mode 100644
index 607d05d..0000000
--- 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/scripts/params.py
+++ /dev/null
@@ -1,29 +0,0 @@
-"""
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Ambari Agent
-
-"""
-
-from resource_management import *
-import os
-
-# server configurations
-config = Script.get_config()
-hcat_user = "hadoop"
-hdp_root = os.path.abspath(os.path.join(os.environ["HADOOP_HOME"],".."))
-config_dir = os.environ["WEBHCAT_CONF_DIR"]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/892ebe4f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/scripts/service_check.py
 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/scripts/service_check.py
deleted file mode 100644
index 804c8b2..0000000
--- 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/scripts/service_check.py
+++ /dev/null
@@ -1,32 +0,0 @@
-"""
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Ambari Agent
-
-"""
-from resource_management import *
-
-class WebHCatServiceCheck(Script):
-  def service_check(self, env):
-    import params
-    env.set_params(params)
-    smoke_cmd = os.path.join(params.hdp_root,"Run-SmokeTests.cmd")
-    service = "WEBHCAT"
-    Execute(format("cmd /C {smoke_cmd} {service}"), user=params.hcat_user, 
logoutput=True)
-
-if __name__ == "__main__":
-  WebHCatServiceCheck().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/892ebe4f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/scripts/service_mapping.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/scripts/service_mapping.py
 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/scripts/service_mapping.py
deleted file mode 100644
index 172886c..0000000
--- 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/scripts/service_mapping.py
+++ /dev/null
@@ -1,20 +0,0 @@
-"""
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-"""
-
-webhcat_server_win_service_name = "templeton"

http://git-wip-us.apache.org/repos/asf/ambari/blob/892ebe4f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/scripts/webhcat.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/scripts/webhcat.py
 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/scripts/webhcat.py
deleted file mode 100644
index 032ca79..0000000
--- 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/scripts/webhcat.py
+++ /dev/null
@@ -1,30 +0,0 @@
-"""
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Ambari Agent
-
-"""
-from resource_management import *
-import sys
-
-
-def webhcat():
-  import params
-  XmlConfig("webhcat-site.xml",
-            conf_dir=params.config_dir,
-            configurations=params.config['configurations']['webhcat-site']
-  )

http://git-wip-us.apache.org/repos/asf/ambari/blob/892ebe4f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/scripts/webhcat_server.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/scripts/webhcat_server.py
 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/scripts/webhcat_server.py
deleted file mode 100644
index 527efb8..0000000
--- 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/scripts/webhcat_server.py
+++ /dev/null
@@ -1,48 +0,0 @@
-"""
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-Ambari Agent
-
-"""
-import sys
-from resource_management import *
-from webhcat import webhcat
-import service_mapping
-
-class WebHCatServer(Script):
-  def install(self, env):
-    if not 
check_windows_service_exists(service_mapping.webhcat_server_win_service_name):
-      self.install_packages(env)
-
-  def configure(self, env):
-    import params
-    env.set_params(params)
-    webhcat()
-
-  def start(self, env):
-    import params
-    self.configure(env) # FOR SECURITY
-    Service(service_mapping.webhcat_server_win_service_name, action="start")
-
-  def stop(self, env):
-    Service(service_mapping.webhcat_server_win_service_name, action="stop")
-
-  def status(self, env):
-    
check_windows_service_status(service_mapping.webhcat_server_win_service_name)
-
-if __name__ == "__main__":
-  WebHCatServer().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/892ebe4f/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/templates/webhcat-env.sh.j2
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/templates/webhcat-env.sh.j2
 
b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/templates/webhcat-env.sh.j2
deleted file mode 100644
index 220f420..0000000
--- 
a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/WEBHCAT/package/templates/webhcat-env.sh.j2
+++ /dev/null
@@ -1,62 +0,0 @@
-{#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#}
-
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-#
-
-# The file containing the running pid
-PID_FILE={{pid_file}}
-
-TEMPLETON_LOG_DIR={{templeton_log_dir}}/
-
-
-WEBHCAT_LOG_DIR={{templeton_log_dir}}/
-
-# The console error log
-ERROR_LOG={{templeton_log_dir}}/webhcat-console-error.log
-
-# The console log
-CONSOLE_LOG={{templeton_log_dir}}/webhcat-console.log
-
-#TEMPLETON_JAR=templeton_jar_name
-
-#HADOOP_PREFIX=hadoop_prefix
-
-#HCAT_PREFIX=hive_prefix
-
-# Set HADOOP_HOME to point to a specific hadoop install directory
-export HADOOP_HOME=/usr/lib/hadoop

http://git-wip-us.apache.org/repos/asf/ambari/blob/892ebe4f/ambari-web/app/controllers/wizard/step5_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step5_controller.js 
b/ambari-web/app/controllers/wizard/step5_controller.js
index 6fb9ab1..13c6896 100644
--- a/ambari-web/app/controllers/wizard/step5_controller.js
+++ b/ambari-web/app/controllers/wizard/step5_controller.js
@@ -607,12 +607,12 @@ App.WizardStep5Controller = 
Em.Controller.extend(App.BlueprintMixin, {
                   multipleComponentHasBeenAdded[component.name] = true;
 
                   savedComponents.forEach(function(saved) {
-                    
resultComponents.push(self.createComponentInstallationObject(fullComponent, 
host.fqdn, saved));
+                    
resultComponents.push(self.createComponentInstallationObject(fullComponent, 
host.fqdn.toLowerCase(), saved));
                   });
                 }
               } else {
                 var savedComponent = masterHosts.findProperty('component', 
component.name);
-                
resultComponents.push(self.createComponentInstallationObject(fullComponent, 
host.fqdn, savedComponent));
+                
resultComponents.push(self.createComponentInstallationObject(fullComponent, 
host.fqdn.toLowerCase(), savedComponent));
               }
             }
           }

Reply via email to