Skip to content
Permalink
Browse files
[AMBARI-24582] - Ambari Alert - HiveServer2 Process - False negative …
…in Certain Scenarios
  • Loading branch information
jonathan-hurley committed Aug 31, 2018
1 parent dd5c769 commit a4b2901a9a16e356c230fb647471e099b2d965ba
Showing 1 changed file with 7 additions and 4 deletions.
@@ -25,8 +25,9 @@


def check_thrift_port_sasl(address, port, hive_auth="NOSASL", key=None, kinitcmd=None, smokeuser='ambari-qa',
transport_mode="binary", http_endpoint="cliservice", ssl=False, ssl_keystore=None,
ssl_password=None, check_command_timeout=30, ldap_username="", ldap_password=""):
hive_user='hive', transport_mode="binary", http_endpoint="cliservice",
ssl=False, ssl_keystore=None, ssl_password=None, check_command_timeout=30,
ldap_username="", ldap_password=""):
"""
Hive thrift SASL port check
"""
@@ -71,8 +72,10 @@ def check_thrift_port_sasl(address, port, hive_auth="NOSASL", key=None, kinitcmd
finally:
kinit_lock.release()

cmd = "! beeline -u '%s' %s -e '' 2>&1| awk '{print}'|grep -i -e 'Connection refused' -e 'Invalid URL'" % \
(format(";".join(beeline_url)), format(credential_str))
# -n the user to connect as (ignored when using the hive principal in the URL, can be different from the user running the beeline command)
# -e ';' executes a SQL commmand of NOOP
cmd = "beeline -n %s -u '%s' %s -e ';' 2>&1 | awk '{print}' | grep -i -e 'Connected to:' -e 'Transaction isolation:'" % \
(format(hive_user), format(";".join(beeline_url)), format(credential_str))

Execute(cmd,
user=smokeuser,

0 comments on commit a4b2901

Please sign in to comment.