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

Istvan Toth commented on PHOENIX-5772:
--------------------------------------

This ended up as a large-ish patch:

The primary goal was to remove the hadoop dependency from the thin client. In 
order to this, I had to move the kerberos login heuristics into the python 
script, and had to switch the login logic over to the standard java library.

Also removed sqlline+friends from the shaded thin client. I believe that 99+% 
of the sqlline-thin useage occurs via sqlline-thin.py, where we add it via the 
classpath, and this again reduces the size and class path clutter for the JDBC 
driver use case.

This achieved the primary goal of reducing the jar size to about a fifth of the 
previous size, as well as cleaning up the classpath.

Removed all additional shading from the thin client, I believe that Avatica 
already shades everything that makes sense.

Updated sqlline to the latest, because why not. It bumps  the Java version 
requirement to Java 8, but the new Avatica already did that, so it is nothing 
new.

Did some minor refactoring so that queryserver doesn't depend on 
queryserver-client.

While at it, I also added the principal and keytab parameters to sqlline-thin 
for completeness.

> Streamline the kerberos logic in thin client java code
> ------------------------------------------------------
>
>                 Key: PHOENIX-5772
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5772
>             Project: Phoenix
>          Issue Type: Task
>            Reporter: Istvan Toth
>            Assignee: Istvan Toth
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The thin client has logic for sqlline-thin that automatically enablies SPNEGO 
> based on hbase and hadoop settings and whether or not the user is is logged 
> into kerberos.
> According to my analysis, this is the only feature that this code provides. 
> When using the JAR as a JDBC driver, the kerberos code does not apply.
> However, this feature depends on hadoop, which carries the heavy cost 
> bloating the thin client size and polluting its classpath.
> I propose removing the the feature from the Java code, and potentially 
> implementing it in the sqlline-thin startup script.
> This would cut the JAR size by ~80%, and solve a lot of classpath problems 
> for the users of the JDBC driver.
> This is based on discussion with [~elserj] during the review of PHOENIX-5761



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

Reply via email to