bkonold commented on a change in pull request #1209: SAMZA-2324: Adding KV 
store metrics for rocksdb
URL: https://github.com/apache/samza/pull/1209#discussion_r342869167
 
 

 ##########
 File path: 
samza-kv-rocksdb/src/main/scala/org/apache/samza/storage/kv/RocksDbKeyValueStore.scala
 ##########
 @@ -101,6 +102,8 @@ object RocksDbKeyValueStore extends Logging {
           }
         ))
 
+      metrics.newGauge("rocksdb.size-on-disk", () => 
FileUtils.sizeOfDirectory(new File(dir.getAbsolutePath)))
 
 Review comment:
   1. Two reasons: first, the behavior I recently reported of the metrics being 
broken (or at the very least, not predictably populated by all jobs running the 
latest release). Second, I was unable to determine whether the 
"total-sst-files-size" would include files nested within checkpoint dirs; 
calculating the size of the directory this way would recursively include that 
as well. If that is undesirable however, this should be discarded in favor of 
another approach.
   2. Fair enough, I will rename to something else. Feel free to comment if you 
have suggestions.

----------------------------------------------------------------
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

Reply via email to