Skip to content

Commit

Permalink
[hplsql] adding hplsql config to on and off the HPLSQL mode
Browse files Browse the repository at this point in the history
  • Loading branch information
agl29 committed Sep 15, 2021
1 parent c44e64e commit 66f654d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions apps/beeswax/src/beeswax/conf.py
Expand Up @@ -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, "
Expand Down
4 changes: 3 additions & 1 deletion apps/beeswax/src/beeswax/server/hive_server2_lib.py
Expand Up @@ -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

Expand Down Expand Up @@ -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})
Expand Down
3 changes: 3 additions & 0 deletions desktop/conf.dist/hue.ini
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions desktop/conf/pseudo-distributed.ini.tmpl
Expand Up @@ -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
Expand Down

0 comments on commit 66f654d

Please sign in to comment.