Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-7830 Convert Kafka RPCs to use automatically generated code
  3. KAFKA-8584

Allow "bytes" type to generated a ByteBuffer rather than byte arrays

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              suryateja008@gmail.com SuryaTeja Duggi
              Reporter:
              guozhang Guozhang Wang
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: