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

compression-rate-avg always returns 0 even with compression.type being set

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.9.0.0
    • Fix Version/s: 0.9.0.1
    • Component/s: producer
    • Labels:
      None

      Description

      The producer metric compression-rate-avg always returns 0 even with compression.type set to snappy. I drilled down the code and discovered that the position of bytebuffer in org.apache.kafka.common.record.Compressor is reset to 0 by RecordAccumulator.drain() before calling metric updates in sender thread.

        Attachments

          Activity

            People

            • Assignee:
              xiaotao183 TAO XIAO
              Reporter:
              xiaotao183 TAO XIAO
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: