This is an automated email from the ASF dual-hosted git repository.

abhishekrb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/master by this push:
     new 93c123a482a docs: fix cached lookup module documentation (#17527)
93c123a482a is described below

commit 93c123a482a5b5ed6533cc746a6bca79698ddb30
Author: TessaIO <[email protected]>
AuthorDate: Fri Dec 6 09:09:37 2024 +0100

    docs: fix cached lookup module documentation (#17527)
    
    * docs: fix loading lookup documentation
    
    Signed-off-by: TessaIO <[email protected]>
    
    * docs: fix indentation and punctuation
    
    Signed-off-by: TessaIO <[email protected]>
    
    ---------
    
    Signed-off-by: TessaIO <[email protected]>
---
 docs/development/extensions-core/druid-lookups.md | 89 +++++++++++++++++++----
 1 file changed, 74 insertions(+), 15 deletions(-)

diff --git a/docs/development/extensions-core/druid-lookups.md 
b/docs/development/extensions-core/druid-lookups.md
index 06283ec4d72..e3514a0d0c2 100644
--- a/docs/development/extensions-core/druid-lookups.md
+++ b/docs/development/extensions-core/druid-lookups.md
@@ -81,10 +81,22 @@ This example demonstrates a polling cache that will update 
its on-heap cache eve
 
 ```json
 {
-    "type":"pollingLookup",
-   "pollPeriod":"PT10M",
-   "dataFetcher":{ "type":"jdbcDataFetcher", 
"connectorConfig":"jdbc://mysql://localhost:3306/my_data_base", 
"table":"lookup_table_name", "keyColumn":"key_column_name", "valueColumn": 
"value_column_name"},
-   "cacheFactory":{"type":"onHeapPolling"}
+    "type": "pollingLookup",
+    "pollPeriod": "PT10M",
+    "dataFetcher": {
+       "type": "jdbcDataFetcher",
+       "connectorConfig": {
+          "connectURI": "jdbc://mysql://localhost:3306/my_data_base",
+          "user": "druid",
+          "password": "druid"
+       },
+       "table": "lookup_table_name",
+       "keyColumn": "key_column_name",
+       "valueColumn": "value_column_name"
+    },
+    "cacheFactory": {
+       "type": "onHeapPolling"
+    }
 }
 
 ```
@@ -94,9 +106,21 @@ This example demonstrates an off-heap lookup that will be 
cached once and never
 
 ```json
 {
-    "type":"pollingLookup",
-   "dataFetcher":{ "type":"jdbcDataFetcher", 
"connectorConfig":"jdbc://mysql://localhost:3306/my_data_base", 
"table":"lookup_table_name", "keyColumn":"key_column_name", "valueColumn": 
"value_column_name"},
-   "cacheFactory":{"type":"offHeapPolling"}
+   "type": "pollingLookup",
+   "dataFetcher": {
+      "type": "jdbcDataFetcher",
+      "connectorConfig": {
+         "connectURI": "jdbc://mysql://localhost:3306/my_data_base",
+         "user": "druid",
+         "password": "druid"
+      },
+      "table": "lookup_table_name",
+      "keyColumn": "key_column_name",
+      "valueColumn": "value_column_name"
+   },
+   "cacheFactory": {
+      "type": "offHeapPolling"
+   }
 }
 
 ```
@@ -125,10 +149,27 @@ Guava cache configuration spec.
 
 ```json
 {
-   "type":"loadingLookup",
-   "dataFetcher":{ "type":"jdbcDataFetcher", 
"connectorConfig":"jdbc://mysql://localhost:3306/my_data_base", 
"table":"lookup_table_name", "keyColumn":"key_column_name", "valueColumn": 
"value_column_name"},
-   "loadingCacheSpec":{"type":"guava"},
-   "reverseLoadingCacheSpec":{"type":"guava", "maximumSize":500000, 
"expireAfterAccess":100000, "expireAfterWrite":10000}
+   "type": "loadingLookup",
+   "dataFetcher": {
+      "type": "jdbcDataFetcher",
+      "connectorConfig": {
+         "connectURI": "jdbc://mysql://localhost:3306/my_data_base",
+         "user": "druid",
+         "password": "druid"
+      },
+      "table": "lookup_table_name",
+      "keyColumn": "key_column_name",
+      "valueColumn": "value_column_name"
+   },
+   "loadingCacheSpec": {
+      "type": "guava"
+   },
+   "reverseLoadingCacheSpec": {
+      "type": "guava",
+      "maximumSize": 500000,
+      "expireAfterAccess": 100000,
+      "expireAfterWrite": 10000
+   }
 }
 ```
 
@@ -146,10 +187,28 @@ Off heap cache is backed by 
[MapDB](http://www.mapdb.org/) implementation. MapDB
 
 ```json
 {
-   "type":"loadingLookup",
-   "dataFetcher":{ "type":"jdbcDataFetcher", 
"connectorConfig":"jdbc://mysql://localhost:3306/my_data_base", 
"table":"lookup_table_name", "keyColumn":"key_column_name", "valueColumn": 
"value_column_name"},
-   "loadingCacheSpec":{"type":"mapDb", "maxEntriesSize":100000},
-   "reverseLoadingCacheSpec":{"type":"mapDb", "maxStoreSize":5, 
"expireAfterAccess":100000, "expireAfterWrite":10000}
+   "type": "loadingLookup",
+   "dataFetcher": {
+      "type": "jdbcDataFetcher",
+      "connectorConfig": {
+         "connectURI": "jdbc://mysql://localhost:3306/my_data_base",
+         "user": "druid",
+         "password": "druid"
+      },
+      "table": "lookup_table_name",
+      "keyColumn": "key_column_name",
+      "valueColumn": "value_column_name"
+   },
+   "loadingCacheSpec": {
+      "type": "mapDb",
+      "maxEntriesSize": 100000
+   },
+   "reverseLoadingCacheSpec": {
+      "type": "mapDb",
+      "maxStoreSize": 5,
+      "expireAfterAccess": 100000,
+      "expireAfterWrite": 10000
+   }
 }
 ```
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to