HOTFIX: change compression codec in TransactionStateManager to UncompressedCodec
Change the compression code used for the transaction log to UncompressedCoded as it fails during creation when the codec is set to NoCompressionCodec.
Author: Damian Guy
Reviewers: Ismael Juma
Closes from dguy/hotfix-tsm
@@ -24,7 +24,7 @@ import java.util.concurrent.locks.ReentrantLock
import kafka.common.{KafkaException, Topic}
import kafka.log.LogConfig
-import kafka.message.NoCompressionCodec
+import kafka.message.UncompressedCodec
import kafka.server.ReplicaManager
import kafka.utils.CoreUtils.inLock
import kafka.utils.{Logging, Pool, Scheduler, ZkUtils}
@@ -117,7 +117,7 @@ class TransactionStateManager(brokerId: Int,
// enforce disabled unclean leader election, no compression types, and compact cleanup policy
props.put(LogConfig.UncleanLeaderElectionEnableProp, "false")
- props.put(LogConfig.CompressionTypeProp, NoCompressionCodec)
+ props.put(LogConfig.CompressionTypeProp, UncompressedCodec.name)
props.put(LogConfig.CleanupPolicyProp, LogConfig.Compact)
props.put(LogConfig.MinInSyncReplicasProp, config.transactionLogMinInsyncReplicas.toString)
