Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Phoenix index becom unavaiable

Solved Go to solution

Phoenix index becom unavaiable

New Contributor

hello everyone,

My Phoenix's one index Become unavailable. Before can normal work .

but now other is normal.Details are as follows。x

My phoenix table name is "SysAction".

I Create index sql is create index SysActionLog_idx on "SysActionLog" ("CreateTime", "ModuleCode","AppCode","Invoker","ClientIP")

I execute sql with phoenix shell but find can't use phoenix index. How to solve this problem ?

I dont want to rebulid index because rebulid index may be shut down my hbase cluster

9434-temp.png

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Phoenix index becom unavaiable

There was bug with one api(PhoenixRuntime#getTable()) in HDP 2.2 where case sensitive tables are not handled properly, that's why automatic rebuilding is not happening to bring your disabled index up to date and make it active for use. Now you have two options either you can move to later version of HDP 2.3( or later ) or you can drop the current index and create ASYNC index on your table (as your table is large) and run IndexTool to create a index data for you by using map reduce job.

Refer for creating ASYNC index and running IndexTool:- http://phoenix.apache.org/secondary_indexing.html

14 REPLIES 14

Re: Phoenix index becom unavaiable

Super Guru

what is your primary key and is the primary key in the where clause? did you create local or global index?

Re: Phoenix index becom unavaiable

New Contributor

my primary key is "RowKey" IS NOT IN WHERE CLAUSE

Re: Phoenix index becom unavaiable

Can you first check whether your index is active or not.

https://community.hortonworks.com/articles/58818/phoenix-index-lifecycle.html

Re: Phoenix index becom unavaiable

New Contributor

Thanks.

I Find my table's index state is x ,How I can change this index state? rebuild it ?

9485-无标题.png

Re: Phoenix index becom unavaiable

New Contributor

Thanks.

I Find my table's index state is x ,How I can change this index state? rebuild it ?

9486-无标题.png

Re: Phoenix index becom unavaiable

@pan bocun

From the snapshot you have provided writing to index got failed at timestamp 1478692767291 that's why the indexes got disabled. They will be automatically rebuild by the Phoenix in the background. If you see the index failure taking more time then you can drop the index and recreate it.

Re: Phoenix index becom unavaiable

New Contributor

I USE THIS commond

ALTER INDEX IF EXISTS SysActionLog_idx ON "SysActionLog" REBUILD;

but error

the error is timeout. so i change phoeinx query sql timeout

but index current state is

9523-002.png

i execute rebuild command but the other error occured,I cant drip index ,because my cluster is not strong ,cant create index success

this table is 800G.

9525-003.png

Highlighted

Re: Phoenix index becom unavaiable

New Contributor

My HDP Version HDP-2.4.2.0-258, I diont change config about phoenix default paramater

but I didn't find my index is rebuilded automatically because this index'state is always rebuild(b)

why? Thanks !

Re: Phoenix index becom unavaiable

The index rebuild does full table scan of data table there is a chance of timeout. Can you try increasing the timeout values of below properties and retry rebuilding index. Once you add/change the configurations then you need to export HBASE_CONF_DIR or HBASE_CONF_PATH with directly having hbase-site.xml.

hbase.client.scanner.timeout.period=1200000 hbase.rpc.timeout=1200000 hbase.regionserver.lease.period = 1200000 phoenix.query.timeoutMs = 600000