smengcl commented on code in PR #8555:
URL: https://github.com/apache/ozone/pull/8555#discussion_r2127236558


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotLocalPropertyManager.java:
##########
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.ozone.om;
+
+import org.apache.hadoop.ozone.om.exceptions.OMException;
+
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * Interface to manage Ozone snapshot DB local checkpoint metadata properties.
+ * Those properties are per-OM, e.g. isSSTFiltered flag, which differs from 
the ones stored in SnapshotInfo proto.
+ */
+public interface OmSnapshotLocalPropertyManager {
+
+  /**
+   * Sets a property for a snapshot.
+   *
+   * @param yamlFilePath Path to the snapshot's YAML property file
+   * @param key Property key
+   * @param value Property value
+   * @throws IOException if an I/O error occurs
+   * @throws OMException if snapshot doesn't exist or operation fails
+   */
+  void setProperty(String yamlFilePath, String key, String value)

Review Comment:
   The current version of the interface follows the current use case by 
`SstFilteringService#isSstFiltered`, where it checks the flag before opening 
the snapshot checkpoint DB:
   
   
https://github.com/apache/ozone/blob/cb9867bcd317ad0f4c4dfdaeeb737353f7b8bca5/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/SstFilteringService.java#L180
   
   In this case, callers are expected to call `getSnapshotLocalPropertyPath()` 
added in `OmSnapshotManager` to provide the yaml path directly.
   
   ----
   
   I thought about putting this inside `OmSnapshotManager` so that yaml path is 
not part of every single method's argument.
   
   @SaketaChalamchala Would you give a bit more detail around your upcoming use 
case? We should design around that.



-- 
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]

Reply via email to