> On May 19, 2014, 11:08 p.m., Joe Stein wrote:
> > clients/src/main/java/org/apache/kafka/common/record/CompressionType.java, 
> > line 45
> > <https://reviews.apache.org/r/21663/diff/2/?file=584706#file584706line45>
> >
> >     This is the id that comes back to make the COMPRESSION_CODEC_MASK & 
> > type.id work.  The MASK being 1 with the type is how it works so that is 
> > why you can keep 0x03 and not change it.

Again, same argument. We need a unique ID to store in the attributes byte so we 
know which decompression alg. to use. If the CompressionCodeMask was just a 
yes/no flag, it would only be 1 bit.

As a compromise, we could remove the LZ4HC setting and stick with 2 bits. 
Regardless of whether or not we make this change, legacy clients won't be able 
to decompress messages with a codec they don't support. The extra bit we use is 
reserved and set to 0 so we should still be backwards-compatible with existing 
compressed messages on the broker.


- James


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21663/#review43441
-----------------------------------------------------------


On May 19, 2014, 10:01 p.m., James Oliver wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21663/
> -----------------------------------------------------------
> 
> (Updated May 19, 2014, 10:01 p.m.)
> 
> 
> Review request for kafka.
> 
> 
> Bugs: KAFKA-1456
>     https://issues.apache.org/jira/browse/KAFKA-1456
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> Fix LZ4HC case object typo
> 
> 
> Diffs
> -----
> 
>   build.gradle b3bbd775366e29abb960e11b0b613b3a85ac4747 
>   clients/src/main/java/org/apache/kafka/common/record/CompressionType.java 
> c557e44b68bc201c7c7e8a31e9eb2f74c359762b 
>   clients/src/main/java/org/apache/kafka/common/record/Record.java 
> ce1177ef3c851572a3e3268a7a075e7db56fc3f7 
>   config/producer.properties 52a76114f5d0968ca0ff01b3ab1a45450c0a1e33 
>   core/src/main/scala/kafka/message/CompressionCodec.scala 
> 8762a790af2ab7f60a5e4e19955c7eb7ad7bc749 
>   core/src/main/scala/kafka/message/CompressionFactory.scala 
> ca833ee317975548b3e0e91f010af36bce2af09b 
>   core/src/main/scala/kafka/message/Message.scala 
> 52c082f5213ba48a39bf0d17e4ced2714276f0e0 
>   system_test/producer_perf/bin/run-compression-test-all.sh PRE-CREATION 
>   system_test/producer_perf/config/server.properties 
> 9f8a633ab2f92862e7e7bcc40d699daf00c69e23 
> 
> Diff: https://reviews.apache.org/r/21663/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> James Oliver
> 
>

Reply via email to