hemantk-12 commented on code in PR #7563:
URL: https://github.com/apache/ozone/pull/7563#discussion_r1881147680
##########
hadoop-hdds/managed-rocksdb/src/main/java/org/apache/hadoop/hdds/utils/db/managed/ManagedRocksDB.java:
##########
@@ -102,4 +111,15 @@ public void deleteFile(LiveFileMetaData fileToBeDeleted)
File file = new File(fileToBeDeleted.path(), fileToBeDeleted.fileName());
ManagedRocksObjectUtils.waitForFileDelete(file, Duration.ofSeconds(60));
}
+
+ public static Map<String, LiveFileMetaData>
getLiveMetadataForSSTFiles(RocksDB db) {
+ return db.getLiveFilesMetaData().stream()
+ .filter(liveFileMetaData ->
liveFileMetaData.fileName().endsWith(SST_FILE_EXTENSION)).collect(
Review Comment:
`db.getLiveFilesMetaData()` only returns table files, why do we need to
filter it?
RocksDB documentation:
```
/**
* Gets a list of all table files metadata.
*
* @return table files metadata.
*/
public List<LiveFileMetaData> getLiveFilesMetaData() {
return Arrays.asList(getLiveFilesMetaData(nativeHandle_));
}
```
--
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]