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-2930. Tez UI: Parent controller is not polling at times (sree)
Date Thu, 12 Nov 2015 05:04:49 GMT
Repository: tez
Updated Branches:
  refs/heads/branch-0.7 f2908599a -> aacad1866


TEZ-2930. Tez UI: Parent controller is not polling at times (sree)

(cherry picked from commit 3a1dcb6a3322607506f80c0a5bba79c178aff509)


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

Branch: refs/heads/branch-0.7
Commit: aacad1866f8044f11e3c535991b53933de13bb70
Parents: f290859
Author: Sreenath Somarajapuram <sree@apache.org>
Authored: Thu Nov 12 10:32:00 2015 +0530
Committer: Sreenath Somarajapuram <sree@apache.org>
Committed: Thu Nov 12 10:34:24 2015 +0530

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../scripts/controllers/dag-view-controller.js  |  2 ++
 .../app/scripts/controllers/dag_controller.js   |  1 +
 .../scripts/controllers/dag_index_controller.js |  2 +-
 .../scripts/controllers/polling-controller.js   | 23 +++++++++++++++-----
 .../controllers/task_attempt_controller.js      |  1 +
 .../app/scripts/controllers/task_controller.js  |  1 +
 .../controllers/task_index_controller.js        |  2 +-
 .../scripts/controllers/tez-app-controller.js   |  2 ++
 .../scripts/controllers/vertex_controller.js    |  1 +
 .../controllers/vertex_index_controller.js      |  2 +-
 tez-ui/src/main/webapp/app/scripts/router.js    |  4 ++++
 12 files changed, 34 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/aacad186/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 535f595..113c50c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,7 @@ INCOMPATIBLE CHANGES
   TEZ-2679. Admin forms of launch env settings
 
 ALL CHANGES
+  TEZ-2930. Tez UI: Parent controller is not polling at times
   TEZ-1670. Add tests for all converter functions in HistoryEventTimelineConversion.
   TEZ-2929. Tez UI: Dag details page displays vertices to be running even when dag have completed
   TEZ-2927. Tez UI: Graciously fail when system-metrics-publisher is disabled

http://git-wip-us.apache.org/repos/asf/tez/blob/aacad186/tez-ui/src/main/webapp/app/scripts/controllers/dag-view-controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/dag-view-controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/dag-view-controller.js
index aabdb0d..9456fb7 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/dag-view-controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/dag-view-controller.js
@@ -26,6 +26,8 @@ App.DagViewController = App.TablePageController.extend({
 
   cacheDomain: Ember.computed.alias('controllers.dag.id'),
 
+  showAutoUpdate: false,
+
   columnSelectorTitle: 'Customize vertex tooltip',
 
   beforeLoad: function () {

http://git-wip-us.apache.org/repos/asf/tez/blob/aacad186/tez-ui/src/main/webapp/app/scripts/controllers/dag_controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/dag_controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/dag_controller.js
index 634bd84..5d7e33a 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/dag_controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/dag_controller.js
@@ -23,6 +23,7 @@ App.DagController = App.PollingController.extend(App.Helpers.DisplayHelper,
{
   loading: true,
 
   pollingType: 'dagInfo',
+  persistConfigs: false,
 
   pollsterControl: function () {
     if(this.get('status') == 'RUNNING' &&

http://git-wip-us.apache.org/repos/asf/tez/blob/aacad186/tez-ui/src/main/webapp/app/scripts/controllers/dag_index_controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/dag_index_controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/dag_index_controller.js
index 45a82ff..d7a176a 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/dag_index_controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/dag_index_controller.js
@@ -79,7 +79,7 @@ App.DagIndexController = App.TablePageController.extend({
     else {
       this.get('pollster').stop();
     }
-  }.observes('_isRunning', 'amWebServiceVersion', 'loading', 'isActive', 'pollingEnabled'),
+  }.observes('_isRunning', 'amWebServiceVersion', 'loading', 'isActive', 'pollingEnabled',
'rowsDisplayed'),
 
   parentStatusObserver: function () {
     var parentStatus = this.get('status'),

http://git-wip-us.apache.org/repos/asf/tez/blob/aacad186/tez-ui/src/main/webapp/app/scripts/controllers/polling-controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/polling-controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/polling-controller.js
index f101c96..a31381b 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/polling-controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/polling-controller.js
@@ -21,9 +21,11 @@ var DEFAULT_MERGE_PROPS = ['status', 'progress'];
 App.PollingController = App.BaseController.extend({
 
   pollster: null,
-  pollingEnabled: true,
+  pollingEnabled: null,
   showAutoUpdate: true,
 
+  persistConfigs: true,
+
   pollingType: null,
   pollingOptions: null,
 
@@ -41,16 +43,27 @@ App.PollingController = App.BaseController.extend({
       onFailure: this.onPollingFailure.bind(this)
     }));
 
-    pollingEnabled = this.fetchConfig('pollingEnabled');
-    if(pollingEnabled != undefined) {
-      this.set('pollingEnabled', pollingEnabled);
+    if(this.get('persistConfigs')) {
+      pollingEnabled = this.fetchConfig('pollingEnabled');
+      if(pollingEnabled == undefined) {
+        pollingEnabled = true;
+      }
+      Ember.run.later(this, this.set, 'pollingEnabled', pollingEnabled, 100);
     }
   },
 
+  setup: function () {
+    this._super();
+    Ember.run.later(this, this.send, 'pollingEnabledChanged', this.get('pollingEnabled'));
+  },
+
   pollingEnabledObserver: function () {
     var pollingEnabled = this.get('pollingEnabled');
 
-    this.storeConfig('pollingEnabled', pollingEnabled);
+    if(this.get('persistConfigs')) {
+      this.storeConfig('pollingEnabled', pollingEnabled);
+    }
+
     this.send('pollingEnabledChanged', pollingEnabled);
 
     if(!pollingEnabled && this.get('pollster.isRunning')) {

http://git-wip-us.apache.org/repos/asf/tez/blob/aacad186/tez-ui/src/main/webapp/app/scripts/controllers/task_attempt_controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/task_attempt_controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/task_attempt_controller.js
index 03a62dd..3485c33 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/task_attempt_controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/task_attempt_controller.js
@@ -20,6 +20,7 @@ App.TaskAttemptController = App.BaseController.extend(App.Helpers.DisplayHelper,
   controllerName: 'TaskAttemptController',
 
   pageTitle: 'TaskAttempt',
+  persistConfigs: false,
 
   loading: true,
 

http://git-wip-us.apache.org/repos/asf/tez/blob/aacad186/tez-ui/src/main/webapp/app/scripts/controllers/task_controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/task_controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/task_controller.js
index 33a67fe..b7a6036 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/task_controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/task_controller.js
@@ -22,6 +22,7 @@ App.TaskController = App.PollingController.extend(App.Helpers.DisplayHelper,
App
   pageTitle: 'Task',
 
   loading: true,
+  persistConfigs: false,
 
   pollingType: 'taskInfo',
 

http://git-wip-us.apache.org/repos/asf/tez/blob/aacad186/tez-ui/src/main/webapp/app/scripts/controllers/task_index_controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/task_index_controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/task_index_controller.js
index 71643c2..eca4ee1 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/task_index_controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/task_index_controller.js
@@ -17,7 +17,7 @@
  */
 
  //TODO: watch individual counters.
-App.TaskIndexController = App.BaseController.extend(App.ModelRefreshMixin, {
+App.TaskIndexController = App.PollingController.extend(App.ModelRefreshMixin, {
   controllerName: 'TaskIndexController',
 
   taskStatus: function() {

http://git-wip-us.apache.org/repos/asf/tez/blob/aacad186/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-controller.js
index fd25ac6..394807d 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/tez-app-controller.js
@@ -20,6 +20,8 @@ App.TezAppController = App.BaseController.extend(App.Helpers.DisplayHelper,
App.
   controllerName: 'AppController',
 
   pageTitle: 'App',
+  persistConfigs: false,
+  pollingEnabled: true,
 
   loading: true,
 

http://git-wip-us.apache.org/repos/asf/tez/blob/aacad186/tez-ui/src/main/webapp/app/scripts/controllers/vertex_controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/vertex_controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/vertex_controller.js
index e6e58a5..e0f1203 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/vertex_controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/vertex_controller.js
@@ -20,6 +20,7 @@ App.VertexController = App.PollingController.extend(App.Helpers.DisplayHelper,
A
   controllerName: 'VertexController',
 
   pageTitle: 'Vertex',
+  persistConfigs: false,
 
   loading: true,
 

http://git-wip-us.apache.org/repos/asf/tez/blob/aacad186/tez-ui/src/main/webapp/app/scripts/controllers/vertex_index_controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/vertex_index_controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/vertex_index_controller.js
index d379f06..fedadaf 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/vertex_index_controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/vertex_index_controller.js
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-App.VertexIndexController = App.BaseController.extend(App.ModelRefreshMixin, {
+App.VertexIndexController = App.PollingController.extend(App.ModelRefreshMixin, {
   controllerName: 'VertexIndexController',
 
   needs: 'vertex',

http://git-wip-us.apache.org/repos/asf/tez/blob/aacad186/tez-ui/src/main/webapp/app/scripts/router.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/router.js b/tez-ui/src/main/webapp/app/scripts/router.js
index ceb8dd9..a575dea 100644
--- a/tez-ui/src/main/webapp/app/scripts/router.js
+++ b/tez-ui/src/main/webapp/app/scripts/router.js
@@ -282,6 +282,10 @@ App.TezAppRoute = App.BaseRoute.extend({
   setupController: setupControllerFactory('Application: %@', 'id')
 });
 
+App.TezAppIndexRoute = App.BaseRoute.extend({
+  setupController: setupControllerFactory()
+});
+
 App.TezAppDagsRoute = App.BaseRoute.extend({
   renderTemplate: renderTable,
   setupController: setupControllerFactory()


Mime
View raw message