xichen01 commented on code in PR #8707:
URL: https://github.com/apache/ozone/pull/8707#discussion_r2202838806
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/ContainerSet.java:
##########
@@ -548,4 +549,30 @@ public <T> void buildMissingContainerSetAndValidate(Map<T,
Long> container2BCSID
}
});
}
+
+ /**
+ * Dump container metadata cache for a volume to reduce startup time.
+ */
+ public void dumpContainerCache(Iterable<? extends HddsVolume> volumes,
+ ConfigurationSource config) {
+ ContainerStartupCache containerCache = new ContainerStartupCache();
+
+ // Set dump in progress flag to prevent YAML modifications
+ ContainerDataYaml.setDisableWrite(true);
+
+ try {
+ for (HddsVolume volume : volumes) {
+ try {
+ containerCache.dumpContainerCache(
+ containerMap.values(), volume, config);
+ } catch (IOException e) {
+ LOG.warn("Failed to dump container cache for volume {}",
Review Comment:
Yes, currently it will just print the log, and then try to generate cache
for other Volumes. Should we terminate all cache generation?
--
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]