arp7 commented on code in PR #4367:
URL: https://github.com/apache/ozone/pull/4367#discussion_r1132672392
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/helpers/KeyValueContainerUtil.java:
##########
@@ -159,6 +160,26 @@ public static void removeContainer(KeyValueContainerData
containerData,
FileUtils.deleteDirectory(containerMetaDataPath.getParentFile());
}
+ /**
+ * Returns if there are no blocks in the container.
+ * @param containerData Container to check
+ * @param conf configuration
+ * @return true if the directory containing blocks is empty
+ * @throws IOException
+ */
+ public static boolean noBlocksInContainer(KeyValueContainerData
Review Comment:
I think we want to check RocksDB and not chunks on disk. The latter may
always be present due to orphaned writes. We only care about committed blocks
which have entries in RocksDB.
--
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]