aswinshakil commented on code in PR #6139:
URL: https://github.com/apache/ozone/pull/6139#discussion_r1483517743
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java:
##########
@@ -325,14 +326,15 @@ public boolean canDisableFsSnapshot(OMMetadataManager
ommm) {
return isSnapshotInfoTableEmpty;
}
- private CacheLoader<String, OmSnapshot> createCacheLoader() {
- return new CacheLoader<String, OmSnapshot>() {
+ private CacheLoader<UUID, OmSnapshot> createCacheLoader() {
+ return new CacheLoader<UUID, OmSnapshot>() {
@Nonnull
@Override
- public OmSnapshot load(@Nonnull String snapshotTableKey)
- throws IOException {
+ public OmSnapshot load(@Nonnull UUID snapshotId) throws IOException {
// Check if the snapshot exists
+ String snapshotTableKey = ((OmMetadataManagerImpl)
ozoneManager.getMetadataManager()).getSnapshotChainManager()
Review Comment:
Should we add a null check for `snapshotTableKey` here just as a sanity
check?
--
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]