PawasChhokra commented on a change in pull request #1008: SAMZA-2174: Throw a record too large exception for oversized records in changelog URL: https://github.com/apache/samza/pull/1008#discussion_r286468536
########## File path: samza-kv/src/main/scala/org/apache/samza/storage/kv/LoggedStore.scala ########## @@ -19,34 +19,44 @@ package org.apache.samza.storage.kv +import org.apache.samza.SamzaException +import org.apache.samza.config.Config import org.apache.samza.util.Logging import org.apache.samza.system.{OutgoingMessageEnvelope, SystemStreamPartition} import org.apache.samza.task.MessageCollector +import scala.collection.JavaConverters.asScalaBufferConverter + /** * A key/value store decorator that adds a changelog for any changes made to the underlying store */ -class LoggedStore[K, V]( - val store: KeyValueStore[K, V], +class LoggedStore( + val store: KeyValueStore[Array[Byte], Array[Byte]], + val storeName: String, + val storeConfig: Config, val systemStreamPartition: SystemStreamPartition, val collector: MessageCollector, - val metrics: LoggedStoreMetrics = new LoggedStoreMetrics) extends KeyValueStore[K, V] with Logging { + val metrics: LoggedStoreMetrics = new LoggedStoreMetrics) extends KeyValueStore[Array[Byte], Array[Byte]] with Logging { val systemStream = systemStreamPartition.getSystemStream val partitionId = systemStreamPartition.getPartition.getPartitionId + private val DEFAULT_CHANGELOG_MAX_MSG_SIZE_BYTES = 1000000 Review comment: I've designed the current code in a way where this change will be easy to do in the future. Created a follow up ticket for this here: https://issues.apache.org/jira/browse/SAMZA-2212 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services