[ 
https://issues.apache.org/jira/browse/IMPALA-10571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17298960#comment-17298960
 ] 

ASF subversion and git services commented on IMPALA-10571:
----------------------------------------------------------

Commit 06fbb0d629e14d7129a5d0d7cf271e38362830e6 in impala's branch 
refs/heads/master from Zoltan Borok-Nagy
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=06fbb0d ]

IMPALA-10571: ImpalaJdbcClient might silently choose a different driver than 
the one specified

ImpalaJdbcClient might silently choose the HiveDriver when the
connection string is not specified. It's because the default
connection string is 'jdbc:hive2://...'.

This patch adds a check to ImpalaJdbcClient to make sure the driver
being used is the one specified by the user. If not, it raises an
error.

I also modified bin/run-jdbc-client.sh to make it easier to use
different drivers. Users are now able to specify the classpath
of their custom driver via the environment variable
IMPALA_JDBC_DRIVER_CLASSPATH.

Testing:
 * tested manually

Change-Id: If7fdf49b7f04f4d9ae6286df5c8df6b205cbce8f
Reviewed-on: http://gerrit.cloudera.org:8080/17164
Reviewed-by: Thomas Tauber-Marshall <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>


> ImpalaJdbcClient might silently choose a different driver than the one 
> specified
> --------------------------------------------------------------------------------
>
>                 Key: IMPALA-10571
>                 URL: https://issues.apache.org/jira/browse/IMPALA-10571
>             Project: IMPALA
>          Issue Type: Bug
>            Reporter: Zoltán Borók-Nagy
>            Assignee: Zoltán Borók-Nagy
>            Priority: Major
>
> I was experimenting with drivers while running into this issue.
> I tried to do some testing with a custom JDBC driver with the following 
> command:
> {noformat}
> bin/run-jdbc-client.sh -d "my.impala.jdbc.Driver" -t NOSASL -q "select 
> 1"{noformat}
> The script outputted:
> {noformat}
> Using JDBC Driver Name: my.impala.jdbc.Driver
> Connecting to: jdbc:impala://localhost:21050
> Executing: select sleep(12000)
> ----[START]----
> 1
> ----[END]----{noformat}
> However, after some debugging I figured out that ImpalaJdbcClient actually 
> used org.apache.hive.jdbc.HiveDriver. It was because the specified driver 
> didn't accept the default connection string (jdbc:hive2://...), therefore the 
> HiveDriver was being used.
> I think instead of silently choosing a different driver, ImpalaJdbcClient 
> should raise an error and tell the user to specify the connection string as 
> well.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to