You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by NaHeon Kim <ho...@gmail.com> on 2017/02/26 05:04:13 UTC
Cannot upsert row_timestamp value
Hi all,
UPSERT into a table with ROW_TIMESTAMP column is not possible.
I'm using phoenix-4.8.0-hbase-1.1.
Table Schema:
create table my_table (
obj_id varchar(20) not null,
create_dt timestamp not null,
keyword varchar(100) not null,
count integer
constraint pk primary key (obj_id, create_dt row_timestamp, keyword)
);
1) Spark Integration
No rows are inserted. No errors.
2) sqlline.py - timestamp column is in a query
No rows are inserted.
upsert into my_table (obj_id, create_dt, keyword, count)
values ('objid', '2017-02-26 13:48:00', 'k', 100);
3) sqlline.py - timestamp column is not in a query
This throws an exception:
> java.lang.ArrayIndexOutOfBoundsException: 8
> at
> org.apache.phoenix.execute.MutationState.getNewRowKeyWithRowTimestamp(MutationState.java:548)
> at
> org.apache.phoenix.execute.MutationState.generateMutations(MutationState.java:627)
> at
> org.apache.phoenix.execute.MutationState.addRowMutations(MutationState.java:566)
> at org.apache.phoenix.execute.MutationState.send(MutationState.java:908)
> at org.apache.phoenix.execute.MutationState.send(MutationState.java:1329)
> at org.apache.phoenix.execute.MutationState.commit(MutationState.java:1161)
> at
> org.apache.phoenix.jdbc.PhoenixConnection$3.call(PhoenixConnection.java:529)
upsert into my_table (obj_id, keyword, count)
values ('objid', 'k', 100);
Everything works well without row_timestamp.
Thanks in advance! : )
Re: Cannot upsert row_timestamp value
Posted by longxd <xi...@xyleminc.com>.
Hi,
I got the same error when upserting row_timestamp value.
I'm using phoenix-4.7.0
It seems that you find a solution, but I did not see anything useful
following the link you replied to.
Could you let me know how you solve the problem?
Thanks
Xindian
--
View this message in context: http://apache-phoenix-user-list.1124778.n5.nabble.com/Cannot-upsert-row-timestamp-value-tp3218p3534.html
Sent from the Apache Phoenix User List mailing list archive at Nabble.com.
Re: Cannot upsert row_timestamp value
Posted by NaHeon Kim <ho...@gmail.com>.
Thanks alot!!! It works. : )
Rdgards,
NaHeon
2017-02-26 15:33 GMT+09:00 Dhaval Modi <dh...@gmail.com>:
> Hi NaHeon Kim,
>
> Please refer to mailing list:
> https://lists.apache.org/thread.html/fb747661f535b0a407bf38e6b961a2
> c68634815189c80a7d612366b1@%3Cuser.phoenix.apache.org%3E
>
>
> I also faced similar issue.
>
>
> Regards,
> Dhaval Modi
> dhavalmodi24@gmail.com
>
> On 26 February 2017 at 10:34, NaHeon Kim <ho...@gmail.com> wrote:
>
>> Hi all,
>>
>> UPSERT into a table with ROW_TIMESTAMP column is not possible.
>> I'm using phoenix-4.8.0-hbase-1.1.
>>
>> Table Schema:
>>
>> create table my_table (
>> obj_id varchar(20) not null,
>> create_dt timestamp not null,
>> keyword varchar(100) not null,
>> count integer
>> constraint pk primary key (obj_id, create_dt row_timestamp, keyword)
>> );
>>
>>
>> 1) Spark Integration
>> No rows are inserted. No errors.
>>
>> 2) sqlline.py - timestamp column is in a query
>> No rows are inserted.
>>
>> upsert into my_table (obj_id, create_dt, keyword, count)
>> values ('objid', '2017-02-26 13:48:00', 'k', 100);
>> 3) sqlline.py - timestamp column is not in a query
>> This throws an exception:
>>
>>> java.lang.ArrayIndexOutOfBoundsException: 8
>>> at org.apache.phoenix.execute.MutationState.getNewRowKeyWithRow
>>> Timestamp(MutationState.java:548)
>>> at org.apache.phoenix.execute.MutationState.generateMutations(M
>>> utationState.java:627)
>>> at org.apache.phoenix.execute.MutationState.addRowMutations(Mut
>>> ationState.java:566)
>>> at org.apache.phoenix.execute.MutationState.send(MutationState.java:908)
>>> at org.apache.phoenix.execute.MutationState.send(MutationState.
>>> java:1329)
>>> at org.apache.phoenix.execute.MutationState.commit(MutationStat
>>> e.java:1161)
>>> at org.apache.phoenix.jdbc.PhoenixConnection$3.call(PhoenixConn
>>> ection.java:529)
>>
>>
>> upsert into my_table (obj_id, keyword, count)
>> values ('objid', 'k', 100);
>>
>> Everything works well without row_timestamp.
>> Thanks in advance! : )
>>
>
>
Re: Cannot upsert row_timestamp value
Posted by Dhaval Modi <dh...@gmail.com>.
Hi NaHeon Kim,
Please refer to mailing list:
https://lists.apache.org/thread.html/fb747661f535b0a407bf38e6b961a2c68634815189c80a7d612366b1@%3Cuser.phoenix.apache.org%3E
I also faced similar issue.
Regards,
Dhaval Modi
dhavalmodi24@gmail.com
On 26 February 2017 at 10:34, NaHeon Kim <ho...@gmail.com> wrote:
> Hi all,
>
> UPSERT into a table with ROW_TIMESTAMP column is not possible.
> I'm using phoenix-4.8.0-hbase-1.1.
>
> Table Schema:
>
> create table my_table (
> obj_id varchar(20) not null,
> create_dt timestamp not null,
> keyword varchar(100) not null,
> count integer
> constraint pk primary key (obj_id, create_dt row_timestamp, keyword)
> );
>
>
> 1) Spark Integration
> No rows are inserted. No errors.
>
> 2) sqlline.py - timestamp column is in a query
> No rows are inserted.
>
> upsert into my_table (obj_id, create_dt, keyword, count)
> values ('objid', '2017-02-26 13:48:00', 'k', 100);
> 3) sqlline.py - timestamp column is not in a query
> This throws an exception:
>
>> java.lang.ArrayIndexOutOfBoundsException: 8
>> at org.apache.phoenix.execute.MutationState.getNewRowKeyWithRowTimestamp(
>> MutationState.java:548)
>> at org.apache.phoenix.execute.MutationState.generateMutations(
>> MutationState.java:627)
>> at org.apache.phoenix.execute.MutationState.addRowMutations(
>> MutationState.java:566)
>> at org.apache.phoenix.execute.MutationState.send(MutationState.java:908)
>> at org.apache.phoenix.execute.MutationState.send(MutationState.java:1329)
>> at org.apache.phoenix.execute.MutationState.commit(
>> MutationState.java:1161)
>> at org.apache.phoenix.jdbc.PhoenixConnection$3.call(
>> PhoenixConnection.java:529)
>
>
> upsert into my_table (obj_id, keyword, count)
> values ('objid', 'k', 100);
>
> Everything works well without row_timestamp.
> Thanks in advance! : )
>