You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by 刘春珲 <le...@gmail.com> on 2015/08/19 05:20:35 UTC

Fwd: how to check index's status?

Hi,
recently, one of my table's index does not work any more. So, I try to
rebuild it.

' alter index my_index on my_table rebuild'

after few hours rebuilding, index always does not work.

So, I want to know, How to check the index's status. and how to fix this
problem.

btw, I created a new table with the index, it does work.

Phoneix: 2.2.3
Hbase: 0.94.27
Hadoop: cdh4.5.0

Thanks

Re: how to check index's status?

Posted by 刘春珲 <le...@gmail.com>.
OK, thank you very much. I will update the whole cluster ASAP.

Thanks ,
Chunhui

2015-08-19 13:03 GMT+08:00 James Taylor <ja...@apache.org>:

> It won't run in the background, but the client thread is not doing much.
> You just need to make sure the timeouts are set high enough that it doesn't
> timeout. Phoenix is consistently getting faster and more stable, so you're
> always better off with the latest release. Same goes for HBase IMHO.
>
> Thanks,
> James
>
> On Tue, Aug 18, 2015 at 9:02 PM, 刘春珲 <le...@gmail.com> wrote:
>
>> If I update the phoenix to 3.3.1 and keep hbase on 0.94.27, the 'REBUID'
>> action will be a little quickly? or , it will run backgroud?
>>
>> 2015-08-19 11:49 GMT+08:00 James Taylor <ja...@apache.org>:
>>
>>> Other than upgrading, my advice would be:
>>> - set your time outs very high when rebuilding your index to prevent
>>> time outs (phoenix.query.timeoutMs on the client side and
>>> hbase.regionserver.lease.period on the server side).
>>> - query the system table (either SYSTEM."TABLE" or SYSTEM.CATALOG) to
>>> check on the status of an index:
>>> SELECT index_state FROM SYSTEM."TABLE" WHERE tenant_id is null AND
>>> table_schem=<your table schema> AND table_name=<your table name>
>>>
>>> Not sure if tenant_id was defined before or after 2.2.3, but just remove
>>> that clause if it's not defined.
>>>
>>> Thanks,
>>> James
>>>
>>> On Tue, Aug 18, 2015 at 8:38 PM, 刘春珲 <le...@gmail.com> wrote:
>>>
>>>> Agreed.
>>>>
>>>> But, It's a existing system. I have not more time to upgrade it. I need
>>>> to make it online asap, then I will update to a new version of Phoenix and
>>>> Hbase.
>>>>
>>>> Is there any suggestions?
>>>>
>>>> Thanks,
>>>> Chunhui
>>>>
>>>> 2015-08-19 11:32 GMT+08:00 James Taylor <ja...@apache.org>:
>>>>
>>>>> I'd recommend updating to a new version of Phoenix and HBase. The
>>>>> Phoenix 2.2.3 release is about 1.5 years old and there are probably more
>>>>> than 400 bug fixes between then and now (not to mention many performance
>>>>> improvements and tons of new features).
>>>>> Thanks,
>>>>> James
>>>>>
>>>>> On Tue, Aug 18, 2015 at 8:20 PM, 刘春珲 <le...@gmail.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>> recently, one of my table's index does not work any more. So, I try
>>>>>> to rebuild it.
>>>>>>
>>>>>> ' alter index my_index on my_table rebuild'
>>>>>>
>>>>>> after few hours rebuilding, index always does not work.
>>>>>>
>>>>>> So, I want to know, How to check the index's status. and how to fix
>>>>>> this problem.
>>>>>>
>>>>>> btw, I created a new table with the index, it does work.
>>>>>>
>>>>>> Phoneix: 2.2.3
>>>>>> Hbase: 0.94.27
>>>>>> Hadoop: cdh4.5.0
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: how to check index's status?

Posted by James Taylor <ja...@apache.org>.
It won't run in the background, but the client thread is not doing much.
You just need to make sure the timeouts are set high enough that it doesn't
timeout. Phoenix is consistently getting faster and more stable, so you're
always better off with the latest release. Same goes for HBase IMHO.

Thanks,
James

On Tue, Aug 18, 2015 at 9:02 PM, 刘春珲 <le...@gmail.com> wrote:

> If I update the phoenix to 3.3.1 and keep hbase on 0.94.27, the 'REBUID'
> action will be a little quickly? or , it will run backgroud?
>
> 2015-08-19 11:49 GMT+08:00 James Taylor <ja...@apache.org>:
>
>> Other than upgrading, my advice would be:
>> - set your time outs very high when rebuilding your index to prevent time
>> outs (phoenix.query.timeoutMs on the client side and
>> hbase.regionserver.lease.period on the server side).
>> - query the system table (either SYSTEM."TABLE" or SYSTEM.CATALOG) to
>> check on the status of an index:
>> SELECT index_state FROM SYSTEM."TABLE" WHERE tenant_id is null AND
>> table_schem=<your table schema> AND table_name=<your table name>
>>
>> Not sure if tenant_id was defined before or after 2.2.3, but just remove
>> that clause if it's not defined.
>>
>> Thanks,
>> James
>>
>> On Tue, Aug 18, 2015 at 8:38 PM, 刘春珲 <le...@gmail.com> wrote:
>>
>>> Agreed.
>>>
>>> But, It's a existing system. I have not more time to upgrade it. I need
>>> to make it online asap, then I will update to a new version of Phoenix and
>>> Hbase.
>>>
>>> Is there any suggestions?
>>>
>>> Thanks,
>>> Chunhui
>>>
>>> 2015-08-19 11:32 GMT+08:00 James Taylor <ja...@apache.org>:
>>>
>>>> I'd recommend updating to a new version of Phoenix and HBase. The
>>>> Phoenix 2.2.3 release is about 1.5 years old and there are probably more
>>>> than 400 bug fixes between then and now (not to mention many performance
>>>> improvements and tons of new features).
>>>> Thanks,
>>>> James
>>>>
>>>> On Tue, Aug 18, 2015 at 8:20 PM, 刘春珲 <le...@gmail.com> wrote:
>>>>
>>>>> Hi,
>>>>> recently, one of my table's index does not work any more. So, I try to
>>>>> rebuild it.
>>>>>
>>>>> ' alter index my_index on my_table rebuild'
>>>>>
>>>>> after few hours rebuilding, index always does not work.
>>>>>
>>>>> So, I want to know, How to check the index's status. and how to fix
>>>>> this problem.
>>>>>
>>>>> btw, I created a new table with the index, it does work.
>>>>>
>>>>> Phoneix: 2.2.3
>>>>> Hbase: 0.94.27
>>>>> Hadoop: cdh4.5.0
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>>
>>>
>>
>

Re: how to check index's status?

Posted by 刘春珲 <le...@gmail.com>.
If I update the phoenix to 3.3.1 and keep hbase on 0.94.27, the 'REBUID'
action will be a little quickly? or , it will run backgroud?

2015-08-19 11:49 GMT+08:00 James Taylor <ja...@apache.org>:

> Other than upgrading, my advice would be:
> - set your time outs very high when rebuilding your index to prevent time
> outs (phoenix.query.timeoutMs on the client side and
> hbase.regionserver.lease.period on the server side).
> - query the system table (either SYSTEM."TABLE" or SYSTEM.CATALOG) to
> check on the status of an index:
> SELECT index_state FROM SYSTEM."TABLE" WHERE tenant_id is null AND
> table_schem=<your table schema> AND table_name=<your table name>
>
> Not sure if tenant_id was defined before or after 2.2.3, but just remove
> that clause if it's not defined.
>
> Thanks,
> James
>
> On Tue, Aug 18, 2015 at 8:38 PM, 刘春珲 <le...@gmail.com> wrote:
>
>> Agreed.
>>
>> But, It's a existing system. I have not more time to upgrade it. I need
>> to make it online asap, then I will update to a new version of Phoenix and
>> Hbase.
>>
>> Is there any suggestions?
>>
>> Thanks,
>> Chunhui
>>
>> 2015-08-19 11:32 GMT+08:00 James Taylor <ja...@apache.org>:
>>
>>> I'd recommend updating to a new version of Phoenix and HBase. The
>>> Phoenix 2.2.3 release is about 1.5 years old and there are probably more
>>> than 400 bug fixes between then and now (not to mention many performance
>>> improvements and tons of new features).
>>> Thanks,
>>> James
>>>
>>> On Tue, Aug 18, 2015 at 8:20 PM, 刘春珲 <le...@gmail.com> wrote:
>>>
>>>> Hi,
>>>> recently, one of my table's index does not work any more. So, I try to
>>>> rebuild it.
>>>>
>>>> ' alter index my_index on my_table rebuild'
>>>>
>>>> after few hours rebuilding, index always does not work.
>>>>
>>>> So, I want to know, How to check the index's status. and how to fix
>>>> this problem.
>>>>
>>>> btw, I created a new table with the index, it does work.
>>>>
>>>> Phoneix: 2.2.3
>>>> Hbase: 0.94.27
>>>> Hadoop: cdh4.5.0
>>>>
>>>> Thanks
>>>>
>>>>
>>>
>>
>

Re: how to check index's status?

Posted by James Taylor <ja...@apache.org>.
Other than upgrading, my advice would be:
- set your time outs very high when rebuilding your index to prevent time
outs (phoenix.query.timeoutMs on the client side and
hbase.regionserver.lease.period on the server side).
- query the system table (either SYSTEM."TABLE" or SYSTEM.CATALOG) to check
on the status of an index:
SELECT index_state FROM SYSTEM."TABLE" WHERE tenant_id is null AND
table_schem=<your table schema> AND table_name=<your table name>

Not sure if tenant_id was defined before or after 2.2.3, but just remove
that clause if it's not defined.

Thanks,
James

On Tue, Aug 18, 2015 at 8:38 PM, 刘春珲 <le...@gmail.com> wrote:

> Agreed.
>
> But, It's a existing system. I have not more time to upgrade it. I need to
> make it online asap, then I will update to a new version of Phoenix and
> Hbase.
>
> Is there any suggestions?
>
> Thanks,
> Chunhui
>
> 2015-08-19 11:32 GMT+08:00 James Taylor <ja...@apache.org>:
>
>> I'd recommend updating to a new version of Phoenix and HBase. The Phoenix
>> 2.2.3 release is about 1.5 years old and there are probably more than 400
>> bug fixes between then and now (not to mention many performance
>> improvements and tons of new features).
>> Thanks,
>> James
>>
>> On Tue, Aug 18, 2015 at 8:20 PM, 刘春珲 <le...@gmail.com> wrote:
>>
>>> Hi,
>>> recently, one of my table's index does not work any more. So, I try to
>>> rebuild it.
>>>
>>> ' alter index my_index on my_table rebuild'
>>>
>>> after few hours rebuilding, index always does not work.
>>>
>>> So, I want to know, How to check the index's status. and how to fix this
>>> problem.
>>>
>>> btw, I created a new table with the index, it does work.
>>>
>>> Phoneix: 2.2.3
>>> Hbase: 0.94.27
>>> Hadoop: cdh4.5.0
>>>
>>> Thanks
>>>
>>>
>>
>

Re: how to check index's status?

Posted by 刘春珲 <le...@gmail.com>.
Agreed.

But, It's a existing system. I have not more time to upgrade it. I need to
make it online asap, then I will update to a new version of Phoenix and
Hbase.

Is there any suggestions?

Thanks,
Chunhui

2015-08-19 11:32 GMT+08:00 James Taylor <ja...@apache.org>:

> I'd recommend updating to a new version of Phoenix and HBase. The Phoenix
> 2.2.3 release is about 1.5 years old and there are probably more than 400
> bug fixes between then and now (not to mention many performance
> improvements and tons of new features).
> Thanks,
> James
>
> On Tue, Aug 18, 2015 at 8:20 PM, 刘春珲 <le...@gmail.com> wrote:
>
>> Hi,
>> recently, one of my table's index does not work any more. So, I try to
>> rebuild it.
>>
>> ' alter index my_index on my_table rebuild'
>>
>> after few hours rebuilding, index always does not work.
>>
>> So, I want to know, How to check the index's status. and how to fix this
>> problem.
>>
>> btw, I created a new table with the index, it does work.
>>
>> Phoneix: 2.2.3
>> Hbase: 0.94.27
>> Hadoop: cdh4.5.0
>>
>> Thanks
>>
>>
>

Re: how to check index's status?

Posted by James Taylor <ja...@apache.org>.
I'd recommend updating to a new version of Phoenix and HBase. The Phoenix
2.2.3 release is about 1.5 years old and there are probably more than 400
bug fixes between then and now (not to mention many performance
improvements and tons of new features).
Thanks,
James

On Tue, Aug 18, 2015 at 8:20 PM, 刘春珲 <le...@gmail.com> wrote:

> Hi,
> recently, one of my table's index does not work any more. So, I try to
> rebuild it.
>
> ' alter index my_index on my_table rebuild'
>
> after few hours rebuilding, index always does not work.
>
> So, I want to know, How to check the index's status. and how to fix this
> problem.
>
> btw, I created a new table with the index, it does work.
>
> Phoneix: 2.2.3
> Hbase: 0.94.27
> Hadoop: cdh4.5.0
>
> Thanks
>
>