From 7cf1d80705c4e5e753e9a20b926fb4d4d1ad1bf8 Mon Sep 17 00:00:00 2001 From: Jihoon Son Date: Fri, 12 Feb 2021 20:24:01 -0800 Subject: [PATCH 1/3] Remove stale 'namespace' config for JDBC lookups from doc and web-console --- .../extensions-core/lookups-cached-global.md | 5 ++--- web-console/src/druid-models/lookup-spec.tsx | 16 ---------------- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/docs/development/extensions-core/lookups-cached-global.md b/docs/development/extensions-core/lookups-cached-global.md index 7d9dffb2f1b2..64064df3123f 100644 --- a/docs/development/extensions-core/lookups-cached-global.md +++ b/docs/development/extensions-core/lookups-cached-global.md @@ -347,7 +347,6 @@ The JDBC lookups will poll a database to populate its local cache. If the `tsCol |Parameter|Description|Required|Default| |---------|-----------|--------|-------| -|`namespace`|The namespace to define|Yes|| |`connectorConfig`|The connector config to use|Yes|| |`table`|The table which contains the key value pairs|Yes|| |`keyColumn`|The column in `table` which contains the keys|Yes|| @@ -359,7 +358,6 @@ The JDBC lookups will poll a database to populate its local cache. If the `tsCol ```json { "type":"jdbc", - "namespace":"some_lookup", "connectorConfig":{ "createTables":true, "connectURI":"jdbc:mysql://localhost:3306/druid", @@ -377,7 +375,8 @@ The JDBC lookups will poll a database to populate its local cache. If the `tsCol > If using JDBC, you will need to add your database's client JAR files to the extension's directory. > For Postgres, the connector JAR is already included. > For MySQL, you can get it from https://dev.mysql.com/downloads/connector/j/. -> Copy or symlink the downloaded file to `extensions/druid-lookups-cached-global` under the distribution root directory. +> The connector JAR should locate in the classpath of Druid's main class loader. +> An easy way to add it in the classpath is copying or symlinking the downloaded file to `lib/` under the distribution root directory. ## Introspection diff --git a/web-console/src/druid-models/lookup-spec.tsx b/web-console/src/druid-models/lookup-spec.tsx index 31405f311719..02576a8f7c44 100644 --- a/web-console/src/druid-models/lookup-spec.tsx +++ b/web-console/src/druid-models/lookup-spec.tsx @@ -268,22 +268,6 @@ export const LOOKUP_FIELDS: Field[] = [ }, // JDBC stuff - { - name: 'extractionNamespace.namespace', - type: 'string', - placeholder: 'some_lookup', - defined: (model: LookupSpec) => deepGet(model, 'extractionNamespace.type') === 'jdbc', - required: true, - info: ( - <> -

The namespace value in the SQL query:

-

- SELECT keyColumn, valueColumn, tsColumn? FROM namespace.table WHERE - filter -

- - ), - }, { name: 'extractionNamespace.connectorConfig.connectURI', label: 'Connect URI', From 8c6a9badd2a89d0bb9553bd81a0fecad49b95040 Mon Sep 17 00:00:00 2001 From: Jihoon Son Date: Mon, 15 Feb 2021 12:15:41 -0800 Subject: [PATCH 2/3] revert webconsole change --- web-console/src/druid-models/lookup-spec.tsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/web-console/src/druid-models/lookup-spec.tsx b/web-console/src/druid-models/lookup-spec.tsx index 02576a8f7c44..31405f311719 100644 --- a/web-console/src/druid-models/lookup-spec.tsx +++ b/web-console/src/druid-models/lookup-spec.tsx @@ -268,6 +268,22 @@ export const LOOKUP_FIELDS: Field[] = [ }, // JDBC stuff + { + name: 'extractionNamespace.namespace', + type: 'string', + placeholder: 'some_lookup', + defined: (model: LookupSpec) => deepGet(model, 'extractionNamespace.type') === 'jdbc', + required: true, + info: ( + <> +

The namespace value in the SQL query:

+

+ SELECT keyColumn, valueColumn, tsColumn? FROM namespace.table WHERE + filter +

+ + ), + }, { name: 'extractionNamespace.connectorConfig.connectURI', label: 'Connect URI', From de9b6ee53463338fed026389d4b4a5ec1f6e85cb Mon Sep 17 00:00:00 2001 From: Jihoon Son Date: Tue, 2 Mar 2021 22:38:43 -0800 Subject: [PATCH 3/3] address comments --- docs/development/extensions-core/lookups-cached-global.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/development/extensions-core/lookups-cached-global.md b/docs/development/extensions-core/lookups-cached-global.md index 64064df3123f..4872a0977c4a 100644 --- a/docs/development/extensions-core/lookups-cached-global.md +++ b/docs/development/extensions-core/lookups-cached-global.md @@ -375,8 +375,8 @@ The JDBC lookups will poll a database to populate its local cache. If the `tsCol > If using JDBC, you will need to add your database's client JAR files to the extension's directory. > For Postgres, the connector JAR is already included. > For MySQL, you can get it from https://dev.mysql.com/downloads/connector/j/. -> The connector JAR should locate in the classpath of Druid's main class loader. -> An easy way to add it in the classpath is copying or symlinking the downloaded file to `lib/` under the distribution root directory. +> The connector JAR should reside in the classpath of Druid's main class loader. +> To add the connector JAR to the classpath, you can copy the downloaded file to `lib/` under the distribution root directory. Alternatively, create a symbolic link to the connector in the `lib` directory. ## Introspection