xuanyuanking commented on a change in pull request #32934:
URL: https://github.com/apache/spark/pull/32934#discussion_r663972794
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDB.scala
##########
@@ -442,6 +476,42 @@ object RocksDBConf {
def apply(): RocksDBConf = apply(new StateStoreConf())
}
+/** Class to represent stats from each commit. */
+case class RocksDBMetrics(
+ numCommittedKeys: Long,
Review comment:
Thanks, done in 355953e
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDB.scala
##########
@@ -442,6 +476,42 @@ object RocksDBConf {
def apply(): RocksDBConf = apply(new StateStoreConf())
}
+/** Class to represent stats from each commit. */
+case class RocksDBMetrics(
+ numCommittedKeys: Long,
+ numUncommittedKeys: Long,
+ memUsageBytes: Long,
+ totalSSTFilesBytes: Long,
+ nativeOpsLatencyMicros: Map[String, RocksDBNativeHistogram],
+ lastCommitLatencyMs: Map[String, Long],
+ filesCopied: Long,
+ bytesCopied: Long,
+ filesReused: Long,
+ zipFileBytesUncompressed: Option[Long]) {
+ def json: String = Serialization.write(this)(RocksDBMetrics.format)
+}
+
+object RocksDBMetrics {
+ val format = Serialization.formats(NoTypeHints)
+}
+
+/** Class to wrap RocksDB's native histogram */
+case class RocksDBNativeHistogram(
+ avg: Double, stddev: Double, median: Double, p95: Double, p99: Double) {
Review comment:
Thanks, done in 355953e
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]