You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by tt...@apache.org on 2016/12/23 16:40:40 UTC

ambari git commit: AMBARI-19258 - Extension directories are not properly sync'd to agent nodes

Repository: ambari
Updated Branches:
  refs/heads/trunk a934c0315 -> 50c770ab9


AMBARI-19258 - Extension directories are not properly sync'd to agent nodes


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

Branch: refs/heads/trunk
Commit: 50c770ab9edeba6ad72881c4e3dd8d494828e7b4
Parents: a934c03
Author: Tim Thorpe <tt...@apache.org>
Authored: Fri Dec 23 08:40:25 2016 -0800
Committer: Tim Thorpe <tt...@apache.org>
Committed: Fri Dec 23 08:40:25 2016 -0800

----------------------------------------------------------------------
 .../python/ambari_server/resourceFilesKeeper.py |  20 +-
 .../src/test/python/TestResourceFilesKeeper.py  |  11 +-
 .../HIVE/configuration/hive-site.xml            | 259 +++++++++++++++++++
 .../dummy_extension/HIVE/metainfo.xml           |  47 ++++
 .../dummy_extension/HIVE/package/.hash          |   1 +
 .../HIVE/package/files/startHiveserver2.sh      |  22 ++
 .../HIVE/package/scripts/status_params.py       |  30 +++
 .../HIVE/package/templates/hcat-env.sh.j2       |  25 ++
 8 files changed, 413 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/50c770ab/ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py b/ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py
index 8047e7d..188f3ff 100644
--- a/ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py
+++ b/ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py
@@ -30,7 +30,7 @@ class KeeperException(Exception):
 
 class ResourceFilesKeeper():
   """
-  This class incapsulates all utility methods for resource files maintenance.
+  This class encapsulates all utility methods for resource files maintenance.
   """
 
   HOOKS_DIR="hooks"
@@ -40,6 +40,7 @@ class ResourceFilesKeeper():
   CUSTOM_ACTIONS_DIR="custom_actions"
   HOST_SCRIPTS_DIR="host_scripts"
   DASHBOARDS_DIR="dashboards"
+  EXTENSIONS_DIR="extensions"
 
   # For these directories archives are created
   ARCHIVABLE_DIRS = [HOOKS_DIR, PACKAGE_DIR]
@@ -107,6 +108,14 @@ class ResourceFilesKeeper():
     # Iterate over common services directories
     self._iter_update_directory_archive(valid_common_services)
 
+    # archive extensions
+    extensions_root = os.path.join(self.resources_dir, self.EXTENSIONS_DIR)
+    self.dbg_out("Updating archives for extensions dirs at {0}...".format(extensions_root))
+    valid_extensions = self.list_extensions(extensions_root)
+    self.dbg_out("Extensions: {0}".format(pprint.pformat(valid_extensions)))
+    # Iterate over extension directories
+    self._iter_update_directory_archive(valid_extensions)
+
     # custom actions
     self._update_resources_subdir_archive(self.CUSTOM_ACTIONS_DIR)
 
@@ -145,6 +154,15 @@ class ResourceFilesKeeper():
     except Exception, err:
       raise KeeperException("Can not list common services: {0}".format(str(err)))
 
+  def list_extensions(self, root_dir):
+    """
+    Builds a list of extension directories
+    """
+    try:
+      return self._list_metainfo_dirs(root_dir)
+    except Exception, err:
+      raise KeeperException("Can not list extensions: {0}".format(str(err)))
+
   def update_directory_archive(self, directory):
     """
     If hash sum for directory is not present or differs from saved value,

http://git-wip-us.apache.org/repos/asf/ambari/blob/50c770ab/ambari-server/src/test/python/TestResourceFilesKeeper.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/TestResourceFilesKeeper.py b/ambari-server/src/test/python/TestResourceFilesKeeper.py
index 4801fad..4f7dc52 100644
--- a/ambari-server/src/test/python/TestResourceFilesKeeper.py
+++ b/ambari-server/src/test/python/TestResourceFilesKeeper.py
@@ -46,6 +46,9 @@ class TestResourceFilesKeeper(TestCase):
   DUMMY_UNCHANGEABLE_STACK = ".." + os.sep + "resources" + os.sep + "TestAmbaryServer.samples" + os.sep + \
                            "dummy_stack" + os.sep + "HIVE"
 
+  DUMMY_UNCHANGEABLE_EXTENSION = ".." + os.sep + "resources" + os.sep + "TestAmbaryServer.samples" + os.sep + \
+                           "dummy_extension" + os.sep + "HIVE"
+
   DUMMY_ACTIVE_STACK = ".." + os.sep + "resources" + os.sep + "TestAmbaryServer.samples" + os.sep + \
                            "active_stack"
 
@@ -81,6 +84,7 @@ class TestResourceFilesKeeper(TestCase):
       "dummy_common_services/HIVE/0.11.0.2.0.5.0/package'),\n " \
       "call('../resources/TestAmbaryServer.samples/" \
       "dummy_common_services/HIVE/0.11.0.2.0.5.0/package'),\n " \
+      "call('../resources/TestAmbaryServer.samples/dummy_extension/HIVE/package'),\n " \
       "call('../resources/custom_actions'),\n " \
       "call('../resources/host_scripts'),\n " \
       "call('../resources/dashboards')]"
@@ -91,6 +95,7 @@ class TestResourceFilesKeeper(TestCase):
       "call('..\\\\resources\\\\TestAmbaryServer.samples\\\\dummy_stack\\\\HIVE\\\\package'),\n " \
       "call('..\\\\resources\\\\TestAmbaryServer.samples\\\\dummy_common_services\\\\HIVE\\\\0.11.0.2.0.5.0\\\\package'),\n " \
       "call('..\\\\resources\\\\TestAmbaryServer.samples\\\\dummy_common_services\\\\HIVE\\\\0.11.0.2.0.5.0\\\\package'),\n " \
+      "call('..\\\\resources\\\\TestAmbaryServer.samples\\\\dummy_extension\\\\HIVE\\\\package'),\n " \
       "call('..\\\\resources\\\\custom_actions'),\n " \
       "call('..\\\\resources\\\\host_scripts'),\n " \
       "call('..\\\\resources\\\\dashboards')]"
@@ -107,6 +112,7 @@ class TestResourceFilesKeeper(TestCase):
     pass
 
 
+  @patch.object(ResourceFilesKeeper, "list_extensions")
   @patch.object(ResourceFilesKeeper, "update_directory_archive")
   @patch.object(ResourceFilesKeeper, "list_common_services")
   @patch.object(ResourceFilesKeeper, "list_stacks")
@@ -114,12 +120,15 @@ class TestResourceFilesKeeper(TestCase):
   def test_update_directory_archives(self, abspath_mock,
                                       list_active_stacks_mock,
                                       list_common_services_mock,
-                                      update_directory_archive_mock):
+                                      update_directory_archive_mock,
+                                      list_extensions_mock):
     list_active_stacks_mock.return_value = [self.DUMMY_UNCHANGEABLE_STACK,
                                             self.DUMMY_UNCHANGEABLE_STACK,
                                             self.DUMMY_UNCHANGEABLE_STACK]
     list_common_services_mock.return_value = [self.DUMMY_UNCHANGEABLE_COMMON_SERVICES,
                                               self.DUMMY_UNCHANGEABLE_COMMON_SERVICES]
+    list_extensions_mock.return_value = [self.DUMMY_UNCHANGEABLE_EXTENSION]
+
     abspath_mock.side_effect = lambda s : s
     resource_files_keeper = ResourceFilesKeeper(self.TEST_RESOURCES_DIR, self.TEST_STACKS_DIR)
     resource_files_keeper.update_directory_archives()

http://git-wip-us.apache.org/repos/asf/ambari/blob/50c770ab/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_extension/HIVE/configuration/hive-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_extension/HIVE/configuration/hive-site.xml b/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_extension/HIVE/configuration/hive-site.xml
new file mode 100644
index 0000000..d56bfab
--- /dev/null
+++ b/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_extension/HIVE/configuration/hive-site.xml
@@ -0,0 +1,259 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<configuration>
+  <property>
+    <name>ambari.hive.db.schema.name</name>
+    <value>hive</value>
+    <description>Database name used as the Hive Metastore</description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>javax.jdo.option.ConnectionURL</name>
+    <value>jdbc</value>
+    <description>JDBC connect string for a JDBC metastore</description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>javax.jdo.option.ConnectionDriverName</name>
+    <value>com.mysql.jdbc.Driver</value>
+    <description>Driver class name for a JDBC metastore</description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>javax.jdo.option.ConnectionUserName</name>
+    <value>hive</value>
+    <description>username to use against metastore database</description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>javax.jdo.option.ConnectionPassword</name>
+    <value> </value>
+    <description>password to use against metastore database</description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.metastore.warehouse.dir</name>
+    <value>/apps/hive/warehouse</value>
+    <description>location of default database for the warehouse</description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.metastore.sasl.enabled</name>
+    <value/>
+    <description>If true, the metastore thrift interface will be secured with SASL.
+     Clients must authenticate with Kerberos.</description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.metastore.kerberos.keytab.file</name>
+    <value/>
+    <description>The path to the Kerberos Keytab file containing the metastore
+     thrift server's service principal.</description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.metastore.kerberos.principal</name>
+    <value/>
+    <description>The service principal for the metastore thrift server. The special
+    string _HOST will be replaced automatically with the correct host name.</description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.metastore.cache.pinobjtypes</name>
+    <value>Table,Database,Type,FieldSchema,Order</value>
+    <description>List of comma separated metastore object types that should be pinned in the cache</description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.metastore.uris</name>
+    <value>thrift://localhost:9083</value>
+    <description>URI for client to contact metastore server</description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.metastore.client.socket.timeout</name>
+    <value>60</value>
+    <description>MetaStore Client socket timeout in seconds</description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.metastore.execute.setugi</name>
+    <value>true</value>
+    <description>In unsecure mode, setting this property to true will cause the metastore to execute DFS operations using the client's reported user and group permissions. Note that this property must be set on both the client and     server sides. Further note that its best effort. If client sets its to true and server sets it to false, client setting will be ignored.</description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.security.authorization.enabled</name>
+    <value>false</value>
+    <description>enable or disable the hive client authorization</description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.security.authorization.manager</name>
+    <value>org.apache.hadoop.hive.ql.security.authorization.StorageBasedAuthorizationProvider</value>
+    <description>the hive client authorization manager class name.
+    The user defined authorization class should implement interface org.apache.hadoop.hive.ql.security.authorization.HiveAuthorizationProvider.  </description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.security.metastore.authorization.manager</name>
+    <value>org.apache.hadoop.hive.ql.security.authorization.StorageBasedAuthorizationProvider</value>
+    <description>The authorization manager class name to be used in the metastore for authorization. The user-defined authorization class should implement interface org.apache.hadoop.hive.ql.security.authorization.HiveMetastoreAuthorizationProvider.  </description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.security.authenticator.manager</name>
+    <value>org.apache.hadoop.hive.ql.security.ProxyUserAuthenticator</value>
+    <description>Hive client authenticator manager class name. The user-defined authenticator class should implement interface org.apache.hadoop.hive.ql.security.HiveAuthenticationProvider.  </description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.server2.enable.doAs</name>
+    <value>true</value>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>fs.hdfs.impl.disable.cache</name>
+    <value>true</value>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>fs.file.impl.disable.cache</name>
+    <value>true</value>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.enforce.bucketing</name>
+    <value>true</value>
+    <description>Whether bucketing is enforced. If true, while inserting into the table, bucketing is enforced.</description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.enforce.sorting</name>
+    <value>true</value>
+    <description>Whether sorting is enforced. If true, while inserting into the table, sorting is enforced.</description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.map.aggr</name>
+    <value>true</value>
+    <description>Whether to use map-side aggregation in Hive Group By queries.</description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.optimize.bucketmapjoin</name>
+    <value>true</value>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.optimize.bucketmapjoin.sortedmerge</name>
+    <value>true</value>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.mapred.reduce.tasks.speculative.execution</name>
+    <value>false</value>
+    <description>Whether speculative execution for reducers should be turned on.</description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.auto.convert.join</name>
+    <value>true</value>
+    <description>Whether Hive enable the optimization about converting common
+      join into mapjoin based on the input file size.</description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.auto.convert.sortmerge.join</name>
+    <value>true</value>
+    <description>Will the join be automatically converted to a sort-merge join, if the joined tables pass
+      the criteria for sort-merge join.
+    </description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.auto.convert.sortmerge.join.noconditionaltask</name>
+    <value>true</value>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.auto.convert.join.noconditionaltask</name>
+    <value>true</value>
+    <description>Whether Hive enable the optimization about converting common join into mapjoin based on the input file
+      size. If this paramater is on, and the sum of size for n-1 of the tables/partitions for a n-way join is smaller than the
+      specified size, the join is directly converted to a mapjoin (there is no conditional task).
+    </description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.auto.convert.join.noconditionaltask.size</name>
+    <value>1000000000</value>
+    <description>If hive.auto.convert.join.noconditionaltask is off, this parameter does not take affect. However, if it
+      is on, and the sum of size for n-1 of the tables/partitions for a n-way join is smaller than this size, the join is directly
+      converted to a mapjoin(there is no conditional task). The default is 10MB.
+    </description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.optimize.reducededuplication.min.reducer</name>
+    <value>1</value>
+    <description>Reduce deduplication merges two RSs by moving key/parts/reducer-num of the child RS to parent RS.
+      That means if reducer-num of the child RS is fixed (order by or forced bucketing) and small, it can make very slow, single MR.
+      The optimization will be disabled if number of reducers is less than specified value.
+    </description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.optimize.mapjoin.mapreduce</name>
+    <value>true</value>
+    <description>If hive.auto.convert.join is off, this parameter does not take
+      affect. If it is on, and if there are map-join jobs followed by a map-reduce
+      job (for e.g a group by), each map-only job is merged with the following
+      map-reduce job.
+    </description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.mapjoin.bucket.cache.size</name>
+    <value>10000</value>
+    <description>
+      Size per reducer.The default is 1G, i.e if the input size is 10G, it
+      will use 10 reducers.
+    </description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.vectorized.execution.enabled</name>
+    <value>false</value>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.optimize.reducededuplication</name>
+    <value>true</value>
+    <on-ambari-upgrade add="true"/>
+  </property>
+  <property>
+    <name>hive.optimize.index.filter</name>
+    <value>true</value>
+    <description>
+    Whether to enable automatic use of indexes
+    </description>
+    <on-ambari-upgrade add="true"/>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/50c770ab/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_extension/HIVE/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_extension/HIVE/metainfo.xml b/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_extension/HIVE/metainfo.xml
new file mode 100644
index 0000000..15b95fa
--- /dev/null
+++ b/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_extension/HIVE/metainfo.xml
@@ -0,0 +1,47 @@
+<?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>
+  <user>root</user>
+  <comment>Data warehouse system for ad-hoc queries &amp; analysis of large datasets and table &amp; storage management
+    service
+  </comment>
+  <version>0.11.0.2.0.5.0</version>
+
+  <components>
+    <component>
+      <name>HIVE_METASTORE</name>
+      <category>MASTER</category>
+    </component>
+    <component>
+      <name>HIVE_SERVER</name>
+      <category>MASTER</category>
+    </component>
+    <component>
+      <name>MYSQL_SERVER</name>
+      <category>MASTER</category>
+    </component>
+    <component>
+      <name>HIVE_CLIENT</name>
+      <category>CLIENT</category>
+    </component>
+  </components>
+  <configuration-dependencies>
+    <config-type>global</config-type>
+    <config-type>hive-site</config-type>
+  </configuration-dependencies>
+</metainfo>

http://git-wip-us.apache.org/repos/asf/ambari/blob/50c770ab/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_extension/HIVE/package/.hash
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_extension/HIVE/package/.hash b/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_extension/HIVE/package/.hash
new file mode 100644
index 0000000..9550dab
--- /dev/null
+++ b/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_extension/HIVE/package/.hash
@@ -0,0 +1 @@
+dummy_hash
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/50c770ab/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_extension/HIVE/package/files/startHiveserver2.sh
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_extension/HIVE/package/files/startHiveserver2.sh b/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_extension/HIVE/package/files/startHiveserver2.sh
new file mode 100644
index 0000000..fa90c2f
--- /dev/null
+++ b/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_extension/HIVE/package/files/startHiveserver2.sh
@@ -0,0 +1,22 @@
+#
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#
+HIVE_CONF_DIR=$4 /usr/lib/hive/bin/hiveserver2 -hiveconf hive.metastore.uris=' ' > $1 2> $2 &
+echo $!|cat>$3

http://git-wip-us.apache.org/repos/asf/ambari/blob/50c770ab/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_extension/HIVE/package/scripts/status_params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_extension/HIVE/package/scripts/status_params.py b/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_extension/HIVE/package/scripts/status_params.py
new file mode 100644
index 0000000..7770975
--- /dev/null
+++ b/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_extension/HIVE/package/scripts/status_params.py
@@ -0,0 +1,30 @@
+#!/usr/bin/env python
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""
+
+from resource_management import *
+
+config = Script.get_config()
+
+hive_pid_dir = config['configurations']['global']['hive_pid_dir']
+hive_pid = 'hive-server.pid'
+
+hive_metastore_pid = 'hive.pid'
+
+hcat_pid_dir = config['configurations']['global']['hcat_pid_dir'] #hcat_pid_dir

http://git-wip-us.apache.org/repos/asf/ambari/blob/50c770ab/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_extension/HIVE/package/templates/hcat-env.sh.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_extension/HIVE/package/templates/hcat-env.sh.j2 b/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_extension/HIVE/package/templates/hcat-env.sh.j2
new file mode 100644
index 0000000..2a35240
--- /dev/null
+++ b/ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_extension/HIVE/package/templates/hcat-env.sh.j2
@@ -0,0 +1,25 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+JAVA_HOME={{java64_home}}
+HCAT_PID_DIR={{hcat_pid_dir}}/
+HCAT_LOG_DIR={{hcat_log_dir}}/
+HCAT_CONF_DIR={{hcat_conf_dir}}
+HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}
+#DBROOT is the path where the connector jars are downloaded
+DBROOT={{hcat_dbroot}}
+USER={{hcat_user}}
+METASTORE_PORT={{metastore_port}}