anishshri-db opened a new pull request, #45616:
URL: https://github.com/apache/spark/pull/45616
### What changes were proposed in this pull request?
Fix RocksDB Logger constructor use to avoid deprecation warning
### Why are the changes needed?
With the latest RocksDB upgrade, the Logger constructor used was deprecated
which was throwing a compiler warning.
```
[warn] val dbLogger = new Logger(dbOptions) {
[warn] ^
[warn] one warning found
[warn] two warnings found
[info] compiling 36 Scala sources and 16 Java sources to
/Users/anish.shrigondekar/spark/spark/sql/core/target/scala-2.13/classes ...
[warn] -target is deprecated: Use -release instead to compile against the
correct platform API.
[warn] Applicable -Wconf / @nowarn filters for this warning: msg=<part of
the message>, cat=deprecation
[warn]
/Users/anish.shrigondekar/spark/spark/sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDB.scala:851:24:
constructor Logger in class Logger is deprecated
[warn] Applicable -Wconf / @nowarn filters for this warning: msg=<part of
the message>, cat=deprecation,
site=org.apache.spark.sql.execution.streaming.state.RocksDB.createLogger.dbLogger,
origin=org.rocksdb.Logger.<init>
```
Updated to use the new recommendation as mentioned here -
https://javadoc.io/doc/org.rocksdb/rocksdbjni/latest/org/rocksdb/Logger.html
After the fix, the warning is not seen.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Existing unit tests
### Was this patch authored or co-authored using generative AI tooling?
No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]