-
Notifications
You must be signed in to change notification settings - Fork 396
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
Fix handling of topics with periods #70
Conversation
Can one of the admins verify this patch? |
Hey @jingw, It looks like you haven't signed our Contributor License Agreement, yet.
You can read and sign our full Contributor License Agreement here. Once you've signed reply with Appreciation of efforts, clabot |
Our legal folks filled out the CLA. Please let me know if I still need to do something for that. |
if (!m.matches()) { | ||
throw new IllegalArgumentException(filename + " does not match COMMITTED_FILENAME_PATTERN"); | ||
} | ||
return Long.parseLong(m.group(4)); |
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.
Should we maybe change this to a named constant in HdfsSinkConnectorConstants
since it could change if, e.g. any grouping was adjusted in COMMITTED_FILENAME_PATTERN
?
@jingw Looks great. I left a couple of comments about cleanup and duplicated code in a test, but should all be trivial to cleanup and get committed. |
test this please |
Currently the filters / offset extraction rely on splitting on dot. If there's a topic called `namespace.topic`, it'll extract `namespace` and compare that with the topic name. This breaks recovery, where it looks for the max offset. Also fixed typo in HdfsSinkConnecorConstants and deleted unused CommittedFileWithEndOffsetFilter.
I made the suggested cleanups. Let me know if you need anything else. Thanks! |
ok to test |
LGTM, thanks for the contribution! |
Did this make it into 3.0.1? I have a topic like
|
It did not. See you at the next release! |
I put an image (from automated build) on Docker Hub from the 3.0.1 images that has a custom build with this patch applied in case anyone needs this fix. |
Is it an option to mention custom DB name for Hive instead of using the Kafka topic name.. If this is already covered, could you briefly describe the procedure .. |
…failure MINOR: Fix compilation error due to new method in SinkTaskContext
Currently the filters / offset extraction rely on splitting on dot. If there's a topic called
namespace.topic
, it'll extractnamespace
and compare that with the topic name. This breaks recovery, where it looks for the max offset.Also fixed typo in HdfsSinkConnecorConstants and deleted unused CommittedFileWithEndOffsetFilter.
Closes #45