ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject ambari git commit: AMBARI-17697 - Hive Restart Failed During RU Due To Missing SQL JAR (jonathanhurley)
Date Thu, 14 Jul 2016 15:45:09 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 d27ad50da -> c6478e4ab


AMBARI-17697 - Hive Restart Failed During RU Due To Missing SQL JAR (jonathanhurley)


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

Branch: refs/heads/branch-2.4
Commit: c6478e4abb5a799e4a10838c9c651caecad0fec7
Parents: d27ad50
Author: Jonathan Hurley <jhurley@hortonworks.com>
Authored: Wed Jul 13 17:12:33 2016 -0400
Committer: Jonathan Hurley <jhurley@hortonworks.com>
Committed: Thu Jul 14 11:44:57 2016 -0400

----------------------------------------------------------------------
 .../0.12.0.2.0/package/scripts/params_linux.py  | 21 ++++++++-----
 .../0.12.0.2.0/package/scripts/status_params.py | 16 ++++------
 .../stacks/HDP/2.2/upgrades/upgrade-2.3.xml     |  3 +-
 .../stacks/HDP/2.2/upgrades/upgrade-2.4.xml     |  2 ++
 .../stacks/HDP/2.3/upgrades/upgrade-2.4.xml     |  4 +++
 .../stacks/HDP/2.3/upgrades/upgrade-2.5.xml     |  3 ++
 .../stacks/HDP/2.4/upgrades/upgrade-2.5.xml     |  3 ++
 .../stacks/2.0.6/HIVE/test_hcat_client.py       |  8 ++---
 .../stacks/2.0.6/HIVE/test_hive_client.py       | 32 ++++++++++----------
 .../stacks/2.0.6/HIVE/test_hive_metastore.py    | 24 +++++++--------
 .../stacks/2.0.6/HIVE/test_hive_server.py       | 26 ++++++++--------
 .../2.0.6/HIVE/test_hive_service_check.py       |  2 +-
 .../stacks/2.0.6/HIVE/test_webhcat_server.py    |  6 ++--
 .../stacks/2.1/HIVE/test_hive_metastore.py      | 18 +++++------
 14 files changed, 92 insertions(+), 76 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c6478e4a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
index 63a1100..c7ed801 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
@@ -79,9 +79,13 @@ current_version = default("/hostLevelParams/current_version", None)
 # downgrade_from_version provides the source-version the downgrade is happening from
 downgrade_from_version = default("/commandParams/downgrade_from_version", None)
 
+# determine which version to use for checking stack features; version is the most accurate
but
+# may not always be available (especially on first install of the cluster)
+version_for_stack_feature_checks = version if not None else stack_version_unformatted
+
 # Upgrade direction
 upgrade_direction = default("/commandParams/upgrade_direction", None)
-stack_supports_ranger_kerberos = check_stack_feature(StackFeature.RANGER_KERBEROS_SUPPORT,
stack_version_formatted_major)
+stack_supports_ranger_kerberos = check_stack_feature(StackFeature.RANGER_KERBEROS_SUPPORT,
version_for_stack_feature_checks)
 
 # component ROLE directory (like hive-metastore or hive-server2-hive2)
 component_directory = status_params.component_directory
@@ -99,7 +103,10 @@ hive_user_home_dir = "/home/hive"
 # starting on stacks where HSI is supported, we need to begin using the 'hive2' schematool
 hive_server2_hive2_dir = None
 hive_server2_hive2_lib = None
-if check_stack_feature(StackFeature.HIVE_SERVER_INTERACTIVE, stack_version_unformatted):
+
+version = default("/commandParams/version", None)
+
+if check_stack_feature(StackFeature.HIVE_SERVER_INTERACTIVE, version_for_stack_feature_checks):
   # the name of the hiveserver2-hive2 component
   hive_server2_hive2_component = status_params.SERVER_ROLE_DIRECTORY_MAP["HIVE_SERVER_INTERACTIVE"]
 
@@ -179,16 +186,16 @@ tarballs_mode = 0444
 
 purge_tables = "false"
 # Starting from stack version for feature hive_purge_table drop should be executed with purge
-if check_stack_feature(StackFeature.HIVE_PURGE_TABLE, stack_version_formatted_major):
+if check_stack_feature(StackFeature.HIVE_PURGE_TABLE, version_for_stack_feature_checks):
   purge_tables = 'true'
 
-if check_stack_feature(StackFeature.HIVE_WEBHCAT_SPECIFIC_CONFIGS, stack_version_formatted_major):
+if check_stack_feature(StackFeature.HIVE_WEBHCAT_SPECIFIC_CONFIGS, version_for_stack_feature_checks):
   # this is NOT a typo.  Configs for hcatalog/webhcat point to a
   # specific directory which is NOT called 'conf'
   hcat_conf_dir = format('{stack_root}/current/hive-webhcat/etc/hcatalog')
   config_dir = format('{stack_root}/current/hive-webhcat/etc/webhcat')
 
-if check_stack_feature(StackFeature.HIVE_METASTORE_SITE_SUPPORT, stack_version_formatted_major):
+if check_stack_feature(StackFeature.HIVE_METASTORE_SITE_SUPPORT, version_for_stack_feature_checks):
   hive_metastore_site_supported = True
 
 execute_path = os.environ['PATH'] + os.pathsep + hive_bin + os.pathsep + hadoop_bin_dir
@@ -383,7 +390,7 @@ start_metastore_path = format("{tmp_dir}/start_metastore_script")
 hadoop_heapsize = config['configurations']['hadoop-env']['hadoop_heapsize']
 
 if 'role' in config and config['role'] in ["HIVE_SERVER", "HIVE_METASTORE"]:
-  if check_stack_feature(StackFeature.HIVE_ENV_HEAPSIZE, stack_version_formatted_major):
+  if check_stack_feature(StackFeature.HIVE_ENV_HEAPSIZE, version_for_stack_feature_checks):
     hive_heapsize = config['configurations']['hive-env']['hive.heapsize']
   else:
     hive_heapsize = config['configurations']['hive-site']['hive.heapsize']
@@ -602,7 +609,7 @@ if has_hive_interactive:
   pass
 
 # ranger host
-stack_supports_ranger_audit_db = check_stack_feature(StackFeature.RANGER_AUDIT_DB_SUPPORT,
stack_version_formatted_major)
+stack_supports_ranger_audit_db = check_stack_feature(StackFeature.RANGER_AUDIT_DB_SUPPORT,
version_for_stack_feature_checks)
 ranger_admin_hosts = default("/clusterHostInfo/ranger_admin_hosts", [])
 has_ranger_admin = not len(ranger_admin_hosts) == 0
 xml_configurations_supported = config['configurations']['ranger-env']['xml_configurations_supported']

http://git-wip-us.apache.org/repos/asf/ambari/blob/c6478e4a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/status_params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/status_params.py
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/status_params.py
index b148849..7122ce0 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/status_params.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/status_params.py
@@ -86,31 +86,27 @@ else:
   # default configuration directories
   hadoop_conf_dir = conf_select.get_hadoop_conf_dir()
   hadoop_bin_dir = stack_select.get_hadoop_dir("bin")
-  webhcat_conf_dir = '/etc/hive-webhcat/conf'
   hive_etc_dir_prefix = "/etc/hive"
   hive_interactive_etc_dir_prefix = "/etc/hive2"
-  hive_conf_dir = "/etc/hive/conf"
-  hive_client_conf_dir = "/etc/hive/conf"
 
   hive_server_conf_dir = "/etc/hive/conf.server"
   hive_server_interactive_conf_dir = "/etc/hive2/conf.server"
 
-  if stack_version_formatted_major and check_stack_feature(StackFeature.ROLLING_UPGRADE,
stack_version_formatted_major):
-    webhcat_conf_dir = format("{stack_root}/current/hive-webhcat/conf")
-    hive_conf_dir = format("{stack_root}/current/{component_directory}/conf")
-    hive_client_conf_dir = format("{stack_root}/current/{component_directory}/conf")
+  webhcat_conf_dir = format("{stack_root}/current/hive-webhcat/conf")
+  hive_conf_dir = format("{stack_root}/current/{component_directory}/conf")
+  hive_client_conf_dir = format("{stack_root}/current/{component_directory}/conf")
 
-  if stack_version_formatted_major and check_stack_feature(StackFeature.CONFIG_VERSIONING,
stack_version_formatted_major):
+  if check_stack_feature(StackFeature.CONFIG_VERSIONING, stack_version_formatted_major):
     hive_server_conf_dir = format("{stack_root}/current/{component_directory}/conf/conf.server")
     hive_conf_dir = hive_server_conf_dir
 
-  if stack_version_formatted_major and check_stack_feature(StackFeature.HIVE_WEBHCAT_SPECIFIC_CONFIGS,
stack_version_formatted_major):
+  if check_stack_feature(StackFeature.HIVE_WEBHCAT_SPECIFIC_CONFIGS, stack_version_formatted_major):
     # this is NOT a typo. Configs for hcatalog/webhcat point to a
     # specific directory which is NOT called 'conf'
     webhcat_conf_dir = format("{stack_root}/current/hive-webhcat/etc/webhcat")
 
   # if stack version supports hive serve interactive
-  if stack_version_formatted_major and check_stack_feature(StackFeature.HIVE_SERVER_INTERACTIVE,
stack_version_formatted_major):
+  if check_stack_feature(StackFeature.HIVE_SERVER_INTERACTIVE, stack_version_formatted_major):
     hive_server_interactive_conf_dir = format("{stack_root}/current/{component_directory_interactive}/conf/conf.server")
 
   hive_config_dir = hive_client_conf_dir

http://git-wip-us.apache.org/repos/asf/ambari/blob/c6478e4a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml
index 2315fc1..a406758 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml
@@ -735,10 +735,11 @@
       <component name="WEBHCAT_SERVER">
         <pre-upgrade>
           <task xsi:type="configure" id="hdp_2_3_0_0_webhcat_server_update_env"/>
-
           <task xsi:type="configure" id="hdp_2_3_0_0_webhcat_server_update_configuration_paths"/>
         </pre-upgrade>
 
+        <pre-downgrade/>
+
         <upgrade>
           <task xsi:type="restart-task"/>
         </upgrade>

http://git-wip-us.apache.org/repos/asf/ambari/blob/c6478e4a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.4.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.4.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.4.xml
index 2f10ddc..72a3018 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.4.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.4.xml
@@ -750,6 +750,8 @@
           <task xsi:type="configure" id="hdp_2_3_0_0_webhcat_server_update_configuration_paths"/>
         </pre-upgrade>
 
+        <pre-downgrade/>
+
         <upgrade>
           <task xsi:type="restart-task"/>
         </upgrade>

http://git-wip-us.apache.org/repos/asf/ambari/blob/c6478e4a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.4.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.4.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.4.xml
index ea365e1..46cda9b 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.4.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.4.xml
@@ -732,6 +732,8 @@
           <task xsi:type="configure" id="hdp_2_4_0_0_webhcat_server_update_configuration_paths"/>
         </pre-upgrade>
 
+        <pre-downgrade/>
+
         <upgrade>
           <task xsi:type="restart-task" />
         </upgrade>
@@ -848,6 +850,8 @@
           <task xsi:type="configure" id ="hdp_2_4_0_0_kafka_broker_deprecate_port"/>
         </pre-upgrade>
 
+        <pre-downgrade/>
+
         <upgrade>
           <task xsi:type="restart-task" />
         </upgrade>

http://git-wip-us.apache.org/repos/asf/ambari/blob/c6478e4a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.5.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.5.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.5.xml
index 4c122e9..98b62c3 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.5.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.5.xml
@@ -685,6 +685,9 @@
         <pre-upgrade>
           <task xsi:type="configure" id="hdp_2_5_0_0_add_spark2_yarn_shuffle"/>
         </pre-upgrade>
+
+        <pre-downgrade/>
+
         <upgrade>
           <task xsi:type="restart-task" />
         </upgrade>

http://git-wip-us.apache.org/repos/asf/ambari/blob/c6478e4a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.5.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.5.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.5.xml
index bbd0fe4..00a4193 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.5.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.5.xml
@@ -679,6 +679,9 @@
         <pre-upgrade>
           <task xsi:type="configure" id="hdp_2_5_0_0_add_spark2_yarn_shuffle"/>
         </pre-upgrade>
+
+        <pre-downgrade/>
+
         <upgrade>
           <task xsi:type="restart-task" />
         </upgrade>

http://git-wip-us.apache.org/repos/asf/ambari/blob/c6478e4a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py
index 54d3e84..c09cd06 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py
@@ -33,7 +33,7 @@ class TestHcatClient(RMFTestCase):
                        stack_version = self.STACK_VERSION,
                        target = RMFTestCase.TARGET_COMMON_SERVICES
     )
-    self.assertResourceCalled('Directory', '/etc/hive/conf',
+    self.assertResourceCalled('Directory', '/usr/hdp/current/hive-server2/conf',
                               owner = 'hcat',
                               group = 'hadoop',
                               create_parents = True,
@@ -51,7 +51,7 @@ class TestHcatClient(RMFTestCase):
       owner = 'hive',
       group = 'hadoop',
       mode = 0644,
-      conf_dir = '/etc/hive/conf',
+      conf_dir = '/usr/hdp/current/hive-server2/conf',
       configurations = self.getConfig()['configurations']['hive-site'],
       configuration_attributes = self.getConfig()['configuration_attributes']['hive-site']
     )
@@ -72,7 +72,7 @@ class TestHcatClient(RMFTestCase):
                          stack_version = self.STACK_VERSION,
                          target = RMFTestCase.TARGET_COMMON_SERVICES
     )
-    self.assertResourceCalled('Directory', '/etc/hive/conf',
+    self.assertResourceCalled('Directory', '/usr/hdp/current/hive-server2/conf',
                               create_parents = True,
                               owner = 'hcat',
                               group = 'hadoop',
@@ -90,7 +90,7 @@ class TestHcatClient(RMFTestCase):
       owner = 'hive',
       group = 'hadoop',
       mode = 0644,
-      conf_dir = '/etc/hive/conf',
+      conf_dir = '/usr/hdp/current/hive-server2/conf',
       configurations = self.getConfig()['configurations']['hive-site'],
       configuration_attributes = self.getConfig()['configuration_attributes']['hive-site']
     )

http://git-wip-us.apache.org/repos/asf/ambari/blob/c6478e4a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py
index 77d6bdb..b96437d 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py
@@ -36,34 +36,34 @@ class TestHiveClient(RMFTestCase):
     self.assertResourceCalled('Directory', '/etc/hive',
         mode = 0755
     )
-    self.assertResourceCalled('Directory', '/etc/hive/conf',
+    self.assertResourceCalled('Directory', '/usr/hdp/current/hive-client/conf',
         owner = 'hive',
         group = 'hadoop',
         create_parents = True,
     )
     self.assertResourceCalled('XmlConfig', 'mapred-site.xml',
         group = 'hadoop',
-        conf_dir = '/etc/hive/conf',
+        conf_dir = '/usr/hdp/current/hive-client/conf',
         mode = 0644,
         configuration_attributes = self.getConfig()['configuration_attributes']['mapred-site'],
         owner = 'hive',
         configurations = self.getConfig()['configurations']['mapred-site'],
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-default.xml.template',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-client/conf/hive-default.xml.template',
         owner = 'hive',
         group = 'hadoop',
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-env.sh.template',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-client/conf/hive-env.sh.template',
         owner = 'hive',
         group = 'hadoop',
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-exec-log4j.properties',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-client/conf/hive-exec-log4j.properties',
         content = 'log4jproperties\nline2',
         owner = 'hive',
         group = 'hadoop',
         mode = 0644,
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-log4j.properties',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-client/conf/hive-log4j.properties',
         content = 'log4jproperties\nline2',
         owner = 'hive',
         group = 'hadoop',
@@ -71,13 +71,13 @@ class TestHiveClient(RMFTestCase):
     )
     self.assertResourceCalled('XmlConfig', 'hive-site.xml',
                               group = 'hadoop',
-                              conf_dir = '/etc/hive/conf',
+                              conf_dir = '/usr/hdp/current/hive-client/conf',
                               mode = 0644,
                               configuration_attributes = self.getConfig()['configuration_attributes']['hive-site'],
                               owner = 'hive',
                               configurations = self.getConfig()['configurations']['hive-site'],
                               )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-env.sh',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-client/conf/hive-env.sh',
                               content = InlineTemplate(self.getConfig()['configurations']['hive-env']['content']),
                               owner = 'hive',
                               group = 'hadoop',
@@ -112,34 +112,34 @@ class TestHiveClient(RMFTestCase):
     self.assertResourceCalled('Directory', '/etc/hive',
         mode = 0755
     )
-    self.assertResourceCalled('Directory', '/etc/hive/conf',
+    self.assertResourceCalled('Directory', '/usr/hdp/current/hive-client/conf',
         owner = 'hive',
         group = 'hadoop',
         create_parents = True,
     )
     self.assertResourceCalled('XmlConfig', 'mapred-site.xml',
         group = 'hadoop',
-        conf_dir = '/etc/hive/conf',
+        conf_dir = '/usr/hdp/current/hive-client/conf',
         mode = 0644,
         configuration_attributes = self.getConfig()['configuration_attributes']['mapred-site'],
         owner = 'hive',
         configurations = self.getConfig()['configurations']['mapred-site'],
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-default.xml.template',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-client/conf/hive-default.xml.template',
         owner = 'hive',
         group = 'hadoop',
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-env.sh.template',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-client/conf/hive-env.sh.template',
         owner = 'hive',
         group = 'hadoop',
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-exec-log4j.properties',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-client/conf/hive-exec-log4j.properties',
         content = 'log4jproperties\nline2',
         owner = 'hive',
         group = 'hadoop',
         mode = 0644,
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-log4j.properties',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-client/conf/hive-log4j.properties',
         content = 'log4jproperties\nline2',
         owner = 'hive',
         group = 'hadoop',
@@ -147,13 +147,13 @@ class TestHiveClient(RMFTestCase):
     )
     self.assertResourceCalled('XmlConfig', 'hive-site.xml',
                               group = 'hadoop',
-                              conf_dir = '/etc/hive/conf',
+                              conf_dir = '/usr/hdp/current/hive-client/conf',
                               mode = 0644,
                               configuration_attributes = self.getConfig()['configuration_attributes']['hive-site'],
                               owner = 'hive',
                               configurations = self.getConfig()['configurations']['hive-site'],
                               )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-env.sh',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-client/conf/hive-env.sh',
                               content = InlineTemplate(self.getConfig()['configurations']['hive-env']['content']),
                               owner = 'hive',
                               group = 'hadoop',

http://git-wip-us.apache.org/repos/asf/ambari/blob/c6478e4a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py
index 4909c77..c79e773 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py
@@ -152,35 +152,35 @@ class TestHiveMetastore(RMFTestCase):
     self.assertResourceCalled('Directory', '/etc/hive',
                               mode = 0755,
                               )
-    self.assertResourceCalled('Directory', '/etc/hive/conf',
+    self.assertResourceCalled('Directory', '/usr/hdp/current/hive-server2/conf',
                               owner = 'hive',
                               group = 'hadoop',
                               create_parents = True,
                               )
     self.assertResourceCalled('XmlConfig', 'mapred-site.xml',
                               group = 'hadoop',
-                              conf_dir = '/etc/hive/conf',
+                              conf_dir = '/usr/hdp/current/hive-server2/conf',
                               mode = 0644,
                               configuration_attributes = {u'final': {u'mapred.healthChecker.script.path':
u'true',
                                                                      u'mapreduce.jobtracker.staging.root.dir':
u'true'}},
                               owner = 'hive',
                               configurations = self.getConfig()['configurations']['mapred-site'],
                               )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-default.xml.template',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-server2/conf/hive-default.xml.template',
                               owner = 'hive',
                               group = 'hadoop',
                               )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-env.sh.template',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-server2/conf/hive-env.sh.template',
                               owner = 'hive',
                               group = 'hadoop',
                               )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-exec-log4j.properties',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-server2/conf/hive-exec-log4j.properties',
                               content = 'log4jproperties\nline2',
                               owner = 'hive',
                               group = 'hadoop',
                               mode = 0644,
                               )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-log4j.properties',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-server2/conf/hive-log4j.properties',
                               content = 'log4jproperties\nline2',
                               owner = 'hive',
                               group = 'hadoop',
@@ -265,35 +265,35 @@ class TestHiveMetastore(RMFTestCase):
     self.assertResourceCalled('Directory', '/etc/hive',
                               mode = 0755,
                               )
-    self.assertResourceCalled('Directory', '/etc/hive/conf',
+    self.assertResourceCalled('Directory', '/usr/hdp/current/hive-server2/conf',
                               owner = 'hive',
                               group = 'hadoop',
                               create_parents = True,
                               )
     self.assertResourceCalled('XmlConfig', 'mapred-site.xml',
                               group = 'hadoop',
-                              conf_dir = '/etc/hive/conf',
+                              conf_dir = '/usr/hdp/current/hive-server2/conf',
                               mode = 0644,
                               configuration_attributes = {u'final': {u'mapred.healthChecker.script.path':
u'true',
                                                                      u'mapreduce.jobtracker.staging.root.dir':
u'true'}},
                               owner = 'hive',
                               configurations = self.getConfig()['configurations']['mapred-site'],
                               )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-default.xml.template',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-server2/conf/hive-default.xml.template',
                               owner = 'hive',
                               group = 'hadoop',
                               )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-env.sh.template',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-server2/conf/hive-env.sh.template',
                               owner = 'hive',
                               group = 'hadoop',
                               )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-exec-log4j.properties',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-server2/conf/hive-exec-log4j.properties',
                               content = 'log4jproperties\nline2',
                               owner = 'hive',
                               group = 'hadoop',
                               mode = 0644,
                               )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-log4j.properties',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-server2/conf/hive-log4j.properties',
                               content = 'log4jproperties\nline2',
                               owner = 'hive',
                               group = 'hadoop',

http://git-wip-us.apache.org/repos/asf/ambari/blob/c6478e4a/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 6c46267..d290310 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
@@ -414,7 +414,7 @@ class TestHiveServer(RMFTestCase):
     self.assertResourceCalled('Directory', '/etc/hive',
                               mode=0755,
     )
-    self.assertResourceCalled('Directory', '/etc/hive/conf',
+    self.assertResourceCalled('Directory', '/usr/hdp/current/hive-server2/conf',
                               owner='hive',
                               group='hadoop',
                               create_parents = True,
@@ -422,28 +422,28 @@ class TestHiveServer(RMFTestCase):
 
     self.assertResourceCalled('XmlConfig', 'mapred-site.xml',
                               group='hadoop',
-                              conf_dir='/etc/hive/conf',
+                              conf_dir='/usr/hdp/current/hive-server2/conf',
                               mode=0644,
                               configuration_attributes={u'final': {u'mapred.healthChecker.script.path':
u'true',
                                                                    u'mapreduce.jobtracker.staging.root.dir':
u'true'}},
                               owner='hive',
                               configurations=self.getConfig()['configurations']['mapred-site'],
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-default.xml.template',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-server2/conf/hive-default.xml.template',
                               owner='hive',
                               group='hadoop',
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-env.sh.template',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-server2/conf/hive-env.sh.template',
                               owner='hive',
                               group='hadoop',
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-exec-log4j.properties',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-server2/conf/hive-exec-log4j.properties',
                               content='log4jproperties\nline2',
                               owner='hive',
                               group='hadoop',
                               mode=0644,
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-log4j.properties',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-server2/conf/hive-log4j.properties',
                               content='log4jproperties\nline2',
                               owner='hive',
                               group='hadoop',
@@ -616,35 +616,35 @@ class TestHiveServer(RMFTestCase):
     self.assertResourceCalled('Directory', '/etc/hive',
                               mode=0755,
     )
-    self.assertResourceCalled('Directory', '/etc/hive/conf',
+    self.assertResourceCalled('Directory', '/usr/hdp/current/hive-server2/conf',
                               owner='hive',
                               group='hadoop',
                               create_parents = True,
     )
     self.assertResourceCalled('XmlConfig', 'mapred-site.xml',
                               group='hadoop',
-                              conf_dir='/etc/hive/conf',
+                              conf_dir='/usr/hdp/current/hive-server2/conf',
                               mode=0644,
                               configuration_attributes={u'final': {u'mapred.healthChecker.script.path':
u'true',
                                                                    u'mapreduce.jobtracker.staging.root.dir':
u'true'}},
                               owner='hive',
                               configurations=self.getConfig()['configurations']['mapred-site'],
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-default.xml.template',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-server2/conf/hive-default.xml.template',
                               owner='hive',
                               group='hadoop',
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-env.sh.template',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-server2/conf/hive-env.sh.template',
                               owner='hive',
                               group='hadoop',
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-exec-log4j.properties',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-server2/conf/hive-exec-log4j.properties',
                               content='log4jproperties\nline2',
                               owner='hive',
                               group='hadoop',
                               mode=0644,
     )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-log4j.properties',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-server2/conf/hive-log4j.properties',
                               content='log4jproperties\nline2',
                               owner='hive',
                               group='hadoop',
@@ -856,7 +856,7 @@ From source with checksum 150f554beae04f76f814f59549dead8b"""
                        target = RMFTestCase.TARGET_COMMON_SERVICES
     )
 
-    get_params_mock.assert_called_with('/etc/hive/conf', {'hive-site.xml': "XML"})
+    get_params_mock.assert_called_with('/usr/hdp/current/hive-server2/conf', {'hive-site.xml':
"XML"})
     build_exp_mock.assert_called_with('hive-site', props_value_check, props_empty_check,
props_read_check)
     put_structured_out_mock.assert_called_with({"securityState": "SECURED_KERBEROS"})
     self.assertTrue(cached_kinit_executor_mock.call_count, 2)

http://git-wip-us.apache.org/repos/asf/ambari/blob/c6478e4a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py
index a8b5421..273bd96 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py
@@ -283,7 +283,7 @@ class TestServiceCheck(RMFTestCase):
       content = StaticFile('hcatSmoke.sh'),
       mode = 0755)
 
-    self.assertResourceCalled('Execute', "env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 /tmp/hcatSmoke.sh
hcatsmoke prepare false",
+    self.assertResourceCalled('Execute', "env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 /tmp/hcatSmoke.sh
hcatsmoke prepare true",
         logoutput = True,
         path = ['/usr/sbin','/usr/local/bin','/bin','/usr/bin', '/bin:/usr/hdp/current/hadoop-client/bin:/usr/hdp/2.3.0.0-1234/hive/bin'],
         tries = 3,

http://git-wip-us.apache.org/repos/asf/ambari/blob/c6478e4a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py
index f71bba9..683c953 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py
@@ -234,7 +234,7 @@ class TestWebHCatServer(RMFTestCase):
                               owner = 'hcat',
                               group = 'hadoop',
                               )
-    self.assertResourceCalled('Directory', '/etc/hive-webhcat/conf',
+    self.assertResourceCalled('Directory', '/usr/hdp/current/hive-webhcat/conf',
         cd_access = 'a',
         create_parents = True
     )
@@ -280,7 +280,7 @@ class TestWebHCatServer(RMFTestCase):
                               owner = 'hcat',
                               group = 'hadoop',
                               )
-    self.assertResourceCalled('Directory', '/etc/hive-webhcat/conf',
+    self.assertResourceCalled('Directory', '/usr/hdp/current/hive-webhcat/conf',
         cd_access = 'a',
         create_parents = True
     )
@@ -336,7 +336,7 @@ class TestWebHCatServer(RMFTestCase):
 
     build_exp_mock.assert_called_with('hive-site', hive_props_value_check, hive_props_empty_check,
hive_props_read_check)
     # get_params_mock.assert_called_with(status_params.hive_conf_dir, {'hive-site.xml': "XML"})
-    get_params_mock.assert_called_with('/etc/hive-webhcat/conf', {'webhcat-site.xml': "XML"})
+    get_params_mock.assert_called_with('/usr/hdp/current/hive-webhcat/conf', {'webhcat-site.xml':
"XML"})
     put_structured_out_mock.assert_called_with({"securityState": "SECURED_KERBEROS"})
     self.assertTrue(cached_kinit_executor_mock.call_count, 2)
     cached_kinit_executor_mock.assert_called_with('/usr/bin/kinit',

http://git-wip-us.apache.org/repos/asf/ambari/blob/c6478e4a/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py b/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py
index 044598d..b398ac8 100644
--- a/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py
+++ b/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py
@@ -190,25 +190,25 @@ class TestHiveMetastore(RMFTestCase):
     self.assertResourceCalled('Directory', '/etc/hive',
                               mode = 0755,
                               )
-    self.assertResourceCalled('Directory', '/etc/hive/conf',
+    self.assertResourceCalled('Directory', '/usr/hdp/current/hive-server2/conf',
                               owner = 'hive',
                               group = 'hadoop',
                               create_parents = True,
                               )
     self.assertResourceCalled('XmlConfig', 'mapred-site.xml',
                               group = 'hadoop',
-                              conf_dir = '/etc/hive/conf',
+                              conf_dir = '/usr/hdp/current/hive-server2/conf',
                               mode = 0644,
                               configuration_attributes = {u'final': {u'mapred.healthChecker.script.path':
u'true',
                                                                      u'mapreduce.jobtracker.staging.root.dir':
u'true'}},
                               owner = 'hive',
                               configurations = self.getConfig()['configurations']['mapred-site'],
                               )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-default.xml.template',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-server2/conf/hive-default.xml.template',
                               owner = 'hive',
                               group = 'hadoop',
                               )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-env.sh.template',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-server2/conf/hive-env.sh.template',
                               owner = 'hive',
                               group = 'hadoop',
                               )
@@ -291,25 +291,25 @@ class TestHiveMetastore(RMFTestCase):
     self.assertResourceCalled('Directory', '/etc/hive',
                               mode = 0755,
                               )
-    self.assertResourceCalled('Directory', '/etc/hive/conf',
+    self.assertResourceCalled('Directory', '/usr/hdp/current/hive-server2/conf',
                               owner = 'hive',
                               group = 'hadoop',
                               create_parents = True,
                               )
     self.assertResourceCalled('XmlConfig', 'mapred-site.xml',
                               group = 'hadoop',
-                              conf_dir = '/etc/hive/conf',
+                              conf_dir = '/usr/hdp/current/hive-server2/conf',
                               mode = 0644,
                               configuration_attributes = {u'final': {u'mapred.healthChecker.script.path':
u'true',
                                                                      u'mapreduce.jobtracker.staging.root.dir':
u'true'}},
                               owner = 'hive',
                               configurations = self.getConfig()['configurations']['mapred-site'],
                               )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-default.xml.template',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-server2/conf/hive-default.xml.template',
                               owner = 'hive',
                               group = 'hadoop',
                               )
-    self.assertResourceCalled('File', '/etc/hive/conf/hive-env.sh.template',
+    self.assertResourceCalled('File', '/usr/hdp/current/hive-server2/conf/hive-env.sh.template',
                               owner = 'hive',
                               group = 'hadoop',
                               )
@@ -432,7 +432,7 @@ class TestHiveMetastore(RMFTestCase):
                        target = RMFTestCase.TARGET_COMMON_SERVICES
     )
 
-    get_params_mock.assert_called_with("/etc/hive/conf", {'hive-site.xml': "XML"})
+    get_params_mock.assert_called_with("/usr/hdp/current/hive-server2/conf", {'hive-site.xml':
"XML"})
     build_exp_mock.assert_called_with('hive-site', props_value_check, props_empty_check,
props_read_check)
     put_structured_out_mock.assert_called_with({"securityState": "SECURED_KERBEROS"})
     self.assertTrue(cached_kinit_executor_mock.call_count, 2)


Mime
View raw message