danny0405 commented on code in PR #5675:
URL: https://github.com/apache/hudi/pull/5675#discussion_r881433551
##########
hudi-common/src/main/java/org/apache/hudi/common/util/collection/RocksDbDiskMap.java:
##########
@@ -41,21 +42,25 @@
* All of the data is stored using the RocksDB implementation.
*/
public final class RocksDbDiskMap<T extends Serializable, R extends
Serializable> extends DiskMap<T, R> {
+ private static final Logger LOG = LogManager.getLogger(RocksDbDiskMap.class);
+
// ColumnFamily allows partitioning data within RockDB, which allows
// independent configuration and faster deletes across partitions
// https://github.com/facebook/rocksdb/wiki/Column-Families
// For this use case, we use a single static column family/ partition
//
- private static final String ROCKSDB_COL_FAMILY = "rocksdb-diskmap";
+ private static final String ROCKSDB_BASE_PATH = "rocksdb-diskmap";
- private static final Logger LOG = LogManager.getLogger(RocksDbDiskMap.class);
// Stores the key and corresponding value's latest metadata spilled to disk
private final Set<T> keySet;
- private RocksDBDAO rocksDb;
+ private static RocksDBDAO rocksDb = null;
+ private String rocksdbColFamily;
public RocksDbDiskMap(String rocksDbStoragePath) throws IOException {
super(rocksDbStoragePath,
ExternalSpillableMap.DiskMapType.ROCKS_DB.name());
this.keySet = new HashSet<>();
Review Comment:
The `RocksDbDiskMap` was designed to be in the thread scope, it is like the
`BitCaskMap` each reader iterator holds a map instance with a random base path,
see `DiskMap.diskMapPath`.
--
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]