You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,10 @@
2
2
3
3
## [Unreleased]
4
4
5
+
### Added
6
+
7
+
- Added support for caching of lookup joins.
8
+
5
9
### Fixed
6
10
7
11
- Fixed issue in the logging code of the `JavaNetHttpPollingClient` which prevents showing the status code and response body when the log level is configured at DEBUG (or lower) level.
Copy file name to clipboardExpand all lines: README.md
+17-16Lines changed: 17 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -424,12 +424,12 @@ is set to `'true'`, it will be used as header value as is, without any extra mod
424
424
| url | required | The base URL that should be use for GET requests. For example _http://localhost:8080/client_|
425
425
| asyncPolling | optional | true/false - determines whether Async Polling should be used. Mechanism is based on Flink's Async I/O. |
426
426
| lookup-method | optional | GET/POST/PUT (and any other) - determines what REST method should be used for lookup REST query. If not specified, `GET` method will be used. |
427
-
| lookup.cache | optional | Enum possible values: `NONE`, `PARTIAL`. The cache strategy for the lookup table. Currently supports `NONE` (no caching) and `PARTIAL` (caching entries on lookup operation in external API). |
428
-
| lookup.partial-cache.max-rows | optional | The max number of rows of lookup cache, over this value, the oldest rows will be expired. `lookup.cache` must be set to `PARTIAL` to use this option. See the following <ahref="#lookup-cache">Lookup Cache</a> section for more details. |
429
-
| lookup.partial-cache.expire-after-write | optional | The max time to live for each rows in lookup cache after writing into the cache. Specify as a [Duration](https://nightlies.apache.org/flink/flink-docs-release-1.19/docs/deployment/config/#duration). `lookup.cache` must be set to `PARTIAL` to use this option. See the following <ahref="#lookup-cache">Lookup Cache</a> section for more details. |
430
-
| lookup.partial-cache.expire-after-access | optional | The max time to live for each rows in lookup cache after accessing the entry in the cache. Specify as a [Duration](https://nightlies.apache.org/flink/flink-docs-release-1.19/docs/deployment/config/#duration). `lookup.cache` must be set to `PARTIAL` to use this option. See the following <ahref="#lookup-cache">Lookup Cache</a> section for more details. |
431
-
| lookup.partial-cache.cache-missing-key | optional | This is a boolean that defaults to true. Whether to store an empty value into the cache if the lookup key doesn't match any rows in the table. `lookup.cache` must be set to `PARTIAL` to use this option. See the following <ahref="#lookup-cache">Lookup Cache</a> section for more details. |
432
-
| lookup.max-retries | optional | The max retry times if the lookup failed; default is 3. See the following <ahref="#lookup-cache">Lookup Cache</a> section for more details. |
427
+
| lookup.cache | optional | Enum possible values: `NONE`, `PARTIAL`. The cache strategy for the lookup table. Currently supports `NONE` (no caching) and `PARTIAL` (caching entries on lookup operation in external API). |
428
+
| lookup.partial-cache.max-rows | optional | The max number of rows of lookup cache, over this value, the oldest rows will be expired. `lookup.cache` must be set to `PARTIAL` to use this option. See the following <ahref="#lookup-cache">Lookup Cache</a> section for more details. |
429
+
| lookup.partial-cache.expire-after-write | optional | The max time to live for each rows in lookup cache after writing into the cache. Specify as a [Duration](https://nightlies.apache.org/flink/flink-docs-release-1.19/docs/deployment/config/#duration). `lookup.cache` must be set to `PARTIAL` to use this option. See the following <ahref="#lookup-cache">Lookup Cache</a> section for more details. |
430
+
| lookup.partial-cache.expire-after-access | optional | The max time to live for each rows in lookup cache after accessing the entry in the cache. Specify as a [Duration](https://nightlies.apache.org/flink/flink-docs-release-1.19/docs/deployment/config/#duration). `lookup.cache` must be set to `PARTIAL` to use this option. See the following <ahref="#lookup-cache">Lookup Cache</a> section for more details. |
431
+
| lookup.partial-cache.cache-missing-key | optional | This is a boolean that defaults to true. Whether to store an empty value into the cache if the lookup key doesn't match any rows in the table. `lookup.cache` must be set to `PARTIAL` to use this option. See the following <ahref="#lookup-cache">Lookup Cache</a> section for more details. |
432
+
| lookup.max-retries | optional | The max retry times if the lookup failed; default is 3. See the following <ahref="#lookup-cache">Lookup Cache</a> section for more details. |
433
433
| gid.connector.http.lookup.error.code | optional | List of HTTP status codes that should be treated as errors by HTTP Source, separated with comma. |
434
434
| gid.connector.http.lookup.error.code.exclude | optional | List of HTTP status codes that should be excluded from the `gid.connector.http.lookup.error.code` list, separated with comma. |
435
435
| gid.connector.http.security.cert.server | optional | Path to trusted HTTP server certificate that should be add to connectors key store. More than one path can be specified using `,` as path delimiter. |
@@ -469,18 +469,20 @@ is set to `'true'`, it will be used as header value as is, without any extra mod
469
469
470
470
471
471
## Lookup Cache
472
-
The HTTP Client connector can be used in temporal join as a lookup source (also known as a dimension table).
472
+
The HTTP Client connector can be used in lookup join as a lookup source (also known as a dimension table).
473
473
474
-
By default, the lookup cache is not enabled. You can enable it by setting `lookup.cache` to `PARTIAL`. Caching is only enabled if `asyncPolling` = false.
475
-
The scope of the cache is per job, so longrunning jobs can benefit from this caching.
474
+
By default, the lookup cache is not enabled. You can enable it by setting `lookup.cache` to `PARTIAL`.
475
+
The scope of the cache is per job, so long-running jobs can benefit from this caching.
476
476
477
-
The lookup cache is used to improve the performance of temporal joins. By default, the lookup cache is not enabled, so all the API requests are sent on the network. When the lookup cache is enabled, Flink looks in the cache first, and only sends requests
478
-
on the network when there is no cached value, then the cache is updated with the returned rows. The oldest rows in this cache are expired when the cache hits the max cached rows `lookup.partial-cache.max-rows` or when the row exceeds the max time to live specified by `lookup.partial-cache.expire-after-write` or `lookup.partial-cache.expire-after-access`.
479
-
The cached rows might not be the latest, but users can tune expiration options to a smaller value to have fresher data, but this may increase the number of API requests sent. So this is a balance between throughput and correctness.
480
-
A good use case for enabling this cache, is when the API responses are very slowly changing; for example master or reference data.
481
-
There are many cases when caching is not appropriate, for example calling an API to get the latest stock price.
477
+
The lookup cache is used to improve the performance of temporal joins. By default, the lookup cache is not enabled,
478
+
so all the API requests are sent on the network. When the lookup cache is enabled, Flink looks in the cache first,
479
+
and only sends requests on the network when there is no cached value, then the cache is updated with the returned rows.
480
+
The oldest rows in this cache are expired when the cache hits the max cached rows `lookup.partial-cache.max-rows`
481
+
or when the row exceeds the max time to live specified by `lookup.partial-cache.expire-after-write`
482
+
or `lookup.partial-cache.expire-after-access`.
482
483
483
-
By default, flink caches the empty query result for a Primary key. You can toggle this behaviour by setting `lookup.partial-cache.cache-missing-key` to false.
484
+
By default, flink caches the empty query result for the primary key. You can toggle this behaviour by setting
485
+
`lookup.partial-cache.cache-missing-key` to false.
484
486
485
487
486
488
## Build and deployment
@@ -568,7 +570,6 @@ The mapping from Http Json Response to SQL table schema is done via Flink's Json
0 commit comments