prashantpogde commented on code in PR #4360:
URL: https://github.com/apache/ozone/pull/4360#discussion_r1131617226
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/RocksDbPersistentMap.java:
##########
@@ -69,4 +69,15 @@ public void put(K key, V value) {
throw new RuntimeException(exception);
}
}
+
+ @Override
+ public void remove(K key) {
+ try {
+ byte[] rawKey = codecRegistry.asRawData(key);
+ db.get().delete(columnFamilyHandle, rawKey);
+ } catch (IOException | RocksDBException exception) {
+ // TODO:: Fail gracefully.
Review Comment:
TODO: [SNAPSHOT]
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotManager.java:
##########
@@ -67,21 +77,74 @@ public final class OmSnapshotManager implements
AutoCloseable {
private final OzoneManager ozoneManager;
private final SnapshotDiffManager snapshotDiffManager;
private final LoadingCache<String, OmSnapshot> snapshotCache;
- private final ManagedRocksDB snapshotDiffDb;
+ private ManagedRocksDB snapshotDiffDb;
+
+ /**
+ * Contains all the snap diff job which are either queued, in_progress or
+ * done. This table is used to make sure that there is only single job for
+ * similar type of request at any point of time.
+ */
+ private static final String SNAP_DIFF_JOB_TABLE_NAME =
+ "snap-diff-job-table";
+
+ /**
+ * Global table to keep the diff report. Each key is prefixed by the jobID
+ * to improve look up and clean up.
+ */
+ private static final String SNAP_DIFF_REPORT_TABLE_NAME =
+ "snap-diff-report-table";
+
+ private final ManagedColumnFamilyOptions columnFamilyOptions;
+ private final ManagedDBOptions options;
+
+ // TODO: create config for max allowed page size.
Review Comment:
TODO: [SNAPSHOT]
--
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]