-
Notifications
You must be signed in to change notification settings - Fork 2.9k
NIFI-14254 Correcting sort order of provenance events in clustered en… #10809
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
base: main
Are you sure you want to change the base?
Conversation
…vironments by surfacing event time in millis to the front-end
exceptionfactory
left a comment
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.
Thanks for working on this issue @pkelly-nifi.
Instead of passing down the Event Time in milliseconds, it seems worth considering parsing the timestamp on the frontend and then sorting that value. With a constrained number of rows, it doesn't seem like too much of an impact, although I would look for some additional perspective from other frontend-focus contributors.
exceptionfactory
left a comment
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.
Alternatively, as mentioned in the Jira issue description, it may be worth changing the string formatting to ISO8601, which would address several issues. That might need to be mentioned in a migration guide, but I think that may be a better solution.
|
Sounds good, thank you for your feedback. I had considered simply changing the TimestampAdapter's formatter to be an ISO8601 string, but I saw it was used in several other DTOs and I didn't want to affect anything else. I agree that it is likely better to switch to an ISO timestamp, so I will do some testing. |
|
I switched to using an ISO timestamp and everything appears to be functional and working as expected. I'd appreciate any additional feedback. |
exceptionfactory
left a comment
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.
Thanks for the adjustment @pkelly-nifi, however, changing the general TimestampAdapter impacts a number of additional components. To keep this narrowly scoped, I recommend a new Adapter named something like ISO8601DateAdapter, and then updating the ProvenanceEventDTO to use that new adapter. Also, following the ISO8601 standard, the format should be yyyy-MM-dd'T'HH:mm:ss.SSSX
|
Thank you, @exceptionfactory. That makes complete sense to do it with a new adapter. I just commited those changes, but called it ISO8601TimestampAdapter and went with yyyy-MM-dd'T'HH:mm:ss.SSSXXX since that seems to be a little more common, but I'm happy to switch it to just a single X if you feel strongly about it. |
…vironments by surfacing event time in millis to the front-end
Summary
NIFI-14254
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000NIFI-00000VerifiedstatusPull Request Formatting
mainbranchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
./mvnw clean install -P contrib-checkLicensing
LICENSEandNOTICEfilesDocumentation