You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by Matt L <ma...@gmail.com> on 2016/11/25 20:20:06 UTC
Upsert works using /sqlline-thin.py and /sqlline.py but not in Zeppelin or other remote jdbc clients
Hello All!
Through Zeppelin I am trying to insert data into a table created by Phoenix:
%phoenix
create table “test" (id bigint PRIMARY KEY, “test"."ip" varchar, “test"."request_date" bigint, “test"."data" varchar)
%phoenix
upsert into “test" values (1, '0.0.0.0', 1, 'data')
%phoenix
select * from "test" limit 100
returns no results.
When I do the same thing through either sqlline-thin or sqlline (passing in ZK with /hbase-unsecure) I am able to UPSERT and see the data when I Select *.
Am i missing some configuration or property when I am connecting from a remote client?
I have tried playing around with “phoenix.mutate.batchSize” setting it to 1 and making sure phoenix.connection.auto.commit is “true”.
I don’t see any errors or logs when I try to upsert through zeppelin.
Thanks fro the help!
Re: Upsert works using /sqlline-thin.py and /sqlline.py but not in
Zeppelin or other remote jdbc clients
Posted by Josh Elser <jo...@gmail.com>.
Or make sure that Zeppelin is adding hbase-site.xml to the classpath.
You can easily test this by making a copy of your phoenix-client.jar and
manually adding in a copy of hbase-site.xml to the jar.
James Taylor wrote:
> https://docs.oracle.com/javase/7/docs/api/java/sql/Connection.html
>
> On Sat, Nov 26, 2016 at 12:39 PM Matt L <matt.liem@gmail.com
> <ma...@gmail.com>> wrote:
>
> I had set auto.commit = true in my hbase-site.xml bit don't think
> the JDBC connections are picking that up.
>
> How do I turn it on in the connection or explicitly make the commit?
>
> On Sat, Nov 26, 2016 at 3:13 PM, James Taylor
> <jamestaylor@apache.org <ma...@apache.org>> wrote:
>
> Are you committing the data after the upsert (either by turning
> on auto commit on the connection or doing an explicit commit)?
>
> On Fri, Nov 25, 2016 at 12:20 PM Matt L <matt.liem@gmail.com
> <ma...@gmail.com>> wrote:
>
> Hello All!
>
> Through Zeppelin I am trying to insert data into a table
> created by Phoenix:
>
> %phoenix
> create table \u201ctest" (id bigint PRIMARY KEY, \u201ctest"."ip"
> varchar, \u201ctest"."request_date" bigint, \u201ctest"."data" varchar)
>
> %phoenix
> upsert into \u201ctest" values (1, '0.0.0.0', 1, 'data')
>
> %phoenix
> select * from "test" limit 100
>
> returns no results.
>
> When I do the same thing through either sqlline-thin or
> sqlline (passing in ZK with /hbase-unsecure) I am able to
> UPSERT and see the data when I Select *.
>
> Am i missing some configuration or property when I am
> connecting from a remote client?
>
> I have tried playing around with
> \u201cphoenix.mutate.batchSize\u201d setting it to 1 and making sure
> phoenix.connection.auto.commit is \u201ctrue\u201d.
>
> I don\u2019t see any errors or logs when I try to upsert through
> zeppelin.
>
> Thanks fro the help!
>
>
Re: Upsert works using /sqlline-thin.py and /sqlline.py but not in
Zeppelin or other remote jdbc clients
Posted by James Taylor <ja...@apache.org>.
https://docs.oracle.com/javase/7/docs/api/java/sql/Connection.html
On Sat, Nov 26, 2016 at 12:39 PM Matt L <ma...@gmail.com> wrote:
> I had set auto.commit = true in my hbase-site.xml bit don't think the JDBC
> connections are picking that up.
>
> How do I turn it on in the connection or explicitly make the commit?
>
> On Sat, Nov 26, 2016 at 3:13 PM, James Taylor <ja...@apache.org>
> wrote:
>
> Are you committing the data after the upsert (either by turning on auto
> commit on the connection or doing an explicit commit)?
>
> On Fri, Nov 25, 2016 at 12:20 PM Matt L <ma...@gmail.com> wrote:
>
> Hello All!
>
> Through Zeppelin I am trying to insert data into a table created by
> Phoenix:
>
> %phoenix
> create table “test" (id bigint PRIMARY KEY, “test"."ip" varchar,
> “test"."request_date" bigint, “test"."data" varchar)
>
> %phoenix
> upsert into “test" values (1, '0.0.0.0', 1, 'data')
>
> %phoenix
> select * from "test" limit 100
>
> returns no results.
>
> When I do the same thing through either sqlline-thin or sqlline (passing
> in ZK with /hbase-unsecure) I am able to UPSERT and see the data when I
> Select *.
>
> Am i missing some configuration or property when I am connecting from a
> remote client?
>
> I have tried playing around with “phoenix.mutate.batchSize” setting it to
> 1 and making sure phoenix.connection.auto.commit is “true”.
>
> I don’t see any errors or logs when I try to upsert through zeppelin.
>
> Thanks fro the help!
>
>
>
Re: Upsert works using /sqlline-thin.py and /sqlline.py but not in
Zeppelin or other remote jdbc clients
Posted by Matt L <ma...@gmail.com>.
I had set auto.commit = true in my hbase-site.xml bit don't think the JDBC
connections are picking that up.
How do I turn it on in the connection or explicitly make the commit?
On Sat, Nov 26, 2016 at 3:13 PM, James Taylor <ja...@apache.org>
wrote:
> Are you committing the data after the upsert (either by turning on auto
> commit on the connection or doing an explicit commit)?
>
> On Fri, Nov 25, 2016 at 12:20 PM Matt L <ma...@gmail.com> wrote:
>
>> Hello All!
>>
>> Through Zeppelin I am trying to insert data into a table created by
>> Phoenix:
>>
>> %phoenix
>> create table “test" (id bigint PRIMARY KEY, “test"."ip" varchar,
>> “test"."request_date" bigint, “test"."data" varchar)
>>
>> %phoenix
>> upsert into “test" values (1, '0.0.0.0', 1, 'data')
>>
>> %phoenix
>> select * from "test" limit 100
>>
>> returns no results.
>>
>> When I do the same thing through either sqlline-thin or sqlline (passing
>> in ZK with /hbase-unsecure) I am able to UPSERT and see the data when I
>> Select *.
>>
>> Am i missing some configuration or property when I am connecting from a
>> remote client?
>>
>> I have tried playing around with “phoenix.mutate.batchSize” setting it
>> to 1 and making sure phoenix.connection.auto.commit is “true”.
>>
>> I don’t see any errors or logs when I try to upsert through zeppelin.
>>
>> Thanks fro the help!
>>
>
Re: Upsert works using /sqlline-thin.py and /sqlline.py but not in
Zeppelin or other remote jdbc clients
Posted by James Taylor <ja...@apache.org>.
Are you committing the data after the upsert (either by turning on auto
commit on the connection or doing an explicit commit)?
On Fri, Nov 25, 2016 at 12:20 PM Matt L <ma...@gmail.com> wrote:
> Hello All!
>
> Through Zeppelin I am trying to insert data into a table created by
> Phoenix:
>
> %phoenix
> create table “test" (id bigint PRIMARY KEY, “test"."ip" varchar,
> “test"."request_date" bigint, “test"."data" varchar)
>
> %phoenix
> upsert into “test" values (1, '0.0.0.0', 1, 'data')
>
> %phoenix
> select * from "test" limit 100
>
> returns no results.
>
> When I do the same thing through either sqlline-thin or sqlline (passing
> in ZK with /hbase-unsecure) I am able to UPSERT and see the data when I
> Select *.
>
> Am i missing some configuration or property when I am connecting from a
> remote client?
>
> I have tried playing around with “phoenix.mutate.batchSize” setting it to
> 1 and making sure phoenix.connection.auto.commit is “true”.
>
> I don’t see any errors or logs when I try to upsert through zeppelin.
>
> Thanks fro the help!
>