-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[ZEPPELIN-704] Display elapse time for long running paragraph #862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks @sagarkulkarni3592 for very useful feature. It works nicely with 'default' looknfeel. However, 'simple' looknfeel it displays elapsed time above the progress bar on left side. like Could this be displayed below the progress bar on the right side in 'simple' looknfeel? the same position that "Took XX seconds" message placed. |
|
@Leemoonsoo Thank you for your suggestion. |
…lligned for Simple looknfeel.
48bd8f9 to
4f64ada
Compare
|
@sagarkulkarni3592 Thanks for taking care. |
|
@Leemoonsoo Thanks for the suggestion. Had to change property of Simple.css top: -9px from -13px as it was appearing on the loading blue line. Is this good? |
…moved ' time' text from 'Last updated by xxx at time xxx'.
|
Even after merging the pull request for #848 for issue ZEPPELIN-819, it was showing "Took xx seconds. Last updated by undefined at time XXX". Fixed this to "Took xx seconds. Last updated by anonymous at time XXX". |
|
@prabhjyotsingh Thank u for the suggestion about text float. |
f6cd0e8 to
a491545
Compare
a491545 to
cb76ed5
Compare
|
@prabhjyotsingh Thank you for the bug. Fixed this using standard ISO time format. Tested with different time zones. This also changes the time format (customizable in code) at statement "last updated by xx at ". Added moment.js : Now, took xx seconds text will show as per moment.js documentattion. Same is the case for elapsed time. |
…xtra features using Moment.js.
b5303ca to
b18811f
Compare
| var desc = 'Took ' + (timeMs/1000) + ' seconds. Last updated by ' + user + ' at time ' + dateUpdated + '.'; | ||
| var desc = 'Took ' | ||
| + moment.duration(moment(pdata.dateFinished).diff(moment(pdata.dateStarted))).humanize() | ||
| + '. Last updated by ' + user + ' at ' + $rootScope.dateToString(dateUpdated) + '.'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grunt build fails
[INFO] src/app/notebook/paragraph/paragraph.controller.js
[INFO] line 979 col 5 Bad line breaking before '+'.
[INFO] line 980 col 5 Bad line breaking before '+'.
593d241 to
40db463
Compare
88f3b1c to
3c7494d
Compare
|
I would prefer keeping the |
|
@corneadoug Thank you for the suggestion. |
|
@sagarkulkarni3592 if you follow moment.js documentation "Started a few seconds ago", also looks like a good option |
|
@corneadoug So, it will be "a few seconds elapsed" or "2 minutes elapsed". It this good? |
|
@sagarkulkarni3592 "Started 2 minutes ago" looks more gracious :) |
|
@corneadoug Latest commit have both the changes you suggested. :) |
115fe8c to
1dabc5e
Compare
1dabc5e to
f912504
Compare
|
Tested, works well. LGTM! |
|
Tested, Merging if there is no more discussions |
|
Merging as it includes HOTFIX for failing Integration Tests |
|
@sagarkulkarni3592 could you please check that JIRA issue is assigned to you well? |
### What is this PR for? For long running paragraph, it is hard to know how long it has already been running. We should either have the elapsed time displayed ### What type of PR is it? [Bug Fix ] ### Todos ### What is the Jira issue? ZEPPELIN-704 (https://issues.apache.org/jira/browse/ZEPPELIN-704) ### How should this be tested? -Open a note. -Run a paragraph , It should show you the elapsed time. ### Screenshots (if appropriate)  ### Questions: * Does the licenses files need update?No * Is there breaking changes for older versions?No * Does this needs documentation?No Author: Sagar Kulkarni <sagarkulkarni3592@gmail.com> Closes apache#862 from sagarkulkarni3592/ZEPPELIN-704 and squashes the following commits: f912504 [Sagar Kulkarni] Corrected the mistake. 192f3f7 [Sagar Kulkarni] Changed the elapsed time string to "Started xx seconds/minutes/hours ago.". 6e1a395 [Sagar Kulkarni] Removed function dateToString and made Moment.js call directly. 5a1cee9 [Sagar Kulkarni] Selenium test failure fixing. 536835a [Sagar Kulkarni] Fixed other build issues - Selenium test failures fixed. 52f2fed [Sagar Kulkarni] Fixing build issue - Selenium test fail fixed. 0d8a68a [Sagar Kulkarni] Merge branch 'master' into ZEPPELIN-704 913515a [Sagar Kulkarni] Corrected the compilation error. b18811f [Sagar Kulkarni] Fixed the timezone difference using standard ISO time format. Added extra features using Moment.js. 93dd602 [Sagar Kulkarni] Merge remote-tracking branch 'origin/master' into ZEPPELIN-704 cb76ed5 [Sagar Kulkarni] Fixed "Text floats outside paragraph" issue in both "default" and "simple" looknfeel. 566da6a [Sagar Kulkarni] ZEPPELIN-819 - Fixed the username from 'undefined' to 'anonymous'. Removed ' time' text from 'Last updated by xxx at time xxx'. 6248eac [Sagar Kulkarni] Merge branch 'master' of https://github.com/sagarkulkarni3592/incubator-zeppelin into ZEPPELIN-704 a991b07 [Sagar Kulkarni] ZEPPELIN-704 Aligned elapsed time message with took xx seconds message 4f64ada [Sagar Kulkarni] ZEPPELIN-704 Display elapse time for long running paragraph - Right alligned for Simple looknfeel. 7c340d4 [Sagar Kulkarni] ZEPPELIN-704 Display elapse time for long running paragraph
### What is this PR for? This bug seems to be produced by #862. Currently a exported notebook is not imported with below error message. ``` ERROR [2016-06-20 17:19:21,797] ({qtp559670971-14} NotebookServer.java[onMessage]:231) - Can't handle message com.google.gson.JsonSyntaxException: 2016-06-20T14:33:31-0700 at com.google.gson.internal.bind.DateTypeAdapter.deserializeToDate(DateTypeAdapter.java:81) at com.google.gson.internal.bind.DateTypeAdapter.read(DateTypeAdapter.java:66) at com.google.gson.internal.bind.DateTypeAdapter.read(DateTypeAdapter.java:41) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:81) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:60) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172) at com.google.gson.Gson.fromJson(Gson.java:791) at org.apache.zeppelin.notebook.Notebook.importNote(Notebook.java:199) at org.apache.zeppelin.socket.NotebookServer.importNote(NotebookServer.java:656) at org.apache.zeppelin.socket.NotebookServer.onMessage(NotebookServer.java:175) at org.apache.zeppelin.socket.NotebookSocket.onWebSocketText(NotebookSocket.java:56) at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.onTextMessage(JettyListenerEventDriver.java:128) at org.eclipse.jetty.websocket.common.message.SimpleTextMessage.messageComplete(SimpleTextMessage.java:69) at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.appendMessage(AbstractEventDriver.java:65) at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.onTextFrame(JettyListenerEventDriver.java:122) at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:161) at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:309) at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:214) at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:220) at org.eclipse.jetty.websocket.common.Parser.parse(Parser.java:258) at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:632) at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:480) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) at java.lang.Thread.run(Thread.java:745) Caused by: java.text.ParseException: Unparseable date: "2016-06-20T14:33:31-0700" at java.text.DateFormat.parse(DateFormat.java:366) at com.google.gson.internal.bind.DateTypeAdapter.deserializeToDate(DateTypeAdapter.java:79) ``` ### What type of PR is it? Bug Fix ### Todos ### What is the Jira issue? [ZEPPELIN-1028](https://issues.apache.org/jira/browse/ZEPPELIN-1028) ### How should this be tested? 1. Apply this patch (Build the source and restart Zeppelin) 2. Export a notebook and try to import it again 3. It should be imported as before ### Screenshots (if appropriate) With this patch, we can import the below two types of date format notebooks. - Exported after #862 merged : `yyyy-MM-dd'T'HH:mm:ssZ` <img width="289" alt="screen shot 2016-06-22 at 12 18 01 pm" src="https://cloud.githubusercontent.com/assets/10060731/16280468/6ebad710-3874-11e6-9ce6-b38e239649a2.png"> - Exported before #862 merged : `MMM dd, yyyy HH:mm:ss` <img width="288" alt="screen shot 2016-06-22 at 12 17 31 pm" src="https://cloud.githubusercontent.com/assets/10060731/16280459/6a4f256e-3874-11e6-848e-ec1ff6e9b441.png"> ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Author: AhyoungRyu <fbdkdud93@hanmail.net> Closes #1055 from AhyoungRyu/ZEPPELIN-1028 and squashes the following commits: 8f91d2d [AhyoungRyu] Fix class description 829bcae [AhyoungRyu] Rename NotebookImportSerializer -> NotebookImportDeserializer 2dff9bb [AhyoungRyu] Support two date format for backward compatibility 2d8fc66 [AhyoungRyu] Remove new line 7c493bf [AhyoungRyu] Change date format in importNote 479c0d0 [AhyoungRyu] Fix exported notebook importing error (cherry picked from commit 57e0dc8) Signed-off-by: Lee moon soo <moon@apache.org>
### What is this PR for? This bug seems to be produced by #862. Currently a exported notebook is not imported with below error message. ``` ERROR [2016-06-20 17:19:21,797] ({qtp559670971-14} NotebookServer.java[onMessage]:231) - Can't handle message com.google.gson.JsonSyntaxException: 2016-06-20T14:33:31-0700 at com.google.gson.internal.bind.DateTypeAdapter.deserializeToDate(DateTypeAdapter.java:81) at com.google.gson.internal.bind.DateTypeAdapter.read(DateTypeAdapter.java:66) at com.google.gson.internal.bind.DateTypeAdapter.read(DateTypeAdapter.java:41) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:81) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:60) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172) at com.google.gson.Gson.fromJson(Gson.java:791) at org.apache.zeppelin.notebook.Notebook.importNote(Notebook.java:199) at org.apache.zeppelin.socket.NotebookServer.importNote(NotebookServer.java:656) at org.apache.zeppelin.socket.NotebookServer.onMessage(NotebookServer.java:175) at org.apache.zeppelin.socket.NotebookSocket.onWebSocketText(NotebookSocket.java:56) at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.onTextMessage(JettyListenerEventDriver.java:128) at org.eclipse.jetty.websocket.common.message.SimpleTextMessage.messageComplete(SimpleTextMessage.java:69) at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.appendMessage(AbstractEventDriver.java:65) at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.onTextFrame(JettyListenerEventDriver.java:122) at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:161) at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:309) at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:214) at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:220) at org.eclipse.jetty.websocket.common.Parser.parse(Parser.java:258) at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:632) at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:480) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) at java.lang.Thread.run(Thread.java:745) Caused by: java.text.ParseException: Unparseable date: "2016-06-20T14:33:31-0700" at java.text.DateFormat.parse(DateFormat.java:366) at com.google.gson.internal.bind.DateTypeAdapter.deserializeToDate(DateTypeAdapter.java:79) ``` ### What type of PR is it? Bug Fix ### Todos ### What is the Jira issue? [ZEPPELIN-1028](https://issues.apache.org/jira/browse/ZEPPELIN-1028) ### How should this be tested? 1. Apply this patch (Build the source and restart Zeppelin) 2. Export a notebook and try to import it again 3. It should be imported as before ### Screenshots (if appropriate) With this patch, we can import the below two types of date format notebooks. - Exported after #862 merged : `yyyy-MM-dd'T'HH:mm:ssZ` <img width="289" alt="screen shot 2016-06-22 at 12 18 01 pm" src="https://cloud.githubusercontent.com/assets/10060731/16280468/6ebad710-3874-11e6-9ce6-b38e239649a2.png"> - Exported before #862 merged : `MMM dd, yyyy HH:mm:ss` <img width="288" alt="screen shot 2016-06-22 at 12 17 31 pm" src="https://cloud.githubusercontent.com/assets/10060731/16280459/6a4f256e-3874-11e6-848e-ec1ff6e9b441.png"> ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Author: AhyoungRyu <fbdkdud93@hanmail.net> Closes #1055 from AhyoungRyu/ZEPPELIN-1028 and squashes the following commits: 8f91d2d [AhyoungRyu] Fix class description 829bcae [AhyoungRyu] Rename NotebookImportSerializer -> NotebookImportDeserializer 2dff9bb [AhyoungRyu] Support two date format for backward compatibility 2d8fc66 [AhyoungRyu] Remove new line 7c493bf [AhyoungRyu] Change date format in importNote 479c0d0 [AhyoungRyu] Fix exported notebook importing error
### What is this PR for? It had been pointed out in the mailing list that after #862, the execution time was changed to humanized fashion, while we would want to keep something more precise in that case. This PR is rolling back to the old precise time for execution time. ### What type of PR is it? Improvement ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-1161 ### How should this be tested? Run a paragraph, after it is finished, it should show: `Took x seconds.` instead of `Took a few seconds` (or Hours, Minutes, Sec) ### Screenshot  ### Questions: * Does the licenses files need update? Yes * Is there breaking changes for older versions? No * Does this needs documentation? No Author: Damien CORNEAU <corneadoug@gmail.com> Closes #1172 from corneadoug/ZEPPELIN-1161 and squashes the following commits: df752bd [Damien CORNEAU] Add licence of new dependency 2c21894 [Damien CORNEAU] Fix jscs errors 9f756e3 [Damien CORNEAU] add moment plugin for duration 935f348 [Damien CORNEAU] Fix jxcs e4f7625 [Damien CORNEAU] Revert seconds ago for execution time
### What is this PR for? It had been pointed out in the mailing list that after #862, the execution time was changed to humanized fashion, while we would want to keep something more precise in that case. This PR is rolling back to the old precise time for execution time. ### What type of PR is it? Improvement ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-1161 ### How should this be tested? Run a paragraph, after it is finished, it should show: `Took x seconds.` instead of `Took a few seconds` (or Hours, Minutes, Sec) ### Screenshot  ### Questions: * Does the licenses files need update? Yes * Is there breaking changes for older versions? No * Does this needs documentation? No Author: Damien CORNEAU <corneadoug@gmail.com> Closes #1172 from corneadoug/ZEPPELIN-1161 and squashes the following commits: df752bd [Damien CORNEAU] Add licence of new dependency 2c21894 [Damien CORNEAU] Fix jscs errors 9f756e3 [Damien CORNEAU] add moment plugin for duration 935f348 [Damien CORNEAU] Fix jxcs e4f7625 [Damien CORNEAU] Revert seconds ago for execution time (cherry picked from commit dbe5e6c) Signed-off-by: Mina Lee <minalee@apache.org>
### What is this PR for? It had been pointed out in the mailing list that after apache#862, the execution time was changed to humanized fashion, while we would want to keep something more precise in that case. This PR is rolling back to the old precise time for execution time. ### What type of PR is it? Improvement ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-1161 ### How should this be tested? Run a paragraph, after it is finished, it should show: `Took x seconds.` instead of `Took a few seconds` (or Hours, Minutes, Sec) ### Screenshot  ### Questions: * Does the licenses files need update? Yes * Is there breaking changes for older versions? No * Does this needs documentation? No Author: Damien CORNEAU <corneadoug@gmail.com> Closes apache#1172 from corneadoug/ZEPPELIN-1161 and squashes the following commits: df752bd [Damien CORNEAU] Add licence of new dependency 2c21894 [Damien CORNEAU] Fix jscs errors 9f756e3 [Damien CORNEAU] add moment plugin for duration 935f348 [Damien CORNEAU] Fix jxcs e4f7625 [Damien CORNEAU] Revert seconds ago for execution time


















What is this PR for?
For long running paragraph, it is hard to know how long it has already been running. We should either have the elapsed time displayed
What type of PR is it?
[Bug Fix ]
Todos
What is the Jira issue?
ZEPPELIN-704 (https://issues.apache.org/jira/browse/ZEPPELIN-704)
How should this be tested?
-Open a note.
-Run a paragraph , It should show you the elapsed time.
Screenshots (if appropriate)
Questions: