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
HIVE-26363: converting replLogger time format from epoch to readable UTC format #3439
Conversation
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.
Are this timestamps going into the metrics table?
If so, others like CM are reading them, so you shouldn't change the type.
Also epoch seconds make doing time diffs easier.
these don't go to metrics table, these are only logged to hive.log |
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.
LGTM.
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.
Isn't there a way to have a custom mapper?
Maybe you can do the reverse of here: annotate the existing columns with custom mapper that maps as UTC time from epoch. |
@JsonSerialize(using = UTCSerializer.class) then public class UTCSerializer extends JsonSerializer {
} Then you just need to add annotation to all the State classes, and not change the type. |
Add a unit test that serializes object and checks that the JSON string has a date and not epoch ms. |
Since these are only logging messages, won't the log line already have the timestamp in readable format? public void log(LogTag tag) { The object instance, BootstrapDumpBegin for instance, is created before the LOG.info(), 2022-07-20 18:54:47,334 INFO which is milliseconds. |
What changes were proposed in this pull request?
Why are the changes needed?
Does this PR introduce any user-facing change?
How was this patch tested?