Adding kafka offset support for period and timestamp#9193
Adding kafka offset support for period and timestamp#9193Jackie-Jiang merged 1 commit intoapache:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9193 +/- ##
=============================================
- Coverage 69.98% 24.76% -45.22%
+ Complexity 5007 53 -4954
=============================================
Files 1854 1843 -11
Lines 98871 98572 -299
Branches 15043 15015 -28
=============================================
- Hits 69191 24415 -44776
- Misses 24799 71725 +46926
+ Partials 4881 2432 -2449
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Modify the exception message
There was a problem hiding this comment.
Seems we want to go back a certain period from the passed in time. IMO this method is a little bit confusing, so suggest removing it and make the caller use convertPeriodToMillis() instead
There was a problem hiding this comment.
Suggest not adding this extra check. Negative period should also be valid
There was a problem hiding this comment.
| public static Long convertDateTimeToMillis(String timeStr) { | |
| public static Long convertTimestampToMillis(String timeStr) { |
6d54cb0 to
680b8f7
Compare
There was a problem hiding this comment.
nit: in both cases, log a warn if offsetAndTimestamp == null?
d0df255 to
79535ee
Compare
There was a problem hiding this comment.
Since we already check if the period is valid, we should just remove the try-catch
There was a problem hiding this comment.
Suggest also logging the topic partition and offset string to provide more info for debugging
22a4392 to
20e0d74
Compare
Add date format to comment Fixing the review comments Add warn logs for better observability Remove the try catch and enhance the log statement Fix checkstyle
20e0d74 to
59f4860
Compare
|
@ravishankar15 Thanks for contributing the feature! Can you help also update the Pinot documentation to include the new config options? The documentation is backed by this repo: https://github.com/pinot-contrib/pinot-docs |
@ravishankar15 would you please update the docs? Right now it reads incorrect: https://docs.pinot.apache.org/basics/data-import/pinot-stream-ingestion/import-from-apache-kafka#creating-a-table-configuration Here as well: https://docs.pinot.apache.org/configuration-reference/table#indexing-config Thanks in advance! |
@npawar I think the master changes in the doc is not reflecting in the official documentation I have made the doc changes to the master Ref: pinot-contrib/pinot-docs#115 |
Fix #7250