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
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
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.
I USE THIS commond
ALTER INDEX IF EXISTS SysActionLog_idx ON "SysActionLog" REBUILD;
the error is timeout. so i change phoeinx query sql timeout
but index current state is
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.
My HDP Version HDP-184.108.40.206-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 !
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.