You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2017/06/13 14:01:25 UTC

[2/2] ambari git commit: AMBARI-21239. Ambari leaves a lot of processes from Hive alert on the machine (aonishuk)

AMBARI-21239. Ambari leaves a lot of processes from Hive alert on the machine (aonishuk)


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

Branch: refs/heads/branch-2.5
Commit: 558d9e3da6f5706f711b8f701bdb1e2b541e8f94
Parents: f2c91c2
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Tue Jun 13 17:01:10 2017 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Tue Jun 13 17:01:10 2017 +0300

----------------------------------------------------------------------
 .../libraries/functions/hive_check.py                 |  5 ++++-
 .../stacks/2.0.6/HIVE/test_hive_service_check.py      | 14 +++++++++++---
 2 files changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/558d9e3d/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py b/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py
index 92d16a2..d8f6696 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py
@@ -21,6 +21,7 @@ limitations under the License.
 from resource_management.core import global_lock
 from resource_management.core.resources import Execute
 from resource_management.libraries.functions import format
+from resource_management.core.signal_utils import TerminateStrategy
 
 
 def check_thrift_port_sasl(address, port, hive_auth="NOSASL", key=None, kinitcmd=None, smokeuser='ambari-qa',
@@ -76,4 +77,6 @@ def check_thrift_port_sasl(address, port, hive_auth="NOSASL", key=None, kinitcmd
   Execute(cmd,
     user=smokeuser,
     path=["/bin/", "/usr/bin/", "/usr/lib/hive/bin/", "/usr/sbin/"],
-    timeout=check_command_timeout)
+    timeout=check_command_timeout,
+    timeout_kill_strategy=TerminateStrategy.KILL_PROCESS_TREE,
+  )

http://git-wip-us.apache.org/repos/asf/ambari/blob/558d9e3d/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 52da83a..6877519 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
@@ -46,6 +46,7 @@ class TestServiceCheck(RMFTestCase):
                               path = ['/bin/', '/usr/bin/', '/usr/lib/hive/bin/', '/usr/sbin/'],
                               user = 'ambari-qa',
                               timeout = 30,
+                              timeout_kill_strategy = 2,
                               )
     self.assertResourceCalled('File', '/tmp/hcatSmoke.sh',
                         content = StaticFile('hcatSmoke.sh'),
@@ -160,6 +161,7 @@ class TestServiceCheck(RMFTestCase):
                               path = ['/bin/', '/usr/bin/', '/usr/lib/hive/bin/', '/usr/sbin/'],
                               user = 'ambari-qa',
                               timeout = 30,
+                              timeout_kill_strategy = 2,
                               )
     self.assertResourceCalled('File', '/tmp/hcatSmoke.sh',
                         content = StaticFile('hcatSmoke.sh'),
@@ -276,7 +278,9 @@ class TestServiceCheck(RMFTestCase):
     self.assertResourceCalled('Execute', "! beeline -u 'jdbc:hive2://c6402.ambari.apache.org:10010/;transportMode=binary'  -e '' 2>&1| awk '{print}'|grep -i -e 'Connection refused' -e 'Invalid URL'",
       path = ['/bin/', '/usr/bin/', '/usr/lib/hive/bin/', '/usr/sbin/'],
       timeout = 30,
-      user = 'ambari-qa')
+      user = 'ambari-qa',
+      timeout_kill_strategy = 2,
+    )
 
     self.assertResourceCalled('File', '/tmp/hcatSmoke.sh',
       content = StaticFile('hcatSmoke.sh'),
@@ -313,13 +317,17 @@ class TestServiceCheck(RMFTestCase):
       "! beeline -u 'jdbc:hive2://c6402.ambari.apache.org:10010/;transportMode=binary'  -e '' 2>&1| awk '{print}'|grep -i -e 'Connection refused' -e 'Invalid URL'",
       path = ['/bin/', '/usr/bin/', '/usr/lib/hive/bin/', '/usr/sbin/'],
       timeout = 30,
-      user = 'ambari-qa')
+      user = 'ambari-qa',
+      timeout_kill_strategy = 2,
+    )
 
     self.assertResourceCalled('Execute',
       "! beeline -u 'jdbc:hive2://c6402.ambari.apache.org:10500/;transportMode=binary'  -e '' 2>&1| awk '{print}'|grep -i -e 'Connection refused' -e 'Invalid URL'",
       path = ['/bin/', '/usr/bin/', '/usr/lib/hive/bin/', '/usr/sbin/'],
       timeout = 30,
-      user = 'ambari-qa')
+      user = 'ambari-qa',
+      timeout_kill_strategy = 2,
+    )
 
     # LLAP call
     self.assertResourceCalled('Execute',