smengcl commented on code in PR #4419:
URL: https://github.com/apache/ozone/pull/4419#discussion_r1148173115
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshot.java:
##########
@@ -82,11 +91,30 @@ public OmSnapshot(KeyManager keyManager,
this.bucketName = bucketName;
this.volumeName = volumeName;
this.omMetadataManager = keyManager.getMetadataManager();
+ this.snapshotDBKey = SnapshotInfo.getTableKey(
+ volumeName, bucketName, snapshotName);
+ this.activeOMMetadataManager = ozoneManager.getMetadataManager();
}
+ /**
+ * Check snapshot status in active DB snapshotInfoTable.
+ * @throws IOException FileNotFoundException when snapshot is not active.
+ */
+ private void checkSnapshotStatus() throws IOException {
+ if (activeOMMetadataManager.getSnapshotInfoTable().get(snapshotDBKey)
Review Comment:
Addressed. With oen more TODO that needs to be addressed with HDDS-7935.
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshot.java:
##########
@@ -82,11 +91,30 @@ public OmSnapshot(KeyManager keyManager,
this.bucketName = bucketName;
this.volumeName = volumeName;
this.omMetadataManager = keyManager.getMetadataManager();
+ this.snapshotDBKey = SnapshotInfo.getTableKey(
+ volumeName, bucketName, snapshotName);
+ this.activeOMMetadataManager = ozoneManager.getMetadataManager();
}
+ /**
+ * Check snapshot status in active DB snapshotInfoTable.
+ * @throws IOException FileNotFoundException when snapshot is not active.
+ */
+ private void checkSnapshotStatus() throws IOException {
+ if (activeOMMetadataManager.getSnapshotInfoTable().get(snapshotDBKey)
Review Comment:
Addressed. With oen more TODO that needs to be done with HDDS-7935.
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshot.java:
##########
@@ -82,11 +91,30 @@ public OmSnapshot(KeyManager keyManager,
this.bucketName = bucketName;
this.volumeName = volumeName;
this.omMetadataManager = keyManager.getMetadataManager();
+ this.snapshotDBKey = SnapshotInfo.getTableKey(
+ volumeName, bucketName, snapshotName);
+ this.activeOMMetadataManager = ozoneManager.getMetadataManager();
}
+ /**
+ * Check snapshot status in active DB snapshotInfoTable.
+ * @throws IOException FileNotFoundException when snapshot is not active.
+ */
+ private void checkSnapshotStatus() throws IOException {
+ if (activeOMMetadataManager.getSnapshotInfoTable().get(snapshotDBKey)
Review Comment:
Addressed. With oen more TODO that needs to be done in HDDS-7935.
--
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]