版本
HBase:2.0.5
Phoenix :5.0.0
在Phoenix建立二级索引
CREATE INDEX index_6 on "my_test6"("student"."name2") include("name1");
报错如下:
原因:
hbase可变索引默认没有开启
解决方案:
在 每个regionServer的hbase-site.xml添加以下语句:
<property>
<name>hbase.regionserver.wal.codec</name>
<value>org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec</value>
</property>
重启hbase即可
再重新建索引,可以看到索引已经成功建立并且使用上