From c326f3c143ffdd56954706aeb4e0b82ac819bf03 Mon Sep 17 00:00:00 2001 From: yangjie01 Date: Tue, 7 May 2024 07:33:38 -0700 Subject: [PATCH] [SPARK-48171][CORE] Clean up the use of deprecated constructors of `o.rocksdb.Logger` ### What changes were proposed in this pull request? This pr aims to clean up the use of deprecated constructors of `o.rocksdb.Logger`, the change ref to https://github.com/facebook/rocksdb/blob/5c2be544f5509465957706c955b6d623e889ac4e/java/src/main/java/org/rocksdb/Logger.java#L39-L54 ``` /** *

AbstractLogger constructor.

* *

Important: the log level set within * the {link org.rocksdb.Options} instance will be used as * maximum log level of RocksDB.

* * param options {link org.rocksdb.Options} instance. * * deprecated Use {link Logger#Logger(InfoLogLevel)} instead, e.g. {code new * Logger(options.infoLogLevel())}. */ Deprecated public Logger(final Options options) { this(options.infoLogLevel()); } ``` ### Why are the changes needed? Clean up deprecated api usage. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Pass GitHub Actions ### Was this patch authored or co-authored using generative AI tooling? No Closes #46436 from LuciferYang/rocksdb-deprecation. Authored-by: yangjie01 Signed-off-by: Dongjoon Hyun --- .../java/org/apache/spark/network/util/RocksDBProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/network-common/src/main/java/org/apache/spark/network/util/RocksDBProvider.java b/common/network-common/src/main/java/org/apache/spark/network/util/RocksDBProvider.java index f3b7b48355a06..2b5ea01d94c9d 100644 --- a/common/network-common/src/main/java/org/apache/spark/network/util/RocksDBProvider.java +++ b/common/network-common/src/main/java/org/apache/spark/network/util/RocksDBProvider.java @@ -136,7 +136,7 @@ private static class RocksDBLogger extends org.rocksdb.Logger { private static final Logger LOG = LoggerFactory.getLogger(RocksDBLogger.class); RocksDBLogger(Options options) { - super(options); + super(options.infoLogLevel()); } @Override