[ZEPPELIN-4873]. Display rich duration info for insert into flink job#3794
Closed
zjffdu wants to merge 3 commits intoapache:masterfrom
Closed
[ZEPPELIN-4873]. Display rich duration info for insert into flink job#3794zjffdu wants to merge 3 commits intoapache:masterfrom
zjffdu wants to merge 3 commits intoapache:masterfrom
Conversation
45898c4 to
5f765eb
Compare
alexott
reviewed
Jun 11, 2020
|
|
||
| public void cancelJob(InterpreterContext context) throws InterpreterException { | ||
| LOGGER.info("Canceling job associated of paragraph: "+ context.getParagraphId()); | ||
| LOGGER.info("Canceling job associated of paragraph: " + context.getParagraphId()); |
Contributor
There was a problem hiding this comment.
It makes sense to use {} placeholder instead of concatenation - it won't lead to the call of the context.getParagraphId() if logger is not configured for INFO
alexott
reviewed
Jun 14, 2020
| } | ||
|
|
||
| static String toRichTimeDuration(long duration) { | ||
| long days = TimeUnit.SECONDS.toDays(duration); |
Contributor
There was a problem hiding this comment.
Maybe just use Duration data type, and then use corresponding functions, like, toDays, toHours, ...?
Contributor
Author
There was a problem hiding this comment.
It seems using Duration doesn't' save work compared current approach, I still have to get days and minus it from duration, and the same for hours, minutes, seconds. So I didn't change it.
alexott
reviewed
Jun 14, 2020
| } | ||
| } | ||
|
|
||
| static String toRichTimeDuration(long duration) { |
Contributor
There was a problem hiding this comment.
would be useful to add a javadoc for it, saying what is parameter is - seconds, milliseconds, etc.?
asfgit
pushed a commit
that referenced
this pull request
Jun 16, 2020
Trivial PR which display rich duration info instead of just x seconds. See screenshot below. [ Improvement ] * [ ] - Task * https://issues.apache.org/jira/browse/ZEPPELIN-4873 * CI pass  * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Author: Jeff Zhang <zjffdu@apache.org> Closes #3794 from zjffdu/ZEPPELIN-4873 and squashes the following commits: 459f181 [Jeff Zhang] add java doc 419818e [Jeff Zhang] address comment 9691eae [Jeff Zhang] [ZEPPELIN-4873]. Display rich duration info for insert into flink job (cherry picked from commit 3139ed6) Signed-off-by: Jeff Zhang <zjffdu@apache.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this PR for?
Trivial PR which display rich duration info instead of just x seconds. See screenshot below.
What type of PR is it?
[ Improvement ]
Todos
What is the Jira issue?
How should this be tested?
Screenshots (if appropriate)
Questions: