hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zoltan Haindrich <k...@rxd.hu>
Subject Re: Review Request 54585: HIVE-15053 Beeline#addlocaldriver - reduce classpath scanning
Date Fri, 15 Sep 2017 07:50:31 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54585/
-----------------------------------------------------------

(Updated Sept. 15, 2017, 7:50 a.m.)


Review request for hive.


Changes
-------

rebase


Bugs: HIVE-15053
    https://issues.apache.org/jira/browse/HIVE-15053


Repository: hive-git


Description
-------

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

the patch removes the scanner related functionalities; and starts relying on the serviceloader
method .
I've looked around...it should work fine with current jdbc drivers:
https://issues.apache.org/jira/browse/HIVE-15053?focusedCommentId=15609340&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15609340


Diffs (updated)
-----

  beeline/src/java/org/apache/hive/beeline/BeeLine.java f2c346dda08175d8b5ab08f6d2182e8497781924

  beeline/src/java/org/apache/hive/beeline/ClassNameCompleter.java 65ac576e8a8dd494f0e92ab54839f71f4ed0e6df

  beeline/src/test/org/apache/hive/beeline/TestBeelineArgParsing.java 2884cc8b5d48cc81632ceb7c7badba545702722d

  beeline/src/test/org/apache/hive/beeline/TestClassNameCompleter.java 1999937ca5cacd00feaa829803357124f6ec63f0

  common/src/java/org/apache/hive/common/util/HiveTestUtils.java 88b9f81e48ee5e8196fa51a19a8fe8fe45048177



Diff: https://reviews.apache.org/r/54585/diff/2/

Changes: https://reviews.apache.org/r/54585/diff/1-2/


Testing
-------

unit test


Thanks,

Zoltan Haindrich


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message