ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pallav...@apache.org
Subject ambari git commit: AMBARI-20416. Need some way to know a plan is vectorized (pallavkul)
Date Tue, 14 Mar 2017 11:48:12 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 8620f4c4e -> a6eb31308


AMBARI-20416. Need some way to know a plan is vectorized (pallavkul)


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

Branch: refs/heads/branch-2.5
Commit: a6eb313086dd03ac63fd8a9a6e57d0e8ff0b5270
Parents: 8620f4c
Author: pallavkul <pallav.kul@gmail.com>
Authored: Tue Mar 14 17:16:14 2017 +0530
Committer: pallavkul <pallav.kul@gmail.com>
Committed: Tue Mar 14 17:17:56 2017 +0530

----------------------------------------------------------------------
 .../main/resources/ui/app/components/visual-explain.js    | 10 +++++++++-
 .../hive20/src/main/resources/ui/app/routes/databases.js  |  4 +++-
 .../resources/ui/app/routes/databases/database/tables.js  |  4 +++-
 .../ui/app/templates/components/visual-explain-detail.hbs |  3 +++
 .../ui/app/templates/components/visual-explain.hbs        |  2 +-
 .../resources/ui/app/utils/hive-explainer/renderer.js     |  5 ++++-
 .../resources/ui/app/utils/hive-explainer/transformer.js  |  1 +
 7 files changed, 24 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a6eb3130/contrib/views/hive20/src/main/resources/ui/app/components/visual-explain.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/components/visual-explain.js b/contrib/views/hive20/src/main/resources/ui/app/components/visual-explain.js
index fd450cc..10ff616 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/components/visual-explain.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/components/visual-explain.js
@@ -29,6 +29,8 @@ export default Ember.Component.extend({
 
   explainDetailData: '',
 
+  vectorizedInfo: null,
+
   draggable: Ember.Object.create(),
 
   visualExplainInput: Ember.computed('visualExplainJson', function () {
@@ -39,8 +41,13 @@ export default Ember.Component.extend({
 
   didInsertElement() {
     this._super(...arguments);
-    const onRequestDetail = data => this.set('explainDetailData', JSON.stringify( data,
null, '  ') );
     const explainData = JSON.parse(this.get('visualExplainInput'));
+    const onRequestDetail = (data, vectorized) => {
+      this.set('explainDetailData', JSON.stringify( data, null, '  ') );
+      console.log('vectorizedInfo', vectorized['Execution mode:']);
+      this.set('vectorizedInfo', vectorized['Execution mode:']);
+    };
+
     // if(explainData) {
       explain(explainData, '#explain-container', onRequestDetail, this.get('draggable'));
     // }
@@ -68,6 +75,7 @@ export default Ember.Component.extend({
     closeModal(){
       this.set('showDetailsModal', false);
       this.set('explainDetailData', '');
+      this.set('vectorizedInfo', '');
       return false;
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/a6eb3130/contrib/views/hive20/src/main/resources/ui/app/routes/databases.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/databases.js b/contrib/views/hive20/src/main/resources/ui/app/routes/databases.js
index 02dbcac..185be01 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/routes/databases.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/routes/databases.js
@@ -34,7 +34,9 @@ export default Ember.Route.extend(UILoggerMixin, {
   },
 
   deactivate() {
-    this.get('autoRefresh').stopDatabasesAutoRefresh();
+    if(ENV.APP.SHOULD_AUTO_REFRESH_DATABASES) {
+      this.get('autoRefresh').stopDatabasesAutoRefresh();
+    }
   },
 
   _databasesRefreshed() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/a6eb3130/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables.js
b/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables.js
index f5940e3..0e9042e 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables.js
@@ -32,7 +32,9 @@ export default Ember.Route.extend(UILoggerMixin, {
   },
 
   deactivate() {
-    this.get('autoRefresh').stopTablesAutoRefresh(this.controller.get('database.name'));
+    if(ENV.APP.SHOULD_AUTO_REFRESH_TABLES) {
+      this.get('autoRefresh').stopTablesAutoRefresh(this.controller.get('database.name'));
+    }
   },
 
   tableRefreshStarting(databaseName) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/a6eb3130/contrib/views/hive20/src/main/resources/ui/app/templates/components/visual-explain-detail.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/visual-explain-detail.hbs
b/contrib/views/hive20/src/main/resources/ui/app/templates/components/visual-explain-detail.hbs
index 3df8e94..12a0897 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/visual-explain-detail.hbs
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/visual-explain-detail.hbs
@@ -22,6 +22,9 @@
   </div>
   <div class="col-md-12">
     <div>&nbsp;</div>
+    {{#if vectorizedInfo}}
+        <div class="vector-info">{{vectorizedInfo}}</div>
+    {{/if}}
     <pre class="prettyprint">{{explainDetailData}}</pre>
   </div>
 </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/a6eb3130/contrib/views/hive20/src/main/resources/ui/app/templates/components/visual-explain.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/templates/components/visual-explain.hbs
b/contrib/views/hive20/src/main/resources/ui/app/templates/components/visual-explain.hbs
index 30f9405..2edeab2 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/templates/components/visual-explain.hbs
+++ b/contrib/views/hive20/src/main/resources/ui/app/templates/components/visual-explain.hbs
@@ -34,7 +34,7 @@
 {{/unless}}
 
 {{#if showDetailsModal}}
-  {{visual-explain-detail closeModal='closeModal' explainDetailData=explainDetailData}}
+  {{visual-explain-detail closeModal='closeModal' explainDetailData=explainDetailData vectorizedInfo=vectorizedInfo}}
 {{/if}}
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/a6eb3130/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/renderer.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/renderer.js
b/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/renderer.js
index b36d7b4..1cfcb15 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/renderer.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/renderer.js
@@ -132,7 +132,10 @@ function recurseC(children, onRequestDetail) {
           .append('xhtml:body')
         .style('margin', 0)
           .html(d => getRenderer(d._operator)(d))
-        .on('click', d => onRequestDetail(doClean(d)));
+        .on('click', d => {
+          const vertex = d3.select(Ember.$(d3.select(this).node()).closest('.vertex').get(0)).data()[0];
+          onRequestDetail(doClean(d), vertex);
+        });
 
       children
         .call(recurseC, onRequestDetail);

http://git-wip-us.apache.org/repos/asf/ambari/blob/a6eb3130/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/transformer.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/transformer.js
b/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/transformer.js
index d88de98..ac592ec 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/transformer.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/utils/hive-explainer/transformer.js
@@ -206,6 +206,7 @@ function getTezVertices(plan) {
 
         return Object.assign({}, doCloneAndOmit(cVertex, VERTEX_TREE_KEYS), {
           _vertex: cVertexKey,
+          _execution: vertexObj['Execution mode:'] || 'Unavailable',
           _children: children,
         });
       });


Mime
View raw message