[hotfix] Replace use of deprecated remove calls to RocksDB with delete

Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/ff6662c9
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/ff6662c9
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/ff6662c9

Branch: refs/heads/master
Commit: ff6662c979e7f8660a7f6039339d82a37abfc623
Parents: c2c4f49
Author: Stefan Richter <[email protected]>
Authored: Thu Feb 22 10:15:37 2018 +0100
Committer: Stefan Richter <[email protected]>
Committed: Sun Feb 25 15:59:55 2018 +0100

----------------------------------------------------------------------
 .../flink/contrib/streaming/state/AbstractRocksDBState.java      | 2 +-
 .../apache/flink/contrib/streaming/state/RocksDBMapState.java    | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/ff6662c9/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/AbstractRocksDBState.java
----------------------------------------------------------------------
diff --git 
a/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/AbstractRocksDBState.java
 
b/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/AbstractRocksDBState.java
index 3464355..8915261 100644
--- 
a/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/AbstractRocksDBState.java
+++ 
b/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/AbstractRocksDBState.java
@@ -102,7 +102,7 @@ public abstract class AbstractRocksDBState<K, N, S extends 
State, SD extends Sta
                try {
                        writeCurrentKeyWithGroupAndNamespace();
                        byte[] key = keySerializationStream.toByteArray();
-                       backend.db.remove(columnFamily, writeOptions, key);
+                       backend.db.delete(columnFamily, writeOptions, key);
                } catch (IOException | RocksDBException e) {
                        throw new RuntimeException("Error while removing entry 
from RocksDB", e);
                }

http://git-wip-us.apache.org/repos/asf/flink/blob/ff6662c9/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBMapState.java
----------------------------------------------------------------------
diff --git 
a/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBMapState.java
 
b/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBMapState.java
index d1e72c9..af789ac 100644
--- 
a/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBMapState.java
+++ 
b/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBMapState.java
@@ -123,7 +123,7 @@ public class RocksDBMapState<K, N, UK, UV>
        public void remove(UK userKey) throws IOException, RocksDBException {
                byte[] rawKeyBytes = 
serializeUserKeyWithCurrentKeyAndNamespace(userKey);
 
-               backend.db.remove(columnFamily, writeOptions, rawKeyBytes);
+               backend.db.delete(columnFamily, writeOptions, rawKeyBytes);
        }
 
        @Override
@@ -339,7 +339,7 @@ public class RocksDBMapState<K, N, UK, UV>
                        rawValueBytes = null;
 
                        try {
-                               db.remove(columnFamily, writeOptions, 
rawKeyBytes);
+                               db.delete(columnFamily, writeOptions, 
rawKeyBytes);
                        } catch (RocksDBException e) {
                                throw new RuntimeException("Error while 
removing data from RocksDB.", e);
                        }

Reply via email to