In Phoenix4.0, global secondary index will be disabled when index update fails because the data integrity between data & index has to been maintained.
You can manually reenable the index by using alter index to rebuild the index OR upgrade to the latest version(PHOENIX-950 improves this situation a little bit). In addition, local secondary index, which in many cases are better than the global one, is supported since 4.2
From: Jude K <firstname.lastname@example.org>
Reply-To: "email@example.com" <firstname.lastname@example.org>
Date: Saturday, February 28, 2015 at 7:07 PM
To: "email@example.com" <firstname.lastname@example.org>
Subject: Phoenix Index Disabled
Been stuck on this issue for few hours. Hoping someone can shed some light.
OS: Centos-6Phoenix Client: phoenix-126.96.36.199.1.5.0-695-client.jarPhoenix Core: phoenix-core-188.8.131.52.1.5.0-695.jarHbase Version: Version 0.98.0.2.1.5.0-695-hadoop2, 6 RSHbase RS Java Heap : 6 Gb
1) Created a 1 column family, 6 column Phoenix table2) Have an app that is continually streaming data into the new Phoenix table3) Created a Phoenix index on two of the columns of the new Phoenix.4) Compare newly created Phoenix index count to row count in Hbase. They agree.5) Wait a few minutes, do another comparison between Phoenix index count and Hbase row count. Row count properly increments, but Phoenix index count shows same value.6) Wait some more and get exact same outcome as in #5.7) Check a RS log file, and see that the Phoenix index is "DISABLED" because it can not write to a particular region.
OK.. what would cause the Phoenix index to become "DISABLED", especially since there were no issues during index creation? Is there a configuration variable that needs to be modified? Is there a suitable workaround beside developing a bash script to alter the index and rebuild.