You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by Reid Chan <re...@outlook.com> on 2020/03/30 08:35:58 UTC

Select * gets 0 rows from index table

Hi team,

I encountered a problem that select * from index_table limit x got 0 rows, but underlying hbase has data (observed it from hbase shell > scan) and any queries went to index table would get 0 rows as well.

In the meantime the server had the following error message: "index.GlobalIndexChecker: Could not find the newly rebuilt index row with row key xxx for table yyy."

Looking forward to get some hints from experienced users and devs.

Thanks!

--------------------------

Best regards,
R.C



Re: Select * gets 0 rows from index table

Posted by Reid Chan <re...@outlook.com>.
Hi Swaroopa,


>> What is the empty column value in the index table (actual hbase table) for corresponding row?

B is a string (ip), C is a int(0 or 1). they are empty in index, but not in data table. (not sure whether I comprehend the question right.)


>> Did you use IndexTool to rebuild the index?

No.




--------------------------

Best regards,
R.C



________________________________________
From: swaroopa kadam <sw...@gmail.com>
Sent: 31 March 2020 00:38
To: user@phoenix.apache.org
Subject: Re: Select * gets 0 rows from index table

Hey Reid,

Some questions:
What is the empty column value in the index table (actual hbase table) for corresponding row?

Did you use IndexTool to rebuild the index?

Thanks


On Mon, Mar 30, 2020 at 9:22 AM Reid Chan <re...@outlook.com>> wrote:
Hey Josh! I'm glad you show up!

Version: 4.15-HBase-1.4

>> Did you `select * from index_table` verbatim?

Yes. Because I found that as long as the query goes to index (checked from EXPLAIN), the result must be empty. So I checked what're inside index by select * index.


>> Caveat about covered columns in a query

Data table is (A primary key, B, C, D, E, ...), index on B include C . B, C columns are nullable.


>> What's the state of the index?

Index_state shows "a". What does it mean?


>> * Did you use Phoenix to create the data+index tables and to populate the data in those tables?

Yes.



--------------------------

Best regards,
R.C



________________________________________
From: Josh Elser <el...@apache.org>>
Sent: 30 March 2020 23:42
To: user@phoenix.apache.org<ma...@phoenix.apache.org>
Subject: Re: Select * gets 0 rows from index table

Hey Reid!

Can you clarify a couple of things?

* What version of Phoenix?
* Did you `select * from index_table` verbatim? Most of the time, when
you have an index table, you'd be interacting with the data table which
(behind the scenes) goes to the index table.
* * Caveat about covered columns in a query
* What's the state of the index? Look at the INDEX_STATE column in
system.catalog for your index table.
* Did you use Phoenix to create the data+index tables and to populate
the data in those tables?

On 3/30/20 4:35 AM, Reid Chan wrote:
> Hi team,
>
> I encountered a problem that select * from index_table limit x got 0 rows, but underlying hbase has data (observed it from hbase shell > scan) and any queries went to index table would get 0 rows as well.
>
> In the meantime the server had the following error message: "index.GlobalIndexChecker: Could not find the newly rebuilt index row with row key xxx for table yyy."
>
> Looking forward to get some hints from experienced users and devs.
>
> Thanks!
>
> --------------------------
>
> Best regards,
> R.C
>
>
--

Swaroopa Kadam
about.me/swaroopa_kadam<https://about.me/swaroopa_kadam?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=gmail_api>


Re: Select * gets 0 rows from index table

Posted by swaroopa kadam <sw...@gmail.com>.
Hey Reid,

Some questions:
What is the empty column value in the index table (actual hbase table) for
corresponding row?

Did you use IndexTool to rebuild the index?

Thanks


On Mon, Mar 30, 2020 at 9:22 AM Reid Chan <re...@outlook.com> wrote:

> Hey Josh! I'm glad you show up!
>
> Version: 4.15-HBase-1.4
>
> >> Did you `select * from index_table` verbatim?
>
> Yes. Because I found that as long as the query goes to index (checked from
> EXPLAIN), the result must be empty. So I checked what're inside index by
> select * index.
>
>
> >> Caveat about covered columns in a query
>
> Data table is (A primary key, B, C, D, E, ...), index on B include C . B,
> C columns are nullable.
>
>
> >> What's the state of the index?
>
> Index_state shows "a". What does it mean?
>
>
> >> * Did you use Phoenix to create the data+index tables and to populate
> the data in those tables?
>
> Yes.
>
>
>
> --------------------------
>
> Best regards,
> R.C
>
>
>
> ________________________________________
> From: Josh Elser <el...@apache.org>
> Sent: 30 March 2020 23:42
> To: user@phoenix.apache.org
> Subject: Re: Select * gets 0 rows from index table
>
> Hey Reid!
>
> Can you clarify a couple of things?
>
> * What version of Phoenix?
> * Did you `select * from index_table` verbatim? Most of the time, when
> you have an index table, you'd be interacting with the data table which
> (behind the scenes) goes to the index table.
> * * Caveat about covered columns in a query
> * What's the state of the index? Look at the INDEX_STATE column in
> system.catalog for your index table.
> * Did you use Phoenix to create the data+index tables and to populate
> the data in those tables?
>
> On 3/30/20 4:35 AM, Reid Chan wrote:
> > Hi team,
> >
> > I encountered a problem that select * from index_table limit x got 0
> rows, but underlying hbase has data (observed it from hbase shell > scan)
> and any queries went to index table would get 0 rows as well.
> >
> > In the meantime the server had the following error message:
> "index.GlobalIndexChecker: Could not find the newly rebuilt index row with
> row key xxx for table yyy."
> >
> > Looking forward to get some hints from experienced users and devs.
> >
> > Thanks!
> >
> > --------------------------
> >
> > Best regards,
> > R.C
> >
> >
>
-- 


Swaroopa Kadam
[image: https://]about.me/swaroopa_kadam
<https://about.me/swaroopa_kadam?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=gmail_api>

Re: Select * gets 0 rows from index table

Posted by Reid Chan <re...@outlook.com>.
Hey Josh! I'm glad you show up!

Version: 4.15-HBase-1.4

>> Did you `select * from index_table` verbatim?

Yes. Because I found that as long as the query goes to index (checked from EXPLAIN), the result must be empty. So I checked what're inside index by select * index.


>> Caveat about covered columns in a query

Data table is (A primary key, B, C, D, E, ...), index on B include C . B, C columns are nullable.


>> What's the state of the index?

Index_state shows "a". What does it mean?


>> * Did you use Phoenix to create the data+index tables and to populate the data in those tables?

Yes.



--------------------------

Best regards,
R.C



________________________________________
From: Josh Elser <el...@apache.org>
Sent: 30 March 2020 23:42
To: user@phoenix.apache.org
Subject: Re: Select * gets 0 rows from index table

Hey Reid!

Can you clarify a couple of things?

* What version of Phoenix?
* Did you `select * from index_table` verbatim? Most of the time, when
you have an index table, you'd be interacting with the data table which
(behind the scenes) goes to the index table.
* * Caveat about covered columns in a query
* What's the state of the index? Look at the INDEX_STATE column in
system.catalog for your index table.
* Did you use Phoenix to create the data+index tables and to populate
the data in those tables?

On 3/30/20 4:35 AM, Reid Chan wrote:
> Hi team,
>
> I encountered a problem that select * from index_table limit x got 0 rows, but underlying hbase has data (observed it from hbase shell > scan) and any queries went to index table would get 0 rows as well.
>
> In the meantime the server had the following error message: "index.GlobalIndexChecker: Could not find the newly rebuilt index row with row key xxx for table yyy."
>
> Looking forward to get some hints from experienced users and devs.
>
> Thanks!
>
> --------------------------
>
> Best regards,
> R.C
>
>

Re: Select * gets 0 rows from index table

Posted by Josh Elser <el...@apache.org>.
Hey Reid!

Can you clarify a couple of things?

* What version of Phoenix?
* Did you `select * from index_table` verbatim? Most of the time, when 
you have an index table, you'd be interacting with the data table which 
(behind the scenes) goes to the index table.
* * Caveat about covered columns in a query
* What's the state of the index? Look at the INDEX_STATE column in 
system.catalog for your index table.
* Did you use Phoenix to create the data+index tables and to populate 
the data in those tables?

On 3/30/20 4:35 AM, Reid Chan wrote:
> Hi team,
> 
> I encountered a problem that select * from index_table limit x got 0 rows, but underlying hbase has data (observed it from hbase shell > scan) and any queries went to index table would get 0 rows as well.
> 
> In the meantime the server had the following error message: "index.GlobalIndexChecker: Could not find the newly rebuilt index row with row key xxx for table yyy."
> 
> Looking forward to get some hints from experienced users and devs.
> 
> Thanks!
> 
> --------------------------
> 
> Best regards,
> R.C
> 
>