MINOR: Improve the org.apache.kafka.common.protocol code#7344
Merged
cmccabe merged 4 commits intoapache:trunkfrom Sep 25, 2019
Merged
MINOR: Improve the org.apache.kafka.common.protocol code#7344cmccabe merged 4 commits intoapache:trunkfrom
cmccabe merged 4 commits intoapache:trunkfrom
Conversation
25b2d0d to
530f308
Compare
Add UUID to the list of types documented in Type#toHtml. This was overlooked in the change which added UUIDs as a supported KRPC type. Type, Protocol, ArrayOf: use Type#isArray and Type#arrayElementType rather than typecasting to handle arrays. This is cleaner. It will also make it easier for us to add compact arrays (as specified by KIP-482) as a new array type distinct from the old array type. Add MessageUtil#byteBufferToArray, as well as a test for it. We will need this for handling tagged fields of type "bytes". Schema#Visitor: we don't need a separate function overload for visiting arrays. We can just call "visit(Type field)". TestUUID.json: reformat the JSON file to match the others. ProtocolSerializationTest: improve the error messages on failure. Check that each type has the name we expect it to have.
530f308 to
48c6d31
Compare
soondenana
approved these changes
Sep 17, 2019
Contributor
soondenana
left a comment
There was a problem hiding this comment.
LGTM. A bunch of nice improvements.
jsancio
approved these changes
Sep 20, 2019
Member
|
retest this please |
mumrah
reviewed
Sep 24, 2019
| return (short) count; | ||
| } | ||
|
|
||
| public static byte[] byteBufferToArray(ByteBuffer buf) { |
Member
There was a problem hiding this comment.
Maybe include a short javadoc here? Might be worth mentioning that this won't affect a mark on the given buffer
Contributor
Author
|
git failed on Jenkins: |
Contributor
Author
|
retest this please |
ijuma
added a commit
to confluentinc/kafka
that referenced
this pull request
Sep 29, 2019
Conflicts: * .gitignore: addition of clients/src/generated-test was near local additions for support-metrics. * checkstyle/suppressions.xml: upstream refactoring of exclusions for generator were near the local changes for support-metrics. * gradle.properties: scala version bump caused a minor conflict due to the kafka version change locally. gradle/dependencies.gradle: bcpkix version bump was near avro additions in the local version. * apache-github/trunk: (49 commits) KAFKA-8471: Replace control requests/responses with automated protocol (apache#7353) MINOR: Don't generate unnecessary strings for debug logging in FetchSessionHandler (apache#7394) MINOR:fixed typo and removed outdated varilable name (apache#7402) KAFKA-8934: Create version file during build for Streams (apache#7397) KAFKA-8319: Make KafkaStreamsTest a non-integration test class (apache#7382) KAFKA-6883: Add toUpperCase support to sasl.kerberos.principal.to.local rule (KIP-309) KAFKA-8907; Return topic configs in CreateTopics response (KIP-525) (apache#7380) MINOR: Address review comments for KIP-504 authorizer changes (apache#7379) MINOR: add versioning to request and response headers (apache#7372) KAFKA-7273: Extend Connect Converter to support headers (apache#6362) MINOR: improve the Kafka RPC code generator (apache#7340) MINOR: Improve the org.apache.kafka.common.protocol code (apache#7344) KAFKA-8880: Docs on upgrade-guide (apache#7385) KAFKA-8179: do not suspend standby tasks during rebalance (apache#7321) KAFKA-8580: Compute RocksDB metrics (apache#7263) KAFKA-8880: Add overloaded function of Consumer.committed (apache#7304) HOTFIX: fix Kafka Streams upgrade note for broker backward compatibility (apache#7363) KAFKA-8848; Update system tests to use new AclAuthorizer (apache#7374) MINOR: remove unnecessary null check (apache#7299) KAFKA-6958: Overload methods for group and windowed stream to allow to name operation name using the new Named class (apache#6413) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add UUID to the list of types documented in Type#toHtml. This was overlooked in the change which added UUIDs as a supported KRPC type.
Type, Protocol, ArrayOf: use Type#isArray and Type#arrayElementType rather than typecasting to handle arrays. This is cleaner. It will also make it easier for us to add compact arrays (as specified by KIP-482) as a new array type distinct from the old array type.
Add MessageUtil#byteBufferToArray, as well as a test for it. We will need this for handling tagged fields of type "bytes".
Schema#Visitor: we don't need a separate function overload for visiting arrays. We can just call "visit(Type field)".
TestUUID.json: reformat the JSON file to match the others.
ProtocolSerializationTest: improve the error messages on failure. Check that each type has the name we expect it to have.