tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject tez git commit: TEZ-3554. Add a link to get to all logs from Tez UI while job is running (Eric Badger via sree)
Date Thu, 26 Jan 2017 17:10:13 GMT
Repository: tez
Updated Branches:
  refs/heads/master 4cbc99d04 -> 5e9e28f13


TEZ-3554. Add a link to get to all logs from Tez UI while job is running (Eric Badger via
sree)


Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/5e9e28f1
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/5e9e28f1
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/5e9e28f1

Branch: refs/heads/master
Commit: 5e9e28f130897197155efe3b622196eee2f7dc4b
Parents: 4cbc99d
Author: Sreenath Somarajapuram <sree@apache.org>
Authored: Thu Jan 26 22:23:00 2017 +0530
Committer: Sreenath Somarajapuram <sree@apache.org>
Committed: Thu Jan 26 22:23:00 2017 +0530

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../main/webapp/app/controllers/dag/attempts.js | 20 ++++++++++++++++
 .../webapp/app/controllers/task/attempts.js     | 20 ++++++++++++++++
 .../webapp/app/controllers/vertex/attempts.js   | 20 ++++++++++++++++
 tez-ui/src/main/webapp/app/models/attempt.js    |  2 ++
 .../src/main/webapp/app/serializers/attempt.js  | 13 +++++++++-
 .../main/webapp/app/templates/attempt/index.hbs | 16 +++++++++++++
 .../main/webapp/app/templates/task/index.hbs    | 25 ++++++++++++++++++++
 .../tests/unit/controllers/dag/attempts-test.js |  2 +-
 .../unit/controllers/task/attempts-test.js      |  2 +-
 .../unit/controllers/vertex/attempts-test.js    |  2 +-
 11 files changed, 119 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/5e9e28f1/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index ee31155..b16be7f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -179,6 +179,7 @@ ALL CHANGES:
   TEZ-3580. Tez UI: Pagination broken on queries page
   TEZ-3575. RM have started forwarding origin. Use that in AMWebController for CORS support
   TEZ-3494. Support relative url for tez-ui.history-url.base config
+  TEZ-3554. Add a link to get to all logs from Tez UI while job is running
 
 Release 0.8.5: Unreleased
 

http://git-wip-us.apache.org/repos/asf/tez/blob/5e9e28f1/tez-ui/src/main/webapp/app/controllers/dag/attempts.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/controllers/dag/attempts.js b/tez-ui/src/main/webapp/app/controllers/dag/attempts.js
index 1c661d1..47e95d9 100644
--- a/tez-ui/src/main/webapp/app/controllers/dag/attempts.js
+++ b/tez-ui/src/main/webapp/app/controllers/dag/attempts.js
@@ -118,5 +118,25 @@ export default MultiTableController.extend({
         }];
       }
     }
+    }, {
+    id: 'container log',
+    headerTitle: 'Container Logs',
+    contentPath: 'containerLogURL',
+    cellComponentName: 'em-table-linked-cell',
+    cellDefinition: {
+      target: "_blank"
+    },
+    getCellContent: function (row) {
+      if(row.get("containerLogURL")) {
+        return [{
+          href: row.get("containerLogURL"),
+          text: "View"
+        }, {
+          href: row.get("containerLogURL"),
+          text: "Download",
+          download: true
+        }];
+      }
+    }
   }])
 });

http://git-wip-us.apache.org/repos/asf/tez/blob/5e9e28f1/tez-ui/src/main/webapp/app/controllers/task/attempts.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/controllers/task/attempts.js b/tez-ui/src/main/webapp/app/controllers/task/attempts.js
index 140e4b2..a6acaec 100644
--- a/tez-ui/src/main/webapp/app/controllers/task/attempts.js
+++ b/tez-ui/src/main/webapp/app/controllers/task/attempts.js
@@ -96,5 +96,25 @@ export default MultiTableController.extend(AutoCounterColumn, {
         }];
       }
     }
+    }, {
+    id: 'container log',
+    headerTitle: 'Container Logs',
+    contentPath: 'containerLogURL',
+    cellComponentName: 'em-table-linked-cell',
+    cellDefinition: {
+      target: "_blank"
+    },
+    getCellContent: function (row) {
+      if(row.get("containerLogURL")) {
+        return [{
+          href: row.get("containerLogURL"),
+          text: "View"
+        }, {
+          href: row.get("containerLogURL"),
+          text: "Download",
+          download: true
+        }];
+      }
+    }
   }])
 });

http://git-wip-us.apache.org/repos/asf/tez/blob/5e9e28f1/tez-ui/src/main/webapp/app/controllers/vertex/attempts.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/controllers/vertex/attempts.js b/tez-ui/src/main/webapp/app/controllers/vertex/attempts.js
index 7e4d12b..b07be92 100644
--- a/tez-ui/src/main/webapp/app/controllers/vertex/attempts.js
+++ b/tez-ui/src/main/webapp/app/controllers/vertex/attempts.js
@@ -108,5 +108,25 @@ export default MultiTableController.extend(AutoCounterColumn, {
         }];
       }
     }
+    }, {
+    id: 'container log',
+    headerTitle: 'Container Logs',
+    contentPath: 'containerLogURL',
+    cellComponentName: 'em-table-linked-cell',
+    cellDefinition: {
+      target: "_blank"
+    },
+    getCellContent: function (row) {
+      if(row.get("containerLogURL")) {
+        return [{
+          href: row.get("containerLogURL"),
+          text: "View"
+        }, {
+          href: row.get("containerLogURL"),
+          text: "Download",
+          download: true
+        }];
+      }
+    }
   }])
 });

http://git-wip-us.apache.org/repos/asf/tez/blob/5e9e28f1/tez-ui/src/main/webapp/app/models/attempt.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/models/attempt.js b/tez-ui/src/main/webapp/app/models/attempt.js
index e04c8c1..ab54b22 100644
--- a/tez-ui/src/main/webapp/app/models/attempt.js
+++ b/tez-ui/src/main/webapp/app/models/attempt.js
@@ -73,4 +73,6 @@ export default AMTimelineModel.extend({
   nodeID: DS.attr('string'),
 
   logURL: DS.attr('string'),
+
+  containerLogURL: DS.attr('string'),
 });

http://git-wip-us.apache.org/repos/asf/tez/blob/5e9e28f1/tez-ui/src/main/webapp/app/serializers/attempt.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/serializers/attempt.js b/tez-ui/src/main/webapp/app/serializers/attempt.js
index 09b82e6..60f7a89 100644
--- a/tez-ui/src/main/webapp/app/serializers/attempt.js
+++ b/tez-ui/src/main/webapp/app/serializers/attempt.js
@@ -30,6 +30,15 @@ function createLogURL(source) {
   }
 }
 
+function createContainerLogURL(source) {
+  var logURL = Ember.get(source, 'otherinfo.inProgressLogsURL'),
+      yarnProtocol = this.get('env.app.yarnProtocol');
+
+  if(logURL) {
+    return `${yarnProtocol}://${logURL}`;
+  }
+}
+
 export default TimelineSerializer.extend({
   maps: {
     taskID: 'primaryfilters.TEZ_TASK_ID.0',
@@ -39,6 +48,8 @@ export default TimelineSerializer.extend({
     containerID: 'otherinfo.containerId',
     nodeID: 'otherinfo.nodeId',
 
-    logURL: createLogURL
+    logURL: createLogURL,
+
+    containerLogURL: createContainerLogURL
   }
 });

http://git-wip-us.apache.org/repos/asf/tez/blob/5e9e28f1/tez-ui/src/main/webapp/app/templates/attempt/index.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/attempt/index.hbs b/tez-ui/src/main/webapp/app/templates/attempt/index.hbs
index d33c509..12aaa8e 100644
--- a/tez-ui/src/main/webapp/app/templates/attempt/index.hbs
+++ b/tez-ui/src/main/webapp/app/templates/attempt/index.hbs
@@ -76,6 +76,22 @@
           {{/if}}
         </td>
       </tr>
+      <tr>
+        <td>Container Logs</td>
+        <td>
+          {{#if model.containerLogURL}}
+            <a href={{model.containerLogURL}} target="_blank">
+              <i class="fa fa-file-o" aria-hidden="true"></i> View
+            </a>
+            &nbsp;
+            <a href={{model.containerLogURL}} target="_blank" download>
+              <i class="fa fa-download" aria-hidden="true"></i> Download
+            </a>
+          {{else}}
+              <span class="txt-message">Not Available!</span>
+          {{/if}}
+        </td>
+      </tr>
     </tbody>
   </table>
 

http://git-wip-us.apache.org/repos/asf/tez/blob/5e9e28f1/tez-ui/src/main/webapp/app/templates/task/index.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/task/index.hbs b/tez-ui/src/main/webapp/app/templates/task/index.hbs
index 5967be1..5d7c182 100644
--- a/tez-ui/src/main/webapp/app/templates/task/index.hbs
+++ b/tez-ui/src/main/webapp/app/templates/task/index.hbs
@@ -77,6 +77,31 @@
           {{/if}}
         </td>
       </tr>
+      <tr>
+        <td>Container Logs</td>
+        <td>
+          {{#if attempts}}
+            {{#each attempts as |attempt|}}
+              <dag class="display-block">
+                Attempt {{attempt.index}} :&nbsp;
+                {{#if attempt.containerLogURL}}
+                  <a href={{attempt.containerLogURL}} target="_blank">
+                    <i class="fa fa-file-o" aria-hidden="true"></i> View
+                  </a>
+                  &nbsp;
+                  <a href={{attempt.containerLogURL}} target="_blank" download>
+                    <i class="fa fa-download" aria-hidden="true"></i> Download
+                  </a>
+                {{else}}
+                  <span class="txt-message">Not Available!</span>
+                {{/if}}
+              </dag>
+            {{/each}}
+          {{else}}
+            <i class="fa fa-spinner fa-spin"></i> Loading...
+          {{/if}}
+        </td>
+      </tr>
     </tbody>
   </table>
 

http://git-wip-us.apache.org/repos/asf/tez/blob/5e9e28f1/tez-ui/src/main/webapp/tests/unit/controllers/dag/attempts-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/unit/controllers/dag/attempts-test.js b/tez-ui/src/main/webapp/tests/unit/controllers/dag/attempts-test.js
index 3a90018..e8b3ed5 100644
--- a/tez-ui/src/main/webapp/tests/unit/controllers/dag/attempts-test.js
+++ b/tez-ui/src/main/webapp/tests/unit/controllers/dag/attempts-test.js
@@ -39,7 +39,7 @@ test('Basic creation test', function(assert) {
   assert.ok(controller.breadcrumbs);
   assert.ok(controller.columns);
 
-  assert.equal(controller.get("columns.length"), 11);
+  assert.equal(controller.get("columns.length"), 12);
 });
 
 test('Log column test', function(assert) {

http://git-wip-us.apache.org/repos/asf/tez/blob/5e9e28f1/tez-ui/src/main/webapp/tests/unit/controllers/task/attempts-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/unit/controllers/task/attempts-test.js b/tez-ui/src/main/webapp/tests/unit/controllers/task/attempts-test.js
index 749a67b..c1d3129 100644
--- a/tez-ui/src/main/webapp/tests/unit/controllers/task/attempts-test.js
+++ b/tez-ui/src/main/webapp/tests/unit/controllers/task/attempts-test.js
@@ -39,7 +39,7 @@ test('Basic creation test', function(assert) {
   assert.ok(controller.breadcrumbs);
   assert.ok(controller.columns);
 
-  assert.equal(controller.get("columns.length"), 9);
+  assert.equal(controller.get("columns.length"), 10);
 });
 
 test('Log column test', function(assert) {

http://git-wip-us.apache.org/repos/asf/tez/blob/5e9e28f1/tez-ui/src/main/webapp/tests/unit/controllers/vertex/attempts-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/unit/controllers/vertex/attempts-test.js b/tez-ui/src/main/webapp/tests/unit/controllers/vertex/attempts-test.js
index e2eae25..e863661 100644
--- a/tez-ui/src/main/webapp/tests/unit/controllers/vertex/attempts-test.js
+++ b/tez-ui/src/main/webapp/tests/unit/controllers/vertex/attempts-test.js
@@ -39,7 +39,7 @@ test('Basic creation test', function(assert) {
   assert.ok(controller.breadcrumbs);
   assert.ok(controller.columns);
 
-  assert.equal(controller.get("columns.length"), 10);
+  assert.equal(controller.get("columns.length"), 11);
 });
 
 test('Log column test', function(assert) {


Mime
View raw message