From 0799f7da3169cb7e042b4ac908c207f21e87279e Mon Sep 17 00:00:00 2001 From: Chi Cao Minh Date: Sun, 23 Feb 2020 15:08:32 -0800 Subject: [PATCH 1/3] Add common optional dependencies for extensions Include hadoop-aws and postgres JDBC connector jar to improve out-of-the-box experience for extensions. The mysql JDBC connector jar is not bundled as it is GPL. --- extensions-core/hdfs-storage/pom.xml | 2 +- extensions-core/lookups-cached-global/pom.xml | 7 ++++++ extensions-core/lookups-cached-single/pom.xml | 8 +++++++ .../postgresql-metadata-storage/pom.xml | 1 - licenses.yaml | 24 +++++++++++++++++++ pom.xml | 5 ++++ 6 files changed, 45 insertions(+), 2 deletions(-) diff --git a/extensions-core/hdfs-storage/pom.xml b/extensions-core/hdfs-storage/pom.xml index 86843af816be..03ece8a044e0 100644 --- a/extensions-core/hdfs-storage/pom.xml +++ b/extensions-core/hdfs-storage/pom.xml @@ -261,7 +261,7 @@ org.apache.hadoop hadoop-aws ${hadoop.compile.version} - provided + runtime commons-io diff --git a/extensions-core/lookups-cached-global/pom.xml b/extensions-core/lookups-cached-global/pom.xml index 35b1ee4f6e69..df286b190c22 100644 --- a/extensions-core/lookups-cached-global/pom.xml +++ b/extensions-core/lookups-cached-global/pom.xml @@ -112,6 +112,13 @@ provided + + + org.postgresql + postgresql + runtime + + junit diff --git a/extensions-core/lookups-cached-single/pom.xml b/extensions-core/lookups-cached-single/pom.xml index 937747927bf0..fca56ed416b7 100644 --- a/extensions-core/lookups-cached-single/pom.xml +++ b/extensions-core/lookups-cached-single/pom.xml @@ -97,6 +97,14 @@ guava provided + + + + org.postgresql + postgresql + runtime + + junit diff --git a/extensions-core/postgresql-metadata-storage/pom.xml b/extensions-core/postgresql-metadata-storage/pom.xml index dc5836325359..66b9c2f900ea 100644 --- a/extensions-core/postgresql-metadata-storage/pom.xml +++ b/extensions-core/postgresql-metadata-storage/pom.xml @@ -50,7 +50,6 @@ org.postgresql postgresql - 42.2.8 org.jdbi diff --git a/licenses.yaml b/licenses.yaml index 746b5a0a56c0..9078789b404c 100644 --- a/licenses.yaml +++ b/licenses.yaml @@ -3467,6 +3467,30 @@ libraries: --- +name: PostgreSQL JDBC Driver +license_category: binary +module: extensions/druid-lookups-cached-single +license_name: BSD-2-Clause License +version: 42.2.8 +copyright: PostgreSQL Global Development Group +license_file_path: licenses/bin/postgresql.BSD2 +libraries: + - org.postgresql: postgresql + +--- + +name: PostgreSQL JDBC Driver +license_category: binary +module: extensions/druid-lookups-cached-global +license_name: BSD-2-Clause License +version: 42.2.8 +copyright: PostgreSQL Global Development Group +license_file_path: licenses/bin/postgresql.BSD2 +libraries: + - org.postgresql: postgresql + +--- + name: PostgreSQL JDBC Driver license_category: binary module: extensions/postgresql-metadata-storage diff --git a/pom.xml b/pom.xml index c7dd46231453..fbe2ed49eaf7 100644 --- a/pom.xml +++ b/pom.xml @@ -1111,6 +1111,11 @@ + + org.postgresql + postgresql + 42.2.8 + From 4622c385cb74b944ea3899f60f15aa87db5a258f Mon Sep 17 00:00:00 2001 From: Chi Cao Minh Date: Mon, 24 Feb 2020 15:58:59 -0800 Subject: [PATCH 2/3] Update docs --- docs/development/extensions-core/druid-lookups.md | 7 +++---- docs/development/extensions-core/lookups-cached-global.md | 7 +++---- pom.xml | 3 ++- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/docs/development/extensions-core/druid-lookups.md b/docs/development/extensions-core/druid-lookups.md index 04c34b6e1016..acede4639729 100644 --- a/docs/development/extensions-core/druid-lookups.md +++ b/docs/development/extensions-core/druid-lookups.md @@ -34,10 +34,9 @@ This module can be used side to side with other lookup module like the global ca To use this extension please make sure to [include](../../development/extensions.md#loading-extensions) `druid-lookups-cached-single` as an extension. > If using JDBC, you will need to add your database's client JAR files to the extension's directory. -> For MySQL, you can get it from https://dev.mysql.com/downloads/connector/j/, and for Postgres, from -> https://jdbc.postgresql.org/download.html or from `extensions/postgresql-metadata-storage/`. -> Copy or symlink the downloaded file to -> `extensions/druid-lookups-cached-single` under the distribution root 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-single` under the distribution root directory. ## Architecture Generally speaking this module can be divided into two main component, namely, the data fetcher layer and caching layer. diff --git a/docs/development/extensions-core/lookups-cached-global.md b/docs/development/extensions-core/lookups-cached-global.md index 9f9900a30104..ce646280ad04 100644 --- a/docs/development/extensions-core/lookups-cached-global.md +++ b/docs/development/extensions-core/lookups-cached-global.md @@ -369,10 +369,9 @@ 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 MySQL, you can get it from https://dev.mysql.com/downloads/connector/j/, and for Postgres, from -> https://jdbc.postgresql.org/download.html or from `extensions/postgresql-metadata-storage/`. -> Copy or symlink the downloaded file to -> `extensions/druid-lookups-cached-global` under the distribution root 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. ## Introspection diff --git a/pom.xml b/pom.xml index fbe2ed49eaf7..2b4be084dd5f 100644 --- a/pom.xml +++ b/pom.xml @@ -98,6 +98,7 @@ 4.1.45.Final v10.14.2 6.5.0 + 42.2.8 3.11.0 1.7.12 @@ -1114,7 +1115,7 @@ org.postgresql postgresql - 42.2.8 + ${postgreql.version} From 6c5bf54ee653ede315f4ead16a4c6874c34449a5 Mon Sep 17 00:00:00 2001 From: Chi Cao Minh Date: Mon, 24 Feb 2020 16:59:28 -0800 Subject: [PATCH 3/3] Fix typo --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 2b4be084dd5f..1bdf03ec1464 100644 --- a/pom.xml +++ b/pom.xml @@ -98,7 +98,7 @@ 4.1.45.Final v10.14.2 6.5.0 - 42.2.8 + 42.2.8 3.11.0 1.7.12 @@ -1115,7 +1115,7 @@ org.postgresql postgresql - ${postgreql.version} + ${postgresql.version}