Repository: spark
Updated Branches:
  refs/heads/master 675921040 -> 6878f3e2e


[SPARK-15641] HistoryServer to not show invalid date for incomplete application

## What changes were proposed in this pull request?
For incomplete applications in HistoryServer, the complete column will show "-" 
instead of incorrect date.

## How was this patch tested?
manually tested.

Author: catapan <cedarpa...@gmail.com>
Author: Ziying Pan <cedarpan@Ziyings-MacBook.local>

Closes #13396 from catapan/SPARK-15641_fix_completed_column.


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

Branch: refs/heads/master
Commit: 6878f3e2eafe0bd2e19a14ddffe6e0c1e545a42d
Parents: 6759210
Author: catapan <cedarpa...@gmail.com>
Authored: Tue May 31 06:55:07 2016 -0500
Committer: Sean Owen <so...@cloudera.com>
Committed: Tue May 31 06:55:07 2016 -0500

----------------------------------------------------------------------
 core/src/main/resources/org/apache/spark/ui/static/historypage.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/6878f3e2/core/src/main/resources/org/apache/spark/ui/static/historypage.js
----------------------------------------------------------------------
diff --git a/core/src/main/resources/org/apache/spark/ui/static/historypage.js 
b/core/src/main/resources/org/apache/spark/ui/static/historypage.js
index ef89a9a..d216166 100644
--- a/core/src/main/resources/org/apache/spark/ui/static/historypage.js
+++ b/core/src/main/resources/org/apache/spark/ui/static/historypage.js
@@ -54,7 +54,8 @@ function makeIdNumeric(id) {
 }
 
 function formatDate(date) {
-  return date.split(".")[0].replace("T", " ");
+  if (date <= 0) return "-";
+  else return date.split(".")[0].replace("T", " ");
 }
 
 function getParameterByName(name, searchString) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to