phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Elser <>
Subject Re: FW: Phoenix Query Server not returning any results
Date Mon, 12 Sep 2016 14:18:00 GMT
Puneeth -- One extra thing to add to Francis' great explanation; the 
response message told you what you did wrong:


This is telling you that the server does not have a statement with the 
ID 12345 as you provided.

F21 wrote:
> Hey,
> You mentioned that you sent a PrepareAndExecuteRequest. However, to do
> that, you would need to first:
> 1. Open a connection:
> 2. Create a statement:
> 3. Call your PrepareAndExecute request:
> The phoenix query service uses Avatica (part of Apache Calcite), so you
> can find all the documentation for talking with the query server here:
> I do recommend using protobufs over JSON as protobufs are now the
> default serialization method.
> In terms of making your clients talk to the query server directly,  I
> don't think that would be the best idea except in the case of some
> exceptions. While the query server supports authentication and
> authorization, I don't think it would be granular enough for most apps.
> Usually, you would need to have some business/domain layer and use
> phoenix as the storage/data access layer. However, it depends on your
> use-case :)
> Cheers,
> Francis
> On 12/09/2016 9:02 PM, Puneeth Prasad wrote:
>> Hello,
>> Wehave just started using Apache Phoenix on HBase. We have a setup
>> where Phoenix is working (We are able to CRUD in tables cleanly). Now,
>> we want an application running outside the network (say a system
>> hosting a mobile app) to be able to query Phoenix table. For that, one
>> of the options we are trying is using Phoenix Query Server (PQS). I
>> have ensured that the port 8765 is accessible from outside network and
>> so, when we use below CURL command, we expect the desired result:
>> [root@externalsystem ~]# curl -XPOST -H
>> 'request:{"request":"prepareAndExecute","connectionId":"000000-0000-0000-00000000","statementId":12345,"sql":
>> QUESTTWEETS1","maxRowCount":1}'http://here.comes.external.ip:8765/
>> But the response which we get is:
>> {"response":"executeResults","missingStatement":true,"rpcMetadata":{"response":"rpcMetadata","serverAddress":"
>> <>"},"results":null}
>> We are using HDP and aligned versions of HBase and PQS.
>> Very clearly, I am passing the SQL as one of the keys in the request.
>> Can somebody please help me understand what am I doing wrong here?
>> Additionally, since the goal of this is to provide a way to access
>> Phoenix tables at high concurrency (which moble apps can demand), is
>> PQS a decent solution or there are any better options to access
>> Phoenix tables? Since I am a newbie in using HBase and Phoenix, please
>> let me know if there are any other details required.
>> Best Regards
>> Puneeth

View raw message