You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Dmitry Lysnichenko (JIRA)" <ji...@apache.org> on 2015/05/06 13:47:00 UTC
[jira] [Created] (AMBARI-10953) Hive Server 2 Process Check Should
Always Use Beeline Instead of TCP Sockets
Dmitry Lysnichenko created AMBARI-10953:
-------------------------------------------
Summary: Hive Server 2 Process Check Should Always Use Beeline Instead of TCP Sockets
Key: AMBARI-10953
URL: https://issues.apache.org/jira/browse/AMBARI-10953
Project: Ambari
Issue Type: Bug
Components: ambari-server
Reporter: Dmitry Lysnichenko
Assignee: Dmitry Lysnichenko
Fix For: 2.1.0
{{ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py}} uses a combination of {{beeline}} and sockets to check the availability of the Hive server.
Hive Server can be configured to run in either {{binary}} or {{http}} mode, as configured by the following property in {{hive-site}}:
{code}
<property>
<name>hive.server2.transport.mode</name>
<value>binary</value>
</property>
{code}
The python, however, only runs the {{beeline}} command if KERBEROS is in use _AND_ the mode is {{binary}}. This not correct in that {{beeline}} can connect via both TCP and HTTP:
{code}
beeline -u 'jdbc:hive2://c6402.ambari.apache.org:10000/;transportMode=binary' -e ''
beeline -u 'jdbc:hive2://c6402.ambari.apache.org:10001/;transportMode=http' -e ''
{code}
Additionally, {{alert_hive_thrift_port.py}} needs to provide a better error message. Currently, the code
{code}
try:
hive_check.check_thrift_port_sasl(host_name, port,
hive_server2_authentication, hive_server_principal, kinitcmd, smokeuser,
transport_mode = transport_mode)
is_thrift_port_ok = True
except:
is_thrift_port_ok = False
if is_thrift_port_ok == True:
result_code = 'OK'
total_time = time.time() - start_time
label = OK_MESSAGE % (total_time, port)
else:
result_code = 'CRITICAL'
label = CRITICAL_MESSAGE.format(host_name,port)
{code}
will not show the exact error message and instead just say that it couldn't connect to host:port, which is wrong since that implies the only failure could be TCP-based. I recommend putting the exception message in as well.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)