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

Method close

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

Source from the content-addressed store, hash-verified

629 raise e
630
631 def close(self):
632 self.log_client("closing 1 sync and {0} async {1} connections to: {2}".format(
633 len(self.__async_cursors), self.get_test_protocol(), self.__host_port))
634 if self.__cursor is not None:
635 self.__close_single_cursor(self.__cursor)
636 for async_cursor in self.__async_cursors:
637 self.__close_single_cursor(async_cursor)
638 # Remove all async cursors.
639 self.__async_cursors = list()
640 try:
641 if self.__impyla_conn:
642 self.__impyla_conn.close()
643 except AttributeError as e:
644 # When the HTTP endpoint restarts, Thrift HTTP will close the endpoint and calling
645 # close() will result in an exception.
646 if not (self.__use_http_transport and 'NoneType' in str(e)):
647 raise
648
649 def get_tables(self, database=None):
650 """Trigger the GetTables() HS2 request on the given database (None means all dbs).

Callers

nothing calls this directly

Calls 5

get_test_protocolMethod · 0.95
__close_single_cursorMethod · 0.95
closeMethod · 0.65
log_clientMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected