From 32a35dc94b5914a782e8f85e8bef0466b57c5534 Mon Sep 17 00:00:00 2001 From: Sunil G Date: Mon, 24 Sep 2018 12:20:28 +0530 Subject: [PATCH] YARN-8742. [UI2] Container logs on Application / Service pages on UI2 are not available many case, improve error messages in such cases. Contributed by Akhil PB. --- .../webapp/app/controllers/yarn-app/logs.js | 7 ++- .../src/main/webapp/app/styles/yarn-app.scss | 5 ++ .../main/webapp/app/templates/yarn-app.hbs | 6 +-- .../webapp/app/templates/yarn-app/logs.hbs | 49 +++++++++++-------- 4 files changed, 43 insertions(+), 24 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-app/logs.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-app/logs.js index 5a6e25ec539..82240117327 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-app/logs.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-app/logs.js @@ -253,5 +253,10 @@ export default Ember.Controller.extend({ } return lines.slice(lines.length - 10).join("\n"); } - ) + ), + + isLogAggregationNotSucceeded: Ember.computed("model.app", function() { + const logAggregationStatus = this.get("model.app.logAggregationStatus"); + return logAggregationStatus !== "SUCCEEDED"; + }) }); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/yarn-app.scss b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/yarn-app.scss index 0c29b5e2340..875da72b0c8 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/yarn-app.scss +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/yarn-app.scss @@ -32,4 +32,9 @@ .yarn-app-final-status .label { vertical-align: middle; } + + .quick-links { + display: block; + margin-left: -5px; + } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app.hbs index ff166e3b3be..13d14e892aa 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app.hbs +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app.hbs @@ -102,9 +102,9 @@ {{#if model.serviceName}} {{#if model.quicklinks}} -
+ -
+
{{model.app.queue}} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app/logs.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app/logs.hbs index a190def7e93..10fd73ec940 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app/logs.hbs +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app/logs.hbs @@ -28,7 +28,7 @@ {{model.app.logAggregationStatus}} {{#if _isLoadingTopPanel}} -
+
Loading...
{{/if}} @@ -36,22 +36,26 @@
- +
+ +
{{#if attemptContainerList}}
- +
+ +
{{else}} {{#if (and selectedAttemptId (not _isLoadingTopPanel))}} @@ -88,12 +92,14 @@
- +
+ +
{{#if selectedLogFileName}}
@@ -125,7 +131,10 @@ {{else}} {{#unless _isLoadingBottomPanel}}
-

No log data available!

+

Logs are not available!

+ {{#if isLogAggregationNotSucceeded}} +

Log aggregation may not be complete, check back later!

+ {{/if}}
{{/unless}} {{/if}}