tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeag...@apache.org
Subject tez git commit: TEZ-2096. TEZ-UI : Add link to view AM log of finished & running apps (jeagles)
Date Mon, 12 Oct 2015 03:34:07 GMT
Repository: tez
Updated Branches:
  refs/heads/master 327e02a76 -> ba6321905


TEZ-2096. TEZ-UI : Add link to view AM log of finished & running apps (jeagles)


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

Branch: refs/heads/master
Commit: ba6321905527e60b26b1d7296656c7455e4cf4c6
Parents: 327e02a
Author: Jonathan Eagles <jeagles@yahoo-inc.com>
Authored: Sun Oct 11 22:33:35 2015 -0500
Committer: Jonathan Eagles <jeagles@yahoo-inc.com>
Committed: Sun Oct 11 22:33:35 2015 -0500

----------------------------------------------------------------------
 CHANGES.txt                                     |  2 ++
 .../app/scripts/controllers/dags_controller.js  | 11 ++++++++
 .../app/scripts/models/TimelineRestAdapter.js   | 20 +++++++++++++-
 .../src/main/webapp/app/scripts/models/dag.js   |  3 ++-
 .../components/basic-table/multi-logs-cell.hbs  | 28 ++++++++++++++++++++
 .../src/main/webapp/app/templates/dag/index.hbs | 10 +++++++
 6 files changed, 72 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/ba632190/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 32aca94..7bc7cff 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,7 @@ Release 0.8.1: Unreleased
 INCOMPATIBLE CHANGES
 
 ALL CHANGES:
+  TEZ-2096. TEZ-UI : Add link to view AM log of finished & running apps
   TEZ-2874. Improved logging for caller context.
   TEZ-2875. Enable missing tests in TestAnalyzer
   TEZ-2781. Fallback to send only TaskAttemptFailedEvent if taskFailed heartbeat fails
@@ -203,6 +204,7 @@ Release 0.7.1: Unreleased
 INCOMPATIBLE CHANGES
 
 ALL CHANGES
+  TEZ-2096. TEZ-UI : Add link to view AM log of finished & running apps
   TEZ-2874. Improved logging for caller context.
   TEZ-2781. Fallback to send only TaskAttemptFailedEvent if taskFailed heartbeat fails
   TEZ-2868. Fix setting Caller Context in Tez Examples.

http://git-wip-us.apache.org/repos/asf/tez/blob/ba632190/tez-ui/src/main/webapp/app/scripts/controllers/dags_controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/dags_controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/dags_controller.js
index b89ba9f..a99c850 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/dags_controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/dags_controller.js
@@ -318,6 +318,17 @@ App.DagsController = Em.ObjectController.extend(App.PaginatedContentMixin,
App.C
             });
           }
         }
+      },
+      {
+        id: 'logs',
+        headerCellName: 'Logs',
+        templateName: 'components/basic-table/multi-logs-cell',
+        getCellContent: function(row) {
+          var content = {
+            logs: row.get('containerLogs')
+          };
+          return content;
+        }
       }
     ];
   }.property(),

http://git-wip-us.apache.org/repos/asf/tez/blob/ba632190/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js b/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
index c295366..9a79851 100644
--- a/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
+++ b/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
@@ -94,6 +94,24 @@ var timelineJsonToDagMap = {
   name: 'primaryfilters.dagName.0',
   user: 'primaryfilters.user.0',
   status: 'otherinfo.status',
+  containerLogs: {
+    custom: function(source) {
+
+      var containerLogs = [];
+      var otherinfo = Em.get(source, 'otherinfo');
+      for (var key in otherinfo) {
+        if (key.indexOf('inProgressLogsURL_') === 0) {
+          var logs = Em.get(source, 'otherinfo.' + key);
+          if (logs.indexOf('http') !== 0) {
+            logs = 'http://' + logs;
+          }
+          var attemptid = key.substring(18);
+          containerLogs.push({id : attemptid, containerLog: logs});
+        }
+      }
+      return containerLogs;
+    }
+  },
   hasFailedTaskAttempts: {
     custom: function(source) {
       // if no other info is available we say no failed tasks attempts.
@@ -579,4 +597,4 @@ App.AttemptInfoSerializer = DS.RESTSerializer.extend({
       attemptInfo : rawPayload.attempts
     }
   }
-});
\ No newline at end of file
+});

http://git-wip-us.apache.org/repos/asf/tez/blob/ba632190/tez-ui/src/main/webapp/app/scripts/models/dag.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/models/dag.js b/tez-ui/src/main/webapp/app/scripts/models/dag.js
index 7aa3915..6e6362a 100644
--- a/tez-ui/src/main/webapp/app/scripts/models/dag.js
+++ b/tez-ui/src/main/webapp/app/scripts/models/dag.js
@@ -72,7 +72,8 @@ App.Dag = App.AbstractEntity.extend({
   vertexIdToNameMap: DS.attr('array'),
 
   counterGroups: DS.attr('array'),
-  amWebServiceVersion: DS.attr('string')
+  amWebServiceVersion: DS.attr('string'),
+  containerLogs: DS.attr('array'),
 });
 
 App.CounterGroup = DS.Model.extend({

http://git-wip-us.apache.org/repos/asf/tez/blob/ba632190/tez-ui/src/main/webapp/app/templates/components/basic-table/multi-logs-cell.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/components/basic-table/multi-logs-cell.hbs
b/tez-ui/src/main/webapp/app/templates/components/basic-table/multi-logs-cell.hbs
new file mode 100644
index 0000000..5525f70
--- /dev/null
+++ b/tez-ui/src/main/webapp/app/templates/components/basic-table/multi-logs-cell.hbs
@@ -0,0 +1,28 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+
+{{#if view.cellContent.isPending}}
+  <i class="waiting"></i>&nbsp;
+{{else}}
+  {{#each log in view.cellContent.logs}}
+    <a target="_blank" href="{{unbound log.containerLog}}">{{log.id}}</a>
+    &nbsp;
+  {{else}}
+    <span class="message">Not Available!</span>
+  {{/each}}
+{{/if}}

http://git-wip-us.apache.org/repos/asf/tez/blob/ba632190/tez-ui/src/main/webapp/app/templates/dag/index.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/dag/index.hbs b/tez-ui/src/main/webapp/app/templates/dag/index.hbs
index 709f179..f7ec99f 100644
--- a/tez-ui/src/main/webapp/app/templates/dag/index.hbs
+++ b/tez-ui/src/main/webapp/app/templates/dag/index.hbs
@@ -80,6 +80,16 @@
           <td>{{t 'common.time.duration'}}</td>
           <td>{{formatDuration startTime endTime}}</td>
         </tr>
+        <tr>
+          <td>Logs</td>
+              <td>
+            {{#each log in containerLogs}}
+              <a target="_blank" a href='{{unbound log.containerLog}}'>{{log.id}}</a>
+            {{else}}
+              <span class="message">Not Available!</span>
+            {{/each}}
+              </td>
+        </tr>
       </tbody>
     </table>
   </div>


Mime
View raw message