From e96cf7e37cdf796c3a1dfc18f4ef66b0c72aba06 Mon Sep 17 00:00:00 2001 From: Dmitry Kryukov Date: Fri, 28 Jun 2024 07:09:55 +0300 Subject: [PATCH] [fix] fix string format for exception in RocksdbKVStore (#4448) --- .../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 8af53990e91..ed1ab940e81 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.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 @@ protected Pair> openRocksdb( byte[] other = haveTtl ? DATA_CF : DATA_TTL_CF; List 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))); } } }