This is an automated email from the ASF dual-hosted git repository.

shoothzj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new e96cf7e37c [fix] fix string format for exception in RocksdbKVStore 
(#4448)
e96cf7e37c is described below

commit e96cf7e37cdf796c3a1dfc18f4ef66b0c72aba06
Author: Dmitry Kryukov <[email protected]>
AuthorDate: Fri Jun 28 07:09:55 2024 +0300

    [fix] fix string format for exception in RocksdbKVStore (#4448)
---
 .../java/org/apache/bookkeeper/statelib/impl/kv/RocksdbKVStore.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/stream/statelib/src/main/java/org/apache/bookkeeper/statelib/impl/kv/RocksdbKVStore.java
 
b/stream/statelib/src/main/java/org/apache/bookkeeper/statelib/impl/kv/RocksdbKVStore.java
index 8af53990e9..ed1ab940e8 100644
--- 
a/stream/statelib/src/main/java/org/apache/bookkeeper/statelib/impl/kv/RocksdbKVStore.java
+++ 
b/stream/statelib/src/main/java/org/apache/bookkeeper/statelib/impl/kv/RocksdbKVStore.java
@@ -41,6 +41,7 @@ import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.List;
@@ -390,8 +391,8 @@ public class RocksdbKVStore<K, V> implements KVStore<K, V> {
                     byte[] other = haveTtl ? DATA_CF : DATA_TTL_CF;
                     List<byte[]> cfNames = RocksDB.listColumnFamilies(opts, 
dbDir.getAbsolutePath());
                     if (!cfNames.contains(wanted) && cfNames.contains(other)) {
-                        throw new StateStoreException(String.format("{}: 
expected {} column family, found {}",
-                                dbDir.getAbsolutePath(), wanted, other));
+                        throw new StateStoreException(String.format("%s: 
expected %s column family, found %s",
+                                dbDir.getAbsolutePath(), 
Arrays.toString(wanted), Arrays.toString(other)));
                     }
                 }
             }

Reply via email to