This is because you are using now() for created. If you used a different date then with TEST_ROW_TIMESTAMP1, the cell timestamp would be that date where as with TEST_ROW_TIMESTAMP2 it would be the server side time.
Also, which examples are broken on the page? On Thu, Mar 9, 2017 at 11:28 AM, Batyrshin Alexander <0x62...@gmail.com> wrote: > Hello, > Im trying to understand what excatly Phoenix row timestamp is > I created 2 tables for test: > > CREATE TABLE test_row_timestamp1( > id varchar NOT NULL, > created TIMESTAMP NOT NULL, > foo varchar, > CONSTRAINT PK PRIMARY KEY( id, created ROW_TIMESTAMP ) > ) > > CREATE TABLE test_row_timestamp2( > id varchar NOT NULL, > created TIMESTAMP NOT NULL, > foo varchar, > CONSTRAINT PK PRIMARY KEY( id, created ) > ) > > upsert into test_row_timestamp1 (id, created, foo) values ('1', now(), > 'bar'); > upsert into test_row_timestamp2 (id, created, foo) values ('1', now(), > 'bar'); > > And result is: > > hbase(main):004:0> scan 'TEST_ROW_TIMESTAMP1', { LIMIT=>10} > ROW > COLUMN+CELL > 1\x00\x80\x00\x01Z\xB4\x80:6\x00\x00\x00\x00 > column=0:FOO, timestamp=1489086986806, value=bar > 1\x00\x80\x00\x01Z\xB4\x80:6\x00\x00\x00\x00 > column=0:_0, timestamp=1489086986806, value=x > > hbase(main):005:0> scan 'TEST_ROW_TIMESTAMP2', { LIMIT=>10} > ROW > COLUMN+CELL > 1\x00\x80\x00\x01Z\xB4\x80M\xE6\x00\x00\x00\x00 > column=0:FOO, timestamp=1489086991848, value=bar > 1\x00\x80\x00\x01Z\xB4\x80M\xE6\x00\x00\x00\x00 > column=0:_0, timestamp=1489086991848, value=x > > Both tables has the same row key pattern id + 0x00 + timestamp > I expect that test_row_timestamp1 will utilise native hbase timestamp > that is part of "real" hbase key. > > > PS. Examples at https://phoenix.apache.org/rowtimestamp.html are broken >