ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject ambari git commit: AMBARI-18304. WebHCat service check should not depend on Pig (aonishuk)
Date Fri, 02 Sep 2016 14:26:39 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 7c4fefe4e -> 6e6ec3e2e


AMBARI-18304. WebHCat service check should not depend on Pig (aonishuk)


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

Branch: refs/heads/trunk
Commit: 6e6ec3e2ebddb975431199fedd4160aa998b22fd
Parents: 7c4fefe
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Fri Sep 2 17:26:32 2016 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Fri Sep 2 17:26:32 2016 +0300

----------------------------------------------------------------------
 .../HIVE/0.12.0.2.0/package/files/templetonSmoke.sh | 16 +++++++++++-----
 .../HIVE/0.12.0.2.0/package/scripts/params_linux.py |  2 ++
 .../package/scripts/webhcat_service_check.py        |  2 +-
 .../stacks/2.0.6/HIVE/test_hive_service_check.py    |  4 ++--
 4 files changed, 16 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/6e6ec3e2/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/files/templetonSmoke.sh
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/files/templetonSmoke.sh
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/files/templetonSmoke.sh
index dd61631..f5a0da1 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/files/templetonSmoke.sh
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/files/templetonSmoke.sh
@@ -24,11 +24,12 @@ export ttonhost=$1
 export smoke_test_user=$2
 export templeton_port=$3
 export ttonTestScript=$4
-export smoke_user_keytab=$5
-export security_enabled=$6
-export kinit_path_local=$7
-export smokeuser_principal=$8
-export tmp_dir=$9
+export has_pig=$5
+export smoke_user_keytab=$6
+export security_enabled=$7
+export kinit_path_local=$8
+export smokeuser_principal=$9
+export tmp_dir=${10}
 export ttonurl="http://${ttonhost}:${templeton_port}/templeton/v1"
 
 if [[ $security_enabled == "true" ]]; then
@@ -75,6 +76,11 @@ if [[ $security_enabled == "true" ]]; then
   exit 0
 fi
 
+if [[ $has_pig != "True" ]]; then
+  echo "Templeton Pig Smoke Tests are not run, because Pig is not installed"
+  exit 0
+fi
+
 #try pig query
 
 #create, copy post args file

http://git-wip-us.apache.org/repos/asf/ambari/blob/6e6ec3e2/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 d5ad244..1c8a86c 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
@@ -574,6 +574,8 @@ HdfsResource = functools.partial(
   dfs_type = dfs_type
  )
 
+has_pig = 'pig-env' in config['configurations']
+
 # Hive Interactive related
 hive_interactive_hosts = default('/clusterHostInfo/hive_server_interactive_hosts', [])
 has_hive_interactive = len(hive_interactive_hosts) > 0

http://git-wip-us.apache.org/repos/asf/ambari/blob/6e6ec3e2/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_service_check.py
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_service_check.py
index 71f930e..383bd12 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_service_check.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/webhcat_service_check.py
@@ -119,7 +119,7 @@ def webhcat_service_check():
   
   params.HdfsResource(None, action = "execute")
 
-  cmd = format("{tmp_dir}/templetonSmoke.sh {webhcat_server_host[0]} {smokeuser} {templeton_port}
{templeton_test_script} {smokeuser_keytab}"
+  cmd = format("{tmp_dir}/templetonSmoke.sh {webhcat_server_host[0]} {smokeuser} {templeton_port}
{templeton_test_script} {has_pig} {smokeuser_keytab}"
                " {security_param} {kinit_path_local} {smoke_user_principal}"
                " {tmp_dir}")
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/6e6ec3e2/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 273bd96..30b4eb7 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
@@ -135,7 +135,7 @@ class TestServiceCheck(RMFTestCase):
         action = ['execute'], hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore',
         hadoop_conf_dir = '/etc/hadoop/conf',
     )
-    self.assertResourceCalled('Execute', '/tmp/templetonSmoke.sh c6402.ambari.apache.org
ambari-qa 50111 idtest.ambari-qa.1431110511.43.pig no_keytab false /usr/bin/kinit no_principal
/tmp',
+    self.assertResourceCalled('Execute', '/tmp/templetonSmoke.sh c6402.ambari.apache.org
ambari-qa 50111 idtest.ambari-qa.1431110511.43.pig True no_keytab false /usr/bin/kinit no_principal
/tmp',
         logoutput = True,
         path = ['/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin'],
         tries = 3,
@@ -250,7 +250,7 @@ class TestServiceCheck(RMFTestCase):
         action = ['execute'], hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore',
         hadoop_conf_dir = '/etc/hadoop/conf',
     )
-    self.assertResourceCalled('Execute', '/tmp/templetonSmoke.sh c6402.ambari.apache.org
ambari-qa 50111 idtest.ambari-qa.1431110511.43.pig /etc/security/keytabs/smokeuser.headless.keytab
true /usr/bin/kinit ambari-qa@EXAMPLE.COM /tmp',
+    self.assertResourceCalled('Execute', '/tmp/templetonSmoke.sh c6402.ambari.apache.org
ambari-qa 50111 idtest.ambari-qa.1431110511.43.pig True /etc/security/keytabs/smokeuser.headless.keytab
true /usr/bin/kinit ambari-qa@EXAMPLE.COM /tmp',
         logoutput = True,
         path = ['/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin'],
         tries = 3,


Mime
View raw message