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_r282278075
##########
File path:
samza-kv/src/main/scala/org/apache/samza/storage/kv/LoggedStore.scala
##########
@@ -114,7 +128,14 @@ class LoggedStore[K, V](
store.close
}
- override def snapshot(from: K, to: K): KeyValueSnapshot[K, V] = {
+ override def snapshot(from: Array[Byte], to: Array[Byte]):
KeyValueSnapshot[Array[Byte], Array[Byte]] = {
store.snapshot(from, to)
}
+
+ private def validateMessageSize(key: Array[Byte], message: Array[Byte]):
Unit = {
+ if (message.length > maxMessageSize) {
+ throw new SamzaException("RocksDB message size " + message.length + "
for store " + storeName
Review comment:
Done.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services