[ https://issues.apache.org/jira/browse/KAFKA-187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13150105#comment-13150105 ]
Jun Rao commented on KAFKA-187: ------------------------------- The following are the changes that I made. Index: core/src/main/scala/kafka/message/CompressionCodec.scala =================================================================== --- core/src/main/scala/kafka/message/CompressionCodec.scala (revision 1200967) +++ core/src/main/scala/kafka/message/CompressionCodec.scala (working copy) @@ -20,8 +20,9 @@ object CompressionCodec { def getCompressionCodec(codec: Int): CompressionCodec = { codec match { - case 0 => NoCompressionCodec - case 1 => GZIPCompressionCodec + case NoCompressionCodec.codec => NoCompressionCodec + case GZIPCompressionCodec.codec => GZIPCompressionCodec + case SnappyCompressionCodec.codec => SnappyCompressionCodec case _ => throw new kafka.common.UnknownCodecException("%d is an unknown compression codec".format(codec)) } } > Add Snappy Compression as a Codec and refactor CompressionUtil and option on > startup to select what the default codec > --------------------------------------------------------------------------------------------------------------------- > > Key: KAFKA-187 > URL: https://issues.apache.org/jira/browse/KAFKA-187 > Project: Kafka > Issue Type: Improvement > Reporter: Joe Stein > Attachments: KAFKA-187_v3.patch, kafka-187.patch, > kafka-187.refactored.patch > > > My thoughts are a new trait CompressionDependencies for KafkaProject.scala, > adding snappy as the first library. > refactor CompressionUtil for better code reuse and provide a way on startup > to select what the default codec is instead of the default always gziping -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira