Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on 10-02-2015 08:51 PM
The Phoenix documentation here leaves out a few pieces in order to make a successful connection to HBase, through the Phoenix Driver. They assume that the connection is from the 'localhost'. May work great, but that's unlikely in the real world.
phoenix-client.jar hbase-client.jar (not mentioned in the Phoenix Docs)
The full adbc connection URL syntax for phoenix is:
Basic Connections
jdbc:phoneix[:zk_quorum][:zk_port][:zk_hbase_path]
The "zk_quorum" is a comma separated list of the ZooKeeper Servers.
The "zk_port" is the ZooKeeper port.
The "zk_hbase_path" is the path used by Hbase to stop information about the instance. On a 'non' kerberized cluster the default zk_hbase_path for HDP is '/hbase-unsecure'.
Sample JDBC URLjdbc:phoenix:m1.hdp.local,m2.hdp.local,d1.hdp.local:2181:/hbase-unsecureFor Kerberos Cluster Connectionsjdbc:phoneix[:zk_quorum][:zk_port][:zk_hbase_path][:headless_keytab_file:principal]Sample JDBC URLjdbc:phoenix:m1.hdp.local,m2.hdp.local,d1.hdp.local:2181:/hbase-secure:/Users/dstreev/keytabs/myuser.headless.keytab:dstreev@HDP.LOCAL
They say that the above items in the url beyond 'phoenix' are optional if the clusters 'hbase-site.xml' file is in the path. I found that when I presented a copy of the 'hbase-site.xml' from the cluster and left off the optional elements, I got errors referencing 'Failed to create local dir'.
When I connected successfully from DBVisualizer to HBase with the Phoenix JDBC Driver, it took about 10-20 seconds to connect.
Created on 12-18-2015 07:48 PM
Hey @David Streever
I think you have the ordering of keytab and principal in the URL reversed. Per the code, it reads the principal and then the keytab.
Created on 12-06-2016 09:06 AM
How can i pass reference of hbase-site.xml file in Phoenix JDBC java code?
Created on 04-24-2019 05:41 PM
I think this is for thick driver since thin one does not require HBase client jar.
Created on 05-04-2023 02:43 AM
Hi Team, i have added Hbase client and phoenix core jar which has hbase client jar within it.
I have the hbase and core site xmls.
i get the Hconnection established message. But then i get
"MESSAGE":"Reading reply sessionid:0x200239e26e51663, packet:: clientPath:/hbase serverPath:/hbase finished:false header:: 16,8 replyHeader:: 16,313534022349,0 request:: '/hbase,F response:: v{'meta-region-server,'rs,'splitWAL,'backup-masters,'flush-table-proc,'master-maintenance,'online-snapshot,'switch,'master,'running,'tokenauth,'draining,'namespace,'hbaseid,'table
What could be the issue