2

We are facing weird issue with Phoenix & HBase. We have MR program that loads data in HBAse table . We use Phoenix for inserting and reading data from HBase. The issue is after data is loaded the count for particular table matches with what we got in extract . We point our API application and after that when we fire same select count statement on Hbase tables , the count is increased and we start seeing duplicate values. Did someone run into the consistency issue with data being pulled from Hbase via Phoenix? We have phoenix 4.7 version

Regards, Sagar

  • Have you tried to use the command `UPDATE STATISTICS my_table`? Have a look to this [link](https://phoenix.apache.org/update_statistics.html) – riccardo.cardin Sep 12 '16 at 14:59

4 Answers4

1

This is a bit of an old question, but is the only remotely-related Google result we found to a problem in our development environment.

HBase would return a count of x,000 rows for a table, while Phoenix would return (almost, but not quite) approximately double the results. Specific primary key queries always returned one row, but filtering on the leading row key parts sometimes (but not always) returned duplicates.

You can see the request for assistance on the Apache Phoenix User Mailing List here.

We eventually fixed this by dropping all the SYSTEM.* tables, simply because we narrowed it down to being the only possible problem with our setup apart from a bug in Phoenix itself. Restarting Apache HBase and Apache Phoenix then re-generated these tables.

After that, everything was fine :)

craig0990
  • 23
  • 4
1

I have also encountered same issue with Phoenix version 4.7 where Phoenix row count is inconsistent. I have ran update statistics on table, but that didn't helped to resolve issue. But issue is resolved by running compaction on the table with issue. After which row count was consistent.

1

Just delete the records from system.stats table in phoenix which delete inconsistent rows For example:

delete from system.stats where physical_name='CUST.PROFILE';

getting original row count in CUST.PROFILE

Kye
  • 4,279
  • 3
  • 21
  • 49
0

We were explicitly giving pre split while creating table in phoenix. After commenting that code, our issue got resolved.

Kalpesh
  • 694
  • 2
  • 8
  • 28