Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

phoenixdb connection to phoenix query server

Highlighted

phoenixdb connection to phoenix query server

Expert Contributor
import phoenixdb

database_url = 'http://localhost:8765/'
conn = phoenixdb.connect(database_url, autocommit=True)

it throws error while making connection to query server

Error:

2016-08-29 11:15:11,946 WARN org.eclipse.jetty.server.HttpChannel: / java.lang.IllegalArgumentException: Cannot find parser for at org.apache.calcite.avatica.remote.ProtobufTranslationImpl.getParserForRequest(ProtobufTranslationImpl.java:170) at org.apache.calcite.avatica.remote.ProtobufTranslationImpl.parseRequest(ProtobufTranslationImpl.java:227) at org.apache.calcite.avatica.remote.ProtobufHandler.decode(ProtobufHandler.java:42) at org.apache.calcite.avatica.remote.ProtobufHandler.decode(ProtobufHandler.java:28) at org.apache.calcite.avatica.remote.AbstractHandler.apply(AbstractHandler.java:95) at org.apache.calcite.avatica.remote.ProtobufHandler.apply(ProtobufHandler.java:38) at org.apache.calcite.avatica.server.AvaticaProtobufHandler.handle(AvaticaProtobufHandler.java:68) at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:497) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:245) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) at java.lang.Thread.run(Thread.java:745) 2016-08-29 11:15:12,043 WARN org.eclipse.jetty.server.HttpChannel: / java.lang.IllegalArgumentException: Cannot find parser for at org.apache.calcite.avatica.remote.ProtobufTranslationImpl.getParserForRequest(ProtobufTranslationImpl.java:170) at org.apache.calcite.avatica.remote.ProtobufTranslationImpl.parseRequest(ProtobufTranslationImpl.java:227) at org.apache.calcite.avatica.remote.ProtobufHandler.decode(ProtobufHandler.java:42) at org.apache.calcite.avatica.remote.ProtobufHandler.decode(ProtobufHandler.java:28) at org.apache.calcite.avatica.remote.AbstractHandler.apply(AbstractHandler.java:95) at org.apache.calcite.avatica.remote.ProtobufHandler.apply(ProtobufHandler.java:38) at org.apache.calcite.avatica.server.AvaticaProtobufHandler.handle(AvaticaProtobufHandler.java:68) at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:497) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:245) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) at java.lang.Thread.run(Thread.java:745)

7 REPLIES 7

Re: phoenixdb connection to phoenix query server

Per https://bitbucket.org/lalinsky/python-phoenixdb

"This library only supports the older JSON serialization."

To try to use this library, you must configure PQS to use JSON serialization instead of PROTOBUF. Set the following in hbase-site.xml and restart PQS

<property>
  <key>phoenix.queryserver.serialization</key>
  <value>JSON</value>
</property>

If you are using HDP and/or Ambari, you can make this configuration modification through Ambari in the "Custom hbase-site" section.

Re: phoenixdb connection to phoenix query server

Expert Contributor

I got phoenix 4.4, i think above value is for Phoenix 4.7. Any way i tried to add this in hbase-site, but no luck...ran into new error...

raise errors.InterfaceError('RPC request returned invalid status code', response.status)

phoenixdb.errors.InterfaceError: ('RPC request returned invalid status code', 500, None, None)

Re: phoenixdb connection to phoenix query server

Are you using Phoenix 4.4 from Apache or some version of 4.4 provided by HDP? If the latter, what version of HDP?

Re: phoenixdb connection to phoenix query server

Expert Contributor

I deployed it through Ambari. Current HDP version is 2.3.4

Re: phoenixdb connection to phoenix query server

That configuration property is present in the version of Phoenix contained in HDP-2.3.4.

Do you have the actual error that the Phoenix Query Server returned when you saw that phoenixdb error? I don't know what that phoenixdb error means alone.

Re: phoenixdb connection to phoenix query server

New Contributor

@Raja Sekhar Chintalapati, and for the sake of future Google searches, the phoenixdb library has been updated to use Protobufs instead of JSON. You can set the server config back to the default and update to 0.5.

Re: phoenixdb connection to phoenix query server

New Contributor
Don't have an account?
Coming from Hortonworks? Activate your account here