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

Method __init__

shell/impala_shell/impala_shell.py:215–373  ·  view source on GitHub ↗
(self, options, query_options)

Source from the content-addressed store, hash-verified

213 GLOBAL_CONFIG_FILE = "IMPALA_SHELL_GLOBAL_CONFIG_FILE"
214
215 def __init__(self, options, query_options):
216 cmd.Cmd.__init__(self)
217 self.is_alive = True
218
219 self.impalad = None
220 self.kerberos_host_fqdn = options.kerberos_host_fqdn
221 self.use_kerberos = options.use_kerberos
222 self.kerberos_service_name = options.kerberos_service_name
223 self.use_ssl = options.ssl
224 self.ca_cert = options.ca_cert
225 self.verify_cert = options.verify_cert
226 self.user = options.user
227 self.ldap_password_cmd = options.ldap_password_cmd
228 self.jwt_cmd = options.jwt_cmd
229 self.oauth_cmd = options.oauth_cmd
230 self.strict_hs2_protocol = options.strict_hs2_protocol
231 self.ldap_password = options.ldap_password
232 self.use_jwt = options.use_jwt
233 self.jwt = options.jwt
234 self.use_oauth = options.use_oauth
235 self.oauth = options.oauth
236 self.oauth_server = options.oauth_server
237 self.oauth_client_id = options.oauth_client_id
238 self.oauth_client_secret_cmd = options.oauth_client_secret_cmd
239 self.oauth_client_secret = options.oauth_client_secret
240 self.oauth_endpoint = options.oauth_endpoint
241 self.oauth_mock_response_cmd = options.oauth_mock_response_cmd
242 self.oauth_mock_response = options.oauth_mock_response
243 # When running tests in strict mode, the server uses the ldap
244 # protocol but can allow any password.
245 if options.use_ldap_test_password:
246 self.ldap_password = 'password'
247 self.use_ldap = options.use_ldap or \
248 (self.strict_hs2_protocol and not self.use_kerberos and not self.use_jwt
249 and not self.use_oauth)
250 self.client_connect_timeout_ms = options.client_connect_timeout_ms
251 self.http_socket_timeout_s = None
252 if (options.http_socket_timeout_s != 'None'
253 and options.http_socket_timeout_s is not None):
254 self.http_socket_timeout_s = float(options.http_socket_timeout_s)
255 self.connect_max_tries = options.connect_max_tries
256 self.verbose = options.verbose
257 self.prompt = ImpalaShell.DISCONNECTED_PROMPT
258 self.server_version = ImpalaShell.UNKNOWN_SERVER_VERSION
259 self.webserver_address = None
260
261 self.current_db = options.default_db
262 self.history_file = os.path.expanduser(options.history_file)
263 # Stores the state of user input until a delimiter is seen.
264 self.partial_cmd = str()
265 # Stores the old prompt while the user input is incomplete.
266 self.cached_prompt = str()
267
268 self.show_profiles = options.show_profiles
269 self.profile_output = options.profile_output
270 self.profile_format = options.profile_format
271
272 self.rpc_stdout = options.rpc_stdout

Callers

nothing calls this directly

Calls 8

_disable_readlineMethod · 0.95
do_connectMethod · 0.95
_validate_databaseMethod · 0.95
existsMethod · 0.45
registerMethod · 0.45

Tested by

no test coverage detected