Repository: apache/kafka
File: streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBGenericOptionsToDbOptionsColumnFamilyOptionsAdapter.java (Java)

Code before:
    }

    @Override
    public boolean avoidFlushDuringShutdown() {
        return dbOptions.avoidFlushDuringShutdown();
    }

    @Override
    public MemTableConfig memTableConfig() {
        return columnFamilyOptions.memTableConfig();
    }

    @Override
    public Options setMemTableConfig(final MemTableConfig config) {
        columnFamilyOptions.setMemTableConfig(config);
        return this;
    }

    @Override
    public Options setRateLimiter(final RateLimiter rateLimiter) {
        dbOptions.setRateLimiter(rateLimiter);
        return this;
    }

    @Override
    public Options setSstFileManager(final SstFileManager sstFileManager) {
        dbOptions.setSstFileManager(sstFileManager);
        return this;
    }

    @Override
    public Options setLogger(final LoggerInterface logger) {
        dbOptions.setLogger(logger);
        return this;
    }

    @Override
    public Options setInfoLogLevel(final InfoLogLevel infoLogLevel) {
        dbOptions.setInfoLogLevel(infoLogLevel);
        return this;
    }

    @Override
    public InfoLogLevel infoLogLevel() {
        return dbOptions.infoLogLevel();
    }

    @Override
    public String memTableFactoryName() {
        return columnFamilyOptions.memTableFactoryName();
    }

Review comment (suggestion):
> Could you also verify if options were deprecated in the Java API and in the C++ code. For the latter, I do not actually not know where to look. Maybe in the release notes. I am asking this because it seems that RocksDB's Java API contains options that were deprecated long ago in the C++ code. Maybe we can deprecate those options in our wrapper.

I've checked 
- https://github.com/facebook/rocksdb/blame/v10.1.3/options/db_options.cc
- https://github.com/facebook/rocksdb/blob/v10.1.3/options/cf_options.cc 

and collected all options marked as `kdeprecated`. According to the definitions in 
https://github.com/facebook/rocksdb/blob/57a8e69d4e75c317f6ab02d6fc2fdd404b366794/include/rocksdb/utilities/options_type.h#L73-L77
```
  kDeprecated,           // The option is no longer used in rocksdb. The RocksDB
                         // OptionsParser will still accept this option if it
                         // happen to exists in some Options file.  However,
                         // the parser will not include it in serialization
                         // and verification processes.

```
Among the two options files, `rate_limiter` is the only deprecated option (since v7.6.0) that is still exposed in `RocksDBGenericOptionsToDbOptionsColumnFamilyOptionsAdapter.java`, and it does not have an alternative. Therefore, I'm adding `@Deprecated` to this option.

Code after:
    public Options setAvoidFlushDuringShutdown(final boolean avoidFlushDuringShutdown) {
        dbOptions.setAvoidFlushDuringShutdown(avoidFlushDuringShutdown);
        return this;
    }

    @Override
    public boolean avoidFlushDuringShutdown() {
        return dbOptions.avoidFlushDuringShutdown();
    }

    @Override
    public MemTableConfig memTableConfig() {
        return columnFamilyOptions.memTableConfig();
    }

    @Override
    public Options setMemTableConfig(final MemTableConfig config) {
        columnFamilyOptions.setMemTableConfig(config);
        return this;
    }

    @Deprecated(since = "4.2", forRemoval = true)
    @Override
    public Options setRateLimiter(final RateLimiter rateLimiter) {
        log.warn("rate_limiter has been deprecated in RocksDB v7.6.0." +
                " See https://github.com/facebook/rocksdb/pull/10378");
        dbOptions.setRateLimiter(rateLimiter);
        return this;
    }

    @Override
    public Options setSstFileManager(final SstFileManager sstFileManager) {
        dbOptions.setSstFileManager(sstFileManager);
        return this;
    }

    @Override
    public Options setLogger(final LoggerInterface logger) {
        dbOptions.setLogger(logger);
        return this;
    }

    @Override
    public Options setInfoLogLevel(final InfoLogLevel infoLogLevel) {
        dbOptions.setInfoLogLevel(infoLogLevel);
        return this;
    }

    @Override
    public InfoLogLevel infoLogLevel() {
        return dbOptions.infoLogLevel();