phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Johnson <br...@brianjohnson.cc>
Subject Re: hbase truncate
Date Sat, 14 Mar 2015 21:38:38 GMT
0.98.5-hadoop2
It's possible we had some other issue that caused the problem, but we were only able to get
things working again by deleting both, recreating the hbase table and then recreating the
phoenix table. This was a table create in HBase that a phoenix table was added to, not a table
created directly by Phoenix. I'll try again to be sure.

On Mar 14, 2015, at 2:31 PM, James Taylor <jamestaylor@apache.org> wrote:

> Hi Brian,
> What version of HBase and Phoenix are you using? I tried the following
> on 4.3.0 with 0.98.9-hadoop2 and it worked fine for me:
> - From sqlline:
> create table FOO(k bigint primary key, v varchar);
> upsert into foo values(1,'a');
> 1 row affected (0.047 seconds)
> select * from foo;
> +------------------------------------------+------------------------------------------+
> |                    K                     |                    V
>               |
> +------------------------------------------+------------------------------------------+
> | 1                                        | a
>               |
> +------------------------------------------+------------------------------------------+
> 
> - From hbase shell
> truncate 'FOO'
> Truncating 'FOO' table (it may take a while):
> - Disabling table...
> - Truncating table...
> 0 row(s) in 10.8670 seconds
> 
> -From sqlline:
> upsert into foo values(1,'a');
> 1 row affected (0.005 seconds)
> 0: jdbc:phoenix:localhost> select * from foo;
> +------------------------------------------+------------------------------------------+
> |                    K                     |                    V
>               |
> +------------------------------------------+------------------------------------------+
> | 1                                        | a
>               |
> +------------------------------------------+------------------------------------------+
> 
> On Sat, Mar 14, 2015 at 9:20 AM, Brian Johnson <brian@brianjohnson.cc> wrote:
>> If we truncate an hbase table that has a phoenix table defined for it, we can no
longer query for new data added to that table through hbase. I know that truncate drops and
recreates the table, but why does that affect phoenix and is there some way to truncate that
doesn't require also redefining the phoenix table? Thanks.


Mime
View raw message