diff --git a/apps/beeswax/src/beeswax/conf.py b/apps/beeswax/src/beeswax/conf.py index 3fbe7e8ead8..af6f271b938 100644 --- a/apps/beeswax/src/beeswax/conf.py +++ b/apps/beeswax/src/beeswax/conf.py @@ -123,6 +123,12 @@ def get_hive_thrift_http_port(): dynamic_default=get_hive_thrift_http_port, type=int) +HPLSQL = Config( + key="hplsql", + default=False, + type=coerce_bool, + help=_t('Enable the HPLSQL mode.')) + HIVE_METASTORE_HOST = Config( key="hive_metastore_host", help=_t("Host where Hive Metastore Server (HMS) is running. If Kerberos security is enabled, " diff --git a/apps/beeswax/src/beeswax/server/hive_server2_lib.py b/apps/beeswax/src/beeswax/server/hive_server2_lib.py index 260b70237fb..deae71761fb 100644 --- a/apps/beeswax/src/beeswax/server/hive_server2_lib.py +++ b/apps/beeswax/src/beeswax/server/hive_server2_lib.py @@ -34,7 +34,7 @@ from beeswax import conf as beeswax_conf, hive_site from beeswax.hive_site import hiveserver2_use_ssl -from beeswax.conf import CONFIG_WHITELIST, LIST_PARTITIONS_LIMIT +from beeswax.conf import CONFIG_WHITELIST, LIST_PARTITIONS_LIMIT, HPLSQL from beeswax.models import Session, HiveServerQueryHandle, HiveServerQueryHistory from beeswax.server.dbms import Table, DataTable, QueryServerException, InvalidSessionQueryServerException @@ -674,6 +674,8 @@ def open_session(self, user): if self.query_server['server_name'] == 'beeswax': # All the time kwargs['configuration'].update({'hive.server2.proxy.user': user.username}) + if HPLSQL.get(): + kwargs['configuration'].update({'set:hivevar:mode': 'HPLSQL'}) if self.query_server['server_name'] == 'llap': # All the time kwargs['configuration'].update({'hive.server2.proxy.user': user.username}) diff --git a/desktop/conf.dist/hue.ini b/desktop/conf.dist/hue.ini index ac69e374bbf..2fefba3e155 100644 --- a/desktop/conf.dist/hue.ini +++ b/desktop/conf.dist/hue.ini @@ -1383,6 +1383,9 @@ submit_to=True # Use SASL framework to establish connection to host. ## use_sasl=false +# Enable the HPLSQL mode. +## hplsql=false + [[ssl]] # Path to Certificate Authority certificates. ## cacerts=/etc/hue/cacerts.pem diff --git a/desktop/conf/pseudo-distributed.ini.tmpl b/desktop/conf/pseudo-distributed.ini.tmpl index 28ea3b3ea53..590fe1b3ce4 100644 --- a/desktop/conf/pseudo-distributed.ini.tmpl +++ b/desktop/conf/pseudo-distributed.ini.tmpl @@ -1366,6 +1366,9 @@ # Use SASL framework to establish connection to host. ## use_sasl=false + # Enable the HPLSQL mode. + ## hplsql=false + [[ssl]] # Path to Certificate Authority certificates. ## cacerts=/etc/hue/cacerts.pem