Created 08-29-2016 03:14 PM
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)
Created 08-29-2016 03:18 PM
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.
Created 08-29-2016 06:47 PM
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)
Created 08-29-2016 06:58 PM
Are you using Phoenix 4.4 from Apache or some version of 4.4 provided by HDP? If the latter, what version of HDP?
Created 08-29-2016 08:01 PM
I deployed it through Ambari. Current HDP version is 2.3.4
Created 08-29-2016 09:36 PM
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.
Created 11-22-2016 02:27 AM
@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.
Created 08-01-2017 10:04 AM
@Raja Sekhar Chintalapati, are you solved? this question can refer to http://python-phoenixdb.readthedocs.io/en/latest/versions.html