Skip to content
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

Add support for custom offset retention durations to offset manager #602

Merged
merged 1 commit into from
Feb 11, 2016

Conversation

cevian
Copy link

@cevian cevian commented Feb 10, 2016

No description provided.

@eapache
Copy link
Contributor

eapache commented Feb 10, 2016

Thanks! I think this kind of value makes more sense in the Consumer.Offsets section of the configuration struct though.

@cevian
Copy link
Author

cevian commented Feb 10, 2016

Ok changed. Can you take another look?

@cevian
Copy link
Author

cevian commented Feb 10, 2016

Test this please

@eapache
Copy link
Contributor

eapache commented Feb 10, 2016

I'm a human being who has to eat and sleep just like everyone else, please be patient.

@@ -228,6 +228,33 @@ func TestPartitionOffsetManagerMarkOffset(t *testing.T) {
coordinator.Close()
}

func TestPartitionOffsetManagerMarkOffsetWithRetention(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test doesn't actually test that the value in the request is set correctly. It should do that, or it (the test) should be removed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Is the sleep in here ok?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of a sleep and a coordinator.Returns you should be able to call coordinator.setHandler and validate the request values in the callback.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok changed, that does look a lot better.

@cevian
Copy link
Author

cevian commented Feb 10, 2016

Sorry that was meant for Travis-ci actually :). The check failed and I thought I could get travis-ci to re-test it with "Test this please" (That is how you force jenkins to re-check, thought Travis-ci is the same.). Didn't mean that to rush you.

@@ -183,6 +183,10 @@ type Config struct {
// The initial offset to use if no offset was previously committed.
// Should be OffsetNewest or OffsetOldest. Defaults to OffsetNewest.
Initial int64

// The retention duration for committed offsets.
// A value of 0 cause the retention time to default to the offsets.retention.minutes broker option.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow the style of other option fields:

  • keep lines short enough to display properly on godoc.org
  • explicitly mention the default value
  • mention that Kafka only supports precision up to milliseconds; nanoseconds will be truncated.
  • add a warning to the Validate method if greater-than-millisecond precision is provided

@eapache
Copy link
Contributor

eapache commented Feb 10, 2016

Oh, heh I had no idea Jenkins worked like that, Travis doesn't :)

I think you can trigger a rebuild from the Travis page that github links to.

@eapache
Copy link
Contributor

eapache commented Feb 11, 2016

Thanks for your work!

eapache added a commit that referenced this pull request Feb 11, 2016
Add support for custom offset retention durations to offset manager
@eapache eapache merged commit 0040558 into IBM:master Feb 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants