phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Taylor (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-19) Enhance JDBC connection of Phoenix to support connecting to a Secure HBase cluster.
Date Sat, 07 Jun 2014 07:37:01 GMT

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

James Taylor commented on PHOENIX-19:
-------------------------------------

Thanks for the patches, [~anilgupta84]. You need to move this code out of the ConnectionQueryServicesImpl
constructor and into the try block of the openConnection() method in ConnectionQueryServicesImpl:
+            try {
+                User.login(config, "hbase.myclient.keytab", "hbase.myclient.principal", null);
+                logger.info("Successfull login to secure cluster!!");
+            } catch (IOException e) {
+                logger.error("Exception while trying to login to secure cluster!!");
+                logger.info("Exception message while connecting:" + e.getMessage());
+            }

Also, as previously mentioned, don't use strings here - use a static final constant for "hbase.myclient.keytab"
and "hbase.myclient.principal".



> Enhance JDBC connection of Phoenix to support connecting to a Secure HBase cluster.
> -----------------------------------------------------------------------------------
>
>                 Key: PHOENIX-19
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-19
>             Project: Phoenix
>          Issue Type: Improvement
>    Affects Versions: 3.0.0
>            Reporter: Anil Gupta
>              Labels: hbase, jdbc, secure
>             Fix For: 3.0.0
>
>         Attachments: SecureClusterConnectTest.java, phoenix-19-four.patch, phoenix-19-master-apache.patch,
phoenix-19-master.patch, phoenix-19-three.patch, phoenix-19.patch
>
>
> This is being moved from github https://github.com/forcedotcom/phoenix/issues/550 to
JIRA.
> As per my discussion with James Taylor over here https://groups.google.com/forum/#!searchin/phoenix-hbase-user/secure$20cluster/phoenix-hbase-user/XHg2wXK4Hqo/qVTm92WLxUkJ
> and some other email exchanges. This ticket is to enhance the JDBC driver of phoenix
so that user can pass keytab and principal to connect to a secure cluster.
> As per our discussion over email, could you please outline the changes required to make
this enhancement?



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message