我尝试创建参考https://phoenix.apache.org/secondary_indexing.html的hbase索引异步,并且无法通过indexTool激活索引。
HBase版本= 2.0.0, 凤凰版= phoenix-5.0.0
```sql
drop table t_test;
-- create table
CREATE TABLE IF NOT EXISTS t_test(
ysk_id UNSIGNED_LONG NOT NULL,
file_id UNSIGNED_LONG NOT NULL,
file_name VARCHAR,
file_code VARCHAR,
CONSTRAINT rowkery PRIMARY KEY (ysk_id,file_id)
) VERSIONS=1
,DISABLE_WAL=true
,UPDATE_CACHE_FREQUENCY=600000
;
-- create index async
DROP INDEX idx_file_name ON t_test;
create index idx_file_name on t_test(ysk_id,file_name) include (file_code) async;
-- insert test data
upsert into t_test(ysk_id,file_id,file_name,file_code)values (1,1,'dir1','code1');
upsert into t_test(ysk_id,file_id,file_name,file_code)values (1,2,'dir2','code2');
upsert into t_test(ysk_id,file_id,file_name,file_code)values (1,3,'dir3','code3');
-- create index by indextool
${HBASE_HOME}/bin/hbase org.apache.phoenix.mapreduce.index.IndexTool --schema default --data-table T_TEST --index-table IDX_FILE_NAME --output-path /tmp/export
-- test index
explain select /*+ INDEX(t_test idx_file_name) */ file_id,file_code from t_test where file_name like 'dir%';
```
-通过indextool创建索引 [developer @ hz21-vm-tspk1-v129〜] $ sudo -u hadoop $ {HBASE_HOME} / bin / hbase org.apache.phoenix.mapreduce.index.IndexTool -runfg --schema默认--data-table T_TEST-索引表IDX_FILE_NAME-输出路径/ data / export -direct -runfg SLF4J:类路径包含多个SLF4J绑定。 SLF4J:在[jar:file:/lianlian/uapp/hbase/lib/phoenix-5.0.0-HBase-2.0-client.jar!/org/slf4j/impl/StaticLoggerBinder.class]中发现绑定 SLF4J:在[jar:file:/lianlian/uapp/hbase/lib/phoenix-5.0.0-HBase-2.0-hive.jar!/org/slf4j/impl/StaticLoggerBinder.class]中找到绑定 SLF4J:在[jar:file:/lianlian/uapp/hbase/lib/phoenix-5.0.0-HBase-2.0-pig.jar!/org/slf4j/impl/StaticLoggerBinder.class]中发现绑定 SLF4J:在[jar:file:/lianlian/uapp/hbase/lib/phoenix-5.0.0-HBase-2.0-thin-client.jar!/org/slf4j/impl/StaticLoggerBinder.class]中发现绑定 SLF4J:在[jar:file:/lianlian/uapp/hbase/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]中找到绑定 SLF4J:参见http://www.slf4j.org/codes.html#multiple_bindings进行解释。
no error log and also do not active the phoenix index
在凤凰查询服务器中,运行!tables
结果INDEX_STATE
正在建造,永远建造...
SOS ... 可能是什么原因以及任何解决方法?