ZanderXu commented on code in PR #6833:
URL: https://github.com/apache/hadoop/pull/6833#discussion_r1607542930
##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/store/driver/StateStoreRecordOperations.java:
##########
@@ -127,6 +128,17 @@ <T extends BaseRecord> StateStoreOperationResult putAll(
@AtMostOnce
<T extends BaseRecord> boolean remove(T record) throws IOException;
+ /**
+ * Remove multiple records.
+ *
+ * @param <T> Record class of the records.
+ * @param records Records to be removed.
+ * @return Map of record -> boolean indicating any entries being deleted by
this record.
Review Comment:
`Map of record -> boolean indicating if the record has being removed
successfully`
##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/store/driver/StateStoreRecordOperations.java:
##########
@@ -152,4 +164,17 @@ <T extends BaseRecord> StateStoreOperationResult putAll(
<T extends BaseRecord> int remove(Class<T> clazz, Query<T> query)
throws IOException;
+ /**
+ * Remove all records of a specific class that match any query in a list of
queries.
+ * Requires the getAll implementation to fetch fresh records on each call.
+ *
+ * @param clazz The class to match the records with.
+ * @param queries Queries (logical OR) to filter what to remove.
+ * @param <T> Record class of the records.
+ * @return Map of query to number of records deleted by that query.
Review Comment:
`Map of query to number of records removed by that query.`
--
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]