ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rle...@apache.org
Subject [14/50] [abbrv] ambari git commit: AMBARI-22346. Beeline connection hangs for longer time when connection to HS2 with metastore DB down (aonishuk)
Date Thu, 16 Nov 2017 19:45:30 GMT
AMBARI-22346. Beeline connection hangs for longer time when connection to HS2 with metastore
DB down (aonishuk)


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 98915a114769c7ddd590854ccf0ab33beabddcf3
Parents: 46ad6c6
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Fri Nov 10 13:28:27 2017 +0200
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Fri Nov 10 13:28:27 2017 +0200

----------------------------------------------------------------------
 .../HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py | 3 ++-
 .../1.2.1/package/scripts/alerts/alert_spark_thrift_port.py  | 8 +++++++-
 .../2.0.0/package/scripts/alerts/alert_spark2_thrift_port.py | 8 +++++++-
 3 files changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/98915a11/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py
index 3560bf8..6db92b0 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_hive_thrift_port.py
@@ -28,6 +28,7 @@ from resource_management.libraries.functions import format
 from resource_management.libraries.functions import get_kinit_path
 from ambari_commons.os_check import OSConst
 from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
+from resource_management.core.signal_utils import TerminateStrategy
 
 OK_MESSAGE = "TCP OK - {0:.3f}s response on port {1}"
 CRITICAL_MESSAGE = "Connection failed on host {0}:{1} ({2})"
@@ -271,7 +272,7 @@ def execute(configurations={}, parameters={}, host_name=None):
 
     start_time = time.time()
     try:
-      Execute(cmd, user=hiveuser, timeout=30)
+      Execute(cmd, user=hiveuser, timeout=30, timeout_kill_strategy=TerminateStrategy.KILL_PROCESS_TREE)
       total_time = time.time() - start_time
       result_code = 'OK'
       label = OK_MESSAGE.format(total_time, port)

http://git-wip-us.apache.org/repos/asf/ambari/blob/98915a11/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_thrift_port.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_thrift_port.py
b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_thrift_port.py
index 3f80fd9..6874cb4 100644
--- a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_thrift_port.py
+++ b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_thrift_port.py
@@ -27,6 +27,7 @@ from resource_management.libraries.script.script import Script
 from resource_management.libraries.functions import get_kinit_path
 from resource_management.core.resources import Execute
 from resource_management.core import global_lock
+from resource_management.core.signal_utils import TerminateStrategy
 
 stack_root = Script.get_stack_root()
 
@@ -140,7 +141,12 @@ def execute(configurations={}, parameters={}, host_name=None):
 
         start_time = time.time()
         try:
-            Execute(cmd, user=hiveruser, path=[beeline_cmd], timeout=CHECK_COMMAND_TIMEOUT_DEFAULT)
+            Execute(cmd,
+                    user=hiveruser,
+                    path=[beeline_cmd],
+                    timeout=CHECK_COMMAND_TIMEOUT_DEFAULT,
+                    timeout_kill_strategy=TerminateStrategy.KILL_PROCESS_TREE,
+            )
             total_time = time.time() - start_time
             result_code = 'OK'
             label = OK_MESSAGE.format(total_time, port)

http://git-wip-us.apache.org/repos/asf/ambari/blob/98915a11/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/alerts/alert_spark2_thrift_port.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/alerts/alert_spark2_thrift_port.py
b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/alerts/alert_spark2_thrift_port.py
index 9e1afea..d3660de 100644
--- a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/alerts/alert_spark2_thrift_port.py
+++ b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/alerts/alert_spark2_thrift_port.py
@@ -27,6 +27,7 @@ from resource_management.libraries.script.script import Script
 from resource_management.libraries.functions import get_kinit_path
 from resource_management.core.resources import Execute
 from resource_management.core import global_lock
+from resource_management.core.signal_utils import TerminateStrategy
 
 
 stack_root = Script.get_stack_root()
@@ -141,7 +142,12 @@ def execute(configurations={}, parameters={}, host_name=None):
 
         start_time = time.time()
         try:
-            Execute(cmd, user=hiveruser, path=[beeline_cmd], timeout=CHECK_COMMAND_TIMEOUT_DEFAULT)
+            Execute(cmd,
+                    user=hiveruser,
+                    path=[beeline_cmd],
+                    timeout=CHECK_COMMAND_TIMEOUT_DEFAULT,
+                    timeout_kill_strategy=TerminateStrategy.KILL_PROCESS_TREE
+            )
             total_time = time.time() - start_time
             result_code = 'OK'
             label = OK_MESSAGE.format(total_time, port)


Mime
View raw message