Here is example:
CREATE TABLE IF NOT EXISTS test (
k VARCHAR NOT NULL,
v VARCHAR,
CONSTRAINT my_pk PRIMARY KEY (k)
);
0: jdbc:phoenix:> upsert into test(k,v) values ('1', 'a');
1 row affected (0.042 seconds)
0: jdbc:phoenix:> select * from test;
+----+----+
| K | V |
+----+----+
| 1 | a |
+----+----+
Then:
hbase(main):014:0> put 'TEST', '1', '0:V', 'b'
0 row(s) in 0.0100 seconds
Result in phoenix will be available after ~ 3-5 seconds:
0: jdbc:phoenix:> select * from test;
+----+----+
| K | V |
+----+----+
| 1 | a |
+----+----+
1 row selected (0.015 seconds)
... 5 seconds later
0: jdbc:phoenix:> select * from test;
+----+----+
| K | V |
+----+----+
| 1 | b |
+----+----+
1 row selected (0.026 seconds)
> On 24 Aug 2017, at 21:38, Batyrshin Alexander <[email protected]> wrote:
>
> Hello,
>
> How to decrease or even eliminate delay between direct HBase put (for example
> from HBase shell) and SELECT from Phoenix?
>
> My table has only 1 VERSION and do not use any block cache ( {NAME =>
> 'invoice', COMPRESSION => 'LZO', BLOCKCACHE => 'false'} ), so i do not
> understand where previous value for SELECT come from.