errose28 commented on code in PR #4367:
URL: https://github.com/apache/ozone/pull/4367#discussion_r1132959862
##########
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 should check RocksDB in this PR and switch to using the directory
check as part of HDDS-8117, or maybe wait until after HDDS-8138. Otherwise we
may get some alarming false positives. In order to tell whether the exception
is a false positive or not we would need to check RocksDB anyways, so I don't
think the error message is useful without a RocksDB check given how the rest of
the code works right now.
--
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]