From 8d356b034b5759e7baa740921a4804dbba678f49 Mon Sep 17 00:00:00 2001 From: cyc Date: Thu, 8 Apr 2021 23:55:52 -0400 Subject: [PATCH] KAFKA-12492: Fix the formatting of example RocksDBConfigSetter (#10486) Fix the formatting of example RocksDBConfigSetter due to the un-arranged spaces within
 tag.

Reviewers: Anna Sophie Blee-Goldman 
---
 .../developer-guide/config-streams.html       | 56 ++++++++++---------
 1 file changed, 30 insertions(+), 26 deletions(-)

diff --git a/docs/streams/developer-guide/config-streams.html b/docs/streams/developer-guide/config-streams.html
index a1ddd128379..8ce2d0f87de 100644
--- a/docs/streams/developer-guide/config-streams.html
+++ b/docs/streams/developer-guide/config-streams.html
@@ -704,34 +704,37 @@
             

The RocksDB configuration. Kafka Streams uses RocksDB as the default storage engine for persistent stores. To change the default configuration for RocksDB, you can implement RocksDBConfigSetter and provide your custom class via rocksdb.config.setter.

Here is an example that adjusts the memory size consumed by RocksDB.

-
    public static class CustomRocksDBConfig implements RocksDBConfigSetter {
-                    // This object should be a member variable so it can be closed in RocksDBConfigSetter#close.
-                    private org.rocksdb.Cache cache = new org.rocksdb.LRUCache(16 * 1024L * 1024L);
+              
+
+public static class CustomRocksDBConfig implements RocksDBConfigSetter {
+    // This object should be a member variable so it can be closed in RocksDBConfigSetter#close.
+    private org.rocksdb.Cache cache = new org.rocksdb.LRUCache(16 * 1024L * 1024L);
 
-                    @Override
-                    public void setConfig(final String storeName, final Options options, final Map<String, Object> configs) {
-                      // See #1 below.
-                      BlockBasedTableConfig tableConfig = (BlockBasedTableConfig) options.tableFormatConfig();
-                      tableConfig.setBlockCache(cache);
-                      // See #2 below.
-                      tableConfig.setBlockSize(16 * 1024L);
-                      // See #3 below.
-                      tableConfig.setCacheIndexAndFilterBlocks(true);
-                      options.setTableFormatConfig(tableConfig);
-                      // See #4 below.
-                      options.setMaxWriteBufferNumber(2);
-                    }
+    @Override
+    public void setConfig(final String storeName, final Options options, final Map<String, Object> configs) {
+        // See #1 below.
+        BlockBasedTableConfig tableConfig = (BlockBasedTableConfig) options.tableFormatConfig();
+        tableConfig.setBlockCache(cache);
+        // See #2 below.
+        tableConfig.setBlockSize(16 * 1024L);
+        // See #3 below.
+        tableConfig.setCacheIndexAndFilterBlocks(true);
+        options.setTableFormatConfig(tableConfig);
+        // See #4 below.
+        options.setMaxWriteBufferNumber(2);
+    }
 
-                    @Override
-                    public void close(final String storeName, final Options options) {
-                      // See #5 below.
-                      cache.close();
-                    }
-                    }
+    @Override
+    public void close(final String storeName, final Options options) {
+        // See #5 below.
+        cache.close();
+    }
+}
 
-                    Properties streamsSettings = new Properties();
-                    streamsConfig.put(StreamsConfig.ROCKSDB_CONFIG_SETTER_CLASS_CONFIG, CustomRocksDBConfig.class);
-                    
+Properties streamsSettings = new Properties(); +streamsConfig.put(StreamsConfig.ROCKSDB_CONFIG_SETTER_CLASS_CONFIG, CustomRocksDBConfig.class); +
+
Notes for example:
@@ -744,7 +747,8 @@
-
+ +