phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emanuele Fumeo <>
Subject Phoenix on HBase - Adding data to HBase reflects on Phoenix table?
Date Wed, 11 May 2016 15:10:03 GMT
Hi all,

firstly I am a new HBase user and I would like to say hello to everyone and
to say thanks in advance to anyone that contributes to this mailing list.

Next, my question.
In case I create a Phoenix table over an existing HBase table, I know that
for each row Phoenix adds a new column marked with "_0".
That specific column (let's call it a "system" column) makes possible to
use SQL-like commands on HBase tables through Phoenix.

I tried to insert new rows to the table through the HBase shell using the
same table schema, it worked.
Then I tried to
  (1) perform a SELECT through Phoenix
  (2) scan the table through the HBase shell
Surprisingly (from my point of view) the SELECT statement returned all the
rows included in the table, even the ones added through the HBase shell.
However, a scan on the HBase shell revealed that no "system" column has
been added to the new rows!

So, my question is: am I looking at a very specific case?
Or the things just work like this:
  (1) When I have an existing HBase table, I create a new Phoenix table on
top to use SQL-like statements.
  (2) Phoenix creates "system" columns for each existing row in the table.
  (3) Whenever I add new rows through HBase (shell, API, etc.), the new
rows are automatically visible through Phoenix without needing Phoenix to
add "system" columns.
This behavior would also mean that after creating an HBase table, in case a
SQL-like interface would be useful, it is a very good idea to create a
Phoenix table on top of this HBase table as soon as possible (i.e. when the
table is almost empty).

Thank you in advance for any clarification!


View raw message