Re: How do I query the phoenix query server?

2016-03-24 Thread Steve Terrell
As I recall, I did try setting auto commit to True, but it did not help.
With/without auto commit, my writes would work soon after I started
SQuirreL Client, but always stopped working after some time passed until I
restarted the client.

I discovered I needed the extra jar when I had a complex query using nested
AND and OR operators.  But I don't remember the exact expression.

On Thu, Mar 24, 2016 at 11:20 AM, Josh Elser  wrote:

> Correct, James:
>
> Phoenix-4.7.0 uses Calcite-1.6.0. This included lots of goodies includes
> commit/rollback support. Phoenix-4.6.0 used Calcite-1.3.0. In general, if
> you want to use the QueryServer, I'd strongly recommend trying to go with
> Phoenix-4.7.0. You'll inherit *lots* of bugfixes/improvements.
>
> @F21: For implementing your own client, you might be interested in
> http://calcite.apache.org/avatica/docs/json_reference.html. If you need
> help, please reach out (here or on d...@calcite.apache.org). A Go client
> would be fantastic. Making this an official-client for Avatica, it'd be
> great :)
>
> @Steve, are you saying that you found PQS to also require
> commons-collections to be added? The phoenix-server-$VERSION-runnable.jar
> should contain all necessary classes -- if that's not true, that's a bug we
> can fix.
>
> James Taylor wrote:
>
>> Steve,
>> For deletes and upsets through the query server in 4.6, did you set auto
>> commit to be true by default (set phoenix.connection.autoCommit to
>> true)? In 4.7 this has been fixed, but prior to this, I believe commit
>> and rollback were a noop. Is that right, Josh?
>> Thanks,
>> James
>>
>> On Thursday, March 24, 2016, Steve Terrell > > wrote:
>>
>> I forgot to mention, although the docs say only one jar is needed, I
>> found that I also had to have commons-collections-3.2.1.jar in the
>> class path, too.
>>
>> On Thu, Mar 24, 2016 at 10:07 AM, Steve Terrell
>> > > wrote:
>>
>> Hi!  Everything I say below pertains only to Phoenix 4.6.0.
>> Don't know what changes in 4.7.0.
>>
>> Judging from the port number, you must be using the thin client
>> server.  Have you seen this page?
>> https://phoenix.apache.org/server.html  .  It has JDBC info.
>>
>> I got the thin client jar to work with SQuirreL Client, but I
>> found that sometimes upserts and deletes did not take effect,
>> even though there was no error reply.  So I don't use the thin
>> client.  (Had no problems with read-only queries.)
>>
>> So, I decided to use only
>> the phoenix-4.6.0-HBase-0.98-client.jar JDBC instead for both
>> read/write.
>>
>> In fact, I wrote my own query server that uses the latter JDBC
>> connection so I can have clients that perform queries with HTTP
>> without having to have a jar file.
>>
>> Hope this helps,
>>  Steve
>>
>> On Wed, Mar 23, 2016 at 7:57 PM, F21 > > wrote:
>>
>> I am interested in building a Go client to query the phoenix
>> query server using protocol buffers.
>>
>> The query server is running on http://localhost:8765, so I
>> tried POSTing to localhost:8765  with the marshalled
>> protocol buffer as the body.
>>
>> Unfortunately, the server responds with:
>> 
>> > content="text/html;charset=ISO-8859-1"/>
>> Error 500 
>> 
>> 
>> HTTP ERROR: 500
>> Problem accessing /. Reason:
>> Cannot find parser for 123456
>> Powered by Jetty://
>> 
>> 
>>
>> "123456" is my connection-id.
>>
>> There doesn't seem to be any documentation on how to query
>> the query server (i.e, which endpoints and how the
>> marshalled protocol buffer should be sent). If someone could
>> point me in the right direction, that would be awesome!
>>
>>
>>
>>


Re: How do I query the phoenix query server?

2016-03-24 Thread Josh Elser

Correct, James:

Phoenix-4.7.0 uses Calcite-1.6.0. This included lots of goodies includes 
commit/rollback support. Phoenix-4.6.0 used Calcite-1.3.0. In general, 
if you want to use the QueryServer, I'd strongly recommend trying to go 
with Phoenix-4.7.0. You'll inherit *lots* of bugfixes/improvements.


@F21: For implementing your own client, you might be interested in 
http://calcite.apache.org/avatica/docs/json_reference.html. If you need 
help, please reach out (here or on d...@calcite.apache.org). A Go client 
would be fantastic. Making this an official-client for Avatica, it'd be 
great :)


@Steve, are you saying that you found PQS to also require 
commons-collections to be added? The 
phoenix-server-$VERSION-runnable.jar should contain all necessary 
classes -- if that's not true, that's a bug we can fix.


James Taylor wrote:

Steve,
For deletes and upsets through the query server in 4.6, did you set auto
commit to be true by default (set phoenix.connection.autoCommit to
true)? In 4.7 this has been fixed, but prior to this, I believe commit
and rollback were a noop. Is that right, Josh?
Thanks,
James

On Thursday, March 24, 2016, Steve Terrell > wrote:

I forgot to mention, although the docs say only one jar is needed, I
found that I also had to have commons-collections-3.2.1.jar in the
class path, too.

On Thu, Mar 24, 2016 at 10:07 AM, Steve Terrell
> wrote:

Hi!  Everything I say below pertains only to Phoenix 4.6.0.
Don't know what changes in 4.7.0.

Judging from the port number, you must be using the thin client
server.  Have you seen this page?
https://phoenix.apache.org/server.html  .  It has JDBC info.

I got the thin client jar to work with SQuirreL Client, but I
found that sometimes upserts and deletes did not take effect,
even though there was no error reply.  So I don't use the thin
client.  (Had no problems with read-only queries.)

So, I decided to use only
the phoenix-4.6.0-HBase-0.98-client.jar JDBC instead for both
read/write.

In fact, I wrote my own query server that uses the latter JDBC
connection so I can have clients that perform queries with HTTP
without having to have a jar file.

Hope this helps,
 Steve

On Wed, Mar 23, 2016 at 7:57 PM, F21 > wrote:

I am interested in building a Go client to query the phoenix
query server using protocol buffers.

The query server is running on http://localhost:8765, so I
tried POSTing to localhost:8765  with the marshalled
protocol buffer as the body.

Unfortunately, the server responds with:


Error 500 


HTTP ERROR: 500
Problem accessing /. Reason:
Cannot find parser for 123456
Powered by Jetty://



"123456" is my connection-id.

There doesn't seem to be any documentation on how to query
the query server (i.e, which endpoints and how the
marshalled protocol buffer should be sent). If someone could
point me in the right direction, that would be awesome!





Re: How do I query the phoenix query server?

2016-03-24 Thread James Taylor
Steve,
For deletes and upsets through the query server in 4.6, did you set auto
commit to be true by default (set phoenix.connection.autoCommit to true)?
In 4.7 this has been fixed, but prior to this, I believe commit and
rollback were a noop. Is that right, Josh?
Thanks,
James

On Thursday, March 24, 2016, Steve Terrell  wrote:

> I forgot to mention, although the docs say only one jar is needed, I found
> that I also had to have commons-collections-3.2.1.jar in the class path,
> too.
>
> On Thu, Mar 24, 2016 at 10:07 AM, Steve Terrell  > wrote:
>
>> Hi!  Everything I say below pertains only to Phoenix 4.6.0.  Don't know
>> what changes in 4.7.0.
>>
>> Judging from the port number, you must be using the thin client server.
>> Have you seen this page?  https://phoenix.apache.org/server.html  .  It
>> has JDBC info.
>>
>> I got the thin client jar to work with SQuirreL Client, but I found that
>> sometimes upserts and deletes did not take effect, even though there was no
>> error reply.  So I don't use the thin client.  (Had no problems with
>> read-only queries.)
>>
>> So, I decided to use only the phoenix-4.6.0-HBase-0.98-client.jar JDBC
>> instead for both read/write.
>>
>> In fact, I wrote my own query server that uses the latter JDBC connection
>> so I can have clients that perform queries with HTTP without having to have
>> a jar file.
>>
>> Hope this helps,
>> Steve
>>
>> On Wed, Mar 23, 2016 at 7:57 PM, F21 > > wrote:
>>
>>> I am interested in building a Go client to query the phoenix query
>>> server using protocol buffers.
>>>
>>> The query server is running on http://localhost:8765, so I tried
>>> POSTing to localhost:8765  with the marshalled protocol buffer as the body.
>>>
>>> Unfortunately, the server responds with:
>>> 
>>> >> content="text/html;charset=ISO-8859-1"/>
>>> Error 500 
>>> 
>>> 
>>> HTTP ERROR: 500
>>> Problem accessing /. Reason:
>>> Cannot find parser for 123456
>>> Powered by Jetty://
>>> 
>>> 
>>>
>>> "123456" is my connection-id.
>>>
>>> There doesn't seem to be any documentation on how to query the query
>>> server (i.e, which endpoints and how the marshalled protocol buffer should
>>> be sent). If someone could point me in the right direction, that would be
>>> awesome!
>>>
>>
>>
>


Re: How do I query the phoenix query server?

2016-03-24 Thread Steve Terrell
I forgot to mention, although the docs say only one jar is needed, I found
that I also had to have commons-collections-3.2.1.jar in the class path,
too.

On Thu, Mar 24, 2016 at 10:07 AM, Steve Terrell 
wrote:

> Hi!  Everything I say below pertains only to Phoenix 4.6.0.  Don't know
> what changes in 4.7.0.
>
> Judging from the port number, you must be using the thin client server.
> Have you seen this page?  https://phoenix.apache.org/server.html  .  It
> has JDBC info.
>
> I got the thin client jar to work with SQuirreL Client, but I found that
> sometimes upserts and deletes did not take effect, even though there was no
> error reply.  So I don't use the thin client.  (Had no problems with
> read-only queries.)
>
> So, I decided to use only the phoenix-4.6.0-HBase-0.98-client.jar JDBC
> instead for both read/write.
>
> In fact, I wrote my own query server that uses the latter JDBC connection
> so I can have clients that perform queries with HTTP without having to have
> a jar file.
>
> Hope this helps,
> Steve
>
> On Wed, Mar 23, 2016 at 7:57 PM, F21  wrote:
>
>> I am interested in building a Go client to query the phoenix query server
>> using protocol buffers.
>>
>> The query server is running on http://localhost:8765, so I tried POSTing
>> to localhost:8765  with the marshalled protocol buffer as the body.
>>
>> Unfortunately, the server responds with:
>> 
>> > content="text/html;charset=ISO-8859-1"/>
>> Error 500 
>> 
>> 
>> HTTP ERROR: 500
>> Problem accessing /. Reason:
>> Cannot find parser for 123456
>> Powered by Jetty://
>> 
>> 
>>
>> "123456" is my connection-id.
>>
>> There doesn't seem to be any documentation on how to query the query
>> server (i.e, which endpoints and how the marshalled protocol buffer should
>> be sent). If someone could point me in the right direction, that would be
>> awesome!
>>
>
>


Re: How do I query the phoenix query server?

2016-03-24 Thread Steve Terrell
Hi!  Everything I say below pertains only to Phoenix 4.6.0.  Don't know
what changes in 4.7.0.

Judging from the port number, you must be using the thin client server.
Have you seen this page?  https://phoenix.apache.org/server.html  .  It has
JDBC info.

I got the thin client jar to work with SQuirreL Client, but I found that
sometimes upserts and deletes did not take effect, even though there was no
error reply.  So I don't use the thin client.  (Had no problems with
read-only queries.)

So, I decided to use only the phoenix-4.6.0-HBase-0.98-client.jar JDBC
instead for both read/write.

In fact, I wrote my own query server that uses the latter JDBC connection
so I can have clients that perform queries with HTTP without having to have
a jar file.

Hope this helps,
Steve

On Wed, Mar 23, 2016 at 7:57 PM, F21  wrote:

> I am interested in building a Go client to query the phoenix query server
> using protocol buffers.
>
> The query server is running on http://localhost:8765, so I tried POSTing
> to localhost:8765  with the marshalled protocol buffer as the body.
>
> Unfortunately, the server responds with:
> 
>  content="text/html;charset=ISO-8859-1"/>
> Error 500 
> 
> 
> HTTP ERROR: 500
> Problem accessing /. Reason:
> Cannot find parser for 123456
> Powered by Jetty://
> 
> 
>
> "123456" is my connection-id.
>
> There doesn't seem to be any documentation on how to query the query
> server (i.e, which endpoints and how the marshalled protocol buffer should
> be sent). If someone could point me in the right direction, that would be
> awesome!
>


How do I query the phoenix query server?

2016-03-23 Thread F21
I am interested in building a Go client to query the phoenix query 
server using protocol buffers.


The query server is running on http://localhost:8765, so I tried POSTing 
to localhost:8765  with the marshalled protocol buffer as the body.


Unfortunately, the server responds with:

content="text/html;charset=ISO-8859-1"/>

Error 500 


HTTP ERROR: 500
Problem accessing /. Reason:
Cannot find parser for 123456
Powered by Jetty://



"123456" is my connection-id.

There doesn't seem to be any documentation on how to query the query 
server (i.e, which endpoints and how the marshalled protocol buffer 
should be sent). If someone could point me in the right direction, that 
would be awesome!