-
Notifications
You must be signed in to change notification settings - Fork 540
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
Writing and reading offsets only from kafka #1647
Comments
we are using kafka 2.5 |
Secor use ZK for 2 purposes:
1. keep track of kafka message progress per topic/partition
2. use ZK as a distributed lock during file uploading
Purpose 1 can be switched to kafka as the offset storage, but the
dependency on ZK as a global lock is still there.
…On Tue, Oct 20, 2020 at 12:49 PM naresh-kotha-ck ***@***.***> wrote:
we are using kafka 2.5
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1647 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABYJP75U7RSQCMQTQDW7ITDSLXSU5ANCNFSM4SYZM4XA>
.
|
yes but for purpose 1 I still see offsets in zookeeper even I set below properties kafka.offsets.storage=kafka kafka.dual.commit.enabled= false Can you please let me know if I am missing it |
For purpose 1, I think there are still some code that writes the offset to
ZK (while also writing to kafka), but the reader is only reading offsets
from Kafka. If you prefer, you can submit a PR to clear those writing
places (I think they are mostly in Uploader.java).
…On Wed, Oct 21, 2020 at 10:30 AM naresh-kotha-ck ***@***.***> wrote:
yes but for purpose 1 I still see offsets in zookeeper even I set below
properties
kafka.offsets.storage=kafka
kafka.dual.commit.enabled= false
Can you please let me know if I am missing it
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1647 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABYJP75YUUOQ5TNUJL2KK2LSL4LE3ANCNFSM4SYZM4XA>
.
|
Sure I will create a PR for that . Thanks for the details |
Hey @HenryCaiHaiying, |
I think 'dual.commit.enabled' = false, the offsets will be written to ZK as
default.
…On Thu, Dec 3, 2020 at 5:22 AM DomWos ***@***.***> wrote:
Hey @HenryCaiHaiying <https://github.com/HenryCaiHaiying>,
I also think there is a bug or inconsistency in SecorKafkaMessageIterator
or I don't understand something correctly.
Currently, there is a variable that is responsible for skipping reading
offsets from zookeeper, but the variable is equal to
offsetStorage.equals("kafka") && dualCommitEnabled.equals("true"). So, if
I understand correctly, if we set offset.storage=kafka and
dual.commit.enabled=false we are going to try to read offsets from
Zookeeper, even though they will never be there due to
dual.commit.enabled=false. Shouldn't the check be for false instead of
true ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1647 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABYJP723GV3ZO3IC45MD2MDSS6GLDANCNFSM4SYZM4XA>
.
|
Yeah, that is correct for the old kafka consumer used by legacy iterator. However, in the |
Hello @HenryCaiHaiying and @naresh-kotha-ck,
Secor will read offsets only from Kafka storage? I do understand that it will write to Zookeeper as well, but we want to migrate from Zookeeper offset storage to Kafka and want to be sure that we understand how Secor will interact after restart with updated configuration. |
By looking at the code (SecorConsumerRebalanceListener.java), it looks like it will skip zookeeper when the Kafka.offsets.storage=kafka:
|
Hi Team
I have noticed that offsets are still being written to zookeeper even if I specify below config variables
kafka.offsets.storage=kafka
kafka.dual.commit.enabled= false
Is this expected or am I doing some thing wrong.
The text was updated successfully, but these errors were encountered: