You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by sr...@apache.org on 2016/07/04 08:50:38 UTC
tez git commit: TEZ-3318. Tez UI: Polling is not restarted after RM
recovery (sree)
Repository: tez
Updated Branches:
refs/heads/master 57e017357 -> 59935e33b
TEZ-3318. Tez UI: Polling is not restarted after RM recovery (sree)
Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/59935e33
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/59935e33
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/59935e33
Branch: refs/heads/master
Commit: 59935e33bfd5138840834c773be3fac9ea2d319d
Parents: 57e0173
Author: Sreenath Somarajapuram <sr...@apache.org>
Authored: Mon Jul 4 14:19:52 2016 +0530
Committer: Sreenath Somarajapuram <sr...@apache.org>
Committed: Mon Jul 4 14:19:52 2016 +0530
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../webapp/app/routes/single-am-pollster.js | 2 +-
.../src/main/webapp/app/templates/dag/index.hbs | 15 ++++--
.../unit/routes/single-am-pollster-test.js | 49 ++++++++++++++++++++
4 files changed, 63 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tez/blob/59935e33/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b58c706..b7ad666 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -65,6 +65,7 @@ ALL CHANGES:
TEZ-3264. Tez UI: UI discrepancies
TEZ-3292. Tez UI: UTs breaking with timezone change
TEZ-3288. Tez UI: Display more details in the error bar
+ TEZ-3318. Tez UI: Polling is not restarted after RM recovery
Release 0.8.5: Unreleased
http://git-wip-us.apache.org/repos/asf/tez/blob/59935e33/tez-ui/src/main/webapp/app/routes/single-am-pollster.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/routes/single-am-pollster.js b/tez-ui/src/main/webapp/app/routes/single-am-pollster.js
index 4a0d507..4b72ee7 100644
--- a/tez-ui/src/main/webapp/app/routes/single-am-pollster.js
+++ b/tez-ui/src/main/webapp/app/routes/single-am-pollster.js
@@ -26,7 +26,7 @@ export default AmPollsterRoute.extend({
return isComplete === false && this._super();
}),
- _loadedValueObserver: Ember.observer("loadedValue", function () {
+ _loadedValueObserver: Ember.observer("loadedValue.loadTime", function () {
var loadedValue = this.get("loadedValue");
this.set("polledRecords", loadedValue ? [this.get("loadedValue")] : null);
})
http://git-wip-us.apache.org/repos/asf/tez/blob/59935e33/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 6a47dbe..068fb62 100644
--- a/tez-ui/src/main/webapp/app/templates/dag/index.hbs
+++ b/tez-ui/src/main/webapp/app/templates/dag/index.hbs
@@ -77,9 +77,21 @@
</tr>
</tbody>
</table>
+{{else}}
+ {{partial "loading"}}
+{{/if}}
+<!--
+ * Splitting the conditional blocks so that stats from inside the outlet,
+ is aligned with the details table.
+ * Keeping outlet outside the conditional block so that the loading of DAG
+ details doesn\u2019t affect the outlet content.
+-->
+<span class="{{unless loaded 'no-visible'}}">
{{outlet}}
+</span>
+{{#if loaded}}
{{#if model.callerDescription}}
{{caller-info type=model.callerContext info=model.callerDescription}}
{{/if}}
@@ -94,7 +106,4 @@
</div>
</div>
{{/if}}
-
-{{else}}
- {{partial "loading"}}
{{/if}}
http://git-wip-us.apache.org/repos/asf/tez/blob/59935e33/tez-ui/src/main/webapp/tests/unit/routes/single-am-pollster-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/unit/routes/single-am-pollster-test.js b/tez-ui/src/main/webapp/tests/unit/routes/single-am-pollster-test.js
index 69c9457..f9b3385 100644
--- a/tez-ui/src/main/webapp/tests/unit/routes/single-am-pollster-test.js
+++ b/tez-ui/src/main/webapp/tests/unit/routes/single-am-pollster-test.js
@@ -16,6 +16,8 @@
* limitations under the License.
*/
+import Ember from 'ember';
+
import { moduleFor, test } from 'ember-qunit';
moduleFor('route:single-am-pollster', 'Unit | Route | single am pollster', {
@@ -30,3 +32,50 @@ test('Basic creation test', function(assert) {
assert.ok(route.canPoll);
assert.ok(route._loadedValueObserver);
});
+
+test('canPoll test', function(assert) {
+ let route = this.subject({
+ polling: {
+ resetPoll: function () {}
+ },
+ _canPollObserver: function () {}
+ });
+
+ assert.notOk(route.get("canPoll"));
+
+ route.setProperties({
+ polledRecords: {},
+ loadedValue: {
+ app: {
+ isComplete: false
+ }
+ }
+ });
+ assert.ok(route.get("canPoll"), true);
+
+ route.set("loadedValue.app.isComplete", true);
+ assert.notOk(route.get("canPoll"));
+
+ route.set("loadedValue.app.isComplete", undefined);
+ assert.notOk(route.get("canPoll"));
+});
+
+test('_loadedValueObserver test', function(assert) {
+ let route = this.subject({
+ polling: {
+ resetPoll: function () {}
+ },
+ _canPollObserver: function () {}
+ }),
+ loadedValue = Ember.Object.create();
+
+ assert.equal(route.get("polledRecords"), null);
+
+ route.set("loadedValue", loadedValue);
+ assert.equal(route.get("polledRecords.0"), loadedValue);
+
+ route.set("polledRecords", null);
+
+ loadedValue.set("loadTime", 1);
+ assert.equal(route.get("polledRecords.0"), loadedValue);
+});