guihecheng commented on a change in pull request #3176:
URL: https://github.com/apache/ozone/pull/3176#discussion_r832964862
##########
File path:
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBTable.java
##########
@@ -57,6 +57,7 @@
private final ColumnFamilyHandle handle;
private final WriteOptions writeOptions;
private final RDBMetrics rdbMetrics;
+ private int prefixLength;
Review comment:
Yes, it is better to prevent a prefixLength set at the table level.
Here I tried to have unified interface for different schemas, so I'll try to
use the `MetadataKeyFilters.MetadataKeyFilter` to pass prefix but not
introducing new method dedicated for schema v3.
##########
File path:
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/Table.java
##########
@@ -153,6 +153,20 @@ default VALUE getReadCopy(KEY key) throws IOException {
*/
TableIterator<KEY, ? extends KeyValue<KEY, VALUE>> iterator();
+ /**
+ * Returns a prefixed iterator for this metadata store.
+ * @param prefix
+ * @return
+ */
+ TableIterator<KEY, ? extends KeyValue<KEY, VALUE>> iterator(KEY prefix)
+ throws IOException;
+
+ /**
+ * Set the fixed key prefix length.
+ * @param length
+ */
+ void setFixedPrefixLength(int length);
Review comment:
Sure
--
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]