Created on 10-20-2016 03:30 PM - edited 08-17-2019 08:45 AM
HDP 2.5 GA'd phoenix query server. This makes connecting to phoenix much easier. Article will walk through steps on how to connect to phoenix Phoenix Query Server via DBVisualizer.
Grab the phoenix thin jdbc driver onto your desktop. On the HDP 2.5 here is the location of the jdbc driver
Start up DBVisualizer. From the top menu bar select Tools->Driver Manager
Popoluate the fields:
Name:Apache Phoenix Thin Client
I used phoenixthin.
URL Format: jdbc:phoenix:thin:url=<scheme>://<server-hostname>:<port>[...]
Client on the folder icon
Locate your phoenix thin jdbc driver you downloaded to your desktop. Once selected click on ok and and now you have the driver loaded.
Lets connect to phoenix. Click on the icon shown below which creates a new db connection. Then select "Use Wizard".
Enter a connection name. I used phoenix-QPS
Now select the driver you loaded in the previous steps. I named my driver phoenixthin
Next enter your userid & password. For this example I use the root user ID
Now a data connection has been created. Lets connect to phoenix using that connection alias. Go to your connection alias shown on the left pane. Right click and select "Connect"
You are now connected! Start having fun and open up some name spaces. Select * from tables
It is clear connecting to Phoenix is much easier now thanks to the community building Phoenix Query Server. Happy Phoenix-ing
Created on 11-25-2016 05:43 AM
Followed the above and getting:
An error occurred while establishing the connection: Long Message: Remote driver error: RuntimeException: java.sql.SQLFeatureNotSupportedException -> SQLFeatureNotSupportedException: (null exception message) Details: Type: org.apache.calcite.avatica.AvaticaClientRuntimeException Stack Trace: AvaticaClientRuntimeException: Remote driver error: RuntimeException: java.sql.SQLFeatureNotSupportedException -> SQLFeatureNotSupportedException: (null exception message). Error -1 (00000) null java.lang.RuntimeException: java.sql.SQLFeatureNotSupportedException at org.apache.calcite.avatica.jdbc.JdbcMeta.propagate(JdbcMeta.java:681) at org.apache.calcite.avatica.jdbc.JdbcMeta.connectionSync(JdbcMeta.java:671) at org.apache.calcite.avatica.remote.LocalService.apply(LocalService.java:314) at org.apache.calcite.avatica.remote.Service$ConnectionSyncRequest.accept(Service.java:2001) at org.apache.calcite.avatica.remote.Service$ConnectionSyncRequest.accept(Service.java:1977) at org.apache.calcite.avatica.remote.AbstractHandler.apply(AbstractHandler.java:95) at org.apache.calcite.avatica.remote.ProtobufHandler.apply(ProtobufHandler.java:46) at org.apache.calcite.avatica.server.AvaticaProtobufHandler.handle(AvaticaProtobufHandler.java:124) at org.apache.phoenix.shaded.org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52) at org.apache.phoenix.shaded.org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.apache.phoenix.shaded.org.eclipse.jetty.server.Server.handle(Server.java:499) at org.apache.phoenix.shaded.org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311) at org.apache.phoenix.shaded.org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) at org.apache.phoenix.shaded.org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544) at org.apache.phoenix.shaded.org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) at org.apache.phoenix.shaded.org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) at java.lang.Thread.run(Thread.java:745) Caused by: java.sql.SQLFeatureNotSupportedException at org.apache.phoenix.jdbc.PhoenixConnection.setCatalog(PhoenixConnection.java:799) at org.apache.calcite.avatica.jdbc.JdbcMeta.apply(JdbcMeta.java:652) at org.apache.calcite.avatica.jdbc.JdbcMeta.connectionSync(JdbcMeta.java:666) ... 15 more at org.apache.calcite.avatica.remote.Service$ErrorResponse.toException(Service.java:2453) at org.apache.calcite.avatica.remote.RemoteProtobufService._apply(RemoteProtobufService.java:61) at org.apache.calcite.avatica.remote.ProtobufService.apply(ProtobufService.java:89) at org.apache.calcite.avatica.remote.RemoteMeta$5.call(RemoteMeta.java:148) at org.apache.calcite.avatica.remote.RemoteMeta$5.call(RemoteMeta.java:134) at org.apache.calcite.avatica.AvaticaConnection.invokeWithRetries(AvaticaConnection.java:715) at org.apache.calcite.avatica.remote.RemoteMeta.connectionSync(RemoteMeta.java:133) at org.apache.calcite.avatica.AvaticaConnection.sync(AvaticaConnection.java:664) at org.apache.calcite.avatica.AvaticaConnection.getAutoCommit(AvaticaConnection.java:181) at com.onseven.dbvis.g.B.C.ā(Z:1315) at com.onseven.dbvis.g.B.F$A.call(Z:1369) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
Through CLI, i am able to connect :
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #5330e1} span.s1 {font-variant-ligatures: no-common-ligatures}
[cloudbreak@ip-172-40-1-169 bin]$ ./sqlline-thin.py
Setting property: [incremental, false]
Setting property: [isolation, TRANSACTION_READ_COMMITTED]
issuing: !connect jdbc:phoenix:thin:url=http://localhost:8765;serialization=PROTOBUF none none org.apache.phoenix.queryserver.client.Driver
Connecting to jdbc:phoenix:thin:url=http://localhost:8765;serialization=PROTOBUF
Triple checked I am loading the correct driver. Anything else I could be missing?