StefanRRichter commented on a change in pull request #7674: [FLINK-10043] 
[State Backends] Refactor RocksDBKeyedStateBackend object 
construction/initialization/restore code
URL: https://github.com/apache/flink/pull/7674#discussion_r257717576
 
 

 ##########
 File path: 
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBKeyedStateBackend.java
 ##########
 @@ -473,6 +412,62 @@ public WriteOptions getWriteOptions() {
                return sharedRocksKeyBuilder;
        }
 
+       public RocksDB getDb() {
+               return db;
+       }
+
+       /**
+        * Allow using mocks in unit test.
+        */
+       @VisibleForTesting
+       public void setDb(RocksDB db) {
+               this.db = db;
+       }
+
+       public RocksDBWriteBatchWrapper getWriteBatchWrapper() {
 
 Review comment:
   Please take a look at my later comments, I think the test is really a good 
candidate for rewrite because it can benefit now from the refactoring, because 
we can now supply the spy instance of RocksDB through the builder or 
constructor and don't have to use `RocksDBStateBackend` to get an instance.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to