You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by pr...@apache.org on 2015/06/02 22:41:58 UTC
tez git commit: TEZ-2523. Tez UI: derive applicationId from
dag/vertex id instead of relying on json data (pramachandran)
Repository: tez
Updated Branches:
refs/heads/master 237d1895d -> 4d5ea0e51
TEZ-2523. Tez UI: derive applicationId from dag/vertex id instead of relying on json data (pramachandran)
Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/4d5ea0e5
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/4d5ea0e5
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/4d5ea0e5
Branch: refs/heads/master
Commit: 4d5ea0e5151dca5dbf5d6aeb05efbe05bfc2208d
Parents: 237d189
Author: Prakash Ramachandran <pr...@hortonworks.com>
Authored: Wed Jun 3 02:10:42 2015 +0530
Committer: Prakash Ramachandran <pr...@hortonworks.com>
Committed: Wed Jun 3 02:10:42 2015 +0530
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../src/main/webapp/app/scripts/helpers/misc.js | 21 ++++++++++++++++++--
.../app/scripts/models/TimelineRestAdapter.js | 2 --
.../src/main/webapp/app/scripts/models/dag.js | 10 +++++++---
4 files changed, 27 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tez/blob/4d5ea0e5/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 60e2b89..c0b49be 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -31,6 +31,7 @@ Release 0.7.1: Unreleased
INCOMPATIBLE CHANGES
ALL CHANGES:
+ TEZ-2523. Tez UI: derive applicationId from dag/vertex id instead of relying on json data
TEZ-2505. PipelinedSorter uses Comparator objects concurrently from multiple threads.
TEZ-2504. Tez UI: tables - show status column without scrolling, numeric 0 shown as Not available
TEZ-2478. Move OneToOne routing to store events in Tasks.
http://git-wip-us.apache.org/repos/asf/tez/blob/4d5ea0e5/tez-ui/src/main/webapp/app/scripts/helpers/misc.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/helpers/misc.js b/tez-ui/src/main/webapp/app/scripts/helpers/misc.js
index a2130ab..27ff4a5 100644
--- a/tez-ui/src/main/webapp/app/scripts/helpers/misc.js
+++ b/tez-ui/src/main/webapp/app/scripts/helpers/misc.js
@@ -331,10 +331,27 @@ App.Helpers.misc = {
* @return application id for the dagid {String}
*/
getAppIdFromDagId: function(dagId) {
- var dagIdRegex = /dag_(\d+)_(\d+)_\d/;
- return dagId.replace(dagIdRegex, 'application_$1_$2');
+ var dagIdRegex = /^dag_(\d+)_(\d+)_\d+$/,
+ appId = undefined;
+ if (dagIdRegex.test(dagId)) {
+ appId = dagId.replace(dagIdRegex, 'application_$1_$2');
+ }
+ return appId;
},
+ /* Gets the application id from vertex id
+ * @param vertexId {String}
+ * @return application id for the vertexId {String}
+ */
+ getAppIdFromVertexId: function(vertexId) {
+ var vertexIdRegex = /^vertex_(\d+)_(\d+)_\d+_\d+$/
+ appId = undefined;
+ if (vertexIdRegex.test(vertexId)) {
+ appId = vertexId.replace(vertexIdRegex, 'application_$1_$2');
+ }
+ return appId;
+ },
+
/**
* Remove the specific record from store
* @param store {DS.Store}
http://git-wip-us.apache.org/repos/asf/tez/blob/4d5ea0e5/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 d763f3d..a8da1dd 100644
--- a/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
+++ b/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
@@ -93,7 +93,6 @@ var timelineJsonToDagMap = {
endTime: 'otherinfo.endTime',
name: 'primaryfilters.dagName.0',
user: 'primaryfilters.user.0',
- applicationId: 'primaryfilters.applicationId.0',
status: 'otherinfo.status',
hasFailedTaskAttempts: {
custom: function(source) {
@@ -188,7 +187,6 @@ var timelineJsonToVertexMap = {
id: 'entity',
name: 'otherinfo.vertexName',
dagID: 'primaryfilters.TEZ_DAG_ID.0',
- applicationId: 'primaryfilters.applicationId.0',
processorClassName: 'processorClassName',
counterGroups: 'otherinfo.counters.counterGroups',
inputs: 'inputs',
http://git-wip-us.apache.org/repos/asf/tez/blob/4d5ea0e5/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 a4b6eb3..f4070c3 100644
--- a/tez-ui/src/main/webapp/app/scripts/models/dag.js
+++ b/tez-ui/src/main/webapp/app/scripts/models/dag.js
@@ -42,8 +42,10 @@ App.Dag = App.AbstractEntity.extend({
// user name who ran this dag.
user: DS.attr('string'),
- // application ID of this dag.
- applicationId: DS.attr('string'),
+ // application ID of this dag.
+ applicationId: function() {
+ return App.Helpers.misc.getAppIdFromDagId(this.get('id'));
+ }.property('id'),
tezApp: DS.belongsTo('tezApp'),
appDetail: DS.belongsTo('appDetail'),
@@ -115,7 +117,9 @@ App.Vertex = App.AbstractEntity.extend({
dag: DS.belongsTo('dag'),
dagID: DS.attr('string'),
- applicationId: DS.attr('string'),
+ applicationId: function() {
+ return App.Helpers.misc.getAppIdFromVertexId(this.get('id'));
+ }.property('id'),
dagIdx: function() {
return this.get('dagID').split('_').splice(-1).pop();
}.property('dagID'),