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 <[email protected]> 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.