Repository: tez Updated Branches: refs/heads/branch-0.7 aeb50ab22 -> ef555b7db
TEZ-2096. TEZ-UI : Add link to view AM log of finished & running apps (jeagles) (cherry picked from commit ba6321905527e60b26b1d7296656c7455e4cf4c6) Project: http://git-wip-us.apache.org/repos/asf/tez/repo Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/ef555b7d Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/ef555b7d Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/ef555b7d Branch: refs/heads/branch-0.7 Commit: ef555b7db5c69630a7bdb48d5052066a5dd04436 Parents: aeb50ab Author: Jonathan Eagles <[email protected]> Authored: Sun Oct 11 22:37:52 2015 -0500 Committer: Jonathan Eagles <[email protected]> Committed: Sun Oct 11 22:37:52 2015 -0500 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../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, 71 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tez/blob/ef555b7d/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 6459dfd..7511506 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,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/ef555b7d/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/ef555b7d/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/ef555b7d/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/ef555b7d/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> +{{else}} + {{#each log in view.cellContent.logs}} + <a target="_blank" href="{{unbound log.containerLog}}">{{log.id}}</a> + + {{else}} + <span class="message">Not Available!</span> + {{/each}} +{{/if}} http://git-wip-us.apache.org/repos/asf/tez/blob/ef555b7d/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>
