Hbase-indexer常用命令
1. 启动hbase-indexer服务
./bin/hbase-indexer server -z s1:2181,s2:2181,s3:2181> /work/hbase-indexer.log
参数说明:
-z: hbase-indexer要用到的zooKeeper的链接信息
/work/hbase-indexer.log 输出日志文件路径
- 添加索引
./hbase-indexer add-indexer
-n indexer_vip
-c /opt/lucidworks-hdpsearch/hbase-indexer/demo/vip_indexer_mapper.xml
-cp solr.zk=s1:2181,s2:2181,s3:2181,s4:2181,s5:2181/solr
-cp solr.collection=collection_vip
参数说明:
-n 要创建的索引名称参数,indexer_vip 索引名称
-c 索引映射文件路径
solr.zk zooKeeper 链接信息
solr.collection 索引映射的集合信息,collection_vip 集合名称
- 删除索引
./hbase-indexer delete-indexer --name 'indexer_vip'
参数说明
delete-indexer 动作命令
indexer_vip 要被删除的索引名称
4. 查看所有索引清单
./hbase-indexer list-indexers -dump
参数说明
list-indexers 动作命令
-dump 添加此参数可以显示索引的配置详情