You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by su...@apache.org on 2019/01/24 09:33:22 UTC
[hadoop] branch branch-3.0 updated: YARN-8961. [UI2] Flow Run End
Time shows 'Invalid date'. Contributed by Akhil PB
This is an automated email from the ASF dual-hosted git repository.
sunilg pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new d11fdbb YARN-8961. [UI2] Flow Run End Time shows 'Invalid date'. Contributed by Akhil PB
d11fdbb is described below
commit d11fdbb7ac73d3a98050ca1eb76d0497693c3273
Author: Sunil G <su...@apache.org>
AuthorDate: Thu Jan 24 15:01:43 2019 +0530
YARN-8961. [UI2] Flow Run End Time shows 'Invalid date'. Contributed by Akhil PB
(cherry picked from commit c7264459901e59021e180228cea3a6ae334a339f)
---
.../src/main/webapp/app/serializers/yarn-flowrun-brief.js | 11 +++++++++--
.../src/main/webapp/app/serializers/yarn-flowrun.js | 11 +++++++++--
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-flowrun-brief.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-flowrun-brief.js
index 67603bb..89dc85a 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-flowrun-brief.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-flowrun-brief.js
@@ -37,9 +37,9 @@ export default DS.JSONAPISerializer.extend({
runid: payload.info.SYSTEM_INFO_FLOW_RUN_ID,
shownid: payload.id,
type: payload.type,
- createTime: Converter.timeStampToDate(payload.createdtime),
+ createTime: this.checkDateValidity(payload.createdtime),
createTimeRaw: payload.createdtime,
- endTime: Converter.timeStampToDate(payload.info.SYSTEM_INFO_FLOW_RUN_END_TIME),
+ endTime: this.checkDateValidity(payload.info.SYSTEM_INFO_FLOW_RUN_END_TIME),
endTimeRaw: payload.info.SYSTEM_INFO_FLOW_RUN_END_TIME || 0,
user: payload.info.SYSTEM_INFO_USER,
uid: payload.info.UID,
@@ -51,6 +51,13 @@ export default DS.JSONAPISerializer.extend({
return this._super(store, primaryModelClass, fixedPayload, id, requestType);
},
+ checkDateValidity(timestamp) {
+ if (timestamp && timestamp > 0) {
+ return Converter.timeStampToDate(timestamp);
+ }
+ return 'N/A';
+ },
+
normalizeArrayResponse(store, primaryModelClass, payload, id, requestType) {
var normalizedArrayResponse = {data: []};
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-flowrun.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-flowrun.js
index 931d134..97dde35 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-flowrun.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-flowrun.js
@@ -34,8 +34,8 @@ export default DS.JSONAPISerializer.extend({
runid: payload.info.SYSTEM_INFO_FLOW_RUN_ID,
shownid: payload.id,
type: payload.type,
- createTime: Converter.timeStampToDate(payload.createdtime),
- endTime: Converter.timeStampToDate(payload.info.SYSTEM_INFO_FLOW_RUN_END_TIME),
+ createTime: this.checkDateValidity(payload.createdtime),
+ endTime: this.checkDateValidity(payload.info.SYSTEM_INFO_FLOW_RUN_END_TIME),
user: payload.info.SYSTEM_INFO_USER,
metrics: payload.metrics,
}
@@ -44,6 +44,13 @@ export default DS.JSONAPISerializer.extend({
return fixedPayload;
},
+ checkDateValidity(timestamp) {
+ if (timestamp && timestamp > 0) {
+ return Converter.timeStampToDate(timestamp);
+ }
+ return 'N/A';
+ },
+
normalizeSingleResponse(store, primaryModelClass, payload, id/*, requestType*/) {
var p = this.internalNormalizeSingleResponse(store,
primaryModelClass, payload, id);
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org