kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boy...@apache.org
Subject [kafka] branch trunk updated: add toString for RocksDbWindowBytesStoreSupplier (#8952)
Date Mon, 29 Jun 2020 23:26:27 GMT
This is an automated email from the ASF dual-hosted git repository.

boyang 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 7dcdd35  add toString for RocksDbWindowBytesStoreSupplier (#8952)
7dcdd35 is described below

commit 7dcdd35b657e000720cb3c10abfd9db886d2b3c6
Author: Boyang Chen <boyang@confluent.io>
AuthorDate: Mon Jun 29 16:25:48 2020 -0700

    add toString for RocksDbWindowBytesStoreSupplier (#8952)
    
    Add toString() to RocksDbWindowBytesStoreSupplier to amend the logging gap.
    
    Reviewers: A. Sophie Blee-Goldman <sophie@confluent.io>
---
 .../kafka/streams/kstream/internals/KStreamImplJoin.java     |  3 ++-
 .../state/internals/RocksDbWindowBytesStoreSupplier.java     | 12 ++++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KStreamImplJoin.java
b/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KStreamImplJoin.java
index 923ca04..6c751b9 100644
--- a/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KStreamImplJoin.java
+++ b/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KStreamImplJoin.java
@@ -170,7 +170,8 @@ class KStreamImplJoin {
         final boolean allMatch = supplier.retentionPeriod() == (joinWindows.size() + joinWindows.gracePeriodMs())
&&
             supplier.windowSize() == joinWindows.size();
         if (!allMatch) {
-            throw new StreamsException(String.format("Window settings mismatch. WindowBytesStoreSupplier
settings %s must match JoinWindows settings %s", supplier, joinWindows));
+            throw new StreamsException(String.format("Window settings mismatch. WindowBytesStoreSupplier
settings %s must match JoinWindows settings %s" +
+                                                         " for the window size and retention
period", supplier, joinWindows));
         }
     }
 
diff --git a/streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDbWindowBytesStoreSupplier.java
b/streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDbWindowBytesStoreSupplier.java
index 42894cb..9ce58ba 100644
--- a/streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDbWindowBytesStoreSupplier.java
+++ b/streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDbWindowBytesStoreSupplier.java
@@ -102,4 +102,16 @@ public class RocksDbWindowBytesStoreSupplier implements WindowBytesStoreSupplier
     public long retentionPeriod() {
         return retentionPeriod;
     }
+
+    @Override
+    public String toString() {
+        return "RocksDbWindowBytesStoreSupplier{" +
+                   "name='" + name + '\'' +
+                   ", retentionPeriod=" + retentionPeriod +
+                   ", segmentInterval=" + segmentInterval +
+                   ", windowSize=" + windowSize +
+                   ", retainDuplicates=" + retainDuplicates +
+                   ", returnTimestampedStore=" + returnTimestampedStore +
+                   '}';
+    }
 }


Mime
View raw message