[ 
https://issues.apache.org/jira/browse/KAFKA-8584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16930836#comment-16930836
 ] 

ASF GitHub Bot commented on KAFKA-8584:
---------------------------------------

nizhikov commented on pull request #7342: KAFKA-8584: Support of ByteBuffer for 
bytes field implemented.
URL: https://github.com/apache/kafka/pull/7342
 
 
   Support of the `java.nio.ByteBuffer` for bytes field implemented.
   To generate code using 'ByteBuffer` one should set `useByteBuffer` flag to 
true.
   
   `TestByteBufferDataTest` added to test the new feature.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Allow "bytes" type to generated a ByteBuffer rather than byte arrays
> --------------------------------------------------------------------
>
>                 Key: KAFKA-8584
>                 URL: https://issues.apache.org/jira/browse/KAFKA-8584
>             Project: Kafka
>          Issue Type: Sub-task
>            Reporter: Guozhang Wang
>            Assignee: Nikolay Izhikov
>            Priority: Major
>              Labels: newbie
>
> Right now in the RPC definition, type {{bytes}} would be translated into 
> {{byte[]}} in generated Java code. However, for some requests like 
> ProduceRequest#partitionData, the underlying type would better be a 
> ByteBuffer rather than a byte array.
> One proposal is to add an additional boolean tag {{useByteBuffer}} for 
> {{bytes}} type, which by default is false; when set to {{true}} set the 
> corresponding field to generate {{ByteBuffer}} instead of {{[]byte}}. 



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to