Browse Source

HUE-8030 [core] Only enable scheduler status polling when the integrated scheduler in on

Will save calls
Romain Rigaux 7 years ago
parent
commit
ffd7013

+ 19 - 17
apps/beeswax/src/beeswax/server/hive_server2_lib.py

@@ -522,23 +522,25 @@ class HiveServerClient:
       from ImpalaService import ImpalaHiveServer2Service
       from ImpalaService import ImpalaHiveServer2Service
       thrift_class = ImpalaHiveServer2Service
       thrift_class = ImpalaHiveServer2Service
 
 
-    self._client = thrift_util.get_client(thrift_class.Client,
-                                          query_server['server_host'],
-                                          query_server['server_port'],
-                                          service_name=query_server['server_name'],
-                                          kerberos_principal=kerberos_principal_short_name,
-                                          use_sasl=use_sasl,
-                                          mechanism=mechanism,
-                                          username=username,
-                                          password=password,
-                                          timeout_seconds=timeout,
-                                          use_ssl=ssl_enabled,
-                                          ca_certs=ca_certs,
-                                          keyfile=keyfile,
-                                          certfile=certfile,
-                                          validate=validate,
-                                          transport_mode=query_server.get('transport_mode', 'socket'),
-                                          http_url=query_server.get('http_url', ''))
+    self._client = thrift_util.get_client(
+        thrift_class.Client,
+        query_server['server_host'],
+        query_server['server_port'],
+        service_name=query_server['server_name'],
+        kerberos_principal=kerberos_principal_short_name,
+        use_sasl=use_sasl,
+        mechanism=mechanism,
+        username=username,
+        password=password,
+        timeout_seconds=timeout,
+        use_ssl=ssl_enabled,
+        ca_certs=ca_certs,
+        keyfile=keyfile,
+        certfile=certfile,
+        validate=validate,
+        transport_mode=query_server.get('transport_mode', 'socket'),
+        http_url=query_server.get('http_url', '')
+    )
 
 
 
 
   def get_security(self):
   def get_security(self):

+ 1 - 1
desktop/core/src/desktop/log/__init__.py

@@ -96,7 +96,7 @@ def get_audit_logger():
 def chown_log_dir(uid, gid):
 def chown_log_dir(uid, gid):
   """
   """
   chown all files in the log dir to this user and group.
   chown all files in the log dir to this user and group.
-  Should only be called after loggic has been setup.
+  Should only be called after logic has been setup.
   Return success
   Return success
   """
   """
   if _log_dir is None:
   if _log_dir is None:

+ 14 - 5
desktop/core/src/desktop/templates/ko_components/ko_job_browser_links.mako

@@ -15,10 +15,12 @@
 ## limitations under the License.
 ## limitations under the License.
 
 
 <%!
 <%!
+from django.utils.translation import ugettext as _
+
+from notebook.conf import ENABLE_QUERY_SCHEDULING
+
 from desktop.conf import IS_EMBEDDED
 from desktop.conf import IS_EMBEDDED
 from desktop.lib.i18n import smart_unicode
 from desktop.lib.i18n import smart_unicode
-
-from django.utils.translation import ugettext as _
 from desktop.views import _ko
 from desktop.views import _ko
 %>
 %>
 
 
@@ -124,9 +126,16 @@ from desktop.views import _ko
 
 
         var checkJobBrowserStatus = function() {
         var checkJobBrowserStatus = function() {
           lastYarnBrowserRequest = checkYarnBrowserStatus();
           lastYarnBrowserRequest = checkYarnBrowserStatus();
-          lastScheduleBrowserRequest = checkScheduleBrowserStatus();
-
-          $.when.apply($, [lastYarnBrowserRequest, lastScheduleBrowserRequest])
+          % if ENABLE_QUERY_SCHEDULING.get():
+            lastScheduleBrowserRequest = checkScheduleBrowserStatus();
+          % endif
+
+          $.when.apply($, [
+            lastYarnBrowserRequest,
+            % if ENABLE_QUERY_SCHEDULING.get():
+              lastScheduleBrowserRequest
+            % endif
+          ])
           .done(function () {
           .done(function () {
             checkJobBrowserStatusIdx = window.setTimeout(checkJobBrowserStatus, JB_CHECK_INTERVAL_IN_MILLIS);
             checkJobBrowserStatusIdx = window.setTimeout(checkJobBrowserStatus, JB_CHECK_INTERVAL_IN_MILLIS);
            })
            })

+ 1 - 1
desktop/libs/notebook/src/notebook/conf.py

@@ -24,7 +24,7 @@ from django.utils.translation import ugettext_lazy as _t
 
 
 
 
 from desktop import appmanager
 from desktop import appmanager
-from desktop.conf import is_hue4, is_oozie_enabled
+from desktop.conf import is_oozie_enabled
 from desktop.lib.conf import Config, UnspecifiedConfigSection, ConfigSection,\
 from desktop.lib.conf import Config, UnspecifiedConfigSection, ConfigSection,\
   coerce_json_dict, coerce_bool, coerce_csv
   coerce_json_dict, coerce_bool, coerce_csv
 
 

+ 1 - 1
desktop/libs/notebook/src/notebook/connectors/hiveserver2.py

@@ -836,7 +836,7 @@ DROP TABLE IF EXISTS `%(table)s`;
     session = Session.objects.get_session(self.user, application='impala')
     session = Session.objects.get_session(self.user, application='impala')
     server_url = _get_impala_server_url(session)
     server_url = _get_impala_server_url(session)
     if query_id:
     if query_id:
-      LOG.info("Attempting to get Impala query profile at server_url %s for query ID: %s" % (server_url, query_id))
+      LOG.debug("Attempting to get Impala query profile at server_url %s for query ID: %s" % (server_url, query_id))
 
 
       fragment = self._get_impala_query_profile(server_url, query_id=query_id)
       fragment = self._get_impala_query_profile(server_url, query_id=query_id)
       total_records_re = "Coordinator Fragment F\d\d.+?RowsReturned: \d+(?:.\d+[KMB])? \((?P<total_records>\d+)\).*?(Averaged Fragment F\d\d)"
       total_records_re = "Coordinator Fragment F\d\d.+?RowsReturned: \d+(?:.\d+[KMB])? \((?P<total_records>\d+)\).*?(Averaged Fragment F\d\d)"