You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Zoltan Haindrich (JIRA)" <ji...@apache.org> on 2017/10/03 12:35:00 UTC
[jira] [Comment Edited] (HIVE-15053) Beeline#addlocaldriver -
reduce classpath scanning
[ https://issues.apache.org/jira/browse/HIVE-15053?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16182085#comment-16182085 ]
Zoltan Haindrich edited comment on HIVE-15053 at 10/3/17 12:34 PM:
-------------------------------------------------------------------
[~Ferd] if someone encounters a jdbc driver which is not service loadable the jdbc drivermanager provides a sysprop {{-Djdbc.drivers=com.acme.jdbc.AcmeJdbcDriver}} to load additional drivers.
according to http://download.oracle.com/otn-pub/jcp/jdbc-4_1-mrel-eval-spec/jdbc4.1-fr-spec.pdf?AuthParam=1506493945_9fc823ace0df6ccd9cc77b1ba9e7068c
9.2.1: \[...\] JDBC 4.0 Drivers *must* include the file META-INF/services/java.sql.Driver.\[...\]
so I guess we are safe to drop the classpath scanning.
was (Author: kgyrtkirk):
[~Ferd] if someone encounters a jdbc driver which is not service loadable the jdbc drivermanager provides a sysprop{{-Djdbc.drivers=com.acme.jdbc.AcmeJdbcDriver}} to load additional drivers.
according to http://download.oracle.com/otn-pub/jcp/jdbc-4_1-mrel-eval-spec/jdbc4.1-fr-spec.pdf?AuthParam=1506493945_9fc823ace0df6ccd9cc77b1ba9e7068c
9.2.1: \[...\] JDBC 4.0 Drivers *must* include the file META-INF/services/java.sql.Driver.\[...\]
so I guess we are safe to drop the classpath scanning.
> Beeline#addlocaldriver - reduce classpath scanning
> --------------------------------------------------
>
> Key: HIVE-15053
> URL: https://issues.apache.org/jira/browse/HIVE-15053
> Project: Hive
> Issue Type: Improvement
> Reporter: Zoltan Haindrich
> Assignee: Zoltan Haindrich
> Attachments: HIVE-15053.1.patch, HIVE-15053.1.patch, HIVE-15053.1.patch, HIVE-15053.2.patch, HIVE-15053.3.patch
>
>
> There is a classpath scanning machinery inside {{ClassNameCompleter}}.
> I think the sole purpose of these things is to scan for jdbc drivers...(but not entirely sure)
> if it is indeed looking for jdbc drivers..then possibly this can be removed without any issues because modern jdbc drivers usually advertise their driver as a service-loadable class for {{java.sql.Driver}}
> http://www.onjava.com/2006/08/02/jjdbc-4-enhancements-in-java-se-6.html
> Auto-Loading of JDBC Driver
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)