diff --git a/apps/beeswax/src/beeswax/server/dbms.py b/apps/beeswax/src/beeswax/server/dbms.py index c25c220540a..a5f77f9f5fd 100644 --- a/apps/beeswax/src/beeswax/server/dbms.py +++ b/apps/beeswax/src/beeswax/server/dbms.py @@ -355,6 +355,13 @@ def get_query_server_config_via_connector(connector): else: impersonation_enabled = hiveserver2_impersonation_enabled() + if compute['dialect'] == 'impala': + from impala import conf as dbms_conf + else: + from beeswax import conf as dbms_conf + auth_username = dbms_conf.AUTH_USERNAME.get() + auth_password = dbms_conf.AUTH_PASSWORD.get() + return { 'is_compute': True, 'dialect': compute['dialect'], @@ -364,8 +371,8 @@ def get_query_server_config_via_connector(connector): # For connectors/computes, the auth details are not available # from configs and needs patching before submitting requests 'principal': 'TODO', - 'auth_username': compute['options'].get('auth_username'), - 'auth_password': compute['options'].get('auth_password', 'hue'), + 'auth_username': compute['options'].get('auth_username', auth_username), + 'auth_password': compute['options'].get('auth_password', auth_password), 'impersonation_enabled': impersonation_enabled, 'use_sasl': str(compute['options'].get('use_sasl', True)).upper() == 'TRUE',