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

Method open

shell/impala_shell/ImpalaHttpClient.py:149–163  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

147 return self.realhost is not None
148
149 def open(self):
150 if self.scheme == 'http':
151 self.__http = http_client.HTTPConnection(self.host, self.port,
152 timeout=self.__connect_timeout_s)
153 elif self.scheme == 'https':
154 self.__http = http_client.HTTPSConnection(self.host, self.port,
155 timeout=self.__connect_timeout_s,
156 context=self.context)
157 if self.using_proxy():
158 self.__http.set_tunnel(self.realhost, self.realport,
159 {"Proxy-Authorization": self.proxy_auth})
160 # Initiate connection with configured timeout.
161 self.__http.connect()
162 # Set socket_timeout_s for the remainder of the session.
163 self.__http.sock.settimeout(self.__socket_timeout_s)
164
165 def close(self):
166 self.__http.close()

Callers 1

sendRequestHeadersMethod · 0.95

Calls 2

using_proxyMethod · 0.95
connectMethod · 0.45

Tested by

no test coverage detected