phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anil Gupta (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-19) Enhance JDBC connection of Phoenix to support connecting to a Secure HBase cluster.
Date Tue, 04 Mar 2014 00:55:22 GMT

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

Anil Gupta commented on PHOENIX-19:
-----------------------------------

[~jamestaylor]: Please find attached the Initial patch. 
Problem 1:
In eclipse, i ran through the code(using SecureClusterConnectTest class) to connect Phoenix
to HBase and it successfully connects to the cluster. However, after connecting i get ClassNotFoundException
error:
Exception in thread "main" java.lang.RuntimeException: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.ipc.SecureRpcEngine
	at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:867)
	at org.apache.hadoop.hbase.ipc.HBaseRPC.getProtocolEngine(HBaseRPC.java:99)
	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.ensureZookeeperTrackers(HConnectionManager.java:734)
	at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getMaster(HConnectionManager.java:789)
	at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:127)
	at com.salesforce.phoenix.query.ConnectionQueryServicesImpl.ensureTableCreated(ConnectionQueryServicesImpl.java:615)
	at com.salesforce.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:839)
	at com.salesforce.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:990)
	at com.salesforce.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:388)
	at com.salesforce.phoenix.compile.CreateTableCompiler$2.execute(CreateTableCompiler.java:153)
	at com.salesforce.phoenix.jdbc.PhoenixStatement$ExecutableCreateTableStatement.executeUpdate(PhoenixStatement.java:358)
	at com.salesforce.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:1055)
	at com.salesforce.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1034)
	at com.salesforce.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:87)
	at com.salesforce.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:115)
	at phoenix.test.SecureClusterConnectTest.main(SecureClusterConnectTest.java:21)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.ipc.SecureRpcEngine
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:249)
	at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:820)
	at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:865)
	... 15 more

Phoenix is referring to hbase-0.94.12 jar. To my surprise, org.apache.hadoop.hbase.ipc.SecureRpcEngine
class is not present in that version. I am running my cluster on cdh4.5.0. and cdh4.5.0 hbase
jar has that class.

Problem 2:
After compiling phoenix with patch, i tried to run phoenix using sqlline.sh script on non
secure cluster by using command:
sqlline.sh jdbc:phoenix:<zk>
I get this error:
com.salesforce.phoenix.jdbc.PhoenixDriver
java.lang.NullPointerException
sqlline version 1.1.2

I have enabled debug logs but still i dont get any logs when i invoke phoenix on console.
Could you please review the code and tell me how to resolve the above two problems. Thanks.

> 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: 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