Selaa lähdekoodia

HUE-8887 [hive] Fixes for LLAP Server/Thrift Server ports (#903)

* Update dbms.py

* updating conf.py (typos and fixing thrift port)

* adding config

* Update pseudo-distributed.ini.tmpl

* Update hue.ini

* Update dbms.py

* updating conf changes
jkm 6 vuotta sitten
vanhempi
commit
fc72b75a3c

+ 13 - 6
apps/beeswax/src/beeswax/conf.py

@@ -74,18 +74,25 @@ CACHE_TIMEOUT = Config(
 
 LLAP_SERVER_PORT = Config(
   key="llap_server_port",
-  help=_t("Host where Hive Server Interactive is running. If Kerberos security is enabled, "
-         "the fully-qualified domain name (FQDN) is required"),
-  default="localhost"
+  help=_t("Configure the base port the Hive Server Interactive runs on (10500 default)."),
+  default=10500,
+  type=int
 )
 
-LLAP_SERVER_HOST = Config(
-  key="llap_server_host",
-  help=_t("Configure the port the Hive Server Interactive runs on."),
+LLAP_SERVER_THRIFT_PORT = Config(
+  key="llap_server_thrift_port",
+  help=_t("Configure the thrift port the Hive Server Interactive runs on (10501 default)"),
   default=10501,
   type=int
 )
 
+LLAP_SERVER_HOST = Config(
+  key="llap_server_host",
+  help=_t("Host where Hive Server Interactive is running. If Kerberos security is enabled, "
+         "the fully-qualified domain name (FQDN) is required"),
+  default="localhost"
+)
+
 HIVE_SERVER_HOST = Config(
   key="hive_server_host",
   help=_t("Host where HiveServer2 server is running. If Kerberos security is enabled, "

+ 2 - 2
apps/beeswax/src/beeswax/server/dbms.py

@@ -38,7 +38,7 @@ from beeswax import hive_site
 from beeswax.conf import HIVE_SERVER_HOST, HIVE_SERVER_PORT, HIVE_METASTORE_HOST, HIVE_METASTORE_PORT, LIST_PARTITIONS_LIMIT, SERVER_CONN_TIMEOUT, \
   AUTH_USERNAME, AUTH_PASSWORD, APPLY_NATURAL_SORT_MAX, QUERY_PARTITIONS_LIMIT, HIVE_DISCOVERY_HIVESERVER2_ZNODE, \
   HIVE_DISCOVERY_HS2, HIVE_DISCOVERY_LLAP, HIVE_DISCOVERY_LLAP_HA, HIVE_DISCOVERY_LLAP_ZNODE, CACHE_TIMEOUT, \
-  LLAP_SERVER_HOST, LLAP_SERVER_PORT
+  LLAP_SERVER_HOST, LLAP_SERVER_PORT, LLAP_SERVER_THRIFT_PORT
 from beeswax.common import apply_natural_sort
 from beeswax.design import hql_query
 from beeswax.hive_site import hiveserver2_use_ssl
@@ -159,7 +159,7 @@ def get_query_server_config(name='beeswax', server=None, cluster=None):
     query_server = {
         'server_name': 'beeswax',
         'server_host': activeEndpoint["host"],
-        'server_port': activeEndpoint["port"],
+        'server_port': LLAP_SERVER_PORT.get() if name == 'llap' else HIVE_SERVER_PORT.get(),
         'principal': kerberos_principal,
         'http_url': '%(protocol)s://%(host)s:%(port)s/%(end_point)s' % {
             'protocol': 'https' if hiveserver2_use_ssl() else 'http',

+ 8 - 5
desktop/conf.dist/hue.ini

@@ -1139,12 +1139,15 @@
 
   # Host where LLAP is running
   ## llap_server_host = localhost
-
+  
+  # Main Port where LLAP runs
+  ## llap_server_port = 10500
+  
   # Port where LLAP Thrift server runs on
-  ## llap_server_port = 10501
-
-  # Alternatively, use Service Discovery for LLAP (Hive Server Interactive) and/or Hiveserver2, this will override the above
-
+  ## llap_server_thrift_port = 10501
+  
+  # Alternatively, use Service Discovery for LLAP (Hive Server Interactive) and/or Hiveserver2, this will override server and thrift port
+  
   # Whether to use Service Discovery for LLAP
   ## hive_discovery_llap = true
 

+ 5 - 2
desktop/conf/pseudo-distributed.ini.tmpl

@@ -1125,10 +1125,13 @@
   # Host where LLAP is running
   ## llap_server_host = localhost
   
+  # Main Port where LLAP runs
+  ## llap_server_port = 10500
+  
   # Port where LLAP Thrift server runs on
-  ## llap_server_port = 10501
+  ## llap_server_thrift_port = 10501
   
-  # Alternatively, use Service Discovery for LLAP (Hive Server Interactive) and/or Hiveserver2, this will override the above
+  # Alternatively, use Service Discovery for LLAP (Hive Server Interactive) and/or Hiveserver2, this will override server and thrift port
   
   # Whether to use Service Discovery for LLAP 
   ## hive_discovery_llap = true