kerneltime commented on code in PR #6611:
URL: https://github.com/apache/ozone/pull/6611#discussion_r1643466493
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/HddsVolume.java:
##########
@@ -470,4 +461,17 @@ private void closeDbStore() {
LOG.info("SchemaV3 db is stopped at {} for volume {}", containerDBPath,
getStorageID());
}
+
+ public void compactDb() {
+ File dbFile = new File(getDbParentDir(), CONTAINER_DB_NAME);
+ String dbFilePath = dbFile.getAbsolutePath();
+ try {
+ // Calculate number of files per level and size per level
+ RawDB rawDB =
+ DatanodeStoreCache.getInstance().getDB(dbFilePath, getConf());
+ rawDB.getStore().compactionIfNeeded();
Review Comment:
Are the metrics that get generated which we capture today for compaction
duration? Also, it would be good to add volume labels for each metric.
--
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]