Skip to content

Commit d9f8119

Browse files
dk2kAnup Ghatage
authored and
Anup Ghatage
committed
[fix] fix string format for exception in RocksdbKVStore (apache#4448)
1 parent 544b34c commit d9f8119

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

stream/statelib/src/main/java/org/apache/bookkeeper/statelib/impl/kv/RocksdbKVStore.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
import java.nio.file.Files;
4242
import java.nio.file.Path;
4343
import java.nio.file.Paths;
44+
import java.util.Arrays;
4445
import java.util.Collections;
4546
import java.util.Comparator;
4647
import java.util.List;
@@ -390,8 +391,8 @@ protected Pair<RocksDB, List<ColumnFamilyHandle>> openRocksdb(
390391
byte[] other = haveTtl ? DATA_CF : DATA_TTL_CF;
391392
List<byte[]> cfNames = RocksDB.listColumnFamilies(opts, dbDir.getAbsolutePath());
392393
if (!cfNames.contains(wanted) && cfNames.contains(other)) {
393-
throw new StateStoreException(String.format("{}: expected {} column family, found {}",
394-
dbDir.getAbsolutePath(), wanted, other));
394+
throw new StateStoreException(String.format("%s: expected %s column family, found %s",
395+
dbDir.getAbsolutePath(), Arrays.toString(wanted), Arrays.toString(other)));
395396
}
396397
}
397398
}

0 commit comments

Comments
 (0)