docs: fix cached lookup module documentation (#17527)

* docs: fix loading lookup documentation

Signed-off-by: TessaIO <ahmedgrati1999@gmail.com>

* docs: fix indentation and punctuation

Signed-off-by: TessaIO <ahmedgrati1999@gmail.com>

---------

Signed-off-by: TessaIO <ahmedgrati1999@gmail.com>
This commit is contained in:
TessaIO 2024-12-06 09:09:37 +01:00 committed by GitHub
parent 3de46746ca
commit 93c123a482
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 74 additions and 15 deletions

View File

@ -81,10 +81,22 @@ This example demonstrates a polling cache that will update its on-heap cache eve
```json ```json
{ {
"type":"pollingLookup", "type": "pollingLookup",
"pollPeriod":"PT10M", "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"}, "dataFetcher": {
"cacheFactory":{"type":"onHeapPolling"} "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 ```json
{ {
"type":"pollingLookup", "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"}, "dataFetcher": {
"cacheFactory":{"type":"offHeapPolling"} "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 ```json
{ {
"type":"loadingLookup", "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"}, "dataFetcher": {
"loadingCacheSpec":{"type":"guava"}, "type": "jdbcDataFetcher",
"reverseLoadingCacheSpec":{"type":"guava", "maximumSize":500000, "expireAfterAccess":100000, "expireAfterWrite":10000} "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 ```json
{ {
"type":"loadingLookup", "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"}, "dataFetcher": {
"loadingCacheSpec":{"type":"mapDb", "maxEntriesSize":100000}, "type": "jdbcDataFetcher",
"reverseLoadingCacheSpec":{"type":"mapDb", "maxStoreSize":5, "expireAfterAccess":100000, "expireAfterWrite":10000} "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
}
} }
``` ```