소스 검색

[ui] Improve yarn config check for skipping job names in log div (#2853)

- Previous logic failed for other job names if config is not present, now we only skip yarn jobs which start with 'application' if the config is not present. This will allow Impala job browser links to be shown in the log div.
Harsh Gupta 3 년 전
부모
커밋
4d00fdc845
1개의 변경된 파일7개의 추가작업 그리고 2개의 파일을 삭제
  1. 7 2
      desktop/core/src/desktop/js/apps/notebook/snippet.js

+ 7 - 2
desktop/core/src/desktop/js/apps/notebook/snippet.js

@@ -2576,9 +2576,14 @@ class Snippet {
                     job.percentJob = ko.observable(job.percentJob);
                   }
                   const config = getLastKnownConfig();
-                  if (config && config['hue_config'] && config['hue_config']['is_yarn_enabled']) {
-                    self.jobs.push(job);
+                  // Yarn job names start with 'application' and we skip them if yarn config is not present.
+                  if (
+                    job.name.startsWith('application') &&
+                    !(config && config['hue_config'] && config['hue_config']['is_yarn_enabled'])
+                  ) {
+                    return;
                   }
+                  self.jobs.push(job);
                 } else if (typeof job.percentJob !== 'undefined') {
                   for (let i = 0; i < _found.length; i++) {
                     _found[i].percentJob(job.percentJob);