Skip to content

KAFKA-2071: Replace Producer Request/Response with their org.apache.kafka.common.requests equivalents#110

Closed
dajac wants to merge 4 commits into
apache:trunkfrom
dajac:KAFKA-2071
Closed

KAFKA-2071: Replace Producer Request/Response with their org.apache.kafka.common.requests equivalents#110
dajac wants to merge 4 commits into
apache:trunkfrom
dajac:KAFKA-2071

Conversation

@dajac

@dajac dajac commented Aug 4, 2015

Copy link
Copy Markdown
Member

This PR replaces all occurrences of kafka.api.ProducerRequest/ProducerResponse by their common equivalents.

@asfbot

asfbot commented Aug 4, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #83 SUCCESS
This pull request looks good

@dajac dajac changed the title KAFKA-2071: Replace Producer Request/Response with their org.apache.kafka.common.requests equivalents KAFKA-2071 [WIP]: Replace Producer Request/Response with their org.apache.kafka.common.requests equivalents Aug 5, 2015
@dajac dajac changed the title KAFKA-2071 [WIP]: Replace Producer Request/Response with their org.apache.kafka.common.requests equivalents KAFKA-2071: Replace Producer Request/Response with their org.apache.kafka.common.requests equivalents Aug 11, 2015
@asfbot

asfbot commented Aug 11, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #124 SUCCESS
This pull request looks good

@dajac

dajac commented Aug 15, 2015

Copy link
Copy Markdown
Member Author

@ijuma Ok, thanks. I'll update that.

@dajac

dajac commented Aug 17, 2015

Copy link
Copy Markdown
Member Author

I've rebased it and removed implicit conversion of collections.

@asfbot

asfbot commented Aug 18, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #164 SUCCESS
This pull request looks good

@dajac

dajac commented Aug 25, 2015

Copy link
Copy Markdown
Member Author

Merged trunk and fixed conflicts.

@asfbot

asfbot commented Aug 25, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #210 FAILURE
Looks like there's a problem with this pull request

@dajac

dajac commented Aug 25, 2015

Copy link
Copy Markdown
Member Author

Failure is not related:

kafka.consumer.MetricsTest > testMetricsLeak FAILED

@asfbot

asfbot commented Aug 26, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #221 FAILURE
Looks like there's a problem with this pull request

@dajac

dajac commented Aug 26, 2015

Copy link
Copy Markdown
Member Author

Could someone review this one? May be @gwenshap or @ijuma?

@granthenke

Copy link
Copy Markdown
Member

@dajac Are you interested in rebasing this?

@dajac

dajac commented Dec 18, 2015

Copy link
Copy Markdown
Member Author

@granthenke Yes, I'll have some time next week to do it.

@dajac

dajac commented Dec 30, 2015

Copy link
Copy Markdown
Member Author

@granthenke I have rebased this PR. Note that this PR migrates the server and the producer.

@dajac

dajac commented Dec 30, 2015

Copy link
Copy Markdown
Member Author

Migration of the producer is quite straightforward as it mainly happens in SyncProducer and DefaultEventHandler but I'm wondering if SyncProducer is considered as a public API. Is it?

@granthenke

Copy link
Copy Markdown
Member

@dajac It looks like the client code changes are not backward compatible. I think this patch either needs to be server side only, or if the clients are going to be updated, they need to be done so in a backward compatible way.

I could be wrong, as we have not had the discussion yet on the mailing list, but I think the idea is to deprecate the older Scala producers and consumers. I am not sure if its worth the effort of updating the client code. (context can be found in the comments on KAFKA-2982)

@ijuma

ijuma commented Jan 6, 2016

Copy link
Copy Markdown
Member

Looking at the JIRA for this PR, it looks like @gwenshap suggested that the JIRA was about removing k.a.Producer{Request, Response} altogether and that is why @dajac did this. But the producer is indeed public API and it is not yet deprecated so I think we can't do that for the upcoming release.

My suggestion is to only update the server-side and leave the soon to be deprecated clients alone (as @granthenke has suggested too, if I understand correctly).

@dajac

dajac commented Jan 7, 2016

Copy link
Copy Markdown
Member Author

@granthenke @ijuma Indeed, the SyncProducer part is not backward compatible. Making it backward compatible requires to keep the old produce request so it doesn't make sense to upgrade it to the new one. As you both suggested, it is better to not upgrade it.

I'll update the PR to reflect this.

@dajac

dajac commented Jan 7, 2016

Copy link
Copy Markdown
Member Author

@granthenke @ijuma I have rebased and updated it. Could you review it when you have time? All tests pass locally.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Think this is likely just a rebase thing, but recently this was moved above the debug message. Not sure why, but can we keep it that way?

Actually just noticed its there, twice. We should remove this one.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Indeed, I have forgotten to remove it during the rebase. I'll remove it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I moved it above the debug log in the other PR to make the side-effect more prominent (instead of hidden after a long debug statement).

@granthenke

Copy link
Copy Markdown
Member

Thanks for the update. I did a quick visual check and will follow up with a more in depth review likely tomorrow.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I know this name was used in the old ProduceRequest, but it seems a bit ambiguous to me. Something with clear in the name would be clearer for me (clearData, clearRecords, clearPartitionRecords, etc.).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good point. I'll use clearPartitionRecords.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nitpick: You don't need () in sizeOf.

@ijuma

ijuma commented Jan 8, 2016

Copy link
Copy Markdown
Member

I had a look and left some comments. Looks good generally.

@dajac

dajac commented Jan 8, 2016

Copy link
Copy Markdown
Member Author

@granthenke @ijuma I did a first pass and addressed all your reviews. Thanks for you input.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can use exceptionName method from #754

@granthenke

Copy link
Copy Markdown
Member

@dajac Just a minor update for the exceptionName method. Otherwise LGTM.

@dajac

dajac commented Jan 14, 2016

Copy link
Copy Markdown
Member Author

@granthenke I have rebased the PR and addressed your points.

@dajac

dajac commented Jan 14, 2016

Copy link
Copy Markdown
Member Author

@gwenshap @ewencp @junrao Could one of you take a look? @granthenke and @ijuma have reviewed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not critical, but could we reuse RequestSend.serialize() here and avoid duplicating low-level serialization code?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, it is possible. I'll do it.

@dajac

dajac commented Jan 19, 2016

Copy link
Copy Markdown
Member Author

@ewencp I have addressed your points. Now, version is explicitly handled and an exception is thrown if the version is not supported. I'm just wondering if throwing an exception is the best way especially when sendResponseCallback is called from the purgatory. Also, I have updated ProduceRequest.getErrorResponse to handle version 0 and 1.

@dajac

dajac commented Jan 20, 2016

Copy link
Copy Markdown
Member Author

I have rebased and addressed all the comments.

@ewencp

ewencp commented Jan 21, 2016

Copy link
Copy Markdown
Contributor

LGTM, thanks @dajac!

@asfgit asfgit closed this in 79cda04 Jan 21, 2016
efeg added a commit to efeg/kafka that referenced this pull request Jan 29, 2020
* Add the version field to JSON responses.
* Add a default partition_load resource (disk) in case the user does not provide one.
* Standardize servlet response format.
@dajac
dajac deleted the KAFKA-2071 branch August 11, 2020 06:46
ambroff pushed a commit to ambroff/kafka that referenced this pull request Jan 20, 2021
…Api (apache#110)

TICKET = KAFKA-9253
LI_DESCRIPTION = There seems to be a race condition.
When a ListPartitionReassignment request is processed, the partition reassignment has already
been completed, and thus the ListPartitionReassignmentResponse does not contain data for that
partition (tp2 in the test), which further causes a NullPointerException.

EXIT_CRITERIA = When the fix for the flaky test is committed in upstream and picked up in this repo
davide-armand pushed a commit to aiven/kafka that referenced this pull request Dec 1, 2025
Try to export all metrics available for faster troubleshooting.
fvaleri added a commit to fvaleri/kafka that referenced this pull request Mar 27, 2026
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.

5 participants