Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-2043

CompressionType is passed in each RecordAccumulator append

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.8.2.0
    • 0.9.0.0
    • clients
    • None

    Description

      Currently org.apache.kafka.clients.producer.internals.RecordAccumulator append method accepts the compressionType on a per record basis. It looks like the code would only work on a per batch basis because the CompressionType is only used when creating a new RecordBatch. My understanding is this should only support setting per batch at most.

      public RecordAppendResult append(TopicPartition tp, byte[] key, byte[] value, CompressionType compression, Callback callback) throws InterruptedException;

      The compression type is a producer
      level config. Instead of passing it in for each append, we probably should
      just pass it in once during the creation RecordAccumulator.

      Attachments

        1. KAFKA-2043_2015-03-25_13:28:52.patch
          19 kB
          Grant Henke
        2. KAFKA-2043.patch
          17 kB
          Grant Henke

        Activity

          People

            granthenke Grant Henke
            granthenke Grant Henke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: