kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject [kafka] branch trunk updated: MINOR: replace deprecated remove with delete (#5565)
Date Fri, 24 Aug 2018 15:54:00 GMT
This is an automated email from the ASF dual-hosted git repository.

guozhang pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 89cf515  MINOR: replace deprecated remove with delete (#5565)
89cf515 is described below

commit 89cf515aecd1ce3a5265a5df94357b3b55694522
Author: Guozhang Wang <wangguoz@gmail.com>
AuthorDate: Fri Aug 24 08:53:54 2018 -0700

    MINOR: replace deprecated remove with delete (#5565)
    
    Reviewers: Matthias J. Sax <matthias@confluent.io>
---
 .../kafka/streams/state/internals/RocksDBSegmentedBytesStore.java     | 2 +-
 .../java/org/apache/kafka/streams/state/internals/RocksDBStore.java   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBSegmentedBytesStore.java
b/streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBSegmentedBytesStore.java
index fccb6c1..fa71465 100644
--- a/streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBSegmentedBytesStore.java
+++ b/streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBSegmentedBytesStore.java
@@ -237,7 +237,7 @@ class RocksDBSegmentedBytesStore implements SegmentedBytesStore {
                 try {
                     final WriteBatch batch = writeBatchMap.computeIfAbsent(segment, s ->
new WriteBatch());
                     if (record.value == null) {
-                        batch.remove(record.key);
+                        batch.delete(record.key);
                     } else {
                         batch.put(record.key, record.value);
                     }
diff --git a/streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBStore.java
b/streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBStore.java
index 559f4a5..fbf7df3 100644
--- a/streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBStore.java
+++ b/streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBStore.java
@@ -283,7 +283,7 @@ public class RocksDBStore implements KeyValueStore<Bytes, byte[]>
{
         try (final WriteBatch batch = new WriteBatch()) {
             for (final KeyValue<byte[], byte[]> record : records) {
                 if (record.value == null) {
-                    batch.remove(record.key);
+                    batch.delete(record.key);
                 } else {
                     batch.put(record.key, record.value);
                 }
@@ -323,7 +323,7 @@ public class RocksDBStore implements KeyValueStore<Bytes, byte[]>
{
             for (final KeyValue<Bytes, byte[]> entry : entries) {
                 Objects.requireNonNull(entry.key, "key cannot be null");
                 if (entry.value == null) {
-                    batch.remove(entry.key.get());
+                    batch.delete(entry.key.get());
                 } else {
                     batch.put(entry.key.get(), entry.value);
                 }


Mime
View raw message