MCPcopy Create free account
hub / github.com/apache/impala / create_connection

Function create_connection

tests/common/impala_connection.py:965–985  ·  view source on GitHub ↗
(host_port, use_kerberos=False, protocol=BEESWAX,
    is_hive=False, use_ssl=False, collect_profile_and_log=True, user=None)

Source from the content-addressed store, hash-verified

963
964
965def create_connection(host_port, use_kerberos=False, protocol=BEESWAX,
966 is_hive=False, use_ssl=False, collect_profile_and_log=True, user=None):
967 if protocol == BEESWAX:
968 c = BeeswaxConnection(host_port=host_port, use_kerberos=use_kerberos,
969 user=user, use_ssl=use_ssl)
970 elif protocol == HS2:
971 c = ImpylaHS2Connection(host_port=host_port, use_kerberos=use_kerberos,
972 is_hive=is_hive, use_ssl=use_ssl,
973 collect_profile_and_log=collect_profile_and_log, user=user)
974 else:
975 assert protocol == HS2_HTTP
976 c = ImpylaHS2Connection(host_port=host_port, use_kerberos=use_kerberos,
977 is_hive=is_hive, use_http_transport=True, http_path='cliservice',
978 use_ssl=use_ssl, collect_profile_and_log=collect_profile_and_log,
979 user=user)
980
981 # A hook in conftest sets tests.common.current_node. Skip for Hive connections since
982 # Hive cannot modify client_identifier at runtime.
983 if hasattr(tests.common, "current_node") and not is_hive:
984 c.set_configuration_option("client_identifier", tests.common.current_node)
985 return c
986
987
988def create_ldap_connection(host_port, user, password, use_ssl=False):

Callers 7

create_beeswax_clientMethod · 0.90
create_hs2_clientMethod · 0.90
create_clientMethod · 0.90
cancel_queryMethod · 0.90
client_factoryFunction · 0.90
_smokeMethod · 0.90

Calls 3

BeeswaxConnectionClass · 0.85
ImpylaHS2ConnectionClass · 0.85

Tested by 2

_smokeMethod · 0.72