|
|
@@ -24,14 +24,16 @@ from django.utils.encoding import force_unicode
|
|
|
from django.utils.translation import ugettext as _
|
|
|
|
|
|
from beeswax import hive_site
|
|
|
-from beeswax.conf import HIVE_SERVER_HOST, HIVE_SERVER_PORT, BROWSE_PARTITIONED_TABLE_LIMIT, SSL
|
|
|
+from beeswax.conf import HIVE_SERVER_HOST, HIVE_SERVER_PORT, BROWSE_PARTITIONED_TABLE_LIMIT
|
|
|
from beeswax.design import hql_query
|
|
|
+from beeswax.hive_site import hiveserver2_use_ssl
|
|
|
from beeswax.models import QueryHistory, QUERY_TYPES
|
|
|
|
|
|
from filebrowser.views import location_to_url
|
|
|
from desktop.lib.django_util import format_preserving_redirect
|
|
|
|
|
|
|
|
|
+
|
|
|
LOG = logging.getLogger(__name__)
|
|
|
|
|
|
DBMS_CACHE = {}
|
|
|
@@ -83,7 +85,7 @@ def get_query_server_config(name='beeswax', server=None):
|
|
|
'server_port': HIVE_SERVER_PORT.get(),
|
|
|
'principal': kerberos_principal,
|
|
|
'http_url': '%(protocol)s://%(host)s:%(port)s/%(end_point)s' % {
|
|
|
- 'protocol': 'https' if SSL.ENABLED.get() else 'http',
|
|
|
+ 'protocol': 'https' if hiveserver2_use_ssl() else 'http',
|
|
|
'host': HIVE_SERVER_HOST.get(),
|
|
|
'port': hive_site.hiveserver2_thrift_http_port(),
|
|
|
'end_point': hive_site.hiveserver2_thrift_http_path()
|