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

Method connect

tests/common/impala_connection.py:614–629  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

612 return self.__cursor
613
614 def connect(self):
615 host, port = split_host_port(self.__host_port)
616 conn_kwargs = {}
617 if self._is_hive:
618 conn_kwargs['auth_mechanism'] = 'PLAIN'
619 try:
620 self.__impyla_conn = impyla.connect(
621 host=host, port=port, use_http_transport=self.__use_http_transport,
622 http_path=self.__http_path, use_ssl=self.__use_ssl, **conn_kwargs)
623 self.log_client("connected to {0} with impyla {1}".format(
624 self.__host_port, self.get_test_protocol()))
625 except Exception as e:
626 self.log_client("failed connecting to {0} with impyla {1}".format(
627 self.__host_port, self.get_test_protocol()
628 ))
629 raise e
630
631 def close(self):
632 self.log_client("closing 1 sync and {0} async {1} connections to: {2}".format(

Callers 1

Calls 5

get_test_protocolMethod · 0.95
split_host_portFunction · 0.90
connectMethod · 0.45
log_clientMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected