[
https://issues.apache.org/jira/browse/IMPALA-12470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17769810#comment-17769810
]
Wenzhe Zhou commented on IMPALA-12470:
--------------------------------------
Copy the driver jar file from the given url to local file system, then create
URLClassLoader. Call
[FileSystemUtil.copyToLocal()|https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/common/FileSystemUtil.java#L783-L785]
to copy driver jar file to local.
Sample code
reference:[HiveUdfLoader.createWithLocalPath()|https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/hive/executor/HiveUdfLoader.java#L128C31-L161].
> Support different schemes for jdbc driver url when creating external jdbc
> table
> -------------------------------------------------------------------------------
>
> Key: IMPALA-12470
> URL: https://issues.apache.org/jira/browse/IMPALA-12470
> Project: IMPALA
> Issue Type: Sub-task
> Components: Frontend
> Reporter: Wenzhe Zhou
> Priority: Major
>
> jdbc driver url is specified as table property 'driver.url' when creating a
> external jdbc table, like the sample below:
> {code:java}
> CREATE TABLE test_postgres (
> id INT,
> string_col STRING)
> PRODUCED BY DATA SOURCE JdbcDataSource(
> '{"database.type":"POSTGRES",
> "jdbc.url":"jdbc:postgresql://localhost:5432/functional",
> "jdbc.driver":"org.postgresql.Driver",
> "driver.url":"hdfs://localhost:20500/test-warehouse/data-sources/jdbc-driver/postgresql-jdbc.jar",
> "dbcp.username":"hiveuser",
> "dbcp.password":"password",
> "table":"alltypes"}');
> {code}
> In the initial patch, we only support to download the driver jar files from
> hdfs. We need to support different storage type, like 'file://', 's3a://',
> etc.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]