KAFKA-2071: Replace Producer Request/Response with their org.apache.kafka.common.requests equivalents#110
KAFKA-2071: Replace Producer Request/Response with their org.apache.kafka.common.requests equivalents#110dajac wants to merge 4 commits into
Conversation
|
kafka-trunk-git-pr #83 SUCCESS |
|
kafka-trunk-git-pr #124 SUCCESS |
|
@ijuma Ok, thanks. I'll update that. |
|
I've rebased it and removed implicit conversion of collections. |
|
kafka-trunk-git-pr #164 SUCCESS |
|
Merged trunk and fixed conflicts. |
|
kafka-trunk-git-pr #210 FAILURE |
|
Failure is not related: |
|
kafka-trunk-git-pr #221 FAILURE |
|
@dajac Are you interested in rebasing this? |
|
@granthenke Yes, I'll have some time next week to do it. |
|
@granthenke I have rebased this PR. Note that this PR migrates the server and the producer. |
|
Migration of the producer is quite straightforward as it mainly happens in |
|
@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) |
|
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). |
|
@granthenke @ijuma Indeed, the I'll update the PR to reflect this. |
|
@granthenke @ijuma I have rebased and updated it. Could you review it when you have time? All tests pass locally. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Indeed, I have forgotten to remove it during the rebase. I'll remove it.
There was a problem hiding this comment.
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).
|
Thanks for the update. I did a quick visual check and will follow up with a more in depth review likely tomorrow. |
There was a problem hiding this comment.
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.).
There was a problem hiding this comment.
Good point. I'll use clearPartitionRecords.
There was a problem hiding this comment.
Nitpick: You don't need () in sizeOf.
|
I had a look and left some comments. Looks good generally. |
|
@granthenke @ijuma I did a first pass and addressed all your reviews. Thanks for you input. |
|
@dajac Just a minor update for the exceptionName method. Otherwise LGTM. |
|
@granthenke I have rebased the PR and addressed your points. |
|
@gwenshap @ewencp @junrao Could one of you take a look? @granthenke and @ijuma have reviewed. |
There was a problem hiding this comment.
Not critical, but could we reuse RequestSend.serialize() here and avoid duplicating low-level serialization code?
There was a problem hiding this comment.
Yes, it is possible. I'll do it.
|
@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 |
|
I have rebased and addressed all the comments. |
|
LGTM, thanks @dajac! |
* 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.
…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
Try to export all metrics available for faster troubleshooting.
This PR replaces all occurrences of kafka.api.ProducerRequest/ProducerResponse by their common equivalents.